Commit 7b655498 authored by Matthieu Kanj's avatar Matthieu Kanj

renaming functions in file :openair2/RRC/LITE/MESSAGES/asn1_msg_NB_IoT.c

parent c5f26acd
...@@ -1136,7 +1136,7 @@ int8_t mac_rrc_data_req_eNB_NB_IoT( ...@@ -1136,7 +1136,7 @@ int8_t mac_rrc_data_req_eNB_NB_IoT(
} }
memcpy(&buffer_pP[0], memcpy(&buffer_pP[0],
eNB_rrc_inst_NB_IoT[Mod_idP].carrier[CC_id].MIB_NB, eNB_rrc_inst_NB_IoT[Mod_idP].carrier[CC_id].MIB_NB_IoT,
eNB_rrc_inst_NB_IoT[Mod_idP].carrier[CC_id].sizeof_MIB_NB_IoT); eNB_rrc_inst_NB_IoT[Mod_idP].carrier[CC_id].sizeof_MIB_NB_IoT);
//XXX RRC_MAC_BCCH_DATA_REQ message not implemented in MAC layer (eNB_scheduler.c under ITTI) //XXX RRC_MAC_BCCH_DATA_REQ message not implemented in MAC layer (eNB_scheduler.c under ITTI)
...@@ -1169,14 +1169,14 @@ int8_t mac_rrc_data_req_eNB_NB_IoT( ...@@ -1169,14 +1169,14 @@ int8_t mac_rrc_data_req_eNB_NB_IoT(
/*check if SIBs are initialized*/ /*check if SIBs are initialized*/
//FIXME to be check when both are initialize and if make sense to have it //FIXME to be check when both are initialize and if make sense to have it
if (eNB_rrc_inst_NB_IoT[Mod_idP].carrier[CC_id].sizeof_SIB1_NB == 255) { if (eNB_rrc_inst_NB_IoT[Mod_idP].carrier[CC_id].sizeof_SIB1_NB_IoT == 255) {
LOG_E(RRC,"[eNB %d] MAC Request for SIB1-NB and SIB1-NB not initialized\n",Mod_idP); LOG_E(RRC,"[eNB %d] MAC Request for SIB1-NB and SIB1-NB_IoT not initialized\n",Mod_idP);
mac_xface->macphy_exit("mac_rrc_data_req_eNB_NB_IoT: MAC Request for SIB1-NB and SIB1-NB not initialized"); mac_xface->macphy_exit("mac_rrc_data_req_eNB_NB_IoT: MAC Request for SIB1-NB_IoT and SIB1-NB_IoT not initialized");
} }
if (eNB_rrc_inst_NB_IoT[Mod_idP].carrier[CC_id].sizeof_SIB23_NB == 255) { if (eNB_rrc_inst_NB_IoT[Mod_idP].carrier[CC_id].sizeof_SIB23_NB_IoT == 255) {
LOG_E(RRC,"[eNB %d] MAC Request for SIB23-NB and SIB23-NB not initialized\n",Mod_idP); LOG_E(RRC,"[eNB %d] MAC Request for SIB23-NB and SIB23-NB_IoT not initialized\n",Mod_idP);
mac_xface->macphy_exit("mac_rrc_data_req_eNB_NB_IoT: MAC Request for SIB23-NB and SIB23-NB not initialized"); mac_xface->macphy_exit("mac_rrc_data_req_eNB_NB_IoT: MAC Request for SIB23-NB_IoT and SIB23-NB_IoT not initialized");
} }
...@@ -1186,8 +1186,8 @@ int8_t mac_rrc_data_req_eNB_NB_IoT( ...@@ -1186,8 +1186,8 @@ int8_t mac_rrc_data_req_eNB_NB_IoT(
if(subframeP == 4 && is_SIB1_start_NB_IoT(frameP,schedulingInfoSIB1, physCellId)!= -1){ if(subframeP == 4 && is_SIB1_start_NB_IoT(frameP,schedulingInfoSIB1, physCellId)!= -1){
memcpy(&buffer_pP[0], memcpy(&buffer_pP[0],
eNB_rrc_inst_NB_IoT[Mod_idP].carrier[CC_id].SIB1_NB, eNB_rrc_inst_NB_IoT[Mod_idP].carrier[CC_id].SIB1_NB_IoT,
eNB_rrc_inst_NB_IoT[Mod_idP].carrier[CC_id].sizeof_SIB1_NB); eNB_rrc_inst_NB_IoT[Mod_idP].carrier[CC_id].sizeof_SIB1_NB_IoT);
//XXX RRC_MAC_BCCH_DATA_REQ message not implemented in MAC layer (eNB_scheduler.c under ITTI) //XXX RRC_MAC_BCCH_DATA_REQ message not implemented in MAC layer (eNB_scheduler.c under ITTI)
...@@ -1195,14 +1195,14 @@ int8_t mac_rrc_data_req_eNB_NB_IoT( ...@@ -1195,14 +1195,14 @@ int8_t mac_rrc_data_req_eNB_NB_IoT(
#ifdef DEBUG_RRC #ifdef DEBUG_RRC
LOG_T(RRC,"[eNB %d] Frame %d : BCCH request => SIB1_NB\n",Mod_idP,frameP); LOG_T(RRC,"[eNB %d] Frame %d : BCCH request => SIB1_NB\n",Mod_idP,frameP);
for (i=0; i<eNB_rrc_inst_NB_IoT[Mod_idP].carrier[CC_id].sizeof_SIB1_NB; i++) { for (i=0; i<eNB_rrc_inst_NB_IoT[Mod_idP].carrier[CC_id].sizeof_SIB1_NB_IoT; i++) {
LOG_T(RRC,"%x.",buffer_pP[i]); LOG_T(RRC,"%x.",buffer_pP[i]);
} }
LOG_T(RRC,"\n"); LOG_T(RRC,"\n");
#endif #endif
return (eNB_rrc_inst_NB_IoT[Mod_idP].carrier[CC_id].sizeof_SIB1_NB); return (eNB_rrc_inst_NB_IoT[Mod_idP].carrier[CC_id].sizeof_SIB1_NB_IoT);
} }
//check for SIB23-Transmission //check for SIB23-Transmission
...@@ -1216,20 +1216,20 @@ int8_t mac_rrc_data_req_eNB_NB_IoT( ...@@ -1216,20 +1216,20 @@ int8_t mac_rrc_data_req_eNB_NB_IoT(
{ {
memcpy(&buffer_pP[0], memcpy(&buffer_pP[0],
eNB_rrc_inst_NB_IoT[Mod_idP].carrier[CC_id].SIB23_NB, eNB_rrc_inst_NB_IoT[Mod_idP].carrier[CC_id].SIB23_NB_IoT,
eNB_rrc_inst_NB_IoT[Mod_idP].carrier[CC_id].sizeof_SIB23_NB); eNB_rrc_inst_NB_IoT[Mod_idP].carrier[CC_id].sizeof_SIB23_NB_IoT);
#ifdef DEBUG_RRC #ifdef DEBUG_RRC
LOG_T(RRC,"[eNB %d] Frame %d BCCH request => SIB 2-3\n",Mod_idP,frameP); LOG_T(RRC,"[eNB %d] Frame %d BCCH request => SIB 2-3\n",Mod_idP,frameP);
for (i=0; i<eNB_rrc_inst_NB_IoT[Mod_idP].carrier[CC_id].sizeof_SIB23_NB; i++) { for (i=0; i<eNB_rrc_inst_NB_IoT[Mod_idP].carrier[CC_id].sizeof_SIB23_NB_IoT; i++) {
LOG_T(RRC,"%x.",buffer_pP[i]); LOG_T(RRC,"%x.",buffer_pP[i]);
} }
LOG_T(RRC,"\n"); LOG_T(RRC,"\n");
#endif #endif
return(eNB_rrc_inst_NB_IoT[Mod_idP].carrier[CC_id].sizeof_SIB23_NB); return(eNB_rrc_inst_NB_IoT[Mod_idP].carrier[CC_id].sizeof_SIB23_NB_IoT);
} }
} }
return(0); return(0);
......
...@@ -148,7 +148,7 @@ uint8_t do_MIB_NB_IoT( ...@@ -148,7 +148,7 @@ uint8_t do_MIB_NB_IoT(
enc_rval = uper_encode_to_buffer(&asn_DEF_BCCH_BCH_Message_NB, enc_rval = uper_encode_to_buffer(&asn_DEF_BCCH_BCH_Message_NB,
(void*)mib_NB_IoT, (void*)mib_NB_IoT,
carrier->MIB_NB, carrier->MIB_NB_IoT,
100); 100);
AssertFatal (enc_rval.encoded > 0, "ASN1 message encoding failed (%s, %lu)!\n", AssertFatal (enc_rval.encoded > 0, "ASN1 message encoding failed (%s, %lu)!\n",
enc_rval.failed_type->name, enc_rval.encoded); enc_rval.failed_type->name, enc_rval.encoded);
...@@ -162,7 +162,7 @@ uint8_t do_MIB_NB_IoT( ...@@ -162,7 +162,7 @@ uint8_t do_MIB_NB_IoT(
} }
/*do_SIB1_NB*/ /*do_SIB1_NB*/
uint8_t do_SIB1_NB(uint8_t Mod_id, int CC_id, uint8_t do_SIB1_NB_IoT(uint8_t Mod_id, int CC_id,
rrc_eNB_carrier_data_NB_IoT_t *carrier, rrc_eNB_carrier_data_NB_IoT_t *carrier,
RrcConfigurationReq *configuration, RrcConfigurationReq *configuration,
uint32_t frame uint32_t frame
...@@ -393,7 +393,7 @@ uint8_t do_SIB1_NB(uint8_t Mod_id, int CC_id, ...@@ -393,7 +393,7 @@ uint8_t do_SIB1_NB(uint8_t Mod_id, int CC_id,
enc_rval = uper_encode_to_buffer(&asn_DEF_BCCH_DL_SCH_Message_NB, enc_rval = uper_encode_to_buffer(&asn_DEF_BCCH_DL_SCH_Message_NB,
(void*)bcch_message, (void*)bcch_message,
carrier->SIB1_NB, carrier->SIB1_NB_IoT,
100); 100);
AssertFatal (enc_rval.encoded > 0, "ASN1 message encoding failed (%s, %lu)!\n", AssertFatal (enc_rval.encoded > 0, "ASN1 message encoding failed (%s, %lu)!\n",
...@@ -411,9 +411,9 @@ uint8_t do_SIB1_NB(uint8_t Mod_id, int CC_id, ...@@ -411,9 +411,9 @@ uint8_t do_SIB1_NB(uint8_t Mod_id, int CC_id,
return((enc_rval.encoded+7)/8); return((enc_rval.encoded+7)/8);
} }
/*SIB23_NB*/ /*SIB23_NB_IoT*/
//to be clarified is it is possible to carry SIB2 and SIB3 in the same SI message for NB-IoT? //to be clarified is it is possible to carry SIB2 and SIB3 in the same SI message for NB-IoT?
uint8_t do_SIB23_NB(uint8_t Mod_id, uint8_t do_SIB23_NB_IoT(uint8_t Mod_id,
int CC_id, int CC_id,
rrc_eNB_carrier_data_NB_IoT_t *carrier,//MP: this is already a carrier[CC_id] rrc_eNB_carrier_data_NB_IoT_t *carrier,//MP: this is already a carrier[CC_id]
RrcConfigurationReq *configuration ) //openair2/COMMON/rrc_messages_types.h RrcConfigurationReq *configuration ) //openair2/COMMON/rrc_messages_types.h
...@@ -422,8 +422,8 @@ uint8_t do_SIB23_NB(uint8_t Mod_id, ...@@ -422,8 +422,8 @@ uint8_t do_SIB23_NB(uint8_t Mod_id,
struct SystemInformation_NB_r13_IEs__sib_TypeAndInfo_r13__Member *sib3_NB_part; struct SystemInformation_NB_r13_IEs__sib_TypeAndInfo_r13__Member *sib3_NB_part;
BCCH_DL_SCH_Message_NB_t *bcch_message = &(carrier->systemInformation_NB_IoT); //is the systeminformation-->BCCH_DL_SCH_Message_NB BCCH_DL_SCH_Message_NB_t *bcch_message = &(carrier->systemInformation_NB_IoT); //is the systeminformation-->BCCH_DL_SCH_Message_NB
SystemInformationBlockType2_NB_r13_t *sib2_NB; SystemInformationBlockType2_NB_r13_t *sib2_NB_IoT;
SystemInformationBlockType3_NB_r13_t *sib3_NB; SystemInformationBlockType3_NB_r13_t *sib3_NB_IoT;
asn_enc_rval_t enc_rval; asn_enc_rval_t enc_rval;
RACH_Info_NB_r13_t rach_Info_NB; RACH_Info_NB_r13_t rach_Info_NB;
...@@ -451,13 +451,13 @@ uint8_t do_SIB23_NB(uint8_t Mod_id, ...@@ -451,13 +451,13 @@ uint8_t do_SIB23_NB(uint8_t Mod_id,
} }
//before schould be allocated memory somewhere? //before schould be allocated memory somewhere?
if (!carrier->sib2_NB) { if (!carrier->sib2_NB_IoT) {
LOG_E(RRC,"[eNB %d] sib2_NB is null, exiting\n", Mod_id); LOG_E(RRC,"[eNB %d] sib2_NB_IoT is null, exiting\n", Mod_id);
exit(-1); exit(-1);
} }
if (!carrier->sib3_NB) { if (!carrier->sib3_NB_IoT) {
LOG_E(RRC,"[eNB %d] sib3_NB is null, exiting\n", Mod_id); LOG_E(RRC,"[eNB %d] sib3_NB_IoT is null, exiting\n", Mod_id);
exit(-1); exit(-1);
} }
...@@ -473,10 +473,10 @@ uint8_t do_SIB23_NB(uint8_t Mod_id, ...@@ -473,10 +473,10 @@ uint8_t do_SIB23_NB(uint8_t Mod_id,
sib3_NB_part->present = SystemInformation_NB_r13_IEs__sib_TypeAndInfo_r13__Member_PR_sib3_r13; sib3_NB_part->present = SystemInformation_NB_r13_IEs__sib_TypeAndInfo_r13__Member_PR_sib3_r13;
//may bug if not correct allocation of memory //may bug if not correct allocation of memory
carrier->sib2_NB = &sib2_NB_part->choice.sib2_r13; carrier->sib2_NB_IoT = &sib2_NB_part->choice.sib2_r13;
carrier->sib3_NB = &sib3_NB_part->choice.sib3_r13; carrier->sib3_NB_IoT = &sib3_NB_part->choice.sib3_r13;
sib2_NB = carrier->sib2_NB; sib2_NB_IoT = carrier->sib2_NB_IoT;
sib3_NB = carrier->sib3_NB; sib3_NB_IoT = carrier->sib3_NB_IoT;
/// SIB2-NB----------------------------------------- /// SIB2-NB-----------------------------------------
...@@ -484,38 +484,38 @@ uint8_t do_SIB23_NB(uint8_t Mod_id, ...@@ -484,38 +484,38 @@ uint8_t do_SIB23_NB(uint8_t Mod_id,
//Barring is manage by ab-Enabled in MIB-NB (but is not a struct as ac-BarringInfo in LTE legacy) //Barring is manage by ab-Enabled in MIB-NB (but is not a struct as ac-BarringInfo in LTE legacy)
//RACH Config. Common-------------------------------------------------------------- //RACH Config. Common--------------------------------------------------------------
sib2_NB->radioResourceConfigCommon_r13.rach_ConfigCommon_r13.preambleTransMax_CE_r13 = sib2_NB_IoT->radioResourceConfigCommon_r13.rach_ConfigCommon_r13.preambleTransMax_CE_r13 =
configuration->rach_preambleTransMax_CE_NB[CC_id]; configuration->rach_preambleTransMax_CE_NB[CC_id];
sib2_NB->radioResourceConfigCommon_r13.rach_ConfigCommon_r13.powerRampingParameters_r13.powerRampingStep = sib2_NB_IoT->radioResourceConfigCommon_r13.rach_ConfigCommon_r13.powerRampingParameters_r13.powerRampingStep =
configuration->rach_powerRampingStep_NB[CC_id]; configuration->rach_powerRampingStep_NB[CC_id];
sib2_NB->radioResourceConfigCommon_r13.rach_ConfigCommon_r13.powerRampingParameters_r13.preambleInitialReceivedTargetPower = sib2_NB_IoT->radioResourceConfigCommon_r13.rach_ConfigCommon_r13.powerRampingParameters_r13.preambleInitialReceivedTargetPower =
configuration->rach_preambleInitialReceivedTargetPower_NB[CC_id]; configuration->rach_preambleInitialReceivedTargetPower_NB[CC_id];
rach_Info_NB.ra_ResponseWindowSize_r13 = configuration->rach_raResponseWindowSize_NB[CC_id]; rach_Info_NB.ra_ResponseWindowSize_r13 = configuration->rach_raResponseWindowSize_NB[CC_id];
rach_Info_NB.mac_ContentionResolutionTimer_r13 = configuration-> rach_macContentionResolutionTimer_NB[CC_id]; rach_Info_NB.mac_ContentionResolutionTimer_r13 = configuration-> rach_macContentionResolutionTimer_NB[CC_id];
//rach_infoList max size = maxNPRACH-Resources-NB-r13 = 3 //rach_infoList max size = maxNPRACH-Resources-NB-r13 = 3
ASN_SEQUENCE_ADD(&sib2_NB->radioResourceConfigCommon_r13.rach_ConfigCommon_r13.rach_InfoList_r13.list,&rach_Info_NB); ASN_SEQUENCE_ADD(&sib2_NB_IoT->radioResourceConfigCommon_r13.rach_ConfigCommon_r13.rach_InfoList_r13.list,&rach_Info_NB);
//TS 36.331 pag 614 --> if not present the value to infinity sould be used //TS 36.331 pag 614 --> if not present the value to infinity sould be used
*connEstFailOffset = 0; *connEstFailOffset = 0;
sib2_NB->radioResourceConfigCommon_r13.rach_ConfigCommon_r13.connEstFailOffset_r13 = connEstFailOffset; /*OPTIONAL*/ sib2_NB_IoT->radioResourceConfigCommon_r13.rach_ConfigCommon_r13.connEstFailOffset_r13 = connEstFailOffset; /*OPTIONAL*/
// BCCH-Config-NB-IoT---------------------------------------------------------------- // BCCH-Config-NB-IoT----------------------------------------------------------------
sib2_NB->radioResourceConfigCommon_r13.bcch_Config_r13.modificationPeriodCoeff_r13 sib2_NB_IoT->radioResourceConfigCommon_r13.bcch_Config_r13.modificationPeriodCoeff_r13
= configuration->bcch_modificationPeriodCoeff_NB[CC_id]; = configuration->bcch_modificationPeriodCoeff_NB[CC_id];
// PCCH-Config-NB-IoT----------------------------------------------------------------- // PCCH-Config-NB-IoT-----------------------------------------------------------------
sib2_NB->radioResourceConfigCommon_r13.pcch_Config_r13.defaultPagingCycle_r13 sib2_NB_IoT->radioResourceConfigCommon_r13.pcch_Config_r13.defaultPagingCycle_r13
= configuration->pcch_defaultPagingCycle_NB[CC_id]; = configuration->pcch_defaultPagingCycle_NB[CC_id];
sib2_NB->radioResourceConfigCommon_r13.pcch_Config_r13.nB_r13 = configuration->pcch_nB_NB[CC_id]; sib2_NB_IoT->radioResourceConfigCommon_r13.pcch_Config_r13.nB_r13 = configuration->pcch_nB_NB[CC_id];
sib2_NB->radioResourceConfigCommon_r13.pcch_Config_r13.npdcch_NumRepetitionPaging_r13 = configuration-> pcch_npdcch_NumRepetitionPaging_NB[CC_id]; sib2_NB_IoT->radioResourceConfigCommon_r13.pcch_Config_r13.npdcch_NumRepetitionPaging_r13 = configuration-> pcch_npdcch_NumRepetitionPaging_NB[CC_id];
//NPRACH-Config-NB-IoT----------------------------------------------------------------- //NPRACH-Config-NB-IoT-----------------------------------------------------------------
sib2_NB->radioResourceConfigCommon_r13.nprach_Config_r13.nprach_CP_Length_r13 = configuration->nprach_CP_Length[CC_id]; sib2_NB_IoT->radioResourceConfigCommon_r13.nprach_Config_r13.nprach_CP_Length_r13 = configuration->nprach_CP_Length[CC_id];
sib2_NB->radioResourceConfigCommon_r13.nprach_Config_r13.rsrp_ThresholdsPrachInfoList_r13 = NULL; /*OPTIONAL*/ sib2_NB_IoT->radioResourceConfigCommon_r13.nprach_Config_r13.rsrp_ThresholdsPrachInfoList_r13 = NULL; /*OPTIONAL*/
// =CALLOC(1, sizeof(struct RSRP_ThresholdsNPRACH_InfoList_NB_r13)); //fatto uguale dopo // =CALLOC(1, sizeof(struct RSRP_ThresholdsNPRACH_InfoList_NB_r13)); //fatto uguale dopo
// rsrp_ThresholdsPrachInfoList = sib2_NB->radioResourceConfigCommon_r13.nprach_Config_r13.rsrp_ThresholdsPrachInfoList_r13; // rsrp_ThresholdsPrachInfoList = sib2_NB_IoT->radioResourceConfigCommon_r13.nprach_Config_r13.rsrp_ThresholdsPrachInfoList_r13;
// rsrp_range = configuration->nprach_rsrp_range_NB; // rsrp_range = configuration->nprach_rsrp_range_NB;
// ASN_SEQUENCE_ADD(&rsrp_ThresholdsPrachInfoList->list,rsrp_range); // ASN_SEQUENCE_ADD(&rsrp_ThresholdsPrachInfoList->list,rsrp_range);
...@@ -531,19 +531,19 @@ uint8_t do_SIB23_NB(uint8_t Mod_id, ...@@ -531,19 +531,19 @@ uint8_t do_SIB23_NB(uint8_t Mod_id,
nprach_parameters.npdcch_Offset_RA_r13= configuration->npdcch_Offset_RA[CC_id]; nprach_parameters.npdcch_Offset_RA_r13= configuration->npdcch_Offset_RA[CC_id];
//nprach_parameterList have a max size of 3 possible nprach configuration (see maxNPRACH_Resources_NB_r13) //nprach_parameterList have a max size of 3 possible nprach configuration (see maxNPRACH_Resources_NB_r13)
ASN_SEQUENCE_ADD(&sib2_NB->radioResourceConfigCommon_r13.nprach_Config_r13.nprach_ParametersList_r13.list,&nprach_parameters); ASN_SEQUENCE_ADD(&sib2_NB_IoT->radioResourceConfigCommon_r13.nprach_Config_r13.nprach_ParametersList_r13.list,&nprach_parameters);
// NPDSCH-Config NB-IOT // NPDSCH-Config NB-IOT
sib2_NB->radioResourceConfigCommon_r13.npdsch_ConfigCommon_r13.nrs_Power_r13= configuration->npdsch_nrs_Power[CC_id]; sib2_NB_IoT->radioResourceConfigCommon_r13.npdsch_ConfigCommon_r13.nrs_Power_r13= configuration->npdsch_nrs_Power[CC_id];
//NPUSCH-Config NB-IoT---------------------------------------------------------------- //NPUSCH-Config NB-IoT----------------------------------------------------------------
//list of size 3 (see maxNPRACH_Resources_NB_r13) //list of size 3 (see maxNPRACH_Resources_NB_r13)
ack_nack_repetition = configuration-> npusch_ack_nack_numRepetitions_NB[CC_id]; //is an enumerative ack_nack_repetition = configuration-> npusch_ack_nack_numRepetitions_NB[CC_id]; //is an enumerative
ASN_SEQUENCE_ADD(&sib2_NB->radioResourceConfigCommon_r13.npusch_ConfigCommon_r13.ack_NACK_NumRepetitions_Msg4_r13.list,ack_nack_repetition); ASN_SEQUENCE_ADD(&sib2_NB_IoT->radioResourceConfigCommon_r13.npusch_ConfigCommon_r13.ack_NACK_NumRepetitions_Msg4_r13.list,ack_nack_repetition);
*srs_SubframeConfig = configuration->npusch_srs_SubframeConfig_NB[CC_id]; *srs_SubframeConfig = configuration->npusch_srs_SubframeConfig_NB[CC_id];
sib2_NB->radioResourceConfigCommon_r13.npusch_ConfigCommon_r13.srs_SubframeConfig_r13= srs_SubframeConfig; /*OPTIONAL*/ sib2_NB_IoT->radioResourceConfigCommon_r13.npusch_ConfigCommon_r13.srs_SubframeConfig_r13= srs_SubframeConfig; /*OPTIONAL*/
/*OPTIONAL*/ /*OPTIONAL*/
...@@ -558,7 +558,7 @@ uint8_t do_SIB23_NB(uint8_t Mod_id, ...@@ -558,7 +558,7 @@ uint8_t do_SIB23_NB(uint8_t Mod_id,
dmrs_config->sixTone_BaseSequence_r13 = NULL; dmrs_config->sixTone_BaseSequence_r13 = NULL;
dmrs_config->twelveTone_BaseSequence_r13 = NULL; dmrs_config->twelveTone_BaseSequence_r13 = NULL;
sib2_NB->radioResourceConfigCommon_r13.npusch_ConfigCommon_r13.dmrs_Config_r13 = dmrs_config; sib2_NB_IoT->radioResourceConfigCommon_r13.npusch_ConfigCommon_r13.dmrs_Config_r13 = dmrs_config;
//ulReferenceSignalsNPUSCH //ulReferenceSignalsNPUSCH
/*Reference Signal (RS) for UL in NB-IoT is called DRS (Demodulation Reference Signal) /*Reference Signal (RS) for UL in NB-IoT is called DRS (Demodulation Reference Signal)
...@@ -566,8 +566,8 @@ uint8_t do_SIB23_NB(uint8_t Mod_id, ...@@ -566,8 +566,8 @@ uint8_t do_SIB23_NB(uint8_t Mod_id,
* sequence-group hopping can be disabled for certain specific UE through the parameter groupHoppingDisabled (physicalConfigDedicated) * sequence-group hopping can be disabled for certain specific UE through the parameter groupHoppingDisabled (physicalConfigDedicated)
* groupAssignmentNPUSCH--> is used for generate the sequence-shift pattern * groupAssignmentNPUSCH--> is used for generate the sequence-shift pattern
*/ */
sib2_NB->radioResourceConfigCommon_r13.npusch_ConfigCommon_r13.ul_ReferenceSignalsNPUSCH_r13.groupHoppingEnabled_r13= configuration->npusch_groupHoppingEnabled[CC_id]; sib2_NB_IoT->radioResourceConfigCommon_r13.npusch_ConfigCommon_r13.ul_ReferenceSignalsNPUSCH_r13.groupHoppingEnabled_r13= configuration->npusch_groupHoppingEnabled[CC_id];
sib2_NB->radioResourceConfigCommon_r13.npusch_ConfigCommon_r13.ul_ReferenceSignalsNPUSCH_r13.groupAssignmentNPUSCH_r13 =configuration->npusch_groupAssignmentNPUSCH_r13[CC_id]; sib2_NB_IoT->radioResourceConfigCommon_r13.npusch_ConfigCommon_r13.ul_ReferenceSignalsNPUSCH_r13.groupAssignmentNPUSCH_r13 =configuration->npusch_groupAssignmentNPUSCH_r13[CC_id];
//dl_GAP---------------------------------------------------------------------------------/*OPTIONAL*/ //dl_GAP---------------------------------------------------------------------------------/*OPTIONAL*/
...@@ -575,49 +575,49 @@ uint8_t do_SIB23_NB(uint8_t Mod_id, ...@@ -575,49 +575,49 @@ uint8_t do_SIB23_NB(uint8_t Mod_id,
dl_Gap->dl_GapDurationCoeff_r13= configuration-> dl_GapDurationCoeff_NB[CC_id]; dl_Gap->dl_GapDurationCoeff_r13= configuration-> dl_GapDurationCoeff_NB[CC_id];
dl_Gap->dl_GapPeriodicity_r13= configuration->dl_GapPeriodicity_NB[CC_id]; dl_Gap->dl_GapPeriodicity_r13= configuration->dl_GapPeriodicity_NB[CC_id];
dl_Gap->dl_GapThreshold_r13= configuration->dl_GapThreshold_NB[CC_id]; dl_Gap->dl_GapThreshold_r13= configuration->dl_GapThreshold_NB[CC_id];
sib2_NB->radioResourceConfigCommon_r13.dl_Gap_r13 = dl_Gap; sib2_NB_IoT->radioResourceConfigCommon_r13.dl_Gap_r13 = dl_Gap;
// uplinkPowerControlCommon - NB-IoT------------------------------------------------------ // uplinkPowerControlCommon - NB-IoT------------------------------------------------------
sib2_NB->radioResourceConfigCommon_r13.uplinkPowerControlCommon_r13.p0_NominalNPUSCH_r13 = configuration->npusch_p0_NominalNPUSCH; sib2_NB_IoT->radioResourceConfigCommon_r13.uplinkPowerControlCommon_r13.p0_NominalNPUSCH_r13 = configuration->npusch_p0_NominalNPUSCH;
sib2_NB->radioResourceConfigCommon_r13.uplinkPowerControlCommon_r13.deltaPreambleMsg3_r13 = configuration->deltaPreambleMsg3; sib2_NB_IoT->radioResourceConfigCommon_r13.uplinkPowerControlCommon_r13.deltaPreambleMsg3_r13 = configuration->deltaPreambleMsg3;
sib2_NB->radioResourceConfigCommon_r13.uplinkPowerControlCommon_r13.alpha_r13 = configuration->npusch_alpha; sib2_NB_IoT->radioResourceConfigCommon_r13.uplinkPowerControlCommon_r13.alpha_r13 = configuration->npusch_alpha;
//no deltaFlist_PUCCH and no UL cyclic prefix //no deltaFlist_PUCCH and no UL cyclic prefix
// UE Timers and Constants -NB-IoT-------------------------------------------------------- // UE Timers and Constants -NB-IoT--------------------------------------------------------
sib2_NB->ue_TimersAndConstants_r13.t300_r13 = configuration-> ue_TimersAndConstants_t300_NB[CC_id]; sib2_NB_IoT->ue_TimersAndConstants_r13.t300_r13 = configuration-> ue_TimersAndConstants_t300_NB[CC_id];
sib2_NB->ue_TimersAndConstants_r13.t301_r13 = configuration-> ue_TimersAndConstants_t301_NB[CC_id]; sib2_NB_IoT->ue_TimersAndConstants_r13.t301_r13 = configuration-> ue_TimersAndConstants_t301_NB[CC_id];
sib2_NB->ue_TimersAndConstants_r13.t310_r13 = configuration-> ue_TimersAndConstants_t310_NB[CC_id]; sib2_NB_IoT->ue_TimersAndConstants_r13.t310_r13 = configuration-> ue_TimersAndConstants_t310_NB[CC_id];
sib2_NB->ue_TimersAndConstants_r13.t311_r13 = configuration-> ue_TimersAndConstants_t311_NB[CC_id]; sib2_NB_IoT->ue_TimersAndConstants_r13.t311_r13 = configuration-> ue_TimersAndConstants_t311_NB[CC_id];
sib2_NB->ue_TimersAndConstants_r13.n310_r13 = configuration-> ue_TimersAndConstants_n310_NB[CC_id]; sib2_NB_IoT->ue_TimersAndConstants_r13.n310_r13 = configuration-> ue_TimersAndConstants_n310_NB[CC_id];
sib2_NB->ue_TimersAndConstants_r13.n311_r13 = configuration-> ue_TimersAndConstants_n311_NB[CC_id]; sib2_NB_IoT->ue_TimersAndConstants_r13.n311_r13 = configuration-> ue_TimersAndConstants_n311_NB[CC_id];
//other SIB2-NB Parameters-------------------------------------------------------------------------------- //other SIB2-NB Parameters--------------------------------------------------------------------------------
sib2_NB->freqInfo_r13.additionalSpectrumEmission_r13 = 1; sib2_NB_IoT->freqInfo_r13.additionalSpectrumEmission_r13 = 1;
sib2_NB->freqInfo_r13.ul_CarrierFreq_r13 = NULL; /*OPTIONAL*/ sib2_NB_IoT->freqInfo_r13.ul_CarrierFreq_r13 = NULL; /*OPTIONAL*/
sib2_NB->timeAlignmentTimerCommon_r13=TimeAlignmentTimer_infinity;//TimeAlignmentTimer_sf5120; sib2_NB_IoT->timeAlignmentTimerCommon_r13=TimeAlignmentTimer_infinity;//TimeAlignmentTimer_sf5120;
/*OPTIONAL*/ /*OPTIONAL*/
sib2_NB->multiBandInfoList_r13 = NULL; sib2_NB_IoT->multiBandInfoList_r13 = NULL;
/// SIB3-NB------------------------------------------------------- /// SIB3-NB-------------------------------------------------------
sib3_NB->cellReselectionInfoCommon_r13.q_Hyst_r13=SystemInformationBlockType3_NB_r13__cellReselectionInfoCommon_r13__q_Hyst_r13_dB4; sib3_NB_IoT->cellReselectionInfoCommon_r13.q_Hyst_r13=SystemInformationBlockType3_NB_r13__cellReselectionInfoCommon_r13__q_Hyst_r13_dB4;
sib3_NB->cellReselectionServingFreqInfo_r13.s_NonIntraSearch_r13=NULL; //or define in configuration? sib3_NB_IoT->cellReselectionServingFreqInfo_r13.s_NonIntraSearch_r13=NULL; //or define in configuration?
sib3_NB->intraFreqCellReselectionInfo_r13.q_RxLevMin_r13 = -70; sib3_NB_IoT->intraFreqCellReselectionInfo_r13.q_RxLevMin_r13 = -70;
//new //new
sib3_NB->intraFreqCellReselectionInfo_r13.q_QualMin_r13 = CALLOC(1,sizeof(*sib3_NB->intraFreqCellReselectionInfo_r13.q_QualMin_r13)); sib3_NB_IoT->intraFreqCellReselectionInfo_r13.q_QualMin_r13 = CALLOC(1,sizeof(*sib3_NB_IoT->intraFreqCellReselectionInfo_r13.q_QualMin_r13));
*(sib3_NB->intraFreqCellReselectionInfo_r13.q_QualMin_r13)= 10; //a caso *(sib3_NB_IoT->intraFreqCellReselectionInfo_r13.q_QualMin_r13)= 10; //a caso
sib3_NB->intraFreqCellReselectionInfo_r13.p_Max_r13 = NULL; sib3_NB_IoT->intraFreqCellReselectionInfo_r13.p_Max_r13 = NULL;
sib3_NB->intraFreqCellReselectionInfo_r13.s_IntraSearchP_r13 = 31; // s_intraSearch --> s_intraSearchP!!! (they call in a different way) sib3_NB_IoT->intraFreqCellReselectionInfo_r13.s_IntraSearchP_r13 = 31; // s_intraSearch --> s_intraSearchP!!! (they call in a different way)
sib3_NB->intraFreqCellReselectionInfo_r13.t_Reselection_r13=1; sib3_NB_IoT->intraFreqCellReselectionInfo_r13.t_Reselection_r13=1;
//how to manage? //how to manage?
sib3_NB->freqBandInfo_r13 = NULL; sib3_NB_IoT->freqBandInfo_r13 = NULL;
sib3_NB->multiBandInfoList_r13 = NULL; sib3_NB_IoT->multiBandInfoList_r13 = NULL;
///BCCH message (generate the SI message) ///BCCH message (generate the SI message)
...@@ -637,7 +637,7 @@ uint8_t do_SIB23_NB(uint8_t Mod_id, ...@@ -637,7 +637,7 @@ uint8_t do_SIB23_NB(uint8_t Mod_id,
#endif #endif
enc_rval = uper_encode_to_buffer(&asn_DEF_BCCH_DL_SCH_Message_NB, enc_rval = uper_encode_to_buffer(&asn_DEF_BCCH_DL_SCH_Message_NB,
(void*)bcch_message, (void*)bcch_message,
carrier->SIB23_NB, carrier->SIB23_NB_IoT,
900); 900);
AssertFatal (enc_rval.encoded > 0, "ASN1 message encoding failed (%s, %lu)!\n", AssertFatal (enc_rval.encoded > 0, "ASN1 message encoding failed (%s, %lu)!\n",
enc_rval.failed_type->name, enc_rval.encoded); enc_rval.failed_type->name, enc_rval.encoded);
...@@ -650,15 +650,15 @@ uint8_t do_SIB23_NB(uint8_t Mod_id, ...@@ -650,15 +650,15 @@ uint8_t do_SIB23_NB(uint8_t Mod_id,
#endif #endif
if (enc_rval.encoded==-1) { if (enc_rval.encoded==-1) {
msg("[RRC] ASN1 : SI-NB encoding failed for SIB23_NB\n"); msg("[RRC] ASN1 : SI-NB encoding failed for SIB23_NB_IoT\n");
return(-1); return(-1);
} }
return((enc_rval.encoded+7)/8); return((enc_rval.encoded+7)/8);
} }
/*do_RRCConnectionSetup_NB--> the aim is to establish SRB1 and SRB1bis(implicitly)*/ /*do_RRCConnectionSetup_NB_IoT--> the aim is to establish SRB1 and SRB1bis(implicitly)*/
uint8_t do_RRCConnectionSetup_NB( uint8_t do_RRCConnectionSetup_NB_IoT(
const protocol_ctxt_t* const ctxt_pP, const protocol_ctxt_t* const ctxt_pP,
rrc_eNB_ue_context_NB_IoT_t* const ue_context_pP, rrc_eNB_ue_context_NB_IoT_t* const ue_context_pP,
int CC_id, int CC_id,
...@@ -693,13 +693,13 @@ uint8_t do_RRCConnectionSetup_NB( ...@@ -693,13 +693,13 @@ uint8_t do_RRCConnectionSetup_NB(
//No UL_specific parameters for NB-IoT in LogicalChanelConfig-NB //No UL_specific parameters for NB-IoT in LogicalChanelConfig-NB
PhysicalConfigDedicated_NB_r13_t* physicalConfigDedicated2_NB = NULL; PhysicalConfigDedicated_NB_r13_t* physicalConfigDedicated2_NB = NULL;
DL_CCCH_Message_NB_t dl_ccch_msg_NB; DL_CCCH_Message_NB_t dl_ccch_msg_NB_IoT;
RRCConnectionSetup_NB_t* rrcConnectionSetup_NB = NULL; RRCConnectionSetup_NB_t* rrcConnectionSetup_NB = NULL;
memset((void *)&dl_ccch_msg_NB,0,sizeof(DL_CCCH_Message_NB_t)); memset((void *)&dl_ccch_msg_NB_IoT,0,sizeof(DL_CCCH_Message_NB_t));
dl_ccch_msg_NB.message.present = DL_CCCH_MessageType_NB_PR_c1; dl_ccch_msg_NB_IoT.message.present = DL_CCCH_MessageType_NB_PR_c1;
dl_ccch_msg_NB.message.choice.c1.present = DL_CCCH_MessageType_NB__c1_PR_rrcConnectionSetup_r13; dl_ccch_msg_NB_IoT.message.choice.c1.present = DL_CCCH_MessageType_NB__c1_PR_rrcConnectionSetup_r13;
rrcConnectionSetup_NB = &dl_ccch_msg_NB.message.choice.c1.choice.rrcConnectionSetup_r13; rrcConnectionSetup_NB = &dl_ccch_msg_NB_IoT.message.choice.c1.choice.rrcConnectionSetup_r13;
if (*SRB_configList_NB) { if (*SRB_configList_NB) {
...@@ -852,7 +852,7 @@ uint8_t do_RRCConnectionSetup_NB( ...@@ -852,7 +852,7 @@ uint8_t do_RRCConnectionSetup_NB(
xer_fprint(stdout, &asn_DEF_DL_CCCH_Message, (void*)&dl_ccch_msg); xer_fprint(stdout, &asn_DEF_DL_CCCH_Message, (void*)&dl_ccch_msg);
#endif #endif
enc_rval = uper_encode_to_buffer(&asn_DEF_DL_CCCH_Message_NB, enc_rval = uper_encode_to_buffer(&asn_DEF_DL_CCCH_Message_NB,
(void*)&dl_ccch_msg_NB, (void*)&dl_ccch_msg_NB_IoT,
buffer, buffer,
100); 100);
AssertFatal (enc_rval.encoded > 0, "ASN1 message encoding failed (%s, %lu)!\n", AssertFatal (enc_rval.encoded > 0, "ASN1 message encoding failed (%s, %lu)!\n",
...@@ -868,7 +868,7 @@ uint8_t do_RRCConnectionSetup_NB( ...@@ -868,7 +868,7 @@ uint8_t do_RRCConnectionSetup_NB(
} }
/*do_SecurityModeCommand - exactly the same as previous implementation*/ /*do_SecurityModeCommand - exactly the same as previous implementation*/
uint8_t do_SecurityModeCommand_NB( uint8_t do_SecurityModeCommand_NB_IoT(
const protocol_ctxt_t* const ctxt_pP, const protocol_ctxt_t* const ctxt_pP,
uint8_t* const buffer, uint8_t* const buffer,
const uint8_t Transaction_id, const uint8_t Transaction_id,
...@@ -929,8 +929,8 @@ uint8_t do_SecurityModeCommand_NB( ...@@ -929,8 +929,8 @@ uint8_t do_SecurityModeCommand_NB(
return((enc_rval.encoded+7)/8); return((enc_rval.encoded+7)/8);
} }
/*do_UECapabilityEnquiry_NB - very similar to legacy lte*/ /*do_UECapabilityEnquiry_NB_IoT - very similar to legacy lte*/
uint8_t do_UECapabilityEnquiry_NB( uint8_t do_UECapabilityEnquiry_NB_IoT(
const protocol_ctxt_t* const ctxt_pP, const protocol_ctxt_t* const ctxt_pP,
uint8_t* const buffer, uint8_t* const buffer,
const uint8_t Transaction_id const uint8_t Transaction_id
...@@ -987,10 +987,10 @@ uint8_t do_UECapabilityEnquiry_NB( ...@@ -987,10 +987,10 @@ uint8_t do_UECapabilityEnquiry_NB(
return((enc_rval.encoded+7)/8); return((enc_rval.encoded+7)/8);
} }
/*do_RRCConnectionReconfiguration_NB-->may convey information for resource configuration /*do_RRCConnectionReconfiguration_NB_IoT-->may convey information for resource configuration
* (including RBs, MAC main configuration and physical channel configuration) * (including RBs, MAC main configuration and physical channel configuration)
* including any associated dedicated NAS information.*/ * including any associated dedicated NAS information.*/
uint16_t do_RRCConnectionReconfiguration_NB( uint16_t do_RRCConnectionReconfiguration_NB_IoT(
const protocol_ctxt_t* const ctxt_pP, const protocol_ctxt_t* const ctxt_pP,
uint8_t *buffer, uint8_t *buffer,
uint8_t Transaction_id, uint8_t Transaction_id,
...@@ -1073,30 +1073,30 @@ uint16_t do_RRCConnectionReconfiguration_NB( ...@@ -1073,30 +1073,30 @@ uint16_t do_RRCConnectionReconfiguration_NB(
} }
/*do_RRCConnectionReestablishmentReject - exactly the same as legacy LTE*/ /*do_RRCConnectionReestablishmentReject - exactly the same as legacy LTE*/
uint8_t do_RRCConnectionReestablishmentReject_NB( uint8_t do_RRCConnectionReestablishmentReject_NB_IoT(
uint8_t Mod_id, uint8_t Mod_id,
uint8_t* const buffer) uint8_t* const buffer)
{ {
asn_enc_rval_t enc_rval; asn_enc_rval_t enc_rval;
DL_CCCH_Message_NB_t dl_ccch_msg_NB; DL_CCCH_Message_NB_t dl_ccch_msg_NB_IoT;
RRCConnectionReestablishmentReject_t *rrcConnectionReestablishmentReject; RRCConnectionReestablishmentReject_t *rrcConnectionReestablishmentReject;
memset((void *)&dl_ccch_msg_NB,0,sizeof(DL_CCCH_Message_NB_t)); memset((void *)&dl_ccch_msg_NB_IoT,0,sizeof(DL_CCCH_Message_NB_t));
dl_ccch_msg_NB.message.present = DL_CCCH_MessageType_NB_PR_c1; dl_ccch_msg_NB_IoT.message.present = DL_CCCH_MessageType_NB_PR_c1;
dl_ccch_msg_NB.message.choice.c1.present = DL_CCCH_MessageType_NB__c1_PR_rrcConnectionReestablishmentReject_r13; dl_ccch_msg_NB_IoT.message.choice.c1.present = DL_CCCH_MessageType_NB__c1_PR_rrcConnectionReestablishmentReject_r13;
rrcConnectionReestablishmentReject = &dl_ccch_msg_NB.message.choice.c1.choice.rrcConnectionReestablishmentReject_r13; rrcConnectionReestablishmentReject = &dl_ccch_msg_NB_IoT.message.choice.c1.choice.rrcConnectionReestablishmentReject_r13;
// RRCConnectionReestablishmentReject //exactly the same as LTE // RRCConnectionReestablishmentReject //exactly the same as LTE
rrcConnectionReestablishmentReject->criticalExtensions.present = RRCConnectionReestablishmentReject__criticalExtensions_PR_rrcConnectionReestablishmentReject_r8; rrcConnectionReestablishmentReject->criticalExtensions.present = RRCConnectionReestablishmentReject__criticalExtensions_PR_rrcConnectionReestablishmentReject_r8;
//Only change in "asn_DEF_DL_CCCH_Message_NB" //Only change in "asn_DEF_DL_CCCH_Message_NB"
#ifdef XER_PRINT #ifdef XER_PRINT
xer_fprint(stdout, &asn_DEF_DL_CCCH_Message_NB, (void*)&dl_ccch_msg_NB); xer_fprint(stdout, &asn_DEF_DL_CCCH_Message_NB, (void*)&dl_ccch_msg_NB_IoT);
#endif #endif
enc_rval = uper_encode_to_buffer(&asn_DEF_DL_CCCH_Message_NB, enc_rval = uper_encode_to_buffer(&asn_DEF_DL_CCCH_Message_NB,
(void*)&dl_ccch_msg_NB, (void*)&dl_ccch_msg_NB_IoT,
buffer, buffer,
100); 100);
AssertFatal (enc_rval.encoded > 0, "ASN1 message encoding failed (%s, %lu)!\n", AssertFatal (enc_rval.encoded > 0, "ASN1 message encoding failed (%s, %lu)!\n",
...@@ -1109,7 +1109,7 @@ uint8_t do_RRCConnectionReestablishmentReject_NB( ...@@ -1109,7 +1109,7 @@ uint8_t do_RRCConnectionReestablishmentReject_NB(
char message_string[20000]; char message_string[20000];
size_t message_string_size; size_t message_string_size;
if ((message_string_size = xer_sprint(message_string, sizeof(message_string), &asn_DEF_DL_CCCH_Message_NB, (void *) &dl_ccch_msg_NB)) > 0) { if ((message_string_size = xer_sprint(message_string, sizeof(message_string), &asn_DEF_DL_CCCH_Message_NB, (void *) &dl_ccch_msg_NB_IoT)) > 0) {
MessageDef *msg_p; MessageDef *msg_p;
msg_p = itti_alloc_new_message_sized (TASK_RRC_ENB, RRC_DL_CCCH, message_string_size + sizeof (IttiMsgText)); msg_p = itti_alloc_new_message_sized (TASK_RRC_ENB, RRC_DL_CCCH, message_string_size + sizeof (IttiMsgText));
...@@ -1130,8 +1130,8 @@ uint8_t do_RRCConnectionReestablishmentReject_NB( ...@@ -1130,8 +1130,8 @@ uint8_t do_RRCConnectionReestablishmentReject_NB(
return((enc_rval.encoded+7)/8); return((enc_rval.encoded+7)/8);
} }
/*do_RRCConnectionReject_NB*/ /*do_RRCConnectionReject_NB_IoT*/
uint8_t do_RRCConnectionReject_NB( uint8_t do_RRCConnectionReject_NB_IoT(
uint8_t Mod_id, uint8_t Mod_id,
uint8_t* const buffer) uint8_t* const buffer)
...@@ -1139,24 +1139,24 @@ uint8_t do_RRCConnectionReject_NB( ...@@ -1139,24 +1139,24 @@ uint8_t do_RRCConnectionReject_NB(
asn_enc_rval_t enc_rval; asn_enc_rval_t enc_rval;
DL_CCCH_Message_NB_t dl_ccch_msg_NB; DL_CCCH_Message_NB_t dl_ccch_msg_NB_IoT;
RRCConnectionReject_NB_t *rrcConnectionReject_NB; RRCConnectionReject_NB_t *rrcConnectionReject_NB_IoT;
memset((void *)&dl_ccch_msg_NB,0,sizeof(DL_CCCH_Message_NB_t)); memset((void *)&dl_ccch_msg_NB_IoT,0,sizeof(DL_CCCH_Message_NB_t));
dl_ccch_msg_NB.message.present = DL_CCCH_MessageType_NB_PR_c1; dl_ccch_msg_NB_IoT.message.present = DL_CCCH_MessageType_NB_PR_c1;
dl_ccch_msg_NB.message.choice.c1.present = DL_CCCH_MessageType_NB__c1_PR_rrcConnectionReject_r13; dl_ccch_msg_NB_IoT.message.choice.c1.present = DL_CCCH_MessageType_NB__c1_PR_rrcConnectionReject_r13;
rrcConnectionReject_NB = &dl_ccch_msg_NB.message.choice.c1.choice.rrcConnectionReject_r13; rrcConnectionReject_NB_IoT = &dl_ccch_msg_NB_IoT.message.choice.c1.choice.rrcConnectionReject_r13;
// RRCConnectionReject-NB // RRCConnectionReject-NB_IoT
rrcConnectionReject_NB->criticalExtensions.present = RRCConnectionReject_NB__criticalExtensions_PR_c1; rrcConnectionReject_NB_IoT->criticalExtensions.present = RRCConnectionReject_NB__criticalExtensions_PR_c1;
rrcConnectionReject_NB->criticalExtensions.choice.c1.present = RRCConnectionReject_NB__criticalExtensions__c1_PR_rrcConnectionReject_r13; rrcConnectionReject_NB_IoT->criticalExtensions.choice.c1.present = RRCConnectionReject_NB__criticalExtensions__c1_PR_rrcConnectionReject_r13;
/* let's put an extended wait time of 1s for the moment */ /* let's put an extended wait time of 1s for the moment */
rrcConnectionReject_NB->criticalExtensions.choice.c1.choice.rrcConnectionReject_r13.extendedWaitTime_r13 = 1; rrcConnectionReject_NB_IoT->criticalExtensions.choice.c1.choice.rrcConnectionReject_r13.extendedWaitTime_r13 = 1;
//new-use of suspend indication //new-use of suspend indication
//If present, this field indicates that the UE should remain suspended and not release its stored context. //If present, this field indicates that the UE should remain suspended and not release its stored context.
rrcConnectionReject_NB->criticalExtensions.choice.c1.choice.rrcConnectionReject_r13.rrc_SuspendIndication_r13= rrcConnectionReject_NB_IoT->criticalExtensions.choice.c1.choice.rrcConnectionReject_r13.rrc_SuspendIndication_r13=
CALLOC(1, sizeof(long)); CALLOC(1, sizeof(long));
*(rrcConnectionReject_NB->criticalExtensions.choice.c1.choice.rrcConnectionReject_r13.rrc_SuspendIndication_r13)= *(rrcConnectionReject_NB_IoT->criticalExtensions.choice.c1.choice.rrcConnectionReject_r13.rrc_SuspendIndication_r13)=
RRCConnectionReject_NB_r13_IEs__rrc_SuspendIndication_r13_true; RRCConnectionReject_NB_r13_IEs__rrc_SuspendIndication_r13_true;
//Only Modified "asn_DEF_DL_CCCH_Message_NB" //Only Modified "asn_DEF_DL_CCCH_Message_NB"
...@@ -1164,7 +1164,7 @@ uint8_t do_RRCConnectionReject_NB( ...@@ -1164,7 +1164,7 @@ uint8_t do_RRCConnectionReject_NB(
xer_fprint(stdout, &asn_DEF_DL_CCCH_Message_NB, (void*)&dl_ccch_msg); xer_fprint(stdout, &asn_DEF_DL_CCCH_Message_NB, (void*)&dl_ccch_msg);
#endif #endif
enc_rval = uper_encode_to_buffer(&asn_DEF_DL_CCCH_Message_NB, enc_rval = uper_encode_to_buffer(&asn_DEF_DL_CCCH_Message_NB,
(void*)&dl_ccch_msg_NB, (void*)&dl_ccch_msg_NB_IoT,
buffer, buffer,
100); 100);
AssertFatal (enc_rval.encoded > 0, "ASN1 message encoding failed (%s, %ld)!\n", AssertFatal (enc_rval.encoded > 0, "ASN1 message encoding failed (%s, %ld)!\n",
...@@ -1176,7 +1176,7 @@ uint8_t do_RRCConnectionReject_NB( ...@@ -1176,7 +1176,7 @@ uint8_t do_RRCConnectionReject_NB(
char message_string[20000]; char message_string[20000];
size_t message_string_size; size_t message_string_size;
if ((message_string_size = xer_sprint(message_string, sizeof(message_string), &asn_DEF_DL_CCCH_Message_NB, (void *) &dl_ccch_msg_NB)) > 0) { if ((message_string_size = xer_sprint(message_string, sizeof(message_string), &asn_DEF_DL_CCCH_Message_NB, (void *) &dl_ccch_msg_NB_IoT)) > 0) {
MessageDef *msg_p; MessageDef *msg_p;
msg_p = itti_alloc_new_message_sized (TASK_RRC_ENB, RRC_DL_CCCH, message_string_size + sizeof (IttiMsgText)); msg_p = itti_alloc_new_message_sized (TASK_RRC_ENB, RRC_DL_CCCH, message_string_size + sizeof (IttiMsgText));
...@@ -1202,7 +1202,7 @@ uint8_t do_RRCConnectionReject_NB( ...@@ -1202,7 +1202,7 @@ uint8_t do_RRCConnectionReject_NB(
//no do_MeasurementReport(..) in NB-IoT //no do_MeasurementReport(..) in NB-IoT
/*do_DLInformationTransfer_NB*/ /*do_DLInformationTransfer_NB*/
uint8_t do_DLInformationTransfer_NB( uint8_t do_DLInformationTransfer_NB_IoT(
uint8_t Mod_id, uint8_t Mod_id,
uint8_t **buffer, uint8_t **buffer,
uint8_t transaction_id, uint8_t transaction_id,
...@@ -1255,7 +1255,7 @@ uint8_t do_DLInformationTransfer_NB( ...@@ -1255,7 +1255,7 @@ uint8_t do_DLInformationTransfer_NB(
/*OAI_UECapability_t *fill_ue_capability*/ /*OAI_UECapability_t *fill_ue_capability*/
/*do_RRCConnectionReestablishment_NB-->used to re-establish SRB1*/ //which parameter to use? /*do_RRCConnectionReestablishment_NB-->used to re-establish SRB1*/ //which parameter to use?
uint8_t do_RRCConnectionReestablishment_NB( uint8_t do_RRCConnectionReestablishment_NB_IoT(
uint8_t Mod_id, uint8_t Mod_id,
uint8_t* const buffer, uint8_t* const buffer,
const uint8_t Transaction_id, const uint8_t Transaction_id,
...@@ -1264,14 +1264,14 @@ uint8_t do_RRCConnectionReestablishment_NB( ...@@ -1264,14 +1264,14 @@ uint8_t do_RRCConnectionReestablishment_NB(
{ {
asn_enc_rval_t enc_rval; asn_enc_rval_t enc_rval;
DL_CCCH_Message_NB_t dl_ccch_msg_NB; DL_CCCH_Message_NB_t dl_ccch_msg_NB_IoT;
RRCConnectionReestablishment_NB_t* rrcConnectionReestablishment_NB; RRCConnectionReestablishment_NB_t* rrcConnectionReestablishment_NB;
memset(&dl_ccch_msg_NB, 0, sizeof(DL_CCCH_Message_NB_t)); memset(&dl_ccch_msg_NB_IoT, 0, sizeof(DL_CCCH_Message_NB_t));
dl_ccch_msg_NB.message.present = DL_CCCH_MessageType_NB_PR_c1; dl_ccch_msg_NB_IoT.message.present = DL_CCCH_MessageType_NB_PR_c1;
dl_ccch_msg_NB.message.choice.c1.present = DL_CCCH_MessageType_NB__c1_PR_rrcConnectionReestablishment_r13; dl_ccch_msg_NB_IoT.message.choice.c1.present = DL_CCCH_MessageType_NB__c1_PR_rrcConnectionReestablishment_r13;
rrcConnectionReestablishment_NB = &dl_ccch_msg_NB.message.choice.c1.choice.rrcConnectionReestablishment_r13; rrcConnectionReestablishment_NB = &dl_ccch_msg_NB_IoT.message.choice.c1.choice.rrcConnectionReestablishment_r13;
//rrcConnectionReestablishment_NB //rrcConnectionReestablishment_NB
rrcConnectionReestablishment_NB->rrc_TransactionIdentifier = Transaction_id; rrcConnectionReestablishment_NB->rrc_TransactionIdentifier = Transaction_id;
...@@ -1288,7 +1288,7 @@ uint8_t do_RRCConnectionReestablishment_NB( ...@@ -1288,7 +1288,7 @@ uint8_t do_RRCConnectionReestablishment_NB(
rrcConnectionReestablishment_NB->criticalExtensions.choice.c1.choice.rrcConnectionReestablishment_r13.nextHopChainingCount_r13=0; rrcConnectionReestablishment_NB->criticalExtensions.choice.c1.choice.rrcConnectionReestablishment_r13.nextHopChainingCount_r13=0;
enc_rval = uper_encode_to_buffer(&asn_DEF_DL_CCCH_Message_NB, enc_rval = uper_encode_to_buffer(&asn_DEF_DL_CCCH_Message_NB,
(void*)&dl_ccch_msg_NB, (void*)&dl_ccch_msg_NB_IoT,
buffer, buffer,
RRC_BUF_SIZE); RRC_BUF_SIZE);
...@@ -1296,7 +1296,7 @@ uint8_t do_RRCConnectionReestablishment_NB( ...@@ -1296,7 +1296,7 @@ uint8_t do_RRCConnectionReestablishment_NB(
enc_rval.failed_type->name, enc_rval.encoded); enc_rval.failed_type->name, enc_rval.encoded);
#ifdef XER_PRINT #ifdef XER_PRINT
xer_fprint(stdout,&asn_DEF_DL_CCCH_Message_NB,(void*)&dl_ccch_msg_NB); xer_fprint(stdout,&asn_DEF_DL_CCCH_Message_NB,(void*)&dl_ccch_msg_NB_IoT);
#endif #endif
#if defined(ENABLE_ITTI) #if defined(ENABLE_ITTI)
...@@ -1305,7 +1305,7 @@ uint8_t do_RRCConnectionReestablishment_NB( ...@@ -1305,7 +1305,7 @@ uint8_t do_RRCConnectionReestablishment_NB(
char message_string[30000]; char message_string[30000];
size_t message_string_size; size_t message_string_size;
if ((message_string_size = xer_sprint(message_string, sizeof(message_string), &asn_DEF_DL_CCCH_Message_NB, (void *) &dl_ccch_msg_NB)) > 0) { if ((message_string_size = xer_sprint(message_string, sizeof(message_string), &asn_DEF_DL_CCCH_Message_NB, (void *) &dl_ccch_msg_NB_IoT)) > 0) {
MessageDef *msg_p; MessageDef *msg_p;
msg_p = itti_alloc_new_message_sized (TASK_RRC_ENB, RRC_DL_CCCH, message_string_size + sizeof (IttiMsgText)); msg_p = itti_alloc_new_message_sized (TASK_RRC_ENB, RRC_DL_CCCH, message_string_size + sizeof (IttiMsgText));
...@@ -1323,7 +1323,7 @@ uint8_t do_RRCConnectionReestablishment_NB( ...@@ -1323,7 +1323,7 @@ uint8_t do_RRCConnectionReestablishment_NB(
} }
/*do_RRCConnectionRelease_NB--> is used to command the release of an RRC connection*/ /*do_RRCConnectionRelease_NB--> is used to command the release of an RRC connection*/
uint8_t do_RRCConnectionRelease_NB( uint8_t do_RRCConnectionRelease_NB_IoT(
uint8_t Mod_id, uint8_t Mod_id,
uint8_t *buffer, uint8_t *buffer,
const uint8_t Transaction_id) const uint8_t Transaction_id)
...@@ -1365,7 +1365,7 @@ uint8_t do_RRCConnectionRelease_NB( ...@@ -1365,7 +1365,7 @@ uint8_t do_RRCConnectionRelease_NB(
// -----??????-------------------- // -----??????--------------------
#ifndef USER_MODE #ifndef USER_MODE
int init_module_NB(void) int init_module_NB_IoT(void)
{ {
printk("Init asn1_msg_nb_iot module\n"); printk("Init asn1_msg_nb_iot module\n");
...@@ -1374,24 +1374,24 @@ int init_module_NB(void) ...@@ -1374,24 +1374,24 @@ int init_module_NB(void)
} }
void cleanup_module_NB(void) void cleanup_module_NB_IoT(void)
{ {
printk("Stopping asn1_msg_nb_iot module\n"); printk("Stopping asn1_msg_nb_iot module\n");
} }
EXPORT_SYMBOL(do_SIB1_NB); EXPORT_SYMBOL(do_SIB1_NB_IoT);
EXPORT_SYMBOL(do_SIB23_NB); EXPORT_SYMBOL(do_SIB23_NB_IoT);
EXPORT_SYMBOL(do_RRCConnectionRequest_NB); EXPORT_SYMBOL(do_RRCConnectionRequest_NB_IoT);
EXPORT_SYMBOL(do_RRCConnectionSetupComplete_NB); EXPORT_SYMBOL(do_RRCConnectionSetupComplete_NB_IoT);
EXPORT_SYMBOL(do_RRCConnectionReconfigurationComplete_NB); EXPORT_SYMBOL(do_RRCConnectionReconfigurationComplete_NB_IoT);
EXPORT_SYMBOL(do_RRCConnectionSetup_NB); EXPORT_SYMBOL(do_RRCConnectionSetup_NB_IoT);
EXPORT_SYMBOL(do_RRCConnectionReestablishmentReject_NB); EXPORT_SYMBOL(do_RRCConnectionReestablishmentReject_NB_IoT);
EXPORT_SYMBOL(do_RRCConnectionReconfiguration_NB); EXPORT_SYMBOL(do_RRCConnectionReconfiguration_NB_IoT);
EXPORT_SYMBOL(asn_DEF_UL_DCCH_Message_NB); EXPORT_SYMBOL(asn_DEF_UL_DCCH_Message_NB);
EXPORT_SYMBOL(asn_DEF_UL_CCCH_Message_NB); EXPORT_SYMBOL(asn_DEF_UL_CCCH_Message_NB);
EXPORT_SYMBOL(asn_DEF_SystemInformation_NB); EXPORT_SYMBOL(asn_DEF_SystemInformation_NB_IoT);
EXPORT_SYMBOL(asn_DEF_DL_DCCH_Message_NB); EXPORT_SYMBOL(asn_DEF_DL_DCCH_Message_NB);
EXPORT_SYMBOL(asn_DEF_SystemInformationBlockType1_NB); EXPORT_SYMBOL(asn_DEF_SystemInformationBlockType1_NB_IoT);
EXPORT_SYMBOL(asn_DEF_DL_CCCH_Message_NB); EXPORT_SYMBOL(asn_DEF_DL_CCCH_Message_NB);
EXPORT_SYMBOL(uper_decode_complete); EXPORT_SYMBOL(uper_decode_complete);
EXPORT_SYMBOL(uper_decode); EXPORT_SYMBOL(uper_decode);
......
...@@ -76,7 +76,8 @@ uint8_t do_MIB_NB_IoT( ...@@ -76,7 +76,8 @@ uint8_t do_MIB_NB_IoT(
@param configuration Pointer Configuration Request structure @param configuration Pointer Configuration Request structure
@return size of encoded bit stream in bytes*/ @return size of encoded bit stream in bytes*/
uint8_t do_SIB1_NB(uint8_t Mod_id, int CC_id, uint8_t do_SIB1_NB_IoT(uint8_t Mod_id,
int CC_id,
rrc_eNB_carrier_data_NB_IoT_t *carrier, rrc_eNB_carrier_data_NB_IoT_t *carrier,
RrcConfigurationReq *configuration, RrcConfigurationReq *configuration,
uint32_t frame uint32_t frame
...@@ -91,7 +92,7 @@ uint8_t do_SIB1_NB(uint8_t Mod_id, int CC_id, ...@@ -91,7 +92,7 @@ uint8_t do_SIB1_NB(uint8_t Mod_id, int CC_id,
@param sib3_NB Pointer (returned) to sib3_NB component withing SI-NB PDU @param sib3_NB Pointer (returned) to sib3_NB component withing SI-NB PDU
@return size of encoded bit stream in bytes*/ @return size of encoded bit stream in bytes*/
uint8_t do_SIB23_NB(uint8_t Mod_id, uint8_t do_SIB23_NB_IoT(uint8_t Mod_id,
int CC_id, int CC_id,
rrc_eNB_carrier_data_NB_IoT_t *carrier, rrc_eNB_carrier_data_NB_IoT_t *carrier,
RrcConfigurationReq *configuration RrcConfigurationReq *configuration
...@@ -105,7 +106,7 @@ routine only generates an mo-data establishment cause. ...@@ -105,7 +106,7 @@ routine only generates an mo-data establishment cause.
@param Mod_id @param Mod_id
@returns Size of encoded bit stream in bytes*/ @returns Size of encoded bit stream in bytes*/
uint8_t do_RRCConnectionRequest_NB(uint8_t Mod_id, uint8_t *buffer,uint8_t *rv); uint8_t do_RRCConnectionRequest_NB_IoT(uint8_t Mod_id, uint8_t *buffer,uint8_t *rv);
/**(UE -SIDE) /**(UE -SIDE)
...@@ -117,7 +118,7 @@ uint8_t do_RRCConnectionRequest_NB(uint8_t Mod_id, uint8_t *buffer,uint8_t *rv); ...@@ -117,7 +118,7 @@ uint8_t do_RRCConnectionRequest_NB(uint8_t Mod_id, uint8_t *buffer,uint8_t *rv);
@param buffer Pointer to PER-encoded ASN.1 description of UL-DCCH-Message PDU @param buffer Pointer to PER-encoded ASN.1 description of UL-DCCH-Message PDU
@returns Size of encoded bit stream in bytes*/ @returns Size of encoded bit stream in bytes*/
uint8_t do_RRCConnectionSetupComplete_NB(uint8_t Mod_id, uint8_t* buffer, const uint8_t Transaction_id, const int dedicatedInfoNASLength, uint8_t do_RRCConnectionSetupComplete_NB_IoT(uint8_t Mod_id, uint8_t* buffer, const uint8_t Transaction_id, const int dedicatedInfoNASLength,
const char* dedicatedInfoNAS); const char* dedicatedInfoNAS);
/** (UE-SIDE) /** (UE-SIDE)
...@@ -127,8 +128,7 @@ uint8_t do_RRCConnectionSetupComplete_NB(uint8_t Mod_id, uint8_t* buffer, const ...@@ -127,8 +128,7 @@ uint8_t do_RRCConnectionSetupComplete_NB(uint8_t Mod_id, uint8_t* buffer, const
@param Transaction_id @param Transaction_id
@returns Size of encoded bit stream in bytes*/ @returns Size of encoded bit stream in bytes*/
uint8_t uint8_t do_RRCConnectionReconfigurationComplete_NB_IoT(
do_RRCConnectionReconfigurationComplete_NB(
const protocol_ctxt_t* const ctxt_pP, const protocol_ctxt_t* const ctxt_pP,
uint8_t* buffer, uint8_t* buffer,
const uint8_t Transaction_id const uint8_t Transaction_id
...@@ -148,8 +148,7 @@ PhysicalConfigDedicated-NB IEs. ...@@ -148,8 +148,7 @@ PhysicalConfigDedicated-NB IEs.
@param physicalConfigDedicated_NB Pointer (returned) to PhysicalConfigDedicated-NB IE for this UE @param physicalConfigDedicated_NB Pointer (returned) to PhysicalConfigDedicated-NB IE for this UE
@returns Size of encoded bit stream in bytes*/ @returns Size of encoded bit stream in bytes*/
uint8_t uint8_t do_RRCConnectionSetup_NB_IoT(
do_RRCConnectionSetup_NB(
const protocol_ctxt_t* const ctxt_pP, const protocol_ctxt_t* const ctxt_pP,
rrc_eNB_ue_context_NB_IoT_t* const ue_context_pP, rrc_eNB_ue_context_NB_IoT_t* const ue_context_pP,
int CC_id, int CC_id,
...@@ -179,7 +178,7 @@ do_RRCConnectionSetup_NB( ...@@ -179,7 +178,7 @@ do_RRCConnectionSetup_NB(
@returns Size of encoded bit stream in bytes*/ @returns Size of encoded bit stream in bytes*/
uint16_t uint16_t
do_RRCConnectionReconfiguration_NB( do_RRCConnectionReconfiguration_NB_IoT(
const protocol_ctxt_t* const ctxt_pP, const protocol_ctxt_t* const ctxt_pP,
uint8_t *buffer, uint8_t *buffer,
uint8_t Transaction_id, uint8_t Transaction_id,
...@@ -200,7 +199,7 @@ do_RRCConnectionReconfiguration_NB( ...@@ -200,7 +199,7 @@ do_RRCConnectionReconfiguration_NB(
@param integrityProtAlgorithm @param integrityProtAlgorithm
*/ */
uint8_t do_SecurityModeCommand_NB( uint8_t do_SecurityModeCommand_NB_IoT(
const protocol_ctxt_t* const ctxt_pP, const protocol_ctxt_t* const ctxt_pP,
uint8_t* const buffer, uint8_t* const buffer,
const uint8_t Transaction_id, const uint8_t Transaction_id,
...@@ -215,7 +214,7 @@ uint8_t do_SecurityModeCommand_NB( ...@@ -215,7 +214,7 @@ uint8_t do_SecurityModeCommand_NB(
@param Transaction_id Transaction_ID for this message @param Transaction_id Transaction_ID for this message
*/ */
uint8_t do_UECapabilityEnquiry_NB( uint8_t do_UECapabilityEnquiry_NB_IoT(
const protocol_ctxt_t* const ctxt_pP, const protocol_ctxt_t* const ctxt_pP,
uint8_t* const buffer, uint8_t* const buffer,
const uint8_t Transaction_id const uint8_t Transaction_id
...@@ -230,7 +229,7 @@ uint8_t do_UECapabilityEnquiry_NB( ...@@ -230,7 +229,7 @@ uint8_t do_UECapabilityEnquiry_NB(
@returns Size of encoded bit stream in bytes*/ @returns Size of encoded bit stream in bytes*/
uint8_t uint8_t
do_RRCConnectionReestablishmentReject_NB( do_RRCConnectionReestablishmentReject_NB_IoT(
uint8_t Mod_id, uint8_t Mod_id,
uint8_t* const buffer); uint8_t* const buffer);
...@@ -241,7 +240,7 @@ do_RRCConnectionReestablishmentReject_NB( ...@@ -241,7 +240,7 @@ do_RRCConnectionReestablishmentReject_NB(
@param buffer Pointer to PER-encoded ASN.1 description of DL-CCCH-Message PDU @param buffer Pointer to PER-encoded ASN.1 description of DL-CCCH-Message PDU
@returns Size of encoded bit stream in bytes*/ @returns Size of encoded bit stream in bytes*/
uint8_t uint8_t
do_RRCConnectionReject_NB( do_RRCConnectionReject_NB_IoT(
uint8_t Mod_id, uint8_t Mod_id,
uint8_t* const buffer); uint8_t* const buffer);
...@@ -253,10 +252,10 @@ do_RRCConnectionReject_NB( ...@@ -253,10 +252,10 @@ do_RRCConnectionReject_NB(
@param transaction_id Transaction index @param transaction_id Transaction index
@returns Size of encoded bit stream in bytes*/ @returns Size of encoded bit stream in bytes*/
uint8_t do_RRCConnectionRelease_NB(uint8_t Mod_id, uint8_t *buffer,int Transaction_id); uint8_t do_RRCConnectionRelease_NB_IoT(uint8_t Mod_id, uint8_t *buffer,int Transaction_id);
uint8_t do_DLInformationTransfer_NB( uint8_t do_DLInformationTransfer_NB_IoT(
uint8_t Mod_id, uint8_t Mod_id,
uint8_t **buffer, uint8_t **buffer,
uint8_t transaction_id, uint8_t transaction_id,
...@@ -275,7 +274,7 @@ uint8_t do_DLInformationTransfer_NB( ...@@ -275,7 +274,7 @@ uint8_t do_DLInformationTransfer_NB(
* *
*/ */
uint8_t do_RRCConnectionReestablishment_NB( uint8_t do_RRCConnectionReestablishment_NB_IoT(
uint8_t Mod_id, uint8_t Mod_id,
uint8_t* const buffer, uint8_t* const buffer,
const uint8_t Transaction_id, const uint8_t Transaction_id,
...@@ -290,4 +289,4 @@ uint8_t do_RRCConnectionReestablishment_NB( ...@@ -290,4 +289,4 @@ uint8_t do_RRCConnectionReestablishment_NB(
@param transaction_id Transaction index @param transaction_id Transaction index
@returns Size of encoded bit stream in bytes*/ @returns Size of encoded bit stream in bytes*/
uint8_t do_RRCConnectionRelease_NB(uint8_t Mod_id, uint8_t *buffer,int Transaction_id); //uint8_t do_RRCConnectionRelease_NB_IoT(uint8_t Mod_id, uint8_t *buffer,int Transaction_id);
...@@ -459,24 +459,24 @@ typedef struct rrc_eNB_ue_context_NB_IoT_s { ...@@ -459,24 +459,24 @@ typedef struct rrc_eNB_ue_context_NB_IoT_s {
typedef struct { typedef struct {
// buffer that contains the encoded messages // buffer that contains the encoded messages
uint8_t *MIB_NB; uint8_t *MIB_NB_IoT;
uint8_t sizeof_MIB_NB_IoT; uint8_t sizeof_MIB_NB_IoT;
uint8_t *SIB1_NB; uint8_t *SIB1_NB_IoT;
uint8_t sizeof_SIB1_NB; uint8_t sizeof_SIB1_NB_IoT;
uint8_t *SIB23_NB; uint8_t *SIB23_NB_IoT;
uint8_t sizeof_SIB23_NB; uint8_t sizeof_SIB23_NB_IoT;
//not actually implemented in OAI //not actually implemented in OAI
uint8_t *SIB4_NB; uint8_t *SIB4_NB_IoT;
uint8_t sizeof_SIB4_NB; uint8_t sizeof_SIB4_NB_IoT;
uint8_t *SIB5_NB; uint8_t *SIB5_NB_IoT;
uint8_t sizeof_SIB5_NB; uint8_t sizeof_SIB5_NB_IoT;
uint8_t *SIB14_NB; uint8_t *SIB14_NB_IoT;
uint8_t sizeof_SIB14_NB; uint8_t sizeof_SIB14_NB_IoT;
uint8_t *SIB16_NB; uint8_t *SIB16_NB_IoT;
uint8_t sizeof_SIB16_NB; uint8_t sizeof_SIB16_NB_IoT;
//TS 36.331 V14.2.1 //TS 36.331 V14.2.1
// uint8_t *SIB15_NB; // uint8_t *SIB15_NB;
...@@ -501,13 +501,13 @@ typedef struct { ...@@ -501,13 +501,13 @@ typedef struct {
BCCH_DL_SCH_Message_NB_t systemInformation_NB_IoT; //SI BCCH_DL_SCH_Message_NB_t systemInformation_NB_IoT; //SI
SystemInformationBlockType1_NB_t *sib1_NB_IoT; SystemInformationBlockType1_NB_t *sib1_NB_IoT;
SystemInformationBlockType2_NB_r13_t *sib2_NB; SystemInformationBlockType2_NB_r13_t *sib2_NB_IoT;
SystemInformationBlockType3_NB_r13_t *sib3_NB; SystemInformationBlockType3_NB_r13_t *sib3_NB_IoT;
//not implemented yet //not implemented yet
SystemInformationBlockType4_NB_r13_t *sib4_NB; SystemInformationBlockType4_NB_r13_t *sib4_NB_IoT;
SystemInformationBlockType5_NB_r13_t *sib5_NB; SystemInformationBlockType5_NB_r13_t *sib5_NB_IoT;
SystemInformationBlockType14_NB_r13_t *sib14_NB; SystemInformationBlockType14_NB_r13_t *sib14_NB_IoT;
SystemInformationBlockType16_NB_r13_t *sib16_NB; SystemInformationBlockType16_NB_r13_t *sib16_NB_IoT;
SRB_INFO_NB_IoT SI; SRB_INFO_NB_IoT SI;
......
...@@ -185,7 +185,7 @@ rrc_eNB_generate_RRCConnectionRelease_NB( ...@@ -185,7 +185,7 @@ rrc_eNB_generate_RRCConnectionRelease_NB(
memset(buffer, 0, RRC_BUF_SIZE); memset(buffer, 0, RRC_BUF_SIZE);
size = do_RRCConnectionRelease_NB(ctxt_pP->module_id, size = do_RRCConnectionRelease_NB_IoT(ctxt_pP->module_id,
buffer, buffer,
rrc_eNB_get_next_transaction_identifier_NB_IoT(ctxt_pP->module_id)); rrc_eNB_get_next_transaction_identifier_NB_IoT(ctxt_pP->module_id));
// set release timer // set release timer
...@@ -244,7 +244,7 @@ void rrc_eNB_generate_RRCConnectionReestablishmentReject_NB_IoT( ...@@ -244,7 +244,7 @@ void rrc_eNB_generate_RRCConnectionReestablishmentReject_NB_IoT(
T_INT(ctxt_pP->subframe), T_INT(ctxt_pP->rnti)); T_INT(ctxt_pP->subframe), T_INT(ctxt_pP->rnti));
eNB_rrc_inst_NB_IoT[ctxt_pP->module_id].carrier[CC_id].Srb0.Tx_buffer.payload_size = eNB_rrc_inst_NB_IoT[ctxt_pP->module_id].carrier[CC_id].Srb0.Tx_buffer.payload_size =
do_RRCConnectionReestablishmentReject_NB(ctxt_pP->module_id, do_RRCConnectionReestablishmentReject_NB_IoT(ctxt_pP->module_id,
(uint8_t*) eNB_rrc_inst_NB_IoT[ctxt_pP->module_id].carrier[CC_id].Srb0.Tx_buffer.Payload); (uint8_t*) eNB_rrc_inst_NB_IoT[ctxt_pP->module_id].carrier[CC_id].Srb0.Tx_buffer.Payload);
#ifdef RRC_MSG_PRINT #ifdef RRC_MSG_PRINT
...@@ -448,7 +448,7 @@ void rrc_eNB_generate_RRCConnectionReject_NB_IoT( ...@@ -448,7 +448,7 @@ void rrc_eNB_generate_RRCConnectionReject_NB_IoT(
T_INT(ctxt_pP->subframe), T_INT(ctxt_pP->rnti)); T_INT(ctxt_pP->subframe), T_INT(ctxt_pP->rnti));
eNB_rrc_inst_NB_IoT[ctxt_pP->module_id].carrier[CC_id].Srb0.Tx_buffer.payload_size = eNB_rrc_inst_NB_IoT[ctxt_pP->module_id].carrier[CC_id].Srb0.Tx_buffer.payload_size =
do_RRCConnectionReject_NB(ctxt_pP->module_id, do_RRCConnectionReject_NB_IoT(ctxt_pP->module_id,
(uint8_t*) eNB_rrc_inst_NB_IoT[ctxt_pP->module_id].carrier[CC_id].Srb0.Tx_buffer.Payload); (uint8_t*) eNB_rrc_inst_NB_IoT[ctxt_pP->module_id].carrier[CC_id].Srb0.Tx_buffer.Payload);
#ifdef RRC_MSG_PRINT #ifdef RRC_MSG_PRINT
...@@ -511,7 +511,7 @@ void rrc_eNB_generate_RRCConnectionSetup_NB_IoT( ...@@ -511,7 +511,7 @@ void rrc_eNB_generate_RRCConnectionSetup_NB_IoT(
SRB_configList = &ue_context_pP->ue_context.SRB_configList; SRB_configList = &ue_context_pP->ue_context.SRB_configList;
eNB_rrc_inst_NB_IoT[ctxt_pP->module_id].carrier[CC_id].Srb0.Tx_buffer.payload_size = eNB_rrc_inst_NB_IoT[ctxt_pP->module_id].carrier[CC_id].Srb0.Tx_buffer.payload_size =
do_RRCConnectionSetup_NB(ctxt_pP, do_RRCConnectionSetup_NB_IoT(ctxt_pP,
ue_context_pP, ue_context_pP,
CC_id, CC_id,
(uint8_t*) eNB_rrc_inst_NB_IoT[ctxt_pP->module_id].carrier[CC_id].Srb0.Tx_buffer.Payload, (uint8_t*) eNB_rrc_inst_NB_IoT[ctxt_pP->module_id].carrier[CC_id].Srb0.Tx_buffer.Payload,
...@@ -1071,7 +1071,7 @@ rrc_eNB_generate_dedicatedRRCConnectionReconfiguration_NB_IoT( ...@@ -1071,7 +1071,7 @@ rrc_eNB_generate_dedicatedRRCConnectionReconfiguration_NB_IoT(
memset(buffer, 0, RRC_BUF_SIZE); memset(buffer, 0, RRC_BUF_SIZE);
size = do_RRCConnectionReconfiguration_NB(ctxt_pP, size = do_RRCConnectionReconfiguration_NB_IoT(ctxt_pP,
buffer, buffer,
xid, xid,
(SRB_ToAddModList_NB_r13_t*)NULL, (SRB_ToAddModList_NB_r13_t*)NULL,
...@@ -1189,7 +1189,7 @@ void rrc_eNB_generate_SecurityModeCommand_NB_IoT( ...@@ -1189,7 +1189,7 @@ void rrc_eNB_generate_SecurityModeCommand_NB_IoT(
T(T_ENB_RRC_SECURITY_MODE_COMMAND, T_INT(ctxt_pP->module_id), T_INT(ctxt_pP->frame), T(T_ENB_RRC_SECURITY_MODE_COMMAND, T_INT(ctxt_pP->module_id), T_INT(ctxt_pP->frame),
T_INT(ctxt_pP->subframe), T_INT(ctxt_pP->rnti)); T_INT(ctxt_pP->subframe), T_INT(ctxt_pP->rnti));
size = do_SecurityModeCommand_NB( size = do_SecurityModeCommand_NB_IoT(
ctxt_pP, ctxt_pP,
buffer, buffer,
rrc_eNB_get_next_transaction_identifier_NB_IoT(ctxt_pP->module_id), rrc_eNB_get_next_transaction_identifier_NB_IoT(ctxt_pP->module_id),
...@@ -1256,7 +1256,7 @@ void rrc_eNB_generate_UECapabilityEnquiry_NB_IoT( ...@@ -1256,7 +1256,7 @@ void rrc_eNB_generate_UECapabilityEnquiry_NB_IoT(
T(T_ENB_RRC_UE_CAPABILITY_ENQUIRY, T_INT(ctxt_pP->module_id), T_INT(ctxt_pP->frame), T(T_ENB_RRC_UE_CAPABILITY_ENQUIRY, T_INT(ctxt_pP->module_id), T_INT(ctxt_pP->frame),
T_INT(ctxt_pP->subframe), T_INT(ctxt_pP->rnti)); T_INT(ctxt_pP->subframe), T_INT(ctxt_pP->rnti));
size = do_UECapabilityEnquiry_NB( size = do_UECapabilityEnquiry_NB_IoT(
ctxt_pP, ctxt_pP,
buffer, buffer,
rrc_eNB_get_next_transaction_identifier(ctxt_pP->module_id)); rrc_eNB_get_next_transaction_identifier(ctxt_pP->module_id));
...@@ -1537,7 +1537,7 @@ void rrc_eNB_generate_defaultRRCConnectionReconfiguration_NB_IoT(const protocol_ ...@@ -1537,7 +1537,7 @@ void rrc_eNB_generate_defaultRRCConnectionReconfiguration_NB_IoT(const protocol_
memset(buffer, 0, RRC_BUF_SIZE); memset(buffer, 0, RRC_BUF_SIZE);
size = do_RRCConnectionReconfiguration_NB(ctxt_pP, size = do_RRCConnectionReconfiguration_NB_IoT(ctxt_pP,
buffer, buffer,
xid, //Transaction_id, xid, //Transaction_id,
(SRB_ToAddModList_NB_r13_t*)*SRB_configList2, //only SRB1 (SRB_ToAddModList_NB_r13_t*)*SRB_configList2, //only SRB1
...@@ -1626,17 +1626,17 @@ init_SI_NB( ...@@ -1626,17 +1626,17 @@ init_SI_NB(
eNB_rrc_inst_NB_IoT[ctxt_pP->module_id].carrier[CC_id].ul_CarrierFreq = configuration->downlink_frequency[CC_id]+ configuration->uplink_frequency_offset[CC_id]; eNB_rrc_inst_NB_IoT[ctxt_pP->module_id].carrier[CC_id].ul_CarrierFreq = configuration->downlink_frequency[CC_id]+ configuration->uplink_frequency_offset[CC_id];
//TODO: verify who allocate memory for sib1_NB_IoT, sib2_NB, sib3_NB and mib_nb in the carrier before being passed as parameter //TODO: verify who allocate memory for sib1_NB_IoT, sib2_NB_IoT, sib3_NB and mib_nb in the carrier before being passed as parameter
eNB_rrc_inst_NB_IoT[ctxt_pP->module_id].carrier[CC_id].sizeof_SIB1_NB = 0; eNB_rrc_inst_NB_IoT[ctxt_pP->module_id].carrier[CC_id].sizeof_SIB1_NB_IoT = 0;
eNB_rrc_inst_NB_IoT[ctxt_pP->module_id].carrier[CC_id].sizeof_SIB23_NB = 0; eNB_rrc_inst_NB_IoT[ctxt_pP->module_id].carrier[CC_id].sizeof_SIB23_NB_IoT = 0;
eNB_rrc_inst_NB_IoT[ctxt_pP->module_id].carrier[CC_id].sizeof_MIB_NB_IoT = 0; eNB_rrc_inst_NB_IoT[ctxt_pP->module_id].carrier[CC_id].sizeof_MIB_NB_IoT = 0;
//MIB //MIB
eNB_rrc_inst_NB_IoT[ctxt_pP->module_id].carrier[CC_id].MIB_NB = (uint8_t*) malloc16(32); //MIB is 34 bits=5bytes needed eNB_rrc_inst_NB_IoT[ctxt_pP->module_id].carrier[CC_id].MIB_NB_IoT = (uint8_t*) malloc16(32); //MIB is 34 bits=5bytes needed
if (eNB_rrc_inst_NB_IoT[ctxt_pP->module_id].carrier[CC_id].MIB_NB) if (eNB_rrc_inst_NB_IoT[ctxt_pP->module_id].carrier[CC_id].MIB_NB_IoT)
{ {
eNB_rrc_inst_NB_IoT[ctxt_pP->module_id].carrier[CC_id].sizeof_MIB_NB_IoT = eNB_rrc_inst_NB_IoT[ctxt_pP->module_id].carrier[CC_id].sizeof_MIB_NB_IoT =
do_MIB_NB_IoT(&eNB_rrc_inst_NB_IoT[ctxt_pP->module_id].carrier[CC_id], do_MIB_NB_IoT(&eNB_rrc_inst_NB_IoT[ctxt_pP->module_id].carrier[CC_id],
...@@ -1645,9 +1645,9 @@ init_SI_NB( ...@@ -1645,9 +1645,9 @@ init_SI_NB(
); );
} }
else { else {
LOG_E(RRC, PROTOCOL_RRC_CTXT_FMT" init_SI: FATAL, no memory for MIB_NB allocated\n", LOG_E(RRC, PROTOCOL_RRC_CTXT_FMT" init_SI: FATAL, no memory for MIB_NB_IoT allocated\n",
PROTOCOL_RRC_CTXT_ARGS(ctxt_pP)); PROTOCOL_RRC_CTXT_ARGS(ctxt_pP));
mac_xface->macphy_exit("[RRC][init_SI] FATAL, no memory for MIB_NB allocated"); mac_xface->macphy_exit("[RRC][init_SI] FATAL, no memory for MIB_NB_IoT allocated");
} }
...@@ -1655,11 +1655,11 @@ init_SI_NB( ...@@ -1655,11 +1655,11 @@ init_SI_NB(
mac_xface->macphy_exit("[RRC][init_SI] FATAL, eNB_rrc_inst_NB[enb_mod_idP].carrier[CC_id].sizeof_MIB_NB_IoT == 255"); mac_xface->macphy_exit("[RRC][init_SI] FATAL, eNB_rrc_inst_NB[enb_mod_idP].carrier[CC_id].sizeof_MIB_NB_IoT == 255");
} }
//SIB1_NB //SIB1_NB_IoT
eNB_rrc_inst_NB_IoT[ctxt_pP->module_id].carrier[CC_id].SIB1_NB = (uint8_t*) malloc16(32);//allocation of buffer memory for SIB1_NB eNB_rrc_inst_NB_IoT[ctxt_pP->module_id].carrier[CC_id].SIB1_NB_IoT = (uint8_t*) malloc16(32);//allocation of buffer memory for SIB1_NB_IOT
if (eNB_rrc_inst_NB_IoT[ctxt_pP->module_id].carrier[CC_id].SIB1_NB) if (eNB_rrc_inst_NB_IoT[ctxt_pP->module_id].carrier[CC_id].SIB1_NB_IoT)
eNB_rrc_inst_NB_IoT[ctxt_pP->module_id].carrier[CC_id].sizeof_SIB1_NB = do_SIB1_NB( //follow the new implementation eNB_rrc_inst_NB_IoT[ctxt_pP->module_id].carrier[CC_id].sizeof_SIB1_NB_IoT = do_SIB1_NB_IoT( //follow the new implementation
ctxt_pP->module_id, ctxt_pP->module_id,
CC_id, CC_id,
&eNB_rrc_inst_NB_IoT[ctxt_pP->module_id].carrier[CC_id], &eNB_rrc_inst_NB_IoT[ctxt_pP->module_id].carrier[CC_id],
...@@ -1668,28 +1668,28 @@ init_SI_NB( ...@@ -1668,28 +1668,28 @@ init_SI_NB(
); );
else { else {
LOG_E(RRC, PROTOCOL_RRC_CTXT_FMT" init_SI: FATAL, no memory for SIB1_NB allocated\n", LOG_E(RRC, PROTOCOL_RRC_CTXT_FMT" init_SI: FATAL, no memory for SIB1_NB_IoT allocated\n",
PROTOCOL_RRC_CTXT_ARGS(ctxt_pP)); PROTOCOL_RRC_CTXT_ARGS(ctxt_pP));
mac_xface->macphy_exit("[RRC][init_SI] FATAL, no memory for SIB1_NB allocated"); mac_xface->macphy_exit("[RRC][init_SI] FATAL, no memory for SIB1_NB_IoT allocated");
} }
if (eNB_rrc_inst_NB_IoT[ctxt_pP->module_id].carrier[CC_id].sizeof_SIB1_NB == 255) { if (eNB_rrc_inst_NB_IoT[ctxt_pP->module_id].carrier[CC_id].sizeof_SIB1_NB_IoT == 255) {
mac_xface->macphy_exit("[RRC][init_SI] FATAL, eNB_rrc_inst_NB[enb_mod_idP].carrier[CC_id].sizeof_SIB1_NB == 255"); mac_xface->macphy_exit("[RRC][init_SI] FATAL, eNB_rrc_inst_NB[enb_mod_idP].carrier[CC_id].sizeof_SIB1_NB_IoT == 255");
} }
//SIB23_NB //SIB23_NB_IoT
eNB_rrc_inst_NB_IoT[ctxt_pP->module_id].carrier[CC_id].SIB23_NB = (uint8_t*) malloc16(64); eNB_rrc_inst_NB_IoT[ctxt_pP->module_id].carrier[CC_id].SIB23_NB_IoT = (uint8_t*) malloc16(64);
if (eNB_rrc_inst_NB_IoT[ctxt_pP->module_id].carrier[CC_id].SIB23_NB) { if (eNB_rrc_inst_NB_IoT[ctxt_pP->module_id].carrier[CC_id].SIB23_NB_IoT) {
eNB_rrc_inst_NB_IoT[ctxt_pP->module_id].carrier[CC_id].sizeof_SIB23_NB = do_SIB23_NB( eNB_rrc_inst_NB_IoT[ctxt_pP->module_id].carrier[CC_id].sizeof_SIB23_NB_IoT = do_SIB23_NB_IoT(
ctxt_pP->module_id, ctxt_pP->module_id,
CC_id, CC_id,
&eNB_rrc_inst_NB_IoT[ctxt_pP->module_id].carrier[CC_id], &eNB_rrc_inst_NB_IoT[ctxt_pP->module_id].carrier[CC_id],
configuration configuration
); );
if (eNB_rrc_inst_NB_IoT[ctxt_pP->module_id].carrier[CC_id].sizeof_SIB23_NB == 255) { if (eNB_rrc_inst_NB_IoT[ctxt_pP->module_id].carrier[CC_id].sizeof_SIB23_NB_IoT == 255) {
mac_xface->macphy_exit("[RRC][init_SI] FATAL, eNB_rrc_inst_NB[mod].carrier[CC_id].sizeof_SIB23_NB == 255"); mac_xface->macphy_exit("[RRC][init_SI] FATAL, eNB_rrc_inst_NB[mod].carrier[CC_id].sizeof_SIB23_NB_IoT == 255");
} }
LOG_T(RRC, PROTOCOL_RRC_CTXT_FMT" SIB2/3 Contents (partial)\n", LOG_T(RRC, PROTOCOL_RRC_CTXT_FMT" SIB2/3 Contents (partial)\n",
...@@ -1703,13 +1703,13 @@ init_SI_NB( ...@@ -1703,13 +1703,13 @@ init_SI_NB(
//Use the following as an example //Use the following as an example
// LOG_T(RRC, PROTOCOL_RRC_CTXT_FMT" npusch_config_common.groupAssignmentNPUSCH = %ld\n", // LOG_T(RRC, PROTOCOL_RRC_CTXT_FMT" npusch_config_common.groupAssignmentNPUSCH = %ld\n",
// PROTOCOL_RRC_CTXT_ARGS(ctxt_pP), // PROTOCOL_RRC_CTXT_ARGS(ctxt_pP),
// eNB_rrc_inst_NB_IoT[ctxt_pP->module_id].carrier[CC_id].sib2_NB->radioResourceConfigCommon_r13.npusch_ConfigCommon_r13. // eNB_rrc_inst_NB_IoT[ctxt_pP->module_id].carrier[CC_id].sib2_NB_IoT->radioResourceConfigCommon_r13.npusch_ConfigCommon_r13.
// ul_ReferenceSignalsNPUSCH_r13.groupAssignmentNPUSCH_r13); // ul_ReferenceSignalsNPUSCH_r13.groupAssignmentNPUSCH_r13);
//Configure MAC //Configure MAC
LOG_D(RRC, LOG_D(RRC,
PROTOCOL_RRC_CTXT_FMT" RRC_UE --- MAC_CONFIG_REQ (SIB1_NB & SIB2_NB params) ---> MAC_UE\n", PROTOCOL_RRC_CTXT_FMT" RRC_UE --- MAC_CONFIG_REQ (SIB1_NB_IoT & SIB2_NB params) ---> MAC_UE\n",
PROTOCOL_RRC_CTXT_ARGS(ctxt_pP)); PROTOCOL_RRC_CTXT_ARGS(ctxt_pP));
// //
...@@ -1734,7 +1734,7 @@ init_SI_NB( ...@@ -1734,7 +1734,7 @@ init_SI_NB(
(BCCH_BCH_Message_NB_t*) & (BCCH_BCH_Message_NB_t*) &
eNB_rrc_inst_NB_IoT[ctxt_pP->module_id].carrier[CC_id].mib_NB_IoT, eNB_rrc_inst_NB_IoT[ctxt_pP->module_id].carrier[CC_id].mib_NB_IoT,
(RadioResourceConfigCommonSIB_NB_r13_t *) & (RadioResourceConfigCommonSIB_NB_r13_t *) &
eNB_rrc_inst_NB_IoT[ctxt_pP->module_id].carrier[CC_id].sib2_NB->radioResourceConfigCommon_r13, eNB_rrc_inst_NB_IoT[ctxt_pP->module_id].carrier[CC_id].sib2_NB_IoT->radioResourceConfigCommon_r13,
(struct PhysicalConfigDedicated_NB_r13 *)NULL, (struct PhysicalConfigDedicated_NB_r13 *)NULL,
(MAC_MainConfig_NB_r13_t *) NULL, (MAC_MainConfig_NB_r13_t *) NULL,
0,// MP:logicalChannelID //TODO still have to be properly managed in the interface 0,// MP:logicalChannelID //TODO still have to be properly managed in the interface
......
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