Commit a84ecd14 authored by matzakos's avatar matzakos

Merge with branch NR_F1C_F1U_extensions

parents 55476b17 c739058c
......@@ -24,6 +24,7 @@
// Location of the python executor node shall be in the same subnet as the others servers
def pythonExecutor = params.pythonExecutor
def DataBaseHost = params.DataBaseHost
// Location of the test XML file to be run
def testXMLFile = params.pythonTestXmlFile
......@@ -45,10 +46,12 @@ def eNB_CommitID
def eNB_AllowMergeRequestProcess
def eNB_TargetBranch
//Status fed to the database
def StatusForDb = ""
pipeline {
agent {
label pythonExecutor
}
agent {label pythonExecutor}
options {
disableConcurrentBuilds()
ansiColor('xterm')
......@@ -270,9 +273,18 @@ pipeline {
}
}
}
stage ("SQL Collect"){
agent {label DataBaseHost}
steps {
script {
if (currentBuild.result=='FAILURE') {StatusForDb = 'FAIL'} else {StatusForDb = 'PASS'}
sh "python3 /home/oaicicd/mysql/sql_connect.py ${JOB_NAME} ${params.eNB_MR} ${params.eNB_Branch} ${env.BUILD_ID} ${env.BUILD_URL} ${StatusForDb} ''"
}
}
}
}
}
}
}
post {
always {
......
......@@ -286,7 +286,7 @@ class gDashboard:
def main():
my_gDashboard=gDashboard("/home/oaicicd/remi/creds.json", 'OAI RAN Dashboard', 'MR Status')
my_gDashboard=gDashboard("/opt/dashboard/g_creds.json", 'OAI RAN Dashboard', 'MR Status')
cmd="""curl --silent "https://gitlab.eurecom.fr/api/v4/projects/oai%2Fopenairinterface5g/merge_requests?state=opened&per_page=100" """
my_gDashboard.fetchData(cmd)
my_gDashboard.gBuild("MR Status")
......
......@@ -22,7 +22,7 @@
-->
<testCaseList>
<htmlTabRef>rfsim-4glte</htmlTabRef>
<htmlTabName>Testing 4G LTE RF sim in containers</htmlTabName>
<htmlTabName>Testing 4G LTE RF sim - Monolithic eNB</htmlTabName>
<htmlTabIcon>wrench</htmlTabIcon>
<TestCaseRequestedList>
100011
......
......@@ -22,7 +22,7 @@
-->
<testCaseList>
<htmlTabRef>rfsim-4glte-down</htmlTabRef>
<htmlTabName>CleanUp 4G RF</htmlTabName>
<htmlTabName>CleanUp 4G RF - Monolithic eNB</htmlTabName>
<htmlTabIcon>trash</htmlTabIcon>
<TestCaseRequestedList>
100011
......
......@@ -22,7 +22,7 @@
-->
<testCaseList>
<htmlTabRef>rfsim-5gnr-f1</htmlTabRef>
<htmlTabName>Testing 5G NR RF sim in containers (CU/DU)</htmlTabName>
<htmlTabName>Testing 5G NR RF sim in containers - CU-DU F1 split</htmlTabName>
<htmlTabIcon>wrench</htmlTabIcon>
<TestCaseRequestedList>
100021
......
......@@ -22,7 +22,7 @@
-->
<testCaseList>
<htmlTabRef>rfsim-5gnr-down-f1</htmlTabRef>
<htmlTabName>CleanUp 5G RF</htmlTabName>
<htmlTabName>CleanUp 5G RF - CU-DU F1 split</htmlTabName>
<htmlTabIcon>trash</htmlTabIcon>
<TestCaseRequestedList>
100022
......
......@@ -22,7 +22,7 @@
-->
<testCaseList>
<htmlTabRef>rfsim-5gnr</htmlTabRef>
<htmlTabName>Testing 5G NR RF sim in containers</htmlTabName>
<htmlTabName>Testing 5G NR RF sim - Monolithic gNB</htmlTabName>
<htmlTabIcon>wrench</htmlTabIcon>
<TestCaseRequestedList>
100001
......
......@@ -22,7 +22,7 @@
-->
<testCaseList>
<htmlTabRef>rfsim-5gnr-down</htmlTabRef>
<htmlTabName>CleanUp 5G RF</htmlTabName>
<htmlTabName>CleanUp 5G RF - Monolithic gNB</htmlTabName>
<htmlTabIcon>trash</htmlTabIcon>
<TestCaseRequestedList>
100002
......
......@@ -77,7 +77,7 @@ cd cmake_targets/
./build_oai -I -w USRP --eNB --UE --nrUE --gNB
```
- The `-I` option is to install pre-requisites, you only need it the first time you build the softmodem or when some oai dependencies have changed.
- The `-I` option is to install pre-requisites, you only need it the first time you build the softmodem or when some oai dependencies have changed. Note: for Ubuntu 20 use cmake_targets/install_external_packages.ubuntu20 instead!
- The `-w` option is to select the radio head support you want to include in your build. Radio head support is provided via a shared library, which is called the "oai device" The build script creates a soft link from `liboai_device.so` to the true device which will be used at run-time (here the USRP one,`liboai_usrpdevif.so` . USRP is the only hardware tested today in the Continuous Integration process. The RF simulator[RF simulator](../targets/ARCH/rfsimulator/README.md) is implemented as a specific device replacing RF hardware, it can be specifically built using `-w SIMU` option, but is also built during any softmodem build.
- `--eNB` is to build the `lte-softmodem` executable and all required shared libraries
- `--gNB` is to build the `nr-softmodem` executable and all required shared libraries
......
This diff is collapsed.
This diff is collapsed.
......@@ -147,14 +147,6 @@ static void UE_synch(void *arg) {
if (UE->UE_scan == 0) {
#ifdef FR2_TEST
// Overwrite DL frequency (for FR2 testing)
if (downlink_frequency[0][0]!=0){
UE->frame_parms.dl_CarrierFreq = downlink_frequency[0][0];
UE->frame_parms.ul_CarrierFreq = downlink_frequency[0][0];
}
#endif
for (i=0; i<openair0_cfg[UE->rf_map.card].rx_num_channels; i++) {
LOG_I( PHY, "[SCHED][UE] Check absolute frequency DL %f, UL %f (RF card %d, oai_exit %d, channel %d, rx_num_channels %d)\n",
......@@ -220,7 +212,7 @@ static void UE_synch(void *arg) {
LOG_I(PHY, "[UE thread Synch] Running Initial Synch (mode %d)\n",UE->mode);
uint64_t dl_carrier, ul_carrier;
nr_get_carrier_frequencies(&UE->frame_parms, &dl_carrier, &ul_carrier);
nr_get_carrier_frequencies(UE, &dl_carrier, &ul_carrier);
if (nr_initial_sync(&syncD->proc, UE, 2, get_softmodem_params()->sa, get_nrUE_params()->nr_dlsch_parallel) == 0) {
freq_offset = UE->common_vars.freq_offset; // frequency offset computed with pss in initial sync
......
......@@ -368,7 +368,7 @@ void init_openair0(void) {
openair0_cfg[card].rx_num_channels,
duplex_mode[openair0_cfg[card].duplex_mode]);
nr_get_carrier_frequencies(frame_parms, &dl_carrier, &ul_carrier);
nr_get_carrier_frequencies(PHY_vars_UE_g[0][0], &dl_carrier, &ul_carrier);
nr_rf_card_config_freq(&openair0_cfg[card], ul_carrier, dl_carrier, freq_off);
nr_rf_card_config_gain(&openair0_cfg[card], rx_gain_off);
......@@ -425,7 +425,7 @@ int main( int argc, char **argv ) {
get_options (); //Command-line options specific for NRUE
get_common_options(SOFTMODEM_5GUE_BIT );
get_common_options(SOFTMODEM_5GUE_BIT);
init_tpools(nrUE_params.nr_dlsch_parallel);
CONFIG_CLEARRTFLAG(CONFIG_NOEXITONHELP);
#if T_TRACER
......@@ -495,14 +495,6 @@ int main( int argc, char **argv ) {
init_timeshift_rotation(&UE[CC_id]->frame_parms);
init_nr_ue_vars(UE[CC_id], 0, abstraction_flag);
#ifdef FR2_TEST
// Overwrite DL frequency (for FR2 testing)
if (downlink_frequency[0][0]!=0){
frame_parms[CC_id]->dl_CarrierFreq = downlink_frequency[0][0];
if (frame_parms[CC_id]->frame_type == TDD)
frame_parms[CC_id]->ul_CarrierFreq = downlink_frequency[0][0];
}
#endif
}
init_openair0();
......
......@@ -7,7 +7,8 @@
#define CONFIG_HLP_IF_FREQ "IF frequency for RF, if needed"
#define CONFIG_HLP_IF_FREQ_OFF "UL IF frequency offset for RF, if needed"
#define CONFIG_HLP_DLSCH_PARA "number of threads for dlsch processing 0 for no parallelization\n"
#define CONFIG_HLP_OFFSET_DIV "Divisor for computing OFDM symbol offset in Rx chain (num samples in CP/<the value>). Default value is 8. To set the sample offset to 0, set this value ~ 10e6\n"
/***************************************************************************************************************************************/
......@@ -62,6 +63,8 @@
{"r" , CONFIG_HLP_PRB_SA, 0, iptr:&(fp->N_RB_DL), defintval:106, TYPE_UINT, 0}, \
{"s" , CONFIG_HLP_SSC, 0, u16ptr:&(fp->ssb_start_subcarrier), defintval:516, TYPE_UINT16,0}, \
{"T" , CONFIG_HLP_TDD, PARAMFLAG_BOOL, iptr:&tddflag, defintval:0, TYPE_INT, 0}, \
{"if_freq" , CONFIG_HLP_IF_FREQ, 0, u64ptr:&(UE->if_freq), defuintval:0, TYPE_UINT64,0}, \
{"if_freq_off" , CONFIG_HLP_IF_FREQ_OFF, 0, iptr:&(UE->if_freq_off), defuintval:0, TYPE_INT, 0}, \
{"do-prb-interpolation", CONFIG_HLP_PRBINTER, PARAMFLAG_BOOL, iptr:&(UE->prb_interpolation), defintval:0, TYPE_INT, 0}, \
{"ue-timing-correction-disable", CONFIG_HLP_DISABLETIMECORR, PARAMFLAG_BOOL, iptr:&(UE->no_timing_correction), defintval:0, TYPE_INT, 0}, \
}
......
......@@ -1466,7 +1466,7 @@ int nr_initial_sync(UE_nr_rxtx_proc_t *proc,
@param dl_Carrier Pointer to DL carrier to be set
@param ul_Carrier Pointer to UL carrier to be set
*/
void nr_get_carrier_frequencies(NR_DL_FRAME_PARMS *fp,
void nr_get_carrier_frequencies(PHY_VARS_NR_UE *ue,
uint64_t *dl_Carrier,
uint64_t *ul_Carrier);
......
......@@ -33,19 +33,17 @@
#include "nr_transport_proto_ue.h"
#include "executables/softmodem-common.h"
void nr_get_carrier_frequencies(NR_DL_FRAME_PARMS *fp, uint64_t *dl_carrier, uint64_t *ul_carrier){
void nr_get_carrier_frequencies(PHY_VARS_NR_UE *ue, uint64_t *dl_carrier, uint64_t *ul_carrier){
if (get_softmodem_params()->phy_test==1 || get_softmodem_params()->do_ra==1 || !downlink_frequency[0][0]) {
NR_DL_FRAME_PARMS *fp = &ue->frame_parms;
if (ue->if_freq!=0) {
*dl_carrier = ue->if_freq;
*ul_carrier = *dl_carrier + ue->if_freq_off;
}
else{
*dl_carrier = fp->dl_CarrierFreq;
} else {
*dl_carrier = downlink_frequency[0][0];
*ul_carrier = fp->ul_CarrierFreq;
}
if (uplink_frequency_offset[0][0])
*ul_carrier = *dl_carrier + uplink_frequency_offset[0][0];
else
*ul_carrier = *dl_carrier + fp->ul_CarrierFreq - fp->dl_CarrierFreq;
}
......
......@@ -767,6 +767,10 @@ typedef struct {
int UE_scan_carrier;
/// \brief Indicator that UE should enable estimation and compensation of frequency offset
int UE_fo_compensation;
/// IF frequency for RF
uint64_t if_freq;
/// UL IF frequency offset for RF
int if_freq_off;
/// \brief Indicator that UE is synchronized to a gNB
int is_synchronized;
/// \brief Indicator that UE lost frame synchronization
......
......@@ -38,6 +38,7 @@
#define F1AP_COMMON_H_
#include "openairinterface5g_limits.h"
#include <openair2/RRC/NR/MESSAGES/asn1_msg.h>
#define F1AP_UE_IDENTIFIER_NUMBER 3
#define F1AP_TRANSACTION_IDENTIFIER_NUMBER 3
......@@ -479,10 +480,6 @@ static inline f1ap_setup_req_t *f1ap_req(F1_t isCu, instance_t instanceP) {
return &getCxt(isCu, instanceP)->setupReq;
}
#define asn1cCalloc(VaR, TyPe, lOcPtr) TyPe *lOcPtr=VaR=(TyPe*) calloc(1,sizeof(TyPe));
#define asn1cCallocOne(VaR, TyPe, VaLue) VaR=(TyPe*) calloc(1,sizeof(TyPe)); *VaR=VaLue;
#define asn1cSequenceAdd(VaR, TyPe, lOcPtr) TyPe *lOcPtr=(TyPe*) calloc(1,sizeof(TyPe)); ASN_SEQUENCE_ADD(&VaR,lOcPtr);
#define TASK_F1APP f1ap_req(false, instance)->cell_type==CELL_MACRO_GNB?TASK_GNB_APP:TASK_ENB_APP
//lts: C struct type is not homogeneous, so we need macros instead of functions
......
......@@ -241,7 +241,7 @@ int CU_send_F1_SETUP_RESPONSE(instance_t instance,
/* Create */
/* 0. Message Type */
pdu.present = F1AP_F1AP_PDU_PR_successfulOutcome;
asn1cCalloc(pdu.choice.successfulOutcome, F1AP_SuccessfulOutcome_t, tmp);
asn1cCalloc(pdu.choice.successfulOutcome, tmp);
tmp->procedureCode = F1AP_ProcedureCode_id_F1Setup;
tmp->criticality = F1AP_Criticality_reject;
tmp->value.present = F1AP_SuccessfulOutcome__value_PR_F1SetupResponse;
......@@ -345,7 +345,7 @@ int CU_send_F1_SETUP_FAILURE(instance_t instance) {
uint32_t len=0;
/* Create */
/* 0. Message Type */
asn1cCalloc(pdu.choice.unsuccessfulOutcome, F1AP_UnsuccessfulOutcome_t, UnsuccessfulOutcome);
asn1cCalloc(pdu.choice.unsuccessfulOutcome, UnsuccessfulOutcome);
pdu.present = F1AP_F1AP_PDU_PR_unsuccessfulOutcome;
UnsuccessfulOutcome->procedureCode = F1AP_ProcedureCode_id_F1Setup;
UnsuccessfulOutcome->criticality = F1AP_Criticality_reject;
......@@ -385,13 +385,13 @@ int CU_send_F1_SETUP_FAILURE(instance_t instance) {
ie4->criticality = F1AP_Criticality_ignore;
ie4->value.present = F1AP_F1SetupFailureIEs__value_PR_CriticalityDiagnostics;
asn1cCallocOne(ie4->value.choice.CriticalityDiagnostics.procedureCode,
F1AP_ProcedureCode_t, F1AP_ProcedureCode_id_UEContextSetup);
F1AP_ProcedureCode_id_UEContextSetup);
asn1cCallocOne(ie4->value.choice.CriticalityDiagnostics.triggeringMessage,
F1AP_TriggeringMessage_t, F1AP_TriggeringMessage_initiating_message);
F1AP_TriggeringMessage_initiating_message);
asn1cCallocOne(ie4->value.choice.CriticalityDiagnostics.procedureCriticality,
F1AP_Criticality_t, F1AP_Criticality_reject);
F1AP_Criticality_reject);
asn1cCallocOne(ie4->value.choice.CriticalityDiagnostics.transactionID,
F1AP_TransactionID_t, 0);
0);
}
/* encode */
......@@ -438,7 +438,7 @@ int CU_send_gNB_CU_CONFIGURATION_UPDATE(instance_t instance, f1ap_gnb_cu_configu
/* Create */
/* 0. Message Type */
pdu.present = F1AP_F1AP_PDU_PR_initiatingMessage;
asn1cCalloc(pdu.choice.initiatingMessage, F1AP_InitiatingMessage_t, initMsg);
asn1cCalloc(pdu.choice.initiatingMessage, initMsg);
initMsg->procedureCode = F1AP_ProcedureCode_id_gNBCUConfigurationUpdate;
initMsg->criticality = F1AP_Criticality_reject;
initMsg->value.present = F1AP_InitiatingMessage__value_PR_GNBCUConfigurationUpdate;
......@@ -472,7 +472,7 @@ int CU_send_gNB_CU_CONFIGURATION_UPDATE(instance_t instance, f1ap_gnb_cu_configu
addnRCGI(cells_to_be_activated_list_item->nRCGI, f1ap_gnb_cu_configuration_update->cells_to_activate+i);
// optional
// -nRPCI
asn1cCalloc(cells_to_be_activated_list_item->nRPCI, F1AP_NRPCI_t, tmp);
asn1cCalloc(cells_to_be_activated_list_item->nRPCI, tmp);
*tmp = f1ap_gnb_cu_configuration_update->cells_to_activate[i].nrpci; // int 0..1007
// optional
// 3.1.2 gNB-CUSystem Information
......
......@@ -148,7 +148,7 @@ int CU_send_DL_RRC_MESSAGE_TRANSFER(instance_t instance,
/* Create */
/* 0. Message Type */
pdu.present = F1AP_F1AP_PDU_PR_initiatingMessage;
asn1cCalloc(pdu.choice.initiatingMessage, F1AP_InitiatingMessage_t, tmp);
asn1cCalloc(pdu.choice.initiatingMessage, tmp);
tmp->procedureCode = F1AP_ProcedureCode_id_DLRRCMessageTransfer;
tmp->criticality = F1AP_Criticality_ignore;
tmp->value.present = F1AP_InitiatingMessage__value_PR_DLRRCMessageTransfer;
......
......@@ -102,7 +102,7 @@ int DU_send_F1_SETUP_REQUEST(instance_t instance) {
/* Create */
/* 0. pdu Type */
pdu.present = F1AP_F1AP_PDU_PR_initiatingMessage;
asn1cCalloc(pdu.choice.initiatingMessage, F1AP_InitiatingMessage_t, initMsg);
asn1cCalloc(pdu.choice.initiatingMessage, initMsg);
initMsg->procedureCode = F1AP_ProcedureCode_id_F1Setup;
initMsg->criticality = F1AP_Criticality_reject;
initMsg->value.present = F1AP_InitiatingMessage__value_PR_F1SetupRequest;
......@@ -159,7 +159,7 @@ int DU_send_F1_SETUP_REQUEST(instance_t instance) {
served_cell_information->nRPCI = cell->nr_pci; // int 0..1007
/* - fiveGS_TAC */
uint32_t tac=htonl(cell->tac);
asn1cCalloc(served_cell_information->fiveGS_TAC, F1AP_FiveGS_TAC_t, netOrder);
asn1cCalloc(served_cell_information->fiveGS_TAC, netOrder);
OCTET_STRING_fromBuf(netOrder, ((char *)&tac)+1, 3);
/* - Configured_EPS_TAC */
......@@ -176,14 +176,14 @@ int DU_send_F1_SETUP_REQUEST(instance_t instance) {
if (f1ap_req(false, instance)->fdd_flag) { // FDD
nR_Mode_Info->present = F1AP_NR_Mode_Info_PR_fDD;
asn1cCalloc(nR_Mode_Info->choice.fDD, F1AP_FDD_Info_t, fDD_Info);
asn1cCalloc(nR_Mode_Info->choice.fDD, fDD_Info);
/* FDD.1 UL NRFreqInfo */
/* FDD.1.1 UL NRFreqInfo ARFCN */
fDD_Info->uL_NRFreqInfo.nRARFCN = f1ap_req(false,instance)->nr_mode_info[i].fdd.ul_nr_arfcn; // Integer
/* FDD.1.2 F1AP_SUL_Information */
if(0) { // Optional
asn1cCalloc(fDD_Info->uL_NRFreqInfo.sul_Information, F1AP_SUL_Information_t, fdd_sul_info);
asn1cCalloc(fDD_Info->uL_NRFreqInfo.sul_Information, fdd_sul_info);
fdd_sul_info->sUL_NRARFCN = 0;
fdd_sul_info->sUL_transmission_Bandwidth.nRSCS = 0;
fdd_sul_info->sUL_transmission_Bandwidth.nRNRB = 0;
......@@ -247,7 +247,7 @@ int DU_send_F1_SETUP_REQUEST(instance_t instance) {
fDD_Info->dL_Transmission_Bandwidth.nRNRB = to_NRNRB(f1ap_req(false,instance)->nr_mode_info[i].fdd.dl_nrb);
} else { // TDD
nR_Mode_Info->present = F1AP_NR_Mode_Info_PR_tDD;
asn1cCalloc(nR_Mode_Info->choice.tDD, F1AP_TDD_Info_t, tDD_Info);
asn1cCalloc(nR_Mode_Info->choice.tDD, tDD_Info);
/* TDD.1 nRFreqInfo */
/* TDD.1.1 nRFreqInfo ARFCN */
tDD_Info->nRFreqInfo.nRARFCN = f1ap_req(false,instance)->nr_mode_info[i].tdd.nr_arfcn; // Integer
......@@ -289,7 +289,7 @@ int DU_send_F1_SETUP_REQUEST(instance_t instance) {
OCTET_STRING_fromBuf(&served_cell_information->measurementTimingConfiguration,
measurementTimingConfiguration,
strlen(measurementTimingConfiguration));
asn1cCalloc(gnb_du_served_cells_item->gNB_DU_System_Information, F1AP_GNB_DU_System_Information_t, gNB_DU_System_Information);
asn1cCalloc(gnb_du_served_cells_item->gNB_DU_System_Information, gNB_DU_System_Information);
/* 4.1.2 gNB-DU System Information */
OCTET_STRING_fromBuf(&gNB_DU_System_Information->mIB_message, // sept. 2018
(const char *)f1ap_req(false,instance)->mib[i], //f1ap_du_data->mib,
......@@ -535,7 +535,7 @@ int DU_send_gNB_DU_CONFIGURATION_UPDATE(instance_t instance,
/* Create */
/* 0. Message Type */
pdu.present = F1AP_F1AP_PDU_PR_initiatingMessage;
asn1cCalloc(pdu.choice.initiatingMessage,F1AP_InitiatingMessage_t, initMsg);
asn1cCalloc(pdu.choice.initiatingMessage, initMsg);
initMsg->procedureCode = F1AP_ProcedureCode_id_gNBDUConfigurationUpdate;
initMsg->criticality = F1AP_Criticality_reject;
initMsg->value.present = F1AP_InitiatingMessage__value_PR_GNBDUConfigurationUpdate;
......@@ -587,7 +587,7 @@ int DU_send_gNB_DU_CONFIGURATION_UPDATE(instance_t instance,
if (f1ap_setup_req->fdd_flag) {
nR_Mode_Info->present = F1AP_NR_Mode_Info_PR_fDD;
/* > FDD >> FDD Info */
asn1cCalloc(nR_Mode_Info->choice.fDD, F1AP_FDD_Info_t, fDD_Info);
asn1cCalloc(nR_Mode_Info->choice.fDD, fDD_Info);
/* >>> UL NRFreqInfo */
fDD_Info->uL_NRFreqInfo.nRARFCN = 999L;
asn1cSequenceAdd(fDD_Info->uL_NRFreqInfo.freqBandListNr.list, F1AP_FreqBandNrItem_t, ul_freqBandNrItem);
......@@ -609,7 +609,7 @@ int DU_send_gNB_DU_CONFIGURATION_UPDATE(instance_t instance,
} else { // TDD
nR_Mode_Info->present = F1AP_NR_Mode_Info_PR_tDD;
/* > TDD >> TDD Info */
asn1cCalloc(nR_Mode_Info->choice.tDD, F1AP_TDD_Info_t, tDD_Info);
asn1cCalloc(nR_Mode_Info->choice.tDD, tDD_Info);
/* >>> ARFCN */
tDD_Info->nRFreqInfo.nRARFCN = 999L; // Integer
asn1cSequenceAdd(tDD_Info->nRFreqInfo.freqBandListNr.list, F1AP_FreqBandNrItem_t, nr_freqBandNrItem);
......@@ -626,7 +626,7 @@ int DU_send_gNB_DU_CONFIGURATION_UPDATE(instance_t instance,
measurementTimingConfiguration,
strlen(measurementTimingConfiguration));
/* 2.1.2 gNB-DU System Information */
asn1cCalloc(served_cells_to_add_item->gNB_DU_System_Information, F1AP_GNB_DU_System_Information_t, gNB_DU_System_Information);
asn1cCalloc(served_cells_to_add_item->gNB_DU_System_Information, gNB_DU_System_Information);
OCTET_STRING_fromBuf(&gNB_DU_System_Information->mIB_message, // sept. 2018
"1",
sizeof("1"));
......@@ -659,14 +659,14 @@ int DU_send_gNB_DU_CONFIGURATION_UPDATE(instance_t instance,
/* - nRPCI */
served_cell_information->nRPCI = f1ap_setup_req->cell[i].nr_pci; // int 0..1007
/* - fiveGS_TAC */
asn1cCalloc(served_cell_information->fiveGS_TAC,F1AP_FiveGS_TAC_t, tac );
asn1cCalloc(served_cell_information->fiveGS_TAC, tac );
OCTET_STRING_fromBuf(tac,
(const char *) &f1ap_setup_req->cell[i].tac,
3);
/* - Configured_EPS_TAC */
if(1) {
asn1cCalloc(served_cell_information->configured_EPS_TAC, F1AP_Configured_EPS_TAC_t, tmp2);
asn1cCalloc(served_cell_information->configured_EPS_TAC, tmp2);
OCTET_STRING_fromBuf(tmp2,
"2",
2);
......@@ -680,7 +680,7 @@ int DU_send_gNB_DU_CONFIGURATION_UPDATE(instance_t instance,
if (f1ap_setup_req->fdd_flag) {
nR_Mode_Info->present = F1AP_NR_Mode_Info_PR_fDD;
/* > FDD >> FDD Info */
asn1cCalloc(nR_Mode_Info->choice.fDD, F1AP_FDD_Info_t, fDD_Info);
asn1cCalloc(nR_Mode_Info->choice.fDD, fDD_Info);
/* >>> UL NRFreqInfo */
fDD_Info->uL_NRFreqInfo.nRARFCN = 999L;
asn1cSequenceAdd(fDD_Info->uL_NRFreqInfo.freqBandListNr.list, F1AP_FreqBandNrItem_t, ul_freqBandNrItem);
......@@ -703,7 +703,7 @@ int DU_send_gNB_DU_CONFIGURATION_UPDATE(instance_t instance,
} else { // TDD
nR_Mode_Info->present = F1AP_NR_Mode_Info_PR_tDD;
/* > TDD >> TDD Info */
asn1cCalloc(nR_Mode_Info->choice.tDD, F1AP_TDD_Info_t, tDD_Info);
asn1cCalloc(nR_Mode_Info->choice.tDD, tDD_Info);
/* >>> ARFCN */
tDD_Info->nRFreqInfo.nRARFCN = 999L; // Integer
asn1cSequenceAdd(tDD_Info->nRFreqInfo.freqBandListNr.list, F1AP_FreqBandNrItem_t, nr_freqBandNrItem);
......@@ -720,7 +720,7 @@ int DU_send_gNB_DU_CONFIGURATION_UPDATE(instance_t instance,
measurementTimingConfiguration,
strlen(measurementTimingConfiguration));
/* 3.2.2 gNB-DU System Information */
asn1cCalloc( served_cells_to_modify_item->gNB_DU_System_Information, F1AP_GNB_DU_System_Information_t, gNB_DU_System_Information);
asn1cCalloc( served_cells_to_modify_item->gNB_DU_System_Information, gNB_DU_System_Information);
OCTET_STRING_fromBuf(&gNB_DU_System_Information->mIB_message, // sept. 2018
"1",
sizeof("1"));
......@@ -949,7 +949,7 @@ int DU_send_gNB_CU_CONFIGURATION_UPDATE_ACKNOWLEDGE(instance_t instance,
/* Create */
/* 0. pdu Type */
pdu.present = F1AP_F1AP_PDU_PR_successfulOutcome;
asn1cCalloc(pdu.choice.successfulOutcome, F1AP_SuccessfulOutcome_t, tmp);
asn1cCalloc(pdu.choice.successfulOutcome, tmp);
tmp->procedureCode = F1AP_ProcedureCode_id_gNBCUConfigurationUpdate;
tmp->criticality = F1AP_Criticality_reject;
tmp->value.present = F1AP_SuccessfulOutcome__value_PR_GNBCUConfigurationUpdateAcknowledge;
......
......@@ -767,7 +767,7 @@ int DU_send_INITIAL_UL_RRC_MESSAGE_TRANSFER(instance_t instanceP,
/* Create */
/* 0. Message Type */
pdu.present = F1AP_F1AP_PDU_PR_initiatingMessage;
asn1cCalloc(pdu.choice.initiatingMessage, F1AP_InitiatingMessage_t, tmp);
asn1cCalloc(pdu.choice.initiatingMessage, tmp);
tmp->procedureCode = F1AP_ProcedureCode_id_InitialULRRCMessageTransfer;
tmp->criticality = F1AP_Criticality_ignore;
tmp->value.present = F1AP_InitiatingMessage__value_PR_InitialULRRCMessageTransfer;
......@@ -841,7 +841,7 @@ int DU_send_UL_NR_RRC_MESSAGE_TRANSFER(instance_t instance,
/* Create */
/* 0. Message Type */
pdu.present = F1AP_F1AP_PDU_PR_initiatingMessage;
asn1cCalloc(pdu.choice.initiatingMessage, F1AP_InitiatingMessage_t, tmp);
asn1cCalloc(pdu.choice.initiatingMessage, tmp);
tmp->procedureCode = F1AP_ProcedureCode_id_ULRRCMessageTransfer;
tmp->criticality = F1AP_Criticality_ignore;
tmp->value.present = F1AP_InitiatingMessage__value_PR_ULRRCMessageTransfer;
......
......@@ -261,7 +261,7 @@ int DU_send_UE_CONTEXT_SETUP_RESPONSE(instance_t instance, f1ap_ue_context_setup
/* Create */
/* 0. Message Type */
pdu.present = F1AP_F1AP_PDU_PR_successfulOutcome;
asn1cCalloc(pdu.choice.successfulOutcome, F1AP_SuccessfulOutcome_t,tmp);
asn1cCalloc(pdu.choice.successfulOutcome, tmp);
tmp->procedureCode = F1AP_ProcedureCode_id_UEContextSetup;
tmp->criticality = F1AP_Criticality_reject;
tmp->value.present = F1AP_SuccessfulOutcome__value_PR_UEContextSetupResponse;
......@@ -296,16 +296,14 @@ int DU_send_UE_CONTEXT_SETUP_RESPONSE(instance_t instance, f1ap_ue_context_setup
/* OPTIONAL */
/* measGapConfig */
if (0) {
asn1cCalloc(ie3->value.choice.DUtoCURRCInformation.measGapConfig,
F1AP_MeasGapConfig_t, tmp);
asn1cCalloc(ie3->value.choice.DUtoCURRCInformation.measGapConfig, tmp);
OCTET_STRING_fromBuf(tmp, "asdsa", strlen("asdsa"));
}
/* OPTIONAL */
/* requestedP_MaxFR1 */
if (0) {
asn1cCalloc(ie3->value.choice.DUtoCURRCInformation.requestedP_MaxFR1,
OCTET_STRING_t, tmp);
asn1cCalloc(ie3->value.choice.DUtoCURRCInformation.requestedP_MaxFR1, tmp);
OCTET_STRING_fromBuf(tmp, "asdsa", strlen("asdsa"));
}
}
......@@ -375,8 +373,7 @@ int DU_send_UE_CONTEXT_SETUP_RESPONSE(instance_t instance, f1ap_ue_context_setup
F1AP_DLUPTNLInformation_ToBeSetup_Item_t, dLUPTNLInformation_ToBeSetup_Item);
dLUPTNLInformation_ToBeSetup_Item->dLUPTNLInformation.present = F1AP_UPTransportLayerInformation_PR_gTPTunnel;
/* gTPTunnel */
asn1cCalloc(dLUPTNLInformation_ToBeSetup_Item->dLUPTNLInformation.choice.gTPTunnel,
F1AP_GTPTunnel_t, gTPTunnel);
asn1cCalloc(dLUPTNLInformation_ToBeSetup_Item->dLUPTNLInformation.choice.gTPTunnel,gTPTunnel);
/* transportLayerAddress */
struct sockaddr_in addr= {0};
inet_pton(AF_INET, getCxt(false,instance)->setupReq.DU_f1_ip_address.ipv4_address,
......@@ -410,7 +407,7 @@ int DU_send_UE_CONTEXT_SETUP_RESPONSE(instance_t instance, f1ap_ue_context_setup
/* sRBID */
srbs_failedToBeSetup_item->sRBID = 13L;
/* cause */
asn1cCalloc(srbs_failedToBeSetup_item->cause, F1AP_Cause_t,tmp);
asn1cCalloc(srbs_failedToBeSetup_item->cause, tmp);
// dummy value
tmp->present = F1AP_Cause_PR_radioNetwork;
......@@ -459,7 +456,7 @@ int DU_send_UE_CONTEXT_SETUP_RESPONSE(instance_t instance, f1ap_ue_context_setup
/* dRBID */
drbs_failedToBeSetup_item->dRBID = 14;
/* cause */
asn1cCalloc(drbs_failedToBeSetup_item->cause, F1AP_Cause_t,tmp);
asn1cCalloc(drbs_failedToBeSetup_item->cause,tmp);
// dummy value
tmp->present = F1AP_Cause_PR_radioNetwork;
......@@ -507,7 +504,7 @@ int DU_send_UE_CONTEXT_SETUP_RESPONSE(instance_t instance, f1ap_ue_context_setup
/* sCell_ID */
addnRCGI(sCell_FailedtoSetup_item->sCell_ID,f1ap_req(false, instance)->cell+i);
/* cause */
asn1cCalloc(sCell_FailedtoSetup_item->cause, F1AP_Cause_t, tmp);
asn1cCalloc(sCell_FailedtoSetup_item->cause, tmp);
// dummy value
tmp->present = F1AP_Cause_PR_radioNetwork;
......@@ -575,13 +572,13 @@ int DU_send_UE_CONTEXT_SETUP_RESPONSE(instance_t instance, f1ap_ue_context_setup
ie12->criticality = F1AP_Criticality_ignore;
ie12->value.present = F1AP_UEContextSetupResponseIEs__value_PR_CriticalityDiagnostics;
asn1cCallocOne(ie12->value.choice.CriticalityDiagnostics.procedureCode,
F1AP_ProcedureCode_t, F1AP_ProcedureCode_id_UEContextSetup);
F1AP_ProcedureCode_id_UEContextSetup);
asn1cCallocOne(ie12->value.choice.CriticalityDiagnostics.triggeringMessage,
F1AP_TriggeringMessage_t, F1AP_TriggeringMessage_initiating_message);
F1AP_TriggeringMessage_initiating_message);
asn1cCallocOne(ie12->value.choice.CriticalityDiagnostics.procedureCriticality,
F1AP_Criticality_t, F1AP_Criticality_reject);
F1AP_Criticality_reject);
asn1cCallocOne(ie12->value.choice.CriticalityDiagnostics.transactionID,
F1AP_TransactionID_t, 0);
0);
}
/* encode */
......@@ -609,7 +606,7 @@ int DU_send_UE_CONTEXT_RELEASE_REQUEST(instance_t instance,
/* Create */
/* 0. Message Type */
pdu.present = F1AP_F1AP_PDU_PR_initiatingMessage;
asn1cCalloc(pdu.choice.initiatingMessage, F1AP_InitiatingMessage_t, tmp);
asn1cCalloc(pdu.choice.initiatingMessage, tmp);
tmp->procedureCode = F1AP_ProcedureCode_id_UEContextReleaseRequest;
tmp->criticality = F1AP_Criticality_reject;
tmp->value.present = F1AP_InitiatingMessage__value_PR_UEContextReleaseRequest;
......@@ -823,7 +820,7 @@ int DU_send_UE_CONTEXT_RELEASE_COMPLETE(instance_t instance,
/* Create */
/* 0. Message Type */
pdu.present = F1AP_F1AP_PDU_PR_successfulOutcome;
asn1cCalloc(pdu.choice.successfulOutcome, F1AP_SuccessfulOutcome_t, tmp);
asn1cCalloc(pdu.choice.successfulOutcome, tmp);
tmp->procedureCode = F1AP_ProcedureCode_id_UEContextRelease;
tmp->criticality = F1AP_Criticality_reject;
tmp->value.present = F1AP_SuccessfulOutcome__value_PR_UEContextReleaseComplete;
......@@ -921,7 +918,7 @@ int DU_send_UE_CONTEXT_MODIFICATION_RESPONSE(instance_t instance) {
/* Create */
/* 0. Message Type */
pdu.present = F1AP_F1AP_PDU_PR_successfulOutcome;
asn1cCalloc(pdu.choice.successfulOutcome,F1AP_SuccessfulOutcome_t, tmp);
asn1cCalloc(pdu.choice.successfulOutcome,tmp);
tmp->procedureCode = F1AP_ProcedureCode_id_UEContextModification;
tmp->criticality = F1AP_Criticality_reject;
tmp->value.present = F1AP_SuccessfulOutcome__value_PR_UEContextModificationResponse;
......@@ -998,7 +995,7 @@ int DU_send_UE_CONTEXT_MODIFICATION_RESPONSE(instance_t instance) {
F1AP_DLUPTNLInformation_ToBeSetup_Item_t, dLUPTNLInformation_ToBeSetup_Item);
dLUPTNLInformation_ToBeSetup_Item->dLUPTNLInformation.present = F1AP_UPTransportLayerInformation_PR_gTPTunnel;
asn1cCalloc(dLUPTNLInformation_ToBeSetup_Item->dLUPTNLInformation.choice.gTPTunnel,
F1AP_GTPTunnel_t, gTPTunnel);
gTPTunnel);
TRANSPORT_LAYER_ADDRESS_IPv4_TO_BIT_STRING(1234, &gTPTunnel->transportLayerAddress);
OCTET_STRING_fromBuf(&gTPTunnel->gTP_TEID, "1204",
strlen("1204"));
......@@ -1031,10 +1028,9 @@ int DU_send_UE_CONTEXT_MODIFICATION_RESPONSE(instance_t instance) {
/* DLTunnels_Modified_Item */
asn1cSequenceAdd(drbs_modified_item->dLUPTNLInformation_ToBeSetup_List.list,
F1AP_DLUPTNLInformation_ToBeSetup_Item_t, dLUPTNLInformation_ToBeSetup_Item);
asn1cCalloc(dLUPTNLInformation_ToBeSetup_Item, F1AP_DLUPTNLInformation_ToBeSetup_Item_t, tmp);
asn1cCalloc(dLUPTNLInformation_ToBeSetup_Item, tmp);
tmp->dLUPTNLInformation.present = F1AP_UPTransportLayerInformation_PR_gTPTunnel;
asn1cCalloc(dLUPTNLInformation_ToBeSetup_Item->dLUPTNLInformation.choice.gTPTunnel,
F1AP_GTPTunnel_t, gTPTunnel);
asn1cCalloc(dLUPTNLInformation_ToBeSetup_Item->dLUPTNLInformation.choice.gTPTunnel, gTPTunnel);
TRANSPORT_LAYER_ADDRESS_IPv4_TO_BIT_STRING(1234, &gTPTunnel->transportLayerAddress);
OCTET_STRING_fromBuf(&gTPTunnel->gTP_TEID, "1204", strlen("1204"));
}
......@@ -1059,7 +1055,7 @@ int DU_send_UE_CONTEXT_MODIFICATION_RESPONSE(instance_t instance) {
&srbs_failedToBeSetupMod_item_ies->value.choice.SRBs_FailedToBeSetupMod_Item;
/* - sRBID */
srbs_failedToBeSetupMod_item->sRBID = 50L;
asn1cCalloc(srbs_failedToBeSetupMod_item->cause, F1AP_Cause_t, tmp)
asn1cCalloc(srbs_failedToBeSetupMod_item->cause, tmp)
tmp->present = F1AP_Cause_PR_radioNetwork;
tmp->choice.radioNetwork = F1AP_CauseRadioNetwork_unknown_or_already_allocated_gnb_du_ue_f1ap_id;
}
......@@ -1106,7 +1102,7 @@ int DU_send_UE_CONTEXT_MODIFICATION_RESPONSE(instance_t instance) {
F1AP_SCell_FailedtoSetupMod_Item_t *scell_failedtoSetupMod_item=&scell_failedtoSetupMod_item_ies->value.choice.SCell_FailedtoSetupMod_Item;
/* - sCell_ID */
addnRCGI(scell_failedtoSetupMod_item->sCell_ID, &f1ap_req(false, instance)->cell[i]);
asn1cCalloc(scell_failedtoSetupMod_item->cause, F1AP_Cause_t, tmp);
asn1cCalloc(scell_failedtoSetupMod_item->cause, tmp);
tmp->present = F1AP_Cause_PR_radioNetwork;
tmp->choice.radioNetwork = F1AP_CauseRadioNetwork_unknown_or_already_allocated_gnb_du_ue_f1ap_id;
}
......@@ -1130,7 +1126,7 @@ int DU_send_UE_CONTEXT_MODIFICATION_RESPONSE(instance_t instance) {
&drbs_failedToBeModified_item_ies->value.choice.DRBs_FailedToBeModified_Item ;
/* dRBID */
drbs_failedToBeModified_item->dRBID = 30L;
asn1cCalloc(drbs_failedToBeModified_item->cause, F1AP_Cause_t, tmp);
asn1cCalloc(drbs_failedToBeModified_item->cause, tmp);
tmp->present = F1AP_Cause_PR_radioNetwork;
tmp->choice.radioNetwork = F1AP_CauseRadioNetwork_unknown_or_already_allocated_gnb_du_ue_f1ap_id;
}
......
......@@ -810,6 +810,14 @@ void nr_rx_sdu(const module_id_t gnb_mod_idP,
if( (frameP!=ra->Msg3_frame) || (slotP!=ra->Msg3_slot))
continue;
// for CFRA (NSA) do not schedule retransmission of msg3
if (ra->cfra) {
LOG_W(NR_MAC, "Random Access %i failed at state %i (NSA msg3 reception failed)\n", i, ra->state);
nr_mac_remove_ra_rnti(gnb_mod_idP, ra->rnti);
nr_clear_ra_proc(gnb_mod_idP, CC_idP, frameP, ra);
return;
}
if (ra->msg3_round >= MAX_HARQ_ROUNDS - 1) {
LOG_W(NR_MAC, "Random Access %i failed at state %i (Reached msg3 max harq rounds)\n", i, ra->state);
nr_mac_remove_ra_rnti(gnb_mod_idP, ra->rnti);
......
......@@ -52,6 +52,14 @@
*/
int xer_sprint(char *string, size_t string_size, struct asn_TYPE_descriptor_s *td, void *sptr);
#define asn1cCallocOne(VaR, VaLue) \
VaR = calloc(1,sizeof(*VaR)); *VaR=VaLue;
#define asn1cCalloc(VaR, lOcPtr) \
typeof(VaR) lOcPtr = VaR = calloc(1,sizeof(*VaR));
#define asn1cSequenceAdd(VaR, TyPe, lOcPtr) \
TyPe *lOcPtr= calloc(1,sizeof(TyPe)); \
ASN_SEQUENCE_ADD(&VaR,lOcPtr);
uint16_t get_adjacent_cell_id(uint8_t Mod_id,uint8_t index);
uint8_t get_adjacent_cell_mod_id(uint16_t phyCellId);
......
......@@ -153,6 +153,15 @@ typedef struct xer_sprint_string_s {
size_t string_index;
} xer_sprint_string_t;
#define asn1cCallocOne(VaR, VaLue) \
VaR = calloc(1,sizeof(*VaR)); *VaR=VaLue;
#define asn1cCalloc(VaR, lOcPtr) \
typeof(VaR) lOcPtr = VaR = calloc(1,sizeof(*VaR));
#define asn1cSequenceAdd(VaR, TyPe, lOcPtr) \
TyPe *lOcPtr= calloc(1,sizeof(TyPe)); \
ASN_SEQUENCE_ADD(&VaR,lOcPtr);
//replace LTE
//extern unsigned char NB_eNB_INST;
extern unsigned char NB_gNB_INST;
......
......@@ -53,6 +53,15 @@
*/
int xer_sprint_NR(char *string, size_t string_size, struct asn_TYPE_descriptor_s *td, void *sptr);
#define asn1cCallocOne(VaR, VaLue) \
VaR = calloc(1,sizeof(*VaR)); *VaR=VaLue;
#define asn1cCalloc(VaR, lOcPtr) \
typeof(VaR) lOcPtr = VaR = calloc(1,sizeof(*VaR));
#define asn1cSequenceAdd(VaR, TyPe, lOcPtr) \
TyPe *lOcPtr= calloc(1,sizeof(TyPe)); \
ASN_SEQUENCE_ADD(&VaR,lOcPtr);
uint8_t do_MIB_NR(gNB_RRC_INST *rrc,
uint32_t frame);
......
......@@ -39,7 +39,7 @@ gNBs =
tr_s_preference = "f1";
local_s_if_name = "lo";
local_s_address = "127.0.0.4"; #"192.168.18.207"; #"127.0.0.4";
local_s_address = "127.0.0.4";
remote_s_address = "127.0.0.3";
local_s_portc = 501;
local_s_portd = 2152;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment