Commit c5f26acd authored by Matthieu Kanj's avatar Matthieu Kanj

renaming structures and variables in file:openair2/RRC/LITE/defs_NB_IoT.h

parent b93275b6
......@@ -460,7 +460,7 @@ typedef struct {
int Ncp_UL;
int eutra_band;
uint32_t dl_CarrierFreq;
BCCH_BCH_Message_NB_t *mib_NB;
BCCH_BCH_Message_NB_t *mib_NB_IoT;
RadioResourceConfigCommonSIB_NB_r13_t *radioResourceConfigCommon;
ARFCN_ValueEUTRA_r9_t ul_CarrierFreq;
struct MasterInformationBlock_NB__operationModeInfo_r13 operationModeInfo;
......
......@@ -224,7 +224,7 @@ int32_t get_uldl_offset_NB_IoT(int eutra_band) {
void config_mib_NB_fapi(
void config_mib_fapi_NB_IoT(
int rntiP,
int physCellId,
uint8_t eutra_band,
......@@ -235,7 +235,7 @@ void config_mib_NB_fapi(
int dl_CarrierFreq,
int ul_CarrierFreq,
long*eutraControlRegionSize,
BCCH_BCH_Message_NB_t *mib_NB
BCCH_BCH_Message_NB_t *mib_NB_IoT
)
{
......@@ -261,12 +261,12 @@ void config_mib_NB_fapi(
//The prb index allowed are the one specified in R&shwarz pag 9 NB-IoT white papaer
switch (mib_NB->message.operationModeInfo_r13.present)
switch (mib_NB_IoT->message.operationModeInfo_r13.present)
{
//FAPI specs pag 135
case MasterInformationBlock_NB__operationModeInfo_r13_PR_inband_SamePCI_r13:
config_INFO->cfg->nb_iot_config.operating_mode.value = 0;
config_INFO->cfg->nb_iot_config.prb_index.value = mib_NB->message.operationModeInfo_r13.choice.inband_SamePCI_r13.eutra_CRS_SequenceInfo_r13; //see TS 36.213 ch 16.0
config_INFO->cfg->nb_iot_config.prb_index.value = mib_NB_IoT->message.operationModeInfo_r13.choice.inband_SamePCI_r13.eutra_CRS_SequenceInfo_r13; //see TS 36.213 ch 16.0
config_INFO->cfg->nb_iot_config.assumed_crs_aps.value = -1; //is not defined so we put a negative value
if(eutraControlRegionSize == NULL)
......@@ -286,7 +286,7 @@ void config_mib_NB_fapi(
//XXX should pass the prb_index may defined by configuration file depending on the LTE band we are considering (see Rhode&Shwartz whitepaper pag9)
//config_INFO->nb_iot_config.prb_index.value =
config_INFO->cfg->nb_iot_config.assumed_crs_aps.value = mib_NB->message.operationModeInfo_r13.choice.inband_DifferentPCI_r13.eutra_NumCRS_Ports_r13;
config_INFO->cfg->nb_iot_config.assumed_crs_aps.value = mib_NB_IoT->message.operationModeInfo_r13.choice.inband_DifferentPCI_r13.eutra_NumCRS_Ports_r13;
if(eutraControlRegionSize == NULL)
LOG_E(RRC, "rrc_mac_config_req_eNB_NB_IoT: operation mode is in-band but eutraControlRegionSize is not defined");
......@@ -577,7 +577,7 @@ int rrc_mac_config_req_eNB_NB_IoT(
long* nrs_CRS_PoweSIwindowsizerOffset, //optional
uint32_t dl_CarrierFreq,
uint32_t ul_CarrierFreq,
BCCH_BCH_Message_NB_t *mib_NB,
BCCH_BCH_Message_NB_t *mib_NB_IoT,
RadioResourceConfigCommonSIB_NB_r13_t *radioResourceConfigCommon,
struct PhysicalConfigDedicated_NB_r13 *physicalConfigDedicated,
MAC_MainConfig_NB_r13_t *mac_MainConfig, //most probably not needed since only used at UE side
......@@ -604,14 +604,14 @@ int rrc_mac_config_req_eNB_NB_IoT(
if (mib_NB!=NULL ) {
if (mib_NB_IoT!=NULL ) {
//XXX possible alternative implementation (as RU-RAU splitting)
//if(eNB_mac_inst == NULL) l2_init_eNB(); //TODO MP: to be included in the MAC/main.c
//mac_top_init_eNB(); //TODO MP: to be included in the MAC/main.c
eNB_mac_inst_NB_IoT[Mod_idP].common_channels[CC_idP].mib_NB = mib_NB;
eNB_mac_inst_NB_IoT[Mod_idP].common_channels[CC_idP].mib_NB_IoT = mib_NB_IoT;
eNB_mac_inst_NB_IoT[Mod_idP].common_channels[CC_idP].physCellId = physCellId;
eNB_mac_inst_NB_IoT[Mod_idP].common_channels[CC_idP].p_eNB = p_eNB;
eNB_mac_inst_NB_IoT[Mod_idP].common_channels[CC_idP].p_rx_eNB = p_rx_eNB;
......@@ -641,7 +641,7 @@ int rrc_mac_config_req_eNB_NB_IoT(
//Mapping OAI params into FAPI params
config_mib_NB_fapi(
config_mib_fapi_NB_IoT(
rntiP,
physCellId,
eutra_band,
......@@ -652,12 +652,12 @@ int rrc_mac_config_req_eNB_NB_IoT(
dl_CarrierFreq,
ul_CarrierFreq,
eutraControlRegionSize,
mib_NB
mib_NB_IoT
);
}//mib_NB!=NULL
}//mib_NB_IoT!=NULL
if (radioResourceConfigCommon!=NULL) {
......@@ -1130,28 +1130,28 @@ int8_t mac_rrc_data_req_eNB_NB_IoT(
if(mib_flag == MIB_FLAG_YES){
//XXX to be check when MIB-NB should be initialized
if (eNB_rrc_inst_NB_IoT[Mod_idP].carrier[CC_id].sizeof_MIB_NB == 255) {
if (eNB_rrc_inst_NB_IoT[Mod_idP].carrier[CC_id].sizeof_MIB_NB_IoT == 255) {
LOG_E(RRC,"[eNB %d] MAC Request for MIB-NB and MIB-NB not initialized\n",Mod_idP);
mac_xface->macphy_exit("mac_rrc_data_req_eNB_NB_IoT: MAC Request for MIB-NB and MIB-NB not initialized");
}
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].sizeof_MIB_NB);
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)
#ifdef DEBUG_RRC
LOG_T(RRC,"[eNB %d] Frame %d : BCCH request => MIB_NB\n",Mod_idP,frameP);
for (i=0; i<eNB_rrc_inst_NB_IoT[Mod_idP].carrier[CC_id].sizeof_MIB_NB; i++) {
for (i=0; i<eNB_rrc_inst_NB_IoT[Mod_idP].carrier[CC_id].sizeof_MIB_NB_IoT; i++) {
LOG_T(RRC,"%x.",buffer_pP[i]);
}
LOG_T(RRC,"\n");
#endif
return (eNB_rrc_inst_NB_IoT[Mod_idP].carrier[CC_id].sizeof_MIB_NB); //exit from the function
return (eNB_rrc_inst_NB_IoT[Mod_idP].carrier[CC_id].sizeof_MIB_NB_IoT); //exit from the function
}
//Requesting for SI Message
......@@ -1207,12 +1207,12 @@ int8_t mac_rrc_data_req_eNB_NB_IoT(
//check for SIB23-Transmission
for(int i = 0; i< eNB_rrc_inst_NB_IoT[Mod_idP].carrier[CC_id].sib1_NB->schedulingInfoList_r13.list.count; i++){
for(int i = 0; i< eNB_rrc_inst_NB_IoT[Mod_idP].carrier[CC_id].sib1_NB_IoT->schedulingInfoList_r13.list.count; i++){
if(is_SIB23_NB_IoT(frameP,h_frameP,
eNB_rrc_inst_NB_IoT[Mod_idP].carrier[CC_id].sib1_NB->schedulingInfoList_r13.list.array[i]->si_Periodicity_r13,
eNB_rrc_inst_NB_IoT[Mod_idP].carrier[CC_id].sib1_NB->si_WindowLength_r13,
eNB_rrc_inst_NB_IoT[Mod_idP].carrier[CC_id].sib1_NB->si_RadioFrameOffset_r13,
eNB_rrc_inst_NB_IoT[Mod_idP].carrier[CC_id].sib1_NB->schedulingInfoList_r13.list.array[i]->si_RepetitionPattern_r13))
eNB_rrc_inst_NB_IoT[Mod_idP].carrier[CC_id].sib1_NB_IoT->schedulingInfoList_r13.list.array[i]->si_Periodicity_r13,
eNB_rrc_inst_NB_IoT[Mod_idP].carrier[CC_id].sib1_NB_IoT->si_WindowLength_r13,
eNB_rrc_inst_NB_IoT[Mod_idP].carrier[CC_id].sib1_NB_IoT->si_RadioFrameOffset_r13,
eNB_rrc_inst_NB_IoT[Mod_idP].carrier[CC_id].sib1_NB_IoT->schedulingInfoList_r13.list.array[i]->si_RepetitionPattern_r13))
{
memcpy(&buffer_pP[0],
......
......@@ -100,7 +100,7 @@ uint8_t do_MIB_NB_IoT(
uint32_t frame)
{
asn_enc_rval_t enc_rval;
BCCH_BCH_Message_NB_t *mib_NB = &(carrier->mib_NB);
BCCH_BCH_Message_NB_t *mib_NB_IoT = &(carrier->mib_NB_IoT);
/*
* systemFrameNumber-MSB: (TS 36.331 pag 576)
......@@ -120,34 +120,34 @@ uint8_t do_MIB_NB_IoT(
uint8_t hsfn_LSB = (uint8_t)(frame & 0x3); //2 bits set to 1 (0x3 = 0011)
uint16_t spare=0; //11 bits --> use uint16
mib_NB->message.systemFrameNumber_MSB_r13.buf = &sfn_MSB;
mib_NB->message.systemFrameNumber_MSB_r13.size = 1; //if expressed in byte
mib_NB->message.systemFrameNumber_MSB_r13.bits_unused = 4; //is byte based (so how many bits you don't use of the 8 bits of a bite
mib_NB_IoT->message.systemFrameNumber_MSB_r13.buf = &sfn_MSB;
mib_NB_IoT->message.systemFrameNumber_MSB_r13.size = 1; //if expressed in byte
mib_NB_IoT->message.systemFrameNumber_MSB_r13.bits_unused = 4; //is byte based (so how many bits you don't use of the 8 bits of a bite
mib_NB->message.hyperSFN_LSB_r13.buf= &hsfn_LSB;
mib_NB->message.hyperSFN_LSB_r13.size= 1;
mib_NB->message.hyperSFN_LSB_r13.bits_unused = 6;
mib_NB_IoT->message.hyperSFN_LSB_r13.buf= &hsfn_LSB;
mib_NB_IoT->message.hyperSFN_LSB_r13.size= 1;
mib_NB_IoT->message.hyperSFN_LSB_r13.bits_unused = 6;
//XXX to be set??
mib_NB->message.spare.buf = (uint16_t *)&spare;
mib_NB->message.spare.size = 2;
mib_NB->message.spare.bits_unused = 5;
mib_NB_IoT->message.spare.buf = (uint16_t *)&spare;
mib_NB_IoT->message.spare.size = 2;
mib_NB_IoT->message.spare.bits_unused = 5;
//decide how to set it
mib_NB->message.schedulingInfoSIB1_r13 =11; //see TS 36.213-->tables 16.4.1.3-3 ecc...
mib_NB->message.systemInfoValueTag_r13= 0;
mib_NB->message.ab_Enabled_r13 = 0;
mib_NB_IoT->message.schedulingInfoSIB1_r13 =11; //see TS 36.213-->tables 16.4.1.3-3 ecc...
mib_NB_IoT->message.systemInfoValueTag_r13= 0;
mib_NB_IoT->message.ab_Enabled_r13 = 0;
//to be decided
mib_NB->message.operationModeInfo_r13.present = MasterInformationBlock_NB__operationModeInfo_r13_PR_inband_SamePCI_r13;
mib_NB->message.operationModeInfo_r13.choice.inband_SamePCI_r13.eutra_CRS_SequenceInfo_r13 = 0;
mib_NB_IoT->message.operationModeInfo_r13.present = MasterInformationBlock_NB__operationModeInfo_r13_PR_inband_SamePCI_r13;
mib_NB_IoT->message.operationModeInfo_r13.choice.inband_SamePCI_r13.eutra_CRS_SequenceInfo_r13 = 0;
printf("[MIB] something to write HERE ,sfn_MSB %x, hsfn_LSB %x\n",
(uint32_t)sfn_MSB,
(uint32_t)hsfn_LSB);
enc_rval = uper_encode_to_buffer(&asn_DEF_BCCH_BCH_Message_NB,
(void*)mib_NB,
(void*)mib_NB_IoT,
carrier->MIB_NB,
100);
AssertFatal (enc_rval.encoded > 0, "ASN1 message encoding failed (%s, %lu)!\n",
......@@ -168,8 +168,8 @@ uint8_t do_SIB1_NB(uint8_t Mod_id, int CC_id,
uint32_t frame
)
{
BCCH_DL_SCH_Message_NB_t *bcch_message= &(carrier->siblock1_NB);
SystemInformationBlockType1_NB_t *sib1_NB;
BCCH_DL_SCH_Message_NB_t *bcch_message= &(carrier->siblock1_NB_IoT);
SystemInformationBlockType1_NB_t *sib1_NB_IoT;
asn_enc_rval_t enc_rval;
......@@ -192,8 +192,8 @@ uint8_t do_SIB1_NB(uint8_t Mod_id, int CC_id,
bcch_message->message.choice.c1.present = BCCH_DL_SCH_MessageType_NB__c1_PR_systemInformationBlockType1_r13;
//allocation
carrier->sib1_NB = &bcch_message->message.choice.c1.choice.systemInformationBlockType1_r13;
sib1_NB = carrier->sib1_NB;
carrier->sib1_NB_IoT = &bcch_message->message.choice.c1.choice.systemInformationBlockType1_r13;
sib1_NB_IoT = carrier->sib1_NB_IoT;
/*TS 36.331 v14.2.0 pag 589
......@@ -204,9 +204,9 @@ uint8_t do_SIB1_NB(uint8_t Mod_id, int CC_id,
uint8_t hyperSFN_MSB = (uint8_t) ((frame>>2)& 0xff);
//XXX to be checked
sib1_NB->hyperSFN_MSB_r13.buf = &hyperSFN_MSB;
sib1_NB->hyperSFN_MSB_r13.size = 1;
sib1_NB->hyperSFN_MSB_r13.bits_unused = 0;
sib1_NB_IoT->hyperSFN_MSB_r13.buf = &hyperSFN_MSB;
sib1_NB_IoT->hyperSFN_MSB_r13.size = 1;
sib1_NB_IoT->hyperSFN_MSB_r13.bits_unused = 0;
memset(&PLMN_identity_info_NB,0,sizeof(PLMN_IdentityInfo_NB_r13_t));
memset(&schedulingInfo_NB,0,sizeof(SchedulingInfo_NB_r13_t));
......@@ -272,53 +272,53 @@ uint8_t do_SIB1_NB(uint8_t Mod_id, int CC_id,
*attachWithoutPDN_Connectivity = 0;
PLMN_identity_info_NB.attachWithoutPDN_Connectivity_r13 = attachWithoutPDN_Connectivity;
ASN_SEQUENCE_ADD(&sib1_NB->cellAccessRelatedInfo_r13.plmn_IdentityList_r13.list,&PLMN_identity_info_NB);
ASN_SEQUENCE_ADD(&sib1_NB_IoT->cellAccessRelatedInfo_r13.plmn_IdentityList_r13.list,&PLMN_identity_info_NB);
// 16 bits = 2 byte
sib1_NB->cellAccessRelatedInfo_r13.trackingAreaCode_r13.buf = MALLOC(2); //MALLOC works in byte
sib1_NB_IoT->cellAccessRelatedInfo_r13.trackingAreaCode_r13.buf = MALLOC(2); //MALLOC works in byte
//lefts as it is?
#if defined(ENABLE_ITTI)
sib1_NB->cellAccessRelatedInfo_r13.trackingAreaCode_r13.buf[0] = (configuration->tac >> 8) & 0xff;
sib1_NB->cellAccessRelatedInfo_r13.trackingAreaCode_r13.buf[1] = (configuration->tac >> 0) & 0xff;
sib1_NB_IoT->cellAccessRelatedInfo_r13.trackingAreaCode_r13.buf[0] = (configuration->tac >> 8) & 0xff;
sib1_NB_IoT->cellAccessRelatedInfo_r13.trackingAreaCode_r13.buf[1] = (configuration->tac >> 0) & 0xff;
#else
sib1_NB->cellAccessRelatedInfo_r13.trackingAreaCode_r13.buf[0] = 0x00;
sib1_NB->cellAccessRelatedInfo_r13.trackingAreaCode_r13.buf[1] = 0x01;
sib1_NB_IoT->cellAccessRelatedInfo_r13.trackingAreaCode_r13.buf[0] = 0x00;
sib1_NB_IoT->cellAccessRelatedInfo_r13.trackingAreaCode_r13.buf[1] = 0x01;
#endif
sib1_NB->cellAccessRelatedInfo_r13.trackingAreaCode_r13.size=2;
sib1_NB->cellAccessRelatedInfo_r13.trackingAreaCode_r13.bits_unused=0;
sib1_NB_IoT->cellAccessRelatedInfo_r13.trackingAreaCode_r13.size=2;
sib1_NB_IoT->cellAccessRelatedInfo_r13.trackingAreaCode_r13.bits_unused=0;
// 28 bits --> i have to use 32 bits = 4 byte
sib1_NB->cellAccessRelatedInfo_r13.cellIdentity_r13.buf = MALLOC(8); // why allocate 8 byte?
sib1_NB_IoT->cellAccessRelatedInfo_r13.cellIdentity_r13.buf = MALLOC(8); // why allocate 8 byte?
#if defined(ENABLE_ITTI)
sib1_NB->cellAccessRelatedInfo_r13.cellIdentity_r13.buf[0] = (configuration->cell_identity >> 20) & 0xff;
sib1_NB->cellAccessRelatedInfo_r13.cellIdentity_r13.buf[1] = (configuration->cell_identity >> 12) & 0xff;
sib1_NB->cellAccessRelatedInfo_r13.cellIdentity_r13.buf[2] = (configuration->cell_identity >> 4) & 0xff;
sib1_NB->cellAccessRelatedInfo_r13.cellIdentity_r13.buf[3] = (configuration->cell_identity << 4) & 0xf0;
sib1_NB_IoT->cellAccessRelatedInfo_r13.cellIdentity_r13.buf[0] = (configuration->cell_identity >> 20) & 0xff;
sib1_NB_IoT->cellAccessRelatedInfo_r13.cellIdentity_r13.buf[1] = (configuration->cell_identity >> 12) & 0xff;
sib1_NB_IoT->cellAccessRelatedInfo_r13.cellIdentity_r13.buf[2] = (configuration->cell_identity >> 4) & 0xff;
sib1_NB_IoT->cellAccessRelatedInfo_r13.cellIdentity_r13.buf[3] = (configuration->cell_identity << 4) & 0xf0;
#else
sib1_NB->cellAccessRelatedInfo_r13.cellIdentity_r13.buf[0] = 0x00;
sib1_NB->cellAccessRelatedInfo_r13.cellIdentity_r13.buf[1] = 0x00;
sib1_NB->cellAccessRelatedInfo_r13.cellIdentity_r13.buf[2] = 0x00;
sib1_NB->cellAccessRelatedInfo_r13.cellIdentity_r13.buf[3] = 0x10;
sib1_NB_IoT->cellAccessRelatedInfo_r13.cellIdentity_r13.buf[0] = 0x00;
sib1_NB_IoT->cellAccessRelatedInfo_r13.cellIdentity_r13.buf[1] = 0x00;
sib1_NB_IoT->cellAccessRelatedInfo_r13.cellIdentity_r13.buf[2] = 0x00;
sib1_NB_IoT->cellAccessRelatedInfo_r13.cellIdentity_r13.buf[3] = 0x10;
#endif
sib1_NB->cellAccessRelatedInfo_r13.cellIdentity_r13.size=4;
sib1_NB->cellAccessRelatedInfo_r13.cellIdentity_r13.bits_unused=4;
sib1_NB_IoT->cellAccessRelatedInfo_r13.cellIdentity_r13.size=4;
sib1_NB_IoT->cellAccessRelatedInfo_r13.cellIdentity_r13.bits_unused=4;
//Still set to "notBarred" as in the previous case
sib1_NB->cellAccessRelatedInfo_r13.cellBarred_r13=SystemInformationBlockType1_NB__cellAccessRelatedInfo_r13__cellBarred_r13_notBarred;
sib1_NB_IoT->cellAccessRelatedInfo_r13.cellBarred_r13=SystemInformationBlockType1_NB__cellAccessRelatedInfo_r13__cellBarred_r13_notBarred;
//Still Set to "notAllowed" like in the previous case
sib1_NB->cellAccessRelatedInfo_r13.intraFreqReselection_r13=SystemInformationBlockType1_NB__cellAccessRelatedInfo_r13__intraFreqReselection_r13_notAllowed;
sib1_NB_IoT->cellAccessRelatedInfo_r13.intraFreqReselection_r13=SystemInformationBlockType1_NB__cellAccessRelatedInfo_r13__intraFreqReselection_r13_notAllowed;
sib1_NB->cellSelectionInfo_r13.q_RxLevMin_r13=-65; //which value?? TS 36.331 V14.2.1 pag. 589
sib1_NB->cellSelectionInfo_r13.q_QualMin_r13 = 0; //FIXME new parameter for SIB1-NB, not present in SIB1 (for cell reselection but if not used the UE should apply the default value)
sib1_NB_IoT->cellSelectionInfo_r13.q_RxLevMin_r13=-65; //which value?? TS 36.331 V14.2.1 pag. 589
sib1_NB_IoT->cellSelectionInfo_r13.q_QualMin_r13 = 0; //FIXME new parameter for SIB1-NB, not present in SIB1 (for cell reselection but if not used the UE should apply the default value)
sib1_NB->p_Max_r13 = CALLOC(1, sizeof(P_Max_t));
*(sib1_NB->p_Max_r13) = 23;
sib1_NB_IoT->p_Max_r13 = CALLOC(1, sizeof(P_Max_t));
*(sib1_NB_IoT->p_Max_r13) = 23;
//FIXME
sib1_NB->freqBandIndicator_r13 =
sib1_NB_IoT->freqBandIndicator_r13 =
#if defined(ENABLE_ITTI)
configuration->eutra_band[CC_id];
#else
......@@ -330,19 +330,19 @@ uint8_t do_SIB1_NB(uint8_t Mod_id, int CC_id,
* freqBandInfo_r13
* multiBandInfoList_r13
* nrs_CRS_PowerOffset_r13
* sib1_NB->downlinkBitmap_r13.choice.subframePattern10_r13 =(is a BIT_STRING)
* sib1_NB_IoT->downlinkBitmap_r13.choice.subframePattern10_r13 =(is a BIT_STRING)
*/
sib1_NB->downlinkBitmap_r13 = CALLOC(1, sizeof(struct DL_Bitmap_NB_r13));
(sib1_NB->downlinkBitmap_r13)->present= DL_Bitmap_NB_r13_PR_NOTHING;
sib1_NB_IoT->downlinkBitmap_r13 = CALLOC(1, sizeof(struct DL_Bitmap_NB_r13));
(sib1_NB_IoT->downlinkBitmap_r13)->present= DL_Bitmap_NB_r13_PR_NOTHING;
*eutraControlRegionSize = 0;
sib1_NB->eutraControlRegionSize_r13 = eutraControlRegionSize;
sib1_NB_IoT->eutraControlRegionSize_r13 = eutraControlRegionSize;
*nrs_CRS_PowerOffset= 0;
sib1_NB->nrs_CRS_PowerOffset_r13 = nrs_CRS_PowerOffset;
sib1_NB_IoT->nrs_CRS_PowerOffset_r13 = nrs_CRS_PowerOffset;
//FIXME which value to set?
......@@ -360,7 +360,7 @@ uint8_t do_SIB1_NB(uint8_t Mod_id, int CC_id,
sib_type_NB=SIB_Type_NB_r13_sibType3_NB_r13;
ASN_SEQUENCE_ADD(&schedulingInfo_NB.sib_MappingInfo_r13.list,&sib_type_NB);
ASN_SEQUENCE_ADD(&sib1_NB->schedulingInfoList_r13.list,&schedulingInfo_NB);
ASN_SEQUENCE_ADD(&sib1_NB_IoT->schedulingInfoList_r13.list,&schedulingInfo_NB);
#if defined(ENABLE_ITTI)
......@@ -373,17 +373,17 @@ uint8_t do_SIB1_NB(uint8_t Mod_id, int CC_id,
}
//FIXME which value chose for the following parameter
sib1_NB->si_WindowLength_r13=SystemInformationBlockType1_NB__si_WindowLength_r13_ms160;
sib1_NB->si_RadioFrameOffset_r13= 0;
sib1_NB_IoT->si_WindowLength_r13=SystemInformationBlockType1_NB__si_WindowLength_r13_ms160;
sib1_NB_IoT->si_RadioFrameOffset_r13= 0;
/*In Nb-IoT change/update of specific SI message can additionally be indicated by a SI message specific value tag
* systemInfoValueTagSI (there is no SystemInfoValueTag in SIB1-NB but only in MIB-NB)
*contained in systemInfoValueTagList_r13
**/
//FIXME correct?
sib1_NB->systemInfoValueTagList_r13 = CALLOC(1, sizeof(struct SystemInfoValueTagList_NB_r13));
asn_set_empty(&sib1_NB->systemInfoValueTagList_r13->list);
ASN_SEQUENCE_ADD(&sib1_NB->systemInfoValueTagList_r13->list,&systemInfoValueTagSI);
sib1_NB_IoT->systemInfoValueTagList_r13 = CALLOC(1, sizeof(struct SystemInfoValueTagList_NB_r13));
asn_set_empty(&sib1_NB_IoT->systemInfoValueTagList_r13->list);
ASN_SEQUENCE_ADD(&sib1_NB_IoT->systemInfoValueTagList_r13->list,&systemInfoValueTagSI);
#ifdef XER_PRINT //generate xml files
......@@ -421,7 +421,7 @@ uint8_t do_SIB23_NB(uint8_t Mod_id,
struct SystemInformation_NB_r13_IEs__sib_TypeAndInfo_r13__Member *sib2_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); //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;
SystemInformationBlockType3_NB_r13_t *sib3_NB;
......
......@@ -86,7 +86,7 @@ uint8_t do_SIB1_NB(uint8_t Mod_id, int CC_id,
\brief Generate a default configuration for SIB2/SIB3-NB in one System Information PDU (eNB).
@param Mod_id Index of eNB (used to derive some parameters)
@param buffer Pointer to PER-encoded ASN.1 description of SI-NB PDU
@param systemInformation_NB Pointer to asn1c C representation of SI-NB PDU
@param systemInformation_NB_IoT Pointer to asn1c C representation of SI-NB PDU
@param sib2_NB Pointer (returned) to sib2_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*/
......
......@@ -460,7 +460,7 @@ typedef struct {
// buffer that contains the encoded messages
uint8_t *MIB_NB;
uint8_t sizeof_MIB_NB;
uint8_t sizeof_MIB_NB_IoT;
uint8_t *SIB1_NB;
uint8_t sizeof_SIB1_NB;
......@@ -496,11 +496,11 @@ typedef struct {
uint16_t physCellId; //not stored in the MIB-NB but is getting through NPSS/NSSS
//are the only static one (memory has been already allocated)
BCCH_BCH_Message_NB_t mib_NB;
BCCH_DL_SCH_Message_NB_t siblock1_NB; //SIB1-NB
BCCH_DL_SCH_Message_NB_t systemInformation_NB; //SI
BCCH_BCH_Message_NB_t mib_NB_IoT;
BCCH_DL_SCH_Message_NB_t siblock1_NB_IoT; //SIB1-NB
BCCH_DL_SCH_Message_NB_t systemInformation_NB_IoT; //SI
SystemInformationBlockType1_NB_t *sib1_NB;
SystemInformationBlockType1_NB_t *sib1_NB_IoT;
SystemInformationBlockType2_NB_r13_t *sib2_NB;
SystemInformationBlockType3_NB_r13_t *sib3_NB;
//not implemented yet
......
......@@ -1626,11 +1626,11 @@ 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];
//TODO: verify who allocate memory for sib1_NB, 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, 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_SIB23_NB = 0;
eNB_rrc_inst_NB_IoT[ctxt_pP->module_id].carrier[CC_id].sizeof_MIB_NB = 0;
eNB_rrc_inst_NB_IoT[ctxt_pP->module_id].carrier[CC_id].sizeof_MIB_NB_IoT = 0;
//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
......@@ -1638,7 +1638,7 @@ init_SI_NB(
if (eNB_rrc_inst_NB_IoT[ctxt_pP->module_id].carrier[CC_id].MIB_NB)
{
eNB_rrc_inst_NB_IoT[ctxt_pP->module_id].carrier[CC_id].sizeof_MIB_NB =
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],
configuration->N_RB_DL[CC_id],
0 //FIXME is correct to pass frame = 0??
......@@ -1651,8 +1651,8 @@ init_SI_NB(
}
if (eNB_rrc_inst_NB_IoT[ctxt_pP->module_id].carrier[CC_id].sizeof_MIB_NB == 255) {
mac_xface->macphy_exit("[RRC][init_SI] FATAL, eNB_rrc_inst_NB[enb_mod_idP].carrier[CC_id].sizeof_MIB_NB == 255");
if (eNB_rrc_inst_NB_IoT[ctxt_pP->module_id].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
......@@ -1721,18 +1721,18 @@ init_SI_NB(
eNB_rrc_inst_NB_IoT[ctxt_pP->module_id].carrier[CC_id].p_rx_eNB,
eNB_rrc_inst_NB_IoT[ctxt_pP->module_id].carrier[CC_id].Ncp,
eNB_rrc_inst_NB_IoT[ctxt_pP->module_id].carrier[CC_id].Ncp_UL,
eNB_rrc_inst_NB_IoT[ctxt_pP->module_id].carrier[CC_id].sib1_NB->freqBandIndicator_r13, //eutra_band
eNB_rrc_inst_NB_IoT[ctxt_pP->module_id].carrier[CC_id].sib1_NB->freqBandInfo_r13,
eNB_rrc_inst_NB_IoT[ctxt_pP->module_id].carrier[CC_id].sib1_NB->multiBandInfoList_r13,
eNB_rrc_inst_NB_IoT[ctxt_pP->module_id].carrier[CC_id].sib1_NB->downlinkBitmap_r13,
eNB_rrc_inst_NB_IoT[ctxt_pP->module_id].carrier[CC_id].sib1_NB->eutraControlRegionSize_r13,
eNB_rrc_inst_NB_IoT[ctxt_pP->module_id].carrier[CC_id].sib1_NB->nrs_CRS_PowerOffset_r13,
eNB_rrc_inst_NB_IoT[ctxt_pP->module_id].carrier[CC_id].sib1_NB_IoT->freqBandIndicator_r13, //eutra_band
eNB_rrc_inst_NB_IoT[ctxt_pP->module_id].carrier[CC_id].sib1_NB_IoT->freqBandInfo_r13,
eNB_rrc_inst_NB_IoT[ctxt_pP->module_id].carrier[CC_id].sib1_NB_IoT->multiBandInfoList_r13,
eNB_rrc_inst_NB_IoT[ctxt_pP->module_id].carrier[CC_id].sib1_NB_IoT->downlinkBitmap_r13,
eNB_rrc_inst_NB_IoT[ctxt_pP->module_id].carrier[CC_id].sib1_NB_IoT->eutraControlRegionSize_r13,
eNB_rrc_inst_NB_IoT[ctxt_pP->module_id].carrier[CC_id].sib1_NB_IoT->nrs_CRS_PowerOffset_r13,
// &SIwindowsize,
// &SIperiod,
eNB_rrc_inst_NB_IoT[ctxt_pP->module_id].carrier[CC_id].dl_CarrierFreq,
eNB_rrc_inst_NB_IoT[ctxt_pP->module_id].carrier[CC_id].ul_CarrierFreq,
(BCCH_BCH_Message_NB_t*) &
eNB_rrc_inst_NB_IoT[ctxt_pP->module_id].carrier[CC_id].mib_NB,
eNB_rrc_inst_NB_IoT[ctxt_pP->module_id].carrier[CC_id].mib_NB_IoT,
(RadioResourceConfigCommonSIB_NB_r13_t *) &
eNB_rrc_inst_NB_IoT[ctxt_pP->module_id].carrier[CC_id].sib2_NB->radioResourceConfigCommon_r13,
(struct PhysicalConfigDedicated_NB_r13 *)NULL,
......
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