Commit 9650940f authored by Michele Paffetti's avatar Michele Paffetti

structure type name changed in defs_nb_iot.h for compile purposes, fix some...

structure type name changed in defs_nb_iot.h for compile purposes, fix some bugs. Code compile but still to much wornings
parent 908bad77
...@@ -48,55 +48,29 @@ ...@@ -48,55 +48,29 @@
#include <per_encoder.h> #include <per_encoder.h>
#include "assertions.h" #include "assertions.h"
#include "RRCConnectionRequest.h" //#include "RRCConnectionRequest.h"
#include "UL-CCCH-Message.h" //#include "UL-CCCH-Message.h"
#include "UL-DCCH-Message.h" //#include "UL-DCCH-Message.h"
#include "DL-CCCH-Message.h" //#include "DL-CCCH-Message.h"
#include "DL-DCCH-Message.h" //#include "DL-DCCH-Message.h"
#include "EstablishmentCause.h" //#include "EstablishmentCause.h"
#include "RRCConnectionSetup.h" //#include "RRCConnectionSetup.h"
#include "SRB-ToAddModList.h" //#include "SRB-ToAddModList.h"
#include "DRB-ToAddModList.h" //#include "DRB-ToAddModList.h"
#if defined(Rel10) || defined(Rel14) //#if defined(Rel10) || defined(Rel14)
#include "MCCH-Message.h" //#include "MCCH-Message.h"
//#define MRB1 1 ////#define MRB1 1
#endif //#endif
#include "RRC/LITE/defs.h"
#include "RRCConnectionSetupComplete.h"
#include "RRCConnectionReconfigurationComplete.h"
#include "RRCConnectionReconfiguration.h"
#include "MasterInformationBlock.h"
#include "SystemInformation.h"
#include "SystemInformationBlockType1.h"
#include "SIB-Type.h"
#include "BCCH-DL-SCH-Message.h"
#include "PHY/defs.h"
#include "MeasObjectToAddModList.h" //#include "RRC/LITE/defs.h"
#include "ReportConfigToAddModList.h" //#include "RRCConnectionSetupComplete.h"
#include "MeasIdToAddModList.h" //#include "RRCConnectionReconfigurationComplete.h"
#include "enb_config.h" //#include "RRCConnectionReconfiguration.h"
//#include "MasterInformationBlock.h"
#if defined(ENABLE_ITTI) //#include "SystemInformation.h"
# include "intertask_interface.h" //#include "SystemInformationBlockType1.h"
#endif //#include "SIB-Type.h"
//#include "BCCH-DL-SCH-Message.h"
//#include "PHY/defs.h"
#ifndef USER_MODE
#define msg printk
#ifndef errno
int errno;
#endif
#else
# if !defined (msg)
# define msg printf
# endif
#endif
//#include for NB-IoT------------------- //#include for NB-IoT-------------------
#include "RRCConnectionRequest-NB.h" #include "RRCConnectionRequest-NB.h"
...@@ -121,6 +95,30 @@ int errno; ...@@ -121,6 +95,30 @@ int errno;
#include "RRCConnectionReestablishment-NB.h" #include "RRCConnectionReestablishment-NB.h"
//---------------------------------------- //----------------------------------------
#include "PHY/defs.h"
//#include "MeasObjectToAddModList.h"
//#include "ReportConfigToAddModList.h"
//#include "MeasIdToAddModList.h"
#include "enb_config.h"
#if defined(ENABLE_ITTI)
# include "intertask_interface.h"
#endif
#ifndef USER_MODE
#define msg printk
#ifndef errno
int errno;
#endif
#else
# if !defined (msg)
# define msg printf
# endif
#endif
//Not touched //Not touched
//#define XER_PRINT //#define XER_PRINT
extern Enb_properties_array_t enb_properties; extern Enb_properties_array_t enb_properties;
...@@ -210,8 +208,8 @@ uint8_t get_adjacent_cell_mod_id(uint16_t phyCellId) ...@@ -210,8 +208,8 @@ uint8_t get_adjacent_cell_mod_id(uint16_t phyCellId)
/*do_MIB_NB*/ /*do_MIB_NB*/
uint8_t do_MIB_NB( uint8_t do_MIB_NB(
rrc_eNB_carrier_data_t *carrier, rrc_eNB_carrier_data_NB_t *carrier,
uint32_t N_RB_DL, uint32_t N_RB_DL,//may not needed
uint32_t frame) uint32_t frame)
{ {
asn_enc_rval_t enc_rval; asn_enc_rval_t enc_rval;
...@@ -275,7 +273,7 @@ uint8_t do_MIB_NB( ...@@ -275,7 +273,7 @@ uint8_t do_MIB_NB(
/*do_SIB1_NB*/ /*do_SIB1_NB*/
uint8_t do_SIB1_NB(uint8_t Mod_id, int CC_id, uint8_t do_SIB1_NB(uint8_t Mod_id, int CC_id,
rrc_eNB_carrier_data_t *carrier, rrc_eNB_carrier_data_NB_t *carrier,
RrcConfigurationReq *configuration RrcConfigurationReq *configuration
) )
{ {
...@@ -431,11 +429,12 @@ uint8_t do_SIB1_NB(uint8_t Mod_id, int CC_id, ...@@ -431,11 +429,12 @@ uint8_t do_SIB1_NB(uint8_t Mod_id, int CC_id,
* freqBandInfo_r13 * freqBandInfo_r13
* multiBandInfoList_r13 * multiBandInfoList_r13
* nrs_CRS_PowerOffset_r13 * nrs_CRS_PowerOffset_r13
* sib1_NB->downlinkBitmap_r13.choice.subframePattern10_r13 =(is a BIT_STRING)
*/ */
sib1_NB->downlinkBitmap_r13.present= DL_Bitmap_NB_r13_PR_subframePattern10_r13; //FIXME: correct memory allocation?
//sib1_NB->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_subframePattern10_r13;
*eutraControlRegionSize = 0; *eutraControlRegionSize = 0;
sib1_NB->eutraControlRegionSize_r13 = eutraControlRegionSize; //ok sib1_NB->eutraControlRegionSize_r13 = eutraControlRegionSize; //ok
...@@ -513,7 +512,7 @@ uint8_t do_SIB1_NB(uint8_t Mod_id, int CC_id, ...@@ -513,7 +512,7 @@ uint8_t do_SIB1_NB(uint8_t Mod_id, int CC_id,
//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(uint8_t Mod_id,
int CC_id, int CC_id,
rrc_eNB_carrier_data_t *carrier, rrc_eNB_carrier_data_NB_t *carrier,
RrcConfigurationReq *configuration ) RrcConfigurationReq *configuration )
{ {
struct SystemInformation_NB_r13_IEs__sib_TypeAndInfo_r13__Member *sib2_NB_part; struct SystemInformation_NB_r13_IEs__sib_TypeAndInfo_r13__Member *sib2_NB_part;
...@@ -610,25 +609,27 @@ uint8_t do_SIB23_NB(uint8_t Mod_id, ...@@ -610,25 +609,27 @@ uint8_t do_SIB23_NB(uint8_t Mod_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->radioResourceConfigCommon_r13.nprach_Config_r13.nprach_CP_Length_r13 = configuration->nprach_CP_Length[CC_id];
//new(provo metodo short) //new
sib2_NB->radioResourceConfigCommon_r13.nprach_Config_r13.rsrp_ThresholdsPrachInfoList_r13 = sib2_NB->radioResourceConfigCommon_r13.nprach_Config_r13.rsrp_ThresholdsPrachInfoList_r13 =
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->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);
nprach_parameters->nprach_Periodicity_r13 = configuration->nprach_Periodicity[CC_id]; nprach_parameters.nprach_Periodicity_r13 = configuration->nprach_Periodicity[CC_id];
nprach_parameters->nprach_StartTime_r13 = configuration->nprach_StartTime[CC_id]; nprach_parameters.nprach_StartTime_r13 = configuration->nprach_StartTime[CC_id];
nprach_parameters->nprach_SubcarrierOffset_r13 = configuration->nprach_SubcarrierOffset[CC_id]; nprach_parameters.nprach_SubcarrierOffset_r13 = configuration->nprach_SubcarrierOffset[CC_id];
nprach_parameters->nprach_NumSubcarriers_r13= configuration->nprach_NumSubcarriers[CC_id]; nprach_parameters.nprach_NumSubcarriers_r13= configuration->nprach_NumSubcarriers[CC_id];
nprach_parameters->nprach_SubcarrierMSG3_RangeStart_r13= configuration->nprach_SubcarrierMSG3_RangeStart[CC_id]; nprach_parameters.nprach_SubcarrierMSG3_RangeStart_r13= configuration->nprach_SubcarrierMSG3_RangeStart[CC_id];
nprach_parameters->maxNumPreambleAttemptCE_r13= configuration->maxNumPreambleAttemptCE_NB[CC_id]; nprach_parameters.maxNumPreambleAttemptCE_r13= configuration->maxNumPreambleAttemptCE_NB[CC_id];
nprach_parameters->numRepetitionsPerPreambleAttempt_r13 = configuration->numRepetitionsPerPreambleAttempt_NB[CC_id]; nprach_parameters.numRepetitionsPerPreambleAttempt_r13 = configuration->numRepetitionsPerPreambleAttempt_NB[CC_id];
nprach_parameters->npdcch_NumRepetitions_RA_r13 = configuration->npdcch_NumRepetitions_RA[CC_id]; nprach_parameters.npdcch_NumRepetitions_RA_r13 = configuration->npdcch_NumRepetitions_RA[CC_id];
nprach_parameters->npdcch_StartSF_CSS_RA_r13= configuration->npdcch_StartSF_CSS_RA[CC_id]; nprach_parameters.npdcch_StartSF_CSS_RA_r13= configuration->npdcch_StartSF_CSS_RA[CC_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];
//Correct?
ASN_SEQUENCE_ADD(&sib2_NB->radioResourceConfigCommon_r13.nprach_Config_r13.nprach_ParametersList_r13.list,nprach_parameters); //FIXME check if nprach parameter is added properly to the list
ASN_SEQUENCE_ADD(&sib2_NB->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->radioResourceConfigCommon_r13.npdsch_ConfigCommon_r13.nrs_Power_r13= configuration->npdsch_nrs_Power[CC_id];
...@@ -880,7 +881,7 @@ uint8_t do_SIB23_NB(uint8_t Mod_id, ...@@ -880,7 +881,7 @@ uint8_t do_SIB23_NB(uint8_t Mod_id,
/*do_RRCConnectionSetup_NB--> the aim is to establish SRB1 and SRB1bis*/ /*do_RRCConnectionSetup_NB--> the aim is to establish SRB1 and SRB1bis*/
uint8_t do_RRCConnectionSetup_NB( uint8_t do_RRCConnectionSetup_NB(
const protocol_ctxt_t* const ctxt_pP, const protocol_ctxt_t* const ctxt_pP,
rrc_eNB_ue_context_t* const ue_context_pP, rrc_eNB_ue_context_NB_t* const ue_context_pP,
int CC_id, int CC_id,
uint8_t* const buffer, uint8_t* const buffer,
const uint8_t Transaction_id, const uint8_t Transaction_id,
...@@ -940,16 +941,16 @@ uint8_t do_RRCConnectionSetup_NB( ...@@ -940,16 +941,16 @@ uint8_t do_RRCConnectionSetup_NB(
SRB1_rlc_config_NB->choice.explicitValue.present=RLC_Config_NB_r13_PR_am;//the only possible in NB_IoT SRB1_rlc_config_NB->choice.explicitValue.present=RLC_Config_NB_r13_PR_am;//the only possible in NB_IoT
SRB1_rlc_config_NB->choice.explicitValue.choice.am.ul_AM_RLC_r13.t_PollRetransmit_r13 = enb_properties.properties[ctxt_pP->module_id]->srb1_timer_poll_retransmit_r13; // SRB1_rlc_config_NB->choice.explicitValue.choice.am.ul_AM_RLC_r13.t_PollRetransmit_r13 = enb_properties.properties[ctxt_pP->module_id]->srb1_timer_poll_retransmit_r13;
SRB1_rlc_config_NB->choice.explicitValue.choice.am.ul_AM_RLC_r13.maxRetxThreshold_r13 = enb_properties.properties[ctxt_pP->module_id]->srb1_max_retx_threshold_r13; // SRB1_rlc_config_NB->choice.explicitValue.choice.am.ul_AM_RLC_r13.maxRetxThreshold_r13 = enb_properties.properties[ctxt_pP->module_id]->srb1_max_retx_threshold_r13;
//(musT be disabled--> SRB1 config pag 640 specs ) // //(musT be disabled--> SRB1 config pag 640 specs )
SRB1_rlc_config_NB->choice.explicitValue.choice.am.dl_AM_RLC_r13.enableStatusReportSN_Gap_r13 =NULL; // SRB1_rlc_config_NB->choice.explicitValue.choice.am.dl_AM_RLC_r13.enableStatusReportSN_Gap_r13 =NULL;
/*no static assignment
* SRB1_rlc_config_NB->choice.explicitValue.choice.am.ul_AM_RLC_r13.t_PollRetransmit_r13 = T_PollRetransmit_NB_r13_ms25000; SRB1_rlc_config_NB->choice.explicitValue.choice.am.ul_AM_RLC_r13.t_PollRetransmit_r13 = T_PollRetransmit_NB_r13_ms25000;
SRB1_rlc_config_NB->choice.explicitValue.choice.am.ul_AM_RLC_r13.maxRetxThreshold_r13 = UL_AM_RLC_NB_r13__maxRetxThreshold_r13_t8; SRB1_rlc_config_NB->choice.explicitValue.choice.am.ul_AM_RLC_r13.maxRetxThreshold_r13 = UL_AM_RLC_NB_r13__maxRetxThreshold_r13_t8;
//(musT be disabled--> SRB1 config pag 640 specs ) //(musT be disabled--> SRB1 config pag 640 specs )
SRB1_rlc_config_NB->choice.explicitValue.choice.am.dl_AM_RLC_r13.enableStatusReportSN_Gap_r13 = NULL;*/ SRB1_rlc_config_NB->choice.explicitValue.choice.am.dl_AM_RLC_r13.enableStatusReportSN_Gap_r13 = NULL;
SRB1_lchan_config_NB = CALLOC(1,sizeof(*SRB1_lchan_config_NB)); SRB1_lchan_config_NB = CALLOC(1,sizeof(*SRB1_lchan_config_NB));
SRB1_config_NB->logicalChannelConfig_r13 = SRB1_lchan_config_NB; SRB1_config_NB->logicalChannelConfig_r13 = SRB1_lchan_config_NB;
...@@ -964,7 +965,7 @@ uint8_t do_RRCConnectionSetup_NB( ...@@ -964,7 +965,7 @@ uint8_t do_RRCConnectionSetup_NB(
logicalChannelSR_Prohibit = CALLOC(1, sizeof(BOOLEAN_t)); logicalChannelSR_Prohibit = CALLOC(1, sizeof(BOOLEAN_t));
*logicalChannelSR_Prohibit = 1; *logicalChannelSR_Prohibit = 1;
//schould be set to TRUE (specs pag 641) //schould be set to TRUE (specs pag 641)
SRB1_lchan_config_NB->choice.explicitValue->logicalChannelSR_Prohibit_r13 = logicalChannelSR_Prohibit; SRB1_lchan_config_NB->choice.explicitValue.logicalChannelSR_Prohibit_r13 = logicalChannelSR_Prohibit;
//ADD SRB1 //ADD SRB1
ASN_SEQUENCE_ADD(&(*SRB_configList_NB)->list,SRB1_config_NB); ASN_SEQUENCE_ADD(&(*SRB_configList_NB)->list,SRB1_config_NB);
...@@ -984,8 +985,8 @@ uint8_t do_RRCConnectionSetup_NB( ...@@ -984,8 +985,8 @@ uint8_t do_RRCConnectionSetup_NB(
SRB1bis_rlc_config_NB->present = SRB_ToAddMod_NB_r13__rlc_Config_r13_PR_explicitValue; SRB1bis_rlc_config_NB->present = SRB_ToAddMod_NB_r13__rlc_Config_r13_PR_explicitValue;
SRB1bis_rlc_config_NB->choice.explicitValue.present=RLC_Config_NB_r13_PR_am;//the only possible in NB_IoT SRB1bis_rlc_config_NB->choice.explicitValue.present=RLC_Config_NB_r13_PR_am;//the only possible in NB_IoT
SRB1bis_rlc_config_NB->choice.explicitValue.choice.am.ul_AM_RLC_r13.t_PollRetransmit_r13 = enb_properties.properties[ctxt_pP->module_id]->srb1bis_timer_poll_retransmit_r13; SRB1bis_rlc_config_NB->choice.explicitValue.choice.am.ul_AM_RLC_r13.t_PollRetransmit_r13 = T_PollRetransmit_NB_r13_ms25000;
SRB1bis_rlc_config_NB->choice.explicitValue.choice.am.ul_AM_RLC_r13.maxRetxThreshold_r13 = enb_properties.properties[ctxt_pP->module_id]->srb1bis_max_retx_threshold_r13; SRB1bis_rlc_config_NB->choice.explicitValue.choice.am.ul_AM_RLC_r13.maxRetxThreshold_r13 = UL_AM_RLC_NB_r13__maxRetxThreshold_r13_t8;
//(musT be disabled--> SRB1 config pag 640 specs ) //(musT be disabled--> SRB1 config pag 640 specs )
SRB1_rlc_config_NB->choice.explicitValue.choice.am.dl_AM_RLC_r13.enableStatusReportSN_Gap_r13 =NULL; SRB1_rlc_config_NB->choice.explicitValue.choice.am.dl_AM_RLC_r13.enableStatusReportSN_Gap_r13 =NULL;
...@@ -1001,7 +1002,7 @@ uint8_t do_RRCConnectionSetup_NB( ...@@ -1001,7 +1002,7 @@ uint8_t do_RRCConnectionSetup_NB(
logicalChannelSR_Prohibit = CALLOC(1, sizeof(BOOLEAN_t)); logicalChannelSR_Prohibit = CALLOC(1, sizeof(BOOLEAN_t));
*logicalChannelSR_Prohibit = 1; *logicalChannelSR_Prohibit = 1;
//schould be set to TRUE (specs pag 641) //schould be set to TRUE (specs pag 641)
SRB1bis_lchan_config_NB->choice.explicitValue->logicalChannelSR_Prohibit_r13 = logicalChannelSR_Prohibit; SRB1bis_lchan_config_NB->choice.explicitValue.logicalChannelSR_Prohibit_r13 = logicalChannelSR_Prohibit;
//ADD SRB1bis //FIXME: actually there is no way to distinguish SRB1 and SRB1bis, maybe MAC doesn't care //ADD SRB1bis //FIXME: actually there is no way to distinguish SRB1 and SRB1bis, maybe MAC doesn't care
ASN_SEQUENCE_ADD(&(*SRB_configList_NB)->list,SRB1bis_config_NB); ASN_SEQUENCE_ADD(&(*SRB_configList_NB)->list,SRB1bis_config_NB);
...@@ -1026,14 +1027,15 @@ uint8_t do_RRCConnectionSetup_NB( ...@@ -1026,14 +1027,15 @@ uint8_t do_RRCConnectionSetup_NB(
* */ * */
//CarrierConfigDedicated --> I don't know nothing --> settato valori a caso //CarrierConfigDedicated --> I don't know nothing --> settato valori a caso
physicalConfigDedicated2_NB->carrierConfigDedicated_r13->dl_CarrierConfig_r13->downlinkBitmapNonAnchor_r13.present= physicalConfigDedicated2_NB->carrierConfigDedicated_r13->dl_CarrierConfig_r13.downlinkBitmapNonAnchor_r13->present=
DL_CarrierConfigDedicated_NB_r13__downlinkBitmapNonAnchor_r13_PR_useNoBitmap_r13; DL_CarrierConfigDedicated_NB_r13__downlinkBitmapNonAnchor_r13_PR_useNoBitmap_r13;
physicalConfigDedicated2_NB->carrierConfigDedicated_r13->dl_CarrierConfig_r13->dl_GapNonAnchor_r13.present = physicalConfigDedicated2_NB->carrierConfigDedicated_r13->dl_CarrierConfig_r13.dl_GapNonAnchor_r13->present =
DL_CarrierConfigDedicated_NB_r13__dl_GapNonAnchor_r13_PR_useNoGap_r13; DL_CarrierConfigDedicated_NB_r13__dl_GapNonAnchor_r13_PR_useNoGap_r13;
physicalConfigDedicated2_NB->carrierConfigDedicated_r13->dl_CarrierConfig_r13->inbandCarrierInfo_r13.eutraControlRegionSize_r13= 0; physicalConfigDedicated2_NB->carrierConfigDedicated_r13->dl_CarrierConfig_r13.inbandCarrierInfo_r13->eutraControlRegionSize_r13= 0;
//physicalConfigDedicated2_NB->carrierConfigDedicated_r13->dl_CarrierConfig_r13->inbandCarrierInfo_r13->samePCI_Indicator_r13 (??) //physicalConfigDedicated2_NB->carrierConfigDedicated_r13->dl_CarrierConfig_r13->inbandCarrierInfo_r13->samePCI_Indicator_r13 (??)
physicalConfigDedicated2_NB->carrierConfigDedicated_r13->ul_CarrierConfig_r13->ul_CarrierFreq_r13.carrierFreq_r13=0; //maybe first need to allocate memory?
physicalConfigDedicated2_NB->carrierConfigDedicated_r13->ul_CarrierConfig_r13->ul_CarrierFreq_r13->carrierFreqOffset_r13= NULL; physicalConfigDedicated2_NB->carrierConfigDedicated_r13->ul_CarrierConfig_r13.ul_CarrierFreq_r13->carrierFreq_r13=0;
physicalConfigDedicated2_NB->carrierConfigDedicated_r13->ul_CarrierConfig_r13.ul_CarrierFreq_r13->carrierFreqOffset_r13= NULL;
// NPDCCH // NPDCCH
physicalConfigDedicated2_NB->npdcch_ConfigDedicated_r13->npdcch_NumRepetitions_r13 =0; physicalConfigDedicated2_NB->npdcch_ConfigDedicated_r13->npdcch_NumRepetitions_r13 =0;
...@@ -1116,7 +1118,7 @@ uint8_t do_SecurityModeCommand_NB( ...@@ -1116,7 +1118,7 @@ uint8_t do_SecurityModeCommand_NB(
//only changed "asn_DEF_DL_DCCH_Message_NB" //only changed "asn_DEF_DL_DCCH_Message_NB"
#ifdef XER_PRINT #ifdef XER_PRINT
xer_fprint(stdout, &asn_DEF_DL_DCCH_Message_NB, (void*)&dl_dcch_msg); xer_fprint(stdout, &asn_DEF_DL_DCCH_Message_NB, (void*)&dl_dcch_msg_NB);
#endif #endif
enc_rval = uper_encode_to_buffer(&asn_DEF_DL_DCCH_Message_NB, enc_rval = uper_encode_to_buffer(&asn_DEF_DL_DCCH_Message_NB,
(void*)&dl_dcch_msg_NB, (void*)&dl_dcch_msg_NB,
...@@ -1132,7 +1134,7 @@ uint8_t do_SecurityModeCommand_NB( ...@@ -1132,7 +1134,7 @@ uint8_t do_SecurityModeCommand_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_DCCH_Message_NB, (void *) &dl_dcch_msg)) > 0) { if ((message_string_size = xer_sprint(message_string, sizeof(message_string), &asn_DEF_DL_DCCH_Message_NB, (void *) &dl_dcch_msg_NB)) > 0) {
MessageDef *msg_p; MessageDef *msg_p;
msg_p = itti_alloc_new_message_sized (TASK_RRC_ENB, RRC_DL_DCCH, message_string_size + sizeof (IttiMsgText)); msg_p = itti_alloc_new_message_sized (TASK_RRC_ENB, RRC_DL_DCCH, message_string_size + sizeof (IttiMsgText));
...@@ -1191,7 +1193,7 @@ uint8_t do_UECapabilityEnquiry_NB( ...@@ -1191,7 +1193,7 @@ uint8_t do_UECapabilityEnquiry_NB(
//only changed "asn_DEF_DL_DCCH_Message_NB" //only changed "asn_DEF_DL_DCCH_Message_NB"
#ifdef XER_PRINT #ifdef XER_PRINT
xer_fprint(stdout, &asn_DEF_DL_DCCH_Message_NB, (void*)&dl_dcch_msg); xer_fprint(stdout, &asn_DEF_DL_DCCH_Message_NB, (void*)&dl_dcch_msg_NB);
#endif #endif
enc_rval = uper_encode_to_buffer(&asn_DEF_DL_DCCH_Message_NB, enc_rval = uper_encode_to_buffer(&asn_DEF_DL_DCCH_Message_NB,
(void*)&dl_dcch_msg_NB, (void*)&dl_dcch_msg_NB,
...@@ -1206,7 +1208,7 @@ uint8_t do_UECapabilityEnquiry_NB( ...@@ -1206,7 +1208,7 @@ uint8_t do_UECapabilityEnquiry_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_DCCH_Message_NB, (void *) &dl_dcch_msg)) > 0) { if ((message_string_size = xer_sprint(message_string, sizeof(message_string), &asn_DEF_DL_DCCH_Message_NB, (void *) &dl_dcch_msg_NB)) > 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));
...@@ -1311,7 +1313,7 @@ uint16_t do_RRCConnectionReconfiguration_NB( ...@@ -1311,7 +1313,7 @@ uint16_t do_RRCConnectionReconfiguration_NB(
//changed only asn_DEF_DL_DCCH_Message_NB //changed only asn_DEF_DL_DCCH_Message_NB
#ifdef XER_PRINT #ifdef XER_PRINT
xer_fprint(stdout,&asn_DEF_DL_DCCH_Message_NB,(void*)&dl_dcch_msg); xer_fprint(stdout,&asn_DEF_DL_DCCH_Message_NB,(void*)&dl_dcch_msg_NB);
#endif #endif
#if defined(ENABLE_ITTI) #if defined(ENABLE_ITTI)
...@@ -1320,7 +1322,7 @@ uint16_t do_RRCConnectionReconfiguration_NB( ...@@ -1320,7 +1322,7 @@ uint16_t do_RRCConnectionReconfiguration_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_DCCH_Message_NB, (void *) &dl_dcch_msg)) > 0) { if ((message_string_size = xer_sprint(message_string, sizeof(message_string), &asn_DEF_DL_DCCH_Message_NB, (void *) &dl_dcch_msg_NB)) > 0) {
MessageDef *msg_p; MessageDef *msg_p;
msg_p = itti_alloc_new_message_sized (TASK_RRC_ENB, RRC_DL_DCCH, message_string_size + sizeof (IttiMsgText)); msg_p = itti_alloc_new_message_sized (TASK_RRC_ENB, RRC_DL_DCCH, message_string_size + sizeof (IttiMsgText));
...@@ -1360,7 +1362,7 @@ uint8_t do_RRCConnectionReestablishmentReject_NB( ...@@ -1360,7 +1362,7 @@ uint8_t do_RRCConnectionReestablishmentReject_NB(
//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); xer_fprint(stdout, &asn_DEF_DL_CCCH_Message_NB, (void*)&dl_ccch_msg_NB);
#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,
...@@ -1376,7 +1378,7 @@ uint8_t do_RRCConnectionReestablishmentReject_NB( ...@@ -1376,7 +1378,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)) > 0) { if ((message_string_size = xer_sprint(message_string, sizeof(message_string), &asn_DEF_DL_CCCH_Message_NB, (void *) &dl_ccch_msg_NB)) > 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));
...@@ -1421,7 +1423,9 @@ uint8_t do_RRCConnectionReject_NB( ...@@ -1421,7 +1423,9 @@ uint8_t do_RRCConnectionReject_NB(
rrcConnectionReject_NB->criticalExtensions.choice.c1.choice.rrcConnectionReject_r13.extendedWaitTime_r13 = 1; rrcConnectionReject_NB->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->criticalExtensions.choice.c1.choice.rrcConnectionReject_r13.rrc_SuspendIndication_r13=
CALLOC(1, sizeof(long));
*(rrcConnectionReject_NB->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"
...@@ -1441,7 +1445,7 @@ uint8_t do_RRCConnectionReject_NB( ...@@ -1441,7 +1445,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)) > 0) { if ((message_string_size = xer_sprint(message_string, sizeof(message_string), &asn_DEF_DL_CCCH_Message_NB, (void *) &dl_ccch_msg_NB)) > 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));
...@@ -1536,7 +1540,7 @@ uint8_t do_DLInformationTransfer_NB( ...@@ -1536,7 +1540,7 @@ uint8_t do_DLInformationTransfer_NB(
char message_string[10000]; char message_string[10000];
size_t message_string_size; size_t message_string_size;
if ((message_string_size = xer_sprint(message_string, sizeof(message_string), &asn_DEF_DL_DCCH_Message_NB, (void *)&dl_dcch_msg)) > 0) { if ((message_string_size = xer_sprint(message_string, sizeof(message_string), &asn_DEF_DL_DCCH_Message_NB, (void *)&dl_dcch_msg_NB)) > 0) {
MessageDef *msg_p; MessageDef *msg_p;
msg_p = itti_alloc_new_message_sized (TASK_RRC_ENB, RRC_DL_DCCH, message_string_size + sizeof (IttiMsgText)); msg_p = itti_alloc_new_message_sized (TASK_RRC_ENB, RRC_DL_DCCH, message_string_size + sizeof (IttiMsgText));
...@@ -1557,7 +1561,7 @@ uint8_t do_DLInformationTransfer_NB( ...@@ -1557,7 +1561,7 @@ uint8_t do_DLInformationTransfer_NB(
/*OAI_UECapability_t *fill_ue_capability*/ /*OAI_UECapability_t *fill_ue_capability*/
/*do_RRCConnectionReestablishment-->used to re-establish SRB1*/ //come fare??//quali parametri in ingresso? /*do_RRCConnectionReestablishment-->used to re-establish SRB1*/ //which parameter to use?
uint8_t do_RRCConnectionReestablishment_NB( uint8_t do_RRCConnectionReestablishment_NB(
uint8_t Mod_id, uint8_t Mod_id,
uint8_t* const buffer, uint8_t* const buffer,
...@@ -1567,34 +1571,32 @@ uint8_t do_RRCConnectionReestablishment_NB( ...@@ -1567,34 +1571,32 @@ 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; DL_CCCH_Message_NB_t dl_ccch_msg_NB;
RRCConnectionReestablishment_NB_t* rrcConnectionReestablishment_NB; RRCConnectionReestablishment_NB_t* rrcConnectionReestablishment_NB;
memset(&dl_ccch_msg, 0, sizeof(DL_CCCH_Message_NB_t)); memset(&dl_ccch_msg_NB, 0, sizeof(DL_CCCH_Message_NB_t));
dl_ccch_msg.message.present = DL_CCCH_MessageType_NB_PR_c1; dl_ccch_msg_NB.message.present = DL_CCCH_MessageType_NB_PR_c1;
dl_ccch_msg.message.choice.c1.present = DL_CCCH_MessageType_NB__c1_PR_rrcConnectionReestablishment_r13; dl_ccch_msg_NB.message.choice.c1.present = DL_CCCH_MessageType_NB__c1_PR_rrcConnectionReestablishment_r13;
rrcConnectionReestablishment_NB = &dl_ccch_msg.message.choice.c1.choice.rrcConnectionReestablishment_r13; rrcConnectionReestablishment_NB = &dl_ccch_msg_NB.message.choice.c1.choice.rrcConnectionReestablishment_r13;
//rrcConnectionReestablishment_NB //rrcConnectionReestablishment_NB
rrcConnectionReestablishment_NB->rrc_TransactionIdentifier = Transaction_id; rrcConnectionReestablishment_NB->rrc_TransactionIdentifier = Transaction_id;
rrcConnectionReestablishment_NB->criticalExtensions.present = RRCConnectionReestablishment_NB__criticalExtensions_PR_c1; rrcConnectionReestablishment_NB->criticalExtensions.present = RRCConnectionReestablishment_NB__criticalExtensions_PR_c1;
rrcConnectionReestablishment_NB->criticalExtensions.choice.c1.present = RRCConnectionReestablishment_NB__criticalExtensions__c1_PR_rrcConnectionReestablishment_r13; rrcConnectionReestablishment_NB->criticalExtensions.choice.c1.present = RRCConnectionReestablishment_NB__criticalExtensions__c1_PR_rrcConnectionReestablishment_r13;
rrcConnectionReestablishment_NB->criticalExtensions.choice.c1.choice.rrcConnectionReestablishment_r13.radioResourceConfigDedicated_r13=
CALLOC(1,sizeof(*rrcConnectionReestablishment_NB->criticalExtensions.choice.c1.choice.rrcConnectionReestablishment_r13.radioResourceConfigDedicated_r13));
//?? //FIXME: which parameters are needed?
rrcConnectionReestablishment_NB->criticalExtensions.choice.c1.choice.rrcConnectionReestablishment_r13.radioResourceConfigDedicated_r13->srb_ToAddModList_r13 = SRB_list_NB; rrcConnectionReestablishment_NB->criticalExtensions.choice.c1.choice.rrcConnectionReestablishment_r13.radioResourceConfigDedicated_r13.srb_ToAddModList_r13 = SRB_list_NB;
rrcConnectionReestablishment_NB->criticalExtensions.choice.c1.choice.rrcConnectionReestablishment_r13.radioResourceConfigDedicated_r13->drb_ToAddModList_r13 = NULL; rrcConnectionReestablishment_NB->criticalExtensions.choice.c1.choice.rrcConnectionReestablishment_r13.radioResourceConfigDedicated_r13.drb_ToAddModList_r13 = NULL;
rrcConnectionReestablishment_NB->criticalExtensions.choice.c1.choice.rrcConnectionReestablishment_r13.radioResourceConfigDedicated_r13->drb_ToReleaseList_r13 = NULL; rrcConnectionReestablishment_NB->criticalExtensions.choice.c1.choice.rrcConnectionReestablishment_r13.radioResourceConfigDedicated_r13.drb_ToReleaseList_r13 = NULL;
rrcConnectionReestablishment_NB->criticalExtensions.choice.c1.choice.rrcConnectionReestablishment_r13.radioResourceConfigDedicated_r13->rlf_TimersAndConstants_r13= NULL; rrcConnectionReestablishment_NB->criticalExtensions.choice.c1.choice.rrcConnectionReestablishment_r13.radioResourceConfigDedicated_r13.rlf_TimersAndConstants_r13= NULL;
rrcConnectionReestablishment_NB->criticalExtensions.choice.c1.choice.rrcConnectionReestablishment_r13.radioResourceConfigDedicated_r13->mac_MainConfig_r13= NULL; rrcConnectionReestablishment_NB->criticalExtensions.choice.c1.choice.rrcConnectionReestablishment_r13.radioResourceConfigDedicated_r13.mac_MainConfig_r13= NULL;
rrcConnectionReestablishment_NB->criticalExtensions.choice.c1.choice.rrcConnectionReestablishment_r13.radioResourceConfigDedicated_r13->physicalConfigDedicated_r13 = NULL; rrcConnectionReestablishment_NB->criticalExtensions.choice.c1.choice.rrcConnectionReestablishment_r13.radioResourceConfigDedicated_r13.physicalConfigDedicated_r13 = NULL;
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, (void*)&dl_ccch_msg_NB,
buffer, buffer,
RRC_BUF_SIZE); RRC_BUF_SIZE);
...@@ -1602,7 +1604,7 @@ uint8_t do_RRCConnectionReestablishment_NB( ...@@ -1602,7 +1604,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); xer_fprint(stdout,&asn_DEF_DL_CCCH_Message_NB,(void*)&dl_ccch_msg_NB);
#endif #endif
#if defined(ENABLE_ITTI) #if defined(ENABLE_ITTI)
...@@ -1611,14 +1613,14 @@ uint8_t do_RRCConnectionReestablishment_NB( ...@@ -1611,14 +1613,14 @@ 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)) > 0) { if ((message_string_size = xer_sprint(message_string, sizeof(message_string), &asn_DEF_DL_CCCH_Message_NB, (void *) &dl_ccch_msg_NB)) > 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));
msg_p->ittiMsg.rrc_dl_ccch.size = message_string_size; msg_p->ittiMsg.rrc_dl_ccch.size = message_string_size;
memcpy(&msg_p->ittiMsg.rrc_dl_ccch.text, message_string, message_string_size); memcpy(&msg_p->ittiMsg.rrc_dl_ccch.text, message_string, message_string_size);
itti_send_msg_to_task(TASK_UNKNOWN, ctxt_pP->instance, msg_p); itti_send_msg_to_task(TASK_UNKNOWN, Mod_id, msg_p);
} }
} }
# endif # endif
...@@ -1631,7 +1633,7 @@ uint8_t do_RRCConnectionReestablishment_NB( ...@@ -1631,7 +1633,7 @@ uint8_t do_RRCConnectionReestablishment_NB(
// -----??????-------------------- // -----??????--------------------
#ifndef USER_MODE #ifndef USER_MODE
int init_module(void) int init_module_NB(void)
{ {
printk("Init asn1_msg_nb_iot module\n"); printk("Init asn1_msg_nb_iot module\n");
...@@ -1640,7 +1642,7 @@ int init_module(void) ...@@ -1640,7 +1642,7 @@ int init_module(void)
} }
void cleanup_module(void) void cleanup_module_NB(void)
{ {
printk("Stopping asn1_msg_nb_iot module\n"); printk("Stopping asn1_msg_nb_iot module\n");
} }
...@@ -1651,7 +1653,7 @@ EXPORT_SYMBOL(do_RRCConnectionRequest_NB); ...@@ -1651,7 +1653,7 @@ EXPORT_SYMBOL(do_RRCConnectionRequest_NB);
EXPORT_SYMBOL(do_RRCConnectionSetupComplete_NB); EXPORT_SYMBOL(do_RRCConnectionSetupComplete_NB);
EXPORT_SYMBOL(do_RRCConnectionReconfigurationComplete_NB); EXPORT_SYMBOL(do_RRCConnectionReconfigurationComplete_NB);
EXPORT_SYMBOL(do_RRCConnectionSetup_NB); EXPORT_SYMBOL(do_RRCConnectionSetup_NB);
EXPORT_SYMBOL(do_RRCConnectionReestablishmentReject); EXPORT_SYMBOL(do_RRCConnectionReestablishmentReject_NB);
EXPORT_SYMBOL(do_RRCConnectionReconfiguration_NB); EXPORT_SYMBOL(do_RRCConnectionReconfiguration_NB);
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);
......
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
#include <asn_application.h> #include <asn_application.h>
#include <asn_internal.h> /* for _ASN_DEFAULT_STACK_MAX */ #include <asn_internal.h> /* for _ASN_DEFAULT_STACK_MAX */
#include "RRC/LITE/defs.h"
#include "RRC/LITE/defs_nb_iot.h" #include "RRC/LITE/defs_nb_iot.h"
/* /*
...@@ -71,7 +71,7 @@ uint8_t get_adjacent_cell_mod_id(uint16_t phyCellId); ...@@ -71,7 +71,7 @@ uint8_t get_adjacent_cell_mod_id(uint16_t phyCellId);
@param frame radio frame number @param frame radio frame number
@return size of encoded bit stream in bytes*/ @return size of encoded bit stream in bytes*/
uint8_t do_MIB_NB( uint8_t do_MIB_NB(
rrc_eNB_carrier_data_t *carrier, rrc_eNB_carrier_data_NB_t *carrier,
uint32_t N_RB_DL, uint32_t N_RB_DL,
uint32_t frame); uint32_t frame);
...@@ -85,7 +85,7 @@ uint8_t do_MIB_NB( ...@@ -85,7 +85,7 @@ uint8_t do_MIB_NB(
@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(uint8_t Mod_id, int CC_id,
rrc_eNB_carrier_data_t *carrier, rrc_eNB_carrier_data_NB_t *carrier,
RrcConfigurationReq *configuration RrcConfigurationReq *configuration
); );
...@@ -100,7 +100,7 @@ uint8_t do_SIB1_NB(uint8_t Mod_id, int CC_id, ...@@ -100,7 +100,7 @@ uint8_t do_SIB1_NB(uint8_t Mod_id, int CC_id,
uint8_t do_SIB23_NB(uint8_t Mod_id, uint8_t do_SIB23_NB(uint8_t Mod_id,
int CC_id, int CC_id,
rrc_eNB_carrier_data_t *carrier, rrc_eNB_carrier_data_NB_t *carrier,
RrcConfigurationReq *configuration RrcConfigurationReq *configuration
); );
...@@ -158,7 +158,7 @@ PhysicalConfigDedicated-NB IEs. ...@@ -158,7 +158,7 @@ PhysicalConfigDedicated-NB IEs.
uint8_t uint8_t
do_RRCConnectionSetup_NB( do_RRCConnectionSetup_NB(
const protocol_ctxt_t* const ctxt_pP, const protocol_ctxt_t* const ctxt_pP,
rrc_eNB_ue_context_t* const ue_context_pP, rrc_eNB_ue_context_NB_t* const ue_context_pP,
int CC_id, int CC_id,
uint8_t* const buffer, //carrier[CC_id].Srb0.Tx_buffer.Payload uint8_t* const buffer, //carrier[CC_id].Srb0.Tx_buffer.Payload
const uint8_t Transaction_id, const uint8_t Transaction_id,
...@@ -207,7 +207,7 @@ do_RRCConnectionReconfiguration_NB( ...@@ -207,7 +207,7 @@ do_RRCConnectionReconfiguration_NB(
@param integrityProtAlgorithm @param integrityProtAlgorithm
*/ */
uint8_t do_SecurityModeCommand( uint8_t do_SecurityModeCommand_NB(
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,
...@@ -237,7 +237,7 @@ uint8_t do_UECapabilityEnquiry_NB( ...@@ -237,7 +237,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( do_RRCConnectionReestablishmentReject_NB(
uint8_t Mod_id, uint8_t Mod_id,
uint8_t* const buffer); uint8_t* const buffer);
......
...@@ -27,9 +27,9 @@ ...@@ -27,9 +27,9 @@
* \email: navid.nikaein@eurecom.fr, raymond.knopp@eurecom.fr, michele.paffetti@studio.unibo.it * \email: navid.nikaein@eurecom.fr, raymond.knopp@eurecom.fr, michele.paffetti@studio.unibo.it
*/ */
#ifndef __OPENAIR_RRC_DEFS_H__ #ifndef __OPENAIR_RRC_DEFS_NB_IOT_H__
#define __OPENAIR_RRC_DEFS_H__ #define __OPENAIR_RRC_DEFS_NB_IOT_H__
#endif //questo non c'era prima?
#ifdef USER_MODE #ifdef USER_MODE
#include <stdio.h> #include <stdio.h>
...@@ -52,29 +52,48 @@ ...@@ -52,29 +52,48 @@
#endif #endif
//----Not needed for NB-IoT??-------- (but have to left for UE?) //----Not needed for NB-IoT??-------- (but have to left for UE?)
#include "SystemInformationBlockType1.h" //#include "SystemInformationBlockType1.h"
#include "SystemInformation.h" //#include "SystemInformation.h"
#include "RRCConnectionReconfiguration.h" //#include "RRCConnectionReconfiguration.h"
#include "RRCConnectionReconfigurationComplete.h" //#include "RRCConnectionReconfigurationComplete.h"
#include "RRCConnectionSetup.h" //#include "RRCConnectionSetup.h"
#include "RRCConnectionSetupComplete.h" //#include "RRCConnectionSetupComplete.h"
#include "RRCConnectionRequest.h" //#include "RRCConnectionRequest.h"
#include "RRCConnectionReestablishmentRequest.h" //#include "RRCConnectionReestablishmentRequest.h"
#include "BCCH-DL-SCH-Message.h" //#include "BCCH-DL-SCH-Message.h"
#include "BCCH-BCH-Message.h" //#include "BCCH-BCH-Message.h"
//
#if defined(Rel10) || defined(Rel14) //#if defined(Rel10) || defined(Rel14)
#include "MCCH-Message.h" //#include "MCCH-Message.h"
#include "MBSFNAreaConfiguration-r9.h" //#include "MBSFNAreaConfiguration-r9.h"
#include "SCellToAddMod-r10.h" //#include "SCellToAddMod-r10.h"
#endif //#endif
//
#include "AS-Config.h" //#include "AS-Config.h"
#include "AS-Context.h" //#include "AS-Context.h"
#include "UE-EUTRA-Capability.h" //#include "UE-EUTRA-Capability.h"
#include "MeasResults.h" //#include "MeasResults.h"
//-------------------------------------- //--------------------------------------
//-----NB-IoT #include files-------
#include "SystemInformationBlockType1-NB.h"
#include "SystemInformation-NB.h"
#include "RRCConnectionReconfiguration-NB.h"
#include "RRCConnectionReconfigurationComplete-NB.h"
#include "RRCConnectionSetup-NB.h"
#include "RRCConnectionSetupComplete-NB.h"
#include "RRCConnectionRequest-NB.h"
#include "RRCConnectionReestablishmentRequest-NB.h"
#include "BCCH-DL-SCH-Message-NB.h"
#include "BCCH-BCH-Message-NB.h"
#include "AS-Config-NB.h"
#include "AS-Context-NB.h"
#include "UE-Capability-NB-r13.h" //equivalent of UE-EUTRA-Capability.h
//-------------------
/* correct Rel(8|10)/Rel14 differences /* correct Rel(8|10)/Rel14 differences
* the code is in favor of Rel14, those defines do the translation * the code is in favor of Rel14, those defines do the translation
*/ */
...@@ -142,14 +161,8 @@ ...@@ -142,14 +161,8 @@
#define SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib10 SystemInformation_r8_IEs_sib_TypeAndInfo_Member_PR_sib10 #define SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib10 SystemInformation_r8_IEs_sib_TypeAndInfo_Member_PR_sib10
#define SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib11 SystemInformation_r8_IEs_sib_TypeAndInfo_Member_PR_sib11 #define SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib11 SystemInformation_r8_IEs_sib_TypeAndInfo_Member_PR_sib11
#endif #endif
/*
#ifdef Rel10
#define SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib12_v920 SystemInformation_r8_IEs_sib_TypeAndInfo_Member_PR_sib12_v920
#define SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib13_v920 SystemInformation_r8_IEs_sib_TypeAndInfo_Member_PR_sib13_v920
#endif
*/
//#include "L3_rrc_defs.h"
#ifndef NO_RRM #ifndef NO_RRM
#include "L3_rrc_interface.h" #include "L3_rrc_interface.h"
#include "rrc_rrm_msg.h" #include "rrc_rrm_msg.h"
...@@ -178,29 +191,14 @@ ...@@ -178,29 +191,14 @@
//-----NB-IoT #include files------- /*I will change the name of the structure for compile purposes--> hope not to undo this process*/
#include "SystemInformationBlockType1-NB.h"
#include "SystemInformation-NB.h"
#include "RRCConnectionReconfiguration-NB.h"
#include "RRCConnectionReconfigurationComplete-NB.h"
#include "RRCConnectionSetup-NB.h"
#include "RRCConnectionSetupComplete-NB.h"
#include "RRCConnectionRequest-NB.h"
#include "RRCConnectionReestablishmentRequest-NB.h"
#include "BCCH-DL-SCH-Message-NB.h"
#include "BCCH-BCH-Message-NB.h"
#include "AS-Config-NB.h"
#include "AS-Context-NB.h"
#include "UE-Capability-NB-r13.h" //equivalent of UE-EUTRA-Capability.h
//-------------------
typedef unsigned int uid_NB_t;
typedef unsigned int uid_t;
#define UID_LINEAR_ALLOCATOR_BITMAP_SIZE (((NUMBER_OF_UE_MAX/8)/sizeof(unsigned int)) + 1) #define UID_LINEAR_ALLOCATOR_BITMAP_SIZE (((NUMBER_OF_UE_MAX/8)/sizeof(unsigned int)) + 1)
typedef struct uid_linear_allocator_s {
typedef struct uid_linear_allocator_NB_s {
unsigned int bitmap[UID_LINEAR_ALLOCATOR_BITMAP_SIZE]; unsigned int bitmap[UID_LINEAR_ALLOCATOR_BITMAP_SIZE];
} uid_allocator_t; } uid_allocator_NB_t;
#define PROTOCOL_RRC_CTXT_UE_FMT PROTOCOL_CTXT_FMT #define PROTOCOL_RRC_CTXT_UE_FMT PROTOCOL_CTXT_FMT
...@@ -222,17 +220,17 @@ typedef struct uid_linear_allocator_s { ...@@ -222,17 +220,17 @@ typedef struct uid_linear_allocator_s {
//left as they are --> used in LAYER2/epenair2_proc.c and UE side //left as they are --> used in LAYER2/epenair2_proc.c and UE side
typedef enum UE_STATE_e { //typedef enum UE_STATE_NB_e {
RRC_INACTIVE=0, // RRC_INACTIVE=0,
RRC_IDLE, // RRC_IDLE,
RRC_SI_RECEIVED, // RRC_SI_RECEIVED,
RRC_CONNECTED, // RRC_CONNECTED,
RRC_RECONFIGURED, // RRC_RECONFIGURED,
RRC_HO_EXECUTION //maybe not needed? // RRC_HO_EXECUTION //maybe not needed?
} UE_STATE_t; //} UE_STATE_NB_t;
// HO_STATe is not supported by NB-IoT // HO_STATE is not supported by NB-IoT
//#define NUMBER_OF_UE_MAX MAX_MOBILES_PER_RG //#define NUMBER_OF_UE_MAX MAX_MOBILES_PER_RG
#define RRM_FREE(p) if ( (p) != NULL) { free(p) ; p=NULL ; } #define RRM_FREE(p) if ( (p) != NULL) { free(p) ; p=NULL ; }
...@@ -250,84 +248,53 @@ typedef enum UE_STATE_e { ...@@ -250,84 +248,53 @@ typedef enum UE_STATE_e {
/* TS 36.331: RRC-TransactionIdentifier ::= INTEGER (0..3) */ /* TS 36.331: RRC-TransactionIdentifier ::= INTEGER (0..3) */
#define RRC_TRANSACTION_IDENTIFIER_NUMBER 3 #define RRC_TRANSACTION_IDENTIFIER_NUMBER 3
//NB-IoT version (not used for the moment)
//typedef struct UE_RRC_INFO_s { //is used in UE_RRC_INST
// UE_STATE_NB_t State;
// uint8_t SIB1systemInfoValueTag;
// uint32_t SIStatus;
// uint32_t SIcnt;
//#if defined(Rel10) || defined(Rel14)
// uint8_t MCCHStatus[8]; // MAX_MBSFN_AREA
//#endif
// uint8_t SIwindowsize; //!< Corresponds to the SIB1 si-WindowLength parameter. The unit is ms. Possible values are (final): 1,2,5,10,15,20,40
// uint8_t handoverTarget;
// HO_STATE_t ho_state;
// uint16_t SIperiod; //!< Corresponds to the SIB1 si-Periodicity parameter (multiplied by 10). Possible values are (final): 80,160,320,640,1280,2560,5120
// unsigned short UE_index;
// uint32_t T300_active;
// uint32_t T300_cnt;
// uint32_t T304_active;
// uint32_t T304_cnt;
// uint32_t T310_active;
// uint32_t T310_cnt;
// uint32_t N310_cnt;
// uint32_t N311_cnt;
// rnti_t rnti;
//} __attribute__ ((__packed__)) UE_RRC_INFO;
typedef struct UE_RRC_INFO_s { //is used in UE_RRC_INST
UE_STATE_t State;
uint8_t SIB1systemInfoValueTag;
uint32_t SIStatus;
uint32_t SIcnt;
#if defined(Rel10) || defined(Rel14)
uint8_t MCCHStatus[8]; // MAX_MBSFN_AREA
#endif
uint8_t SIwindowsize; //!< Corresponds to the SIB1 si-WindowLength parameter. The unit is ms. Possible values are (final): 1,2,5,10,15,20,40
uint8_t handoverTarget;
HO_STATE_t ho_state;
uint16_t SIperiod; //!< Corresponds to the SIB1 si-Periodicity parameter (multiplied by 10). Possible values are (final): 80,160,320,640,1280,2560,5120
unsigned short UE_index;
uint32_t T300_active;
uint32_t T300_cnt;
uint32_t T304_active;
uint32_t T304_cnt;
uint32_t T310_active;
uint32_t T310_cnt;
uint32_t N310_cnt;
uint32_t N311_cnt;
rnti_t rnti;
} __attribute__ ((__packed__)) UE_RRC_INFO;
//NB-IoT version UE_RRC_INFO_s-------------------------------
/*
typedef struct UE_RRC_INFO_s {
UE_STATE_t State;
//uint8_t SIB1systemInfoValueTag;
uint8_t MIB_NBsystemInfoValueTag; //In NB-IoT is in the MIB-NB ---systemInfoValueTag_r13
uint8_t systemInfoValueTagSI; //SI message specific value tag in SIB1-NB (as specified in Clause 5.2.1.3).Common for all SIBs within the SI message other than SIB14-NB.
uint32_t SIStatus;
uint32_t SIcnt;
uint8_t SIwindowsize; //!< Corresponds to the SIB1-NB si_WindowLength_r13 parameter. The unit is ms. Possible values are (final): 160,320,480,640,960,1280,1600 (TS 36.331 V14.2.1)
uint16_t SIperiod; //!< Corresponds to the SIB1-NB si_Periodicity_r13 parameter (multiplied by 10= 1 rf). Possible values are (final): 640,1280,2560,5120,10240,20480,40960 (TS 36.331 V14.2.1)
unsigned short UE_index;
//define all the timer for NB-IoT (T300, T301, T310, T311) maybe not all used in OAI
uint32_t T300_active;
uint32_t T300_cnt;
uint32_t T301_active;
uint32_t T301_cnt;
uint32_t T310_active;
uint32_t T310_cnt;
uint32_t T311_active;
uint32_t T311_cnt;
uint32_t N310_cnt;
uint32_t N311_cnt;
rnti_t rnti;
} __attribute__ ((__packed__)) UE_RRC_INFO;
*/
//------------------------------------------
//left as it is //left as it is
typedef struct UE_S_TMSI_s { typedef struct UE_S_TMSI_NB_s {
boolean_t presence; boolean_t presence;
mme_code_t mme_code; mme_code_t mme_code;
m_tmsi_t m_tmsi; m_tmsi_t m_tmsi;
} __attribute__ ((__packed__)) UE_S_TMSI; } __attribute__ ((__packed__)) UE_S_TMSI_NB;
typedef enum e_rab_satus_e { typedef enum e_rab_satus_NB_e {
E_RAB_STATUS_NEW, E_RAB_NB_STATUS_NEW,
E_RAB_STATUS_DONE, // from the eNB perspective E_RAB_NB_STATUS_DONE, // from the eNB perspective
E_RAB_STATUS_ESTABLISHED, // get the reconfigurationcomplete form UE E_RAB_NB_STATUS_ESTABLISHED, // get the reconfigurationcomplete form UE
E_RAB_STATUS_FAILED, E_RAB_NB_STATUS_FAILED,
} e_rab_status_t; } e_rab_status_NB_t;
typedef struct e_rab_param_s { typedef struct e_rab_param_NB_s {
e_rab_t param; e_rab_t param;
uint8_t status; uint8_t status;
uint8_t xid; // transaction_id uint8_t xid; // transaction_id
} __attribute__ ((__packed__)) e_rab_param_t; } __attribute__ ((__packed__)) e_rab_param_NB_t;
//HANDOVER_INFO not implemented in NB-IoT delete //HANDOVER_INFO not implemented in NB-IoT delete
...@@ -335,123 +302,52 @@ typedef struct e_rab_param_s { ...@@ -335,123 +302,52 @@ typedef struct e_rab_param_s {
#define RRC_HEADER_SIZE_MAX 64 #define RRC_HEADER_SIZE_MAX 64
#define RRC_BUFFER_SIZE_MAX 1024 #define RRC_BUFFER_SIZE_MAX 1024
typedef struct { typedef struct {
char Payload[RRC_BUFFER_SIZE_MAX]; char Payload[RRC_BUFFER_SIZE_MAX];
char Header[RRC_HEADER_SIZE_MAX]; char Header[RRC_HEADER_SIZE_MAX];
char payload_size; char payload_size;
} RRC_BUFFER; } RRC_BUFFER_NB;
#define RRC_BUFFER_SIZE sizeof(RRC_BUFFER)
#define RRC_BUFFER_SIZE_NB sizeof(RRC_BUFFER_NB)
typedef struct RB_INFO_s {
typedef struct RB_INFO_NB_s {
uint16_t Rb_id; //=Lchan_id uint16_t Rb_id; //=Lchan_id
LCHAN_DESC Lchan_desc[2]; //LCHAN_DESC should be changed for NB-IoT LCHAN_DESC Lchan_desc[2]; //LCHAN_DESC should be changed for NB-IoT
MAC_MEAS_REQ_ENTRY *Meas_entry; //may not needed for NB-IoT MAC_MEAS_REQ_ENTRY *Meas_entry; //may not needed for NB-IoT
} RB_INFO; } RB_INFO_NB;
typedef struct SRB_INFO_s { typedef struct SRB_INFO_NB_s {
uint16_t Srb_id; //=Lchan_id---> questo potrebbe esserci utile per distinguere ??? uint16_t Srb_id; //=Lchan_id---> useful for distinguish between SRB1 and SRB1bis?
RRC_BUFFER Rx_buffer; RRC_BUFFER_NB Rx_buffer;
RRC_BUFFER Tx_buffer; RRC_BUFFER_NB Tx_buffer;
LCHAN_DESC Lchan_desc[2];//LCHAN_DESC should be changed for NB-IoT LCHAN_DESC Lchan_desc[2];//LCHAN_DESC should be changed for NB-IoT
unsigned int Trans_id; unsigned int Trans_id;
uint8_t Active; uint8_t Active;
} SRB_INFO; } SRB_INFO_NB;
typedef struct RB_INFO_TABLE_ENTRY_s { typedef struct RB_INFO_TABLE_ENTRY_NB_s {
RB_INFO Rb_info; RB_INFO_NB Rb_info;
uint8_t Active; uint8_t Active;
uint32_t Next_check_frame; uint32_t Next_check_frame;
uint8_t Status; uint8_t Status;
} RB_INFO_TABLE_ENTRY; } RB_INFO_TABLE_ENTRY_NB;
typedef struct SRB_INFO_TABLE_ENTRY_s { typedef struct SRB_INFO_TABLE_ENTRY_NB_s {
SRB_INFO Srb_info; SRB_INFO_NB Srb_info;
uint8_t Active; uint8_t Active;
uint8_t Status; uint8_t Status;
uint32_t Next_check_frame; uint32_t Next_check_frame;
} SRB_INFO_TABLE_ENTRY; } SRB_INFO_TABLE_ENTRY_NB;
//MEAS_REPORT_LIST_s not implemented in NB-IoT but is used at UE side //MEAS_REPORT_LIST_s not implemented in NB-IoT but is used at UE side
//HANDOVER_INFO_UE not implemented in NB-IoT //HANDOVER_INFO_UE not implemented in NB-IoT
/* See NB-IoT implementation below //NB-IoT eNB_RRC_UE_NB_s--(used as a context in eNB --> ue_context in rrc_eNB_ue_context)------
typedef struct eNB_RRC_UE_s { //used in rrc_eNB_ue_context typedef struct eNB_RRC_UE_NB_s {
uint8_t primaryCC_id;
#if defined(Rel10) || defined(Rel14)
SCellToAddMod_r10_t sCell_config[2];
#endif
SRB_ToAddModList_t* SRB_configList; //used in generate_default/dedicatedRRCConnectionReconfiguration (rrc_eNB.c)
SRB_ToAddModList_t* SRB_configList2[RRC_TRANSACTION_IDENTIFIER_NUMBER];
DRB_ToAddModList_t* DRB_configList;
DRB_ToAddModList_t* DRB_configList2[RRC_TRANSACTION_IDENTIFIER_NUMBER];
uint8_t DRB_active[8];
struct PhysicalConfigDedicated* physicalConfigDedicated;
struct SPS_Config* sps_Config;
MeasObjectToAddMod_t* MeasObj[MAX_MEAS_OBJ];
struct ReportConfigToAddMod* ReportConfig[MAX_MEAS_CONFIG];
struct QuantityConfig* QuantityConfig;
struct MeasIdToAddMod* MeasId[MAX_MEAS_ID];
MAC_MainConfig_t* mac_MainConfig;
MeasGapConfig_t* measGapConfig;
SRB_INFO SI;
SRB_INFO Srb0;
SRB_INFO_TABLE_ENTRY Srb1;
SRB_INFO_TABLE_ENTRY Srb2;
MeasConfig_t* measConfig;
HANDOVER_INFO* handover_info;
#if defined(ENABLE_SECURITY)
// KeNB as derived from KASME received from EPC
uint8_t kenb[32];
#endif
// Used integrity/ciphering algorithms
e_CipheringAlgorithm_r12 ciphering_algorithm;
e_SecurityAlgorithmConfig__integrityProtAlgorithm integrity_algorithm;
uint8_t Status;
rnti_t rnti;
uint64_t random_ue_identity;
#if defined(ENABLE_ITTI)
//Information from UE RRC ConnectionRequest
UE_S_TMSI Initialue_identity_s_TMSI;
EstablishmentCause_t establishment_cause;
//Information from UE RRC ConnectionReestablishmentRequest
ReestablishmentCause_t reestablishment_cause;
// UE id for initial connection to S1AP
uint16_t ue_initial_id;
//Information from S1AP initial_context_setup_req
uint32_t eNB_ue_s1ap_id :24;
security_capabilities_t security_capabilities;
//Total number of e_rab already setup in the list
uint8_t setup_e_rabs;
//Number of e_rab to be setup in the list
uint8_t nb_of_e_rabs;
//list of e_rab to be setup by RRC layers
e_rab_param_t e_rab[NB_RB_MAX];//[S1AP_MAX_E_RAB];
// LG: For GTPV1 TUNNELS
uint32_t enb_gtp_teid[S1AP_MAX_E_RAB];
transport_layer_addr_t enb_gtp_addrs[S1AP_MAX_E_RAB];
rb_id_t enb_gtp_ebi[S1AP_MAX_E_RAB];
#endif
uint32_t ul_failure_timer;
uint32_t ue_release_timer;
uint32_t ue_release_timer_thres;
} eNB_RRC_UE_t;
*/
//NB-IoT eNB_RRC_UE_s--(used as a context in eNB --> ue_context in rrc_eNB_ue_context)------
typedef struct eNB_RRC_UE_s {
uint8_t primaryCC_id; uint8_t primaryCC_id;
//Radio Bearers carried by RadioResourceConfigDedicated-NB-r13.h //Radio Bearers carried by RadioResourceConfigDedicated-NB-r13.h
...@@ -472,10 +368,10 @@ typedef struct eNB_RRC_UE_s { ...@@ -472,10 +368,10 @@ typedef struct eNB_RRC_UE_s {
//No SPS(semi-persistent scheduling) in NB-IoT //No SPS(semi-persistent scheduling) in NB-IoT
//No Measurement report in NB-IoT //No Measurement report in NB-IoT
SRB_INFO SI; SRB_INFO_NB SI;
SRB_INFO Srb0; SRB_INFO_NB Srb0;
SRB_INFO_TABLE_ENTRY Srb1; SRB_INFO_TABLE_ENTRY_NB Srb1;
SRB_INFO_TABLE_ENTRY Srb1bis; SRB_INFO_TABLE_ENTRY_NB Srb1bis;
#if defined(ENABLE_SECURITY) #if defined(ENABLE_SECURITY)
/* KeNB as derived from KASME received from EPC */ /* KeNB as derived from KASME received from EPC */
...@@ -493,7 +389,7 @@ typedef struct eNB_RRC_UE_s { ...@@ -493,7 +389,7 @@ typedef struct eNB_RRC_UE_s {
/* Information from UE RRC ConnectionRequest-NB-r13_IE--> NB-IoT */ /* Information from UE RRC ConnectionRequest-NB-r13_IE--> NB-IoT */
UE_S_TMSI Initialue_identity_s_TMSI; UE_S_TMSI_NB Initialue_identity_s_TMSI;
EstablishmentCause_NB_r13_t establishment_cause_NB; //different set for NB-IoT EstablishmentCause_NB_r13_t establishment_cause_NB; //different set for NB-IoT
/* Information from UE RRC ConnectionReestablishmentRequest-NB--> NB-IoT */ /* Information from UE RRC ConnectionReestablishmentRequest-NB--> NB-IoT */
...@@ -513,7 +409,7 @@ typedef struct eNB_RRC_UE_s { ...@@ -513,7 +409,7 @@ typedef struct eNB_RRC_UE_s {
/* Number of e_rab to be setup in the list */ //NAS list? /* Number of e_rab to be setup in the list */ //NAS list?
uint8_t nb_of_e_rabs; uint8_t nb_of_e_rabs;
/* list of e_rab to be setup by RRC layers */ /* list of e_rab to be setup by RRC layers */
e_rab_param_t e_rab[NB_RB_MAX];//[S1AP_MAX_E_RAB]; e_rab_param_NB_t e_rab[NB_RB_MAX];//[S1AP_MAX_E_RAB];
// LG: For GTPV1 TUNNELS // LG: For GTPV1 TUNNELS
uint32_t enb_gtp_teid[S1AP_MAX_E_RAB]; uint32_t enb_gtp_teid[S1AP_MAX_E_RAB];
...@@ -524,17 +420,17 @@ typedef struct eNB_RRC_UE_s { ...@@ -524,17 +420,17 @@ typedef struct eNB_RRC_UE_s {
uint32_t ul_failure_timer; uint32_t ul_failure_timer;
uint32_t ue_release_timer; uint32_t ue_release_timer;
uint32_t ue_release_timer_thres; uint32_t ue_release_timer_thres;
} eNB_RRC_UE_t; } eNB_RRC_UE_NB_t;
//-------------------------------------------------------------------------------- //--------------------------------------------------------------------------------
typedef uid_t ue_uid_t; typedef uid_NB_t ue_uid_t;
//Not touched - generally variable called: ue_context_pP //Not touched - generally variable called: ue_context_pP
typedef struct rrc_eNB_ue_context_s { typedef struct rrc_eNB_ue_context_NB_s {
/* Tree related data */ /* Tree related data */
RB_ENTRY(rrc_eNB_ue_context_s) entries; RB_ENTRY(rrc_eNB_ue_context_NB_s) entries;
/* Uniquely identifies the UE between MME and eNB within the eNB. /* Uniquely identifies the UE between MME and eNB within the eNB.
* This id is encoded on 24bits. * This id is encoded on 24bits.
...@@ -545,9 +441,9 @@ typedef struct rrc_eNB_ue_context_s { ...@@ -545,9 +441,9 @@ typedef struct rrc_eNB_ue_context_s {
ue_uid_t local_uid; ue_uid_t local_uid;
/* UE id for initial connection to S1AP */ /* UE id for initial connection to S1AP */
struct eNB_RRC_UE_s ue_context; //context of ue in the e-nB struct eNB_RRC_UE_NB_s ue_context; //context of ue in the e-nB
} rrc_eNB_ue_context_t; } rrc_eNB_ue_context_NB_t;
...@@ -616,20 +512,20 @@ typedef struct { ...@@ -616,20 +512,20 @@ typedef struct {
uint8_t sizeof_SC_MCHH_MESS[]; uint8_t sizeof_SC_MCHH_MESS[];
SC_MCCH_Message_NB_t scptm;*/ SC_MCCH_Message_NB_t scptm;*/
SRB_INFO SI; SRB_INFO_NB SI;
SRB_INFO Srb0; SRB_INFO_NB Srb0;
} rrc_eNB_carrier_data_t; } rrc_eNB_carrier_data_NB_t;
//--------------------------------------------------- //---------------------------------------------------
//---NB-IoT---(completely change)--------------------- //---NB-IoT---(completely change)---------------------
typedef struct eNB_RRC_INST_s { typedef struct eNB_RRC_INST_NB_s {
rrc_eNB_carrier_data_t carrier[MAX_NUM_CCs]; rrc_eNB_carrier_data_NB_t carrier[MAX_NUM_CCs];
uid_allocator_t uid_allocator; // for rrc_ue_head uid_allocator_NB_t uid_allocator; // for rrc_ue_head
RB_HEAD(rrc_ue_tree_s, rrc_eNB_ue_context_s) rrc_ue_head; // ue_context tree key search by rnti RB_HEAD(rrc_ue_tree_NB_s, rrc_eNB_ue_context_NB_s) rrc_ue_head; // ue_context tree key search by rnti
uint8_t Nb_ue; uint8_t Nb_ue;
...@@ -658,185 +554,187 @@ typedef struct eNB_RRC_INST_s { ...@@ -658,185 +554,187 @@ typedef struct eNB_RRC_INST_s {
int srs_enable[MAX_NUM_CCs]; int srs_enable[MAX_NUM_CCs];
} eNB_RRC_INST; } eNB_RRC_INST_NB;
#define MAX_UE_CAPABILITY_SIZE 255 #define MAX_UE_CAPABILITY_SIZE 255
typedef struct OAI_UECapability_s { //not needed for the moment
uint8_t sdu[MAX_UE_CAPABILITY_SIZE]; //typedef struct OAI_UECapability_s {
uint8_t sdu_size; // uint8_t sdu[MAX_UE_CAPABILITY_SIZE];
//NB-IoT------ // uint8_t sdu_size;
UE_Capability_NB_r13_t UE_Capability_NB; //replace the UE_EUTRA_Capability of LTE ////NB-IoT------
} OAI_UECapability_t; // UE_Capability_NB_r13_t UE_Capability_NB; //replace the UE_EUTRA_Capability of LTE
//} OAI_UECapability_t;
typedef struct UE_RRC_INST_s {
Rrc_State_t RrcState; //Old implementation --> see NB_iot version
Rrc_Sub_State_t RrcSubState; //typedef struct UE_RRC_INST_s {
# if defined(ENABLE_USE_MME) // Rrc_State_t RrcState;
plmn_t plmnID; // Rrc_Sub_State_t RrcSubState;
Byte_t rat; //# if defined(ENABLE_USE_MME)
as_nas_info_t initialNasMsg; // plmn_t plmnID;
# endif // Byte_t rat;
OAI_UECapability_t *UECap; // as_nas_info_t initialNasMsg;
uint8_t *UECapability; //# endif
uint8_t UECapability_size; // OAI_UECapability_t *UECap;
UE_RRC_INFO Info[NB_SIG_CNX_UE]; // uint8_t *UECapability;
SRB_INFO Srb0[NB_SIG_CNX_UE]; // uint8_t UECapability_size;
SRB_INFO_TABLE_ENTRY Srb1[NB_CNX_UE]; // UE_RRC_INFO Info[NB_SIG_CNX_UE];
SRB_INFO_TABLE_ENTRY Srb2[NB_CNX_UE]; // SRB_INFO Srb0[NB_SIG_CNX_UE];
HANDOVER_INFO_UE HandoverInfoUe; // SRB_INFO_TABLE_ENTRY Srb1[NB_CNX_UE];
uint8_t *SIB1[NB_CNX_UE]; // SRB_INFO_TABLE_ENTRY Srb2[NB_CNX_UE];
uint8_t sizeof_SIB1[NB_CNX_UE]; // HANDOVER_INFO_UE HandoverInfoUe;
uint8_t *SI[NB_CNX_UE]; // uint8_t *SIB1[NB_CNX_UE];
uint8_t sizeof_SI[NB_CNX_UE]; // uint8_t sizeof_SIB1[NB_CNX_UE];
uint8_t SIB1Status[NB_CNX_UE]; // uint8_t *SI[NB_CNX_UE];
uint8_t SIStatus[NB_CNX_UE]; // uint8_t sizeof_SI[NB_CNX_UE];
SystemInformationBlockType1_t *sib1[NB_CNX_UE]; // uint8_t SIB1Status[NB_CNX_UE];
SystemInformation_t *si[NB_CNX_UE]; //!< Temporary storage for an SI message. Decoding happens in decode_SI(). // uint8_t SIStatus[NB_CNX_UE];
SystemInformationBlockType2_t *sib2[NB_CNX_UE]; // SystemInformationBlockType1_t *sib1[NB_CNX_UE];
SystemInformationBlockType3_t *sib3[NB_CNX_UE]; // SystemInformation_t *si[NB_CNX_UE]; //!< Temporary storage for an SI message. Decoding happens in decode_SI().
SystemInformationBlockType4_t *sib4[NB_CNX_UE]; // SystemInformationBlockType2_t *sib2[NB_CNX_UE];
SystemInformationBlockType5_t *sib5[NB_CNX_UE]; // SystemInformationBlockType3_t *sib3[NB_CNX_UE];
SystemInformationBlockType6_t *sib6[NB_CNX_UE]; // SystemInformationBlockType4_t *sib4[NB_CNX_UE];
SystemInformationBlockType7_t *sib7[NB_CNX_UE]; // SystemInformationBlockType5_t *sib5[NB_CNX_UE];
SystemInformationBlockType8_t *sib8[NB_CNX_UE]; // SystemInformationBlockType6_t *sib6[NB_CNX_UE];
SystemInformationBlockType9_t *sib9[NB_CNX_UE]; // SystemInformationBlockType7_t *sib7[NB_CNX_UE];
SystemInformationBlockType10_t *sib10[NB_CNX_UE]; // SystemInformationBlockType8_t *sib8[NB_CNX_UE];
SystemInformationBlockType11_t *sib11[NB_CNX_UE]; // SystemInformationBlockType9_t *sib9[NB_CNX_UE];
// SystemInformationBlockType10_t *sib10[NB_CNX_UE];
#if defined(Rel10) || defined(Rel14) // SystemInformationBlockType11_t *sib11[NB_CNX_UE];
uint8_t MBMS_flag; //
uint8_t *MCCH_MESSAGE[NB_CNX_UE]; //#if defined(Rel10) || defined(Rel14)
uint8_t sizeof_MCCH_MESSAGE[NB_CNX_UE]; // uint8_t MBMS_flag;
uint8_t MCCH_MESSAGEStatus[NB_CNX_UE]; // uint8_t *MCCH_MESSAGE[NB_CNX_UE];
MBSFNAreaConfiguration_r9_t *mcch_message[NB_CNX_UE]; // uint8_t sizeof_MCCH_MESSAGE[NB_CNX_UE];
SystemInformationBlockType12_r9_t *sib12[NB_CNX_UE]; // uint8_t MCCH_MESSAGEStatus[NB_CNX_UE];
SystemInformationBlockType13_r9_t *sib13[NB_CNX_UE]; // MBSFNAreaConfiguration_r9_t *mcch_message[NB_CNX_UE];
#endif // SystemInformationBlockType12_r9_t *sib12[NB_CNX_UE];
#ifdef CBA // SystemInformationBlockType13_r9_t *sib13[NB_CNX_UE];
uint8_t num_active_cba_groups; //#endif
uint16_t cba_rnti[NUM_MAX_CBA_GROUP]; //#ifdef CBA
#endif // uint8_t num_active_cba_groups;
uint8_t num_srb; // uint16_t cba_rnti[NUM_MAX_CBA_GROUP];
struct SRB_ToAddMod *SRB1_config[NB_CNX_UE]; //#endif
struct SRB_ToAddMod *SRB2_config[NB_CNX_UE]; // uint8_t num_srb;
struct DRB_ToAddMod *DRB_config[NB_CNX_UE][8]; // struct SRB_ToAddMod *SRB1_config[NB_CNX_UE];
rb_id_t *defaultDRB; // remember the ID of the default DRB // struct SRB_ToAddMod *SRB2_config[NB_CNX_UE];
MeasObjectToAddMod_t *MeasObj[NB_CNX_UE][MAX_MEAS_OBJ]; // struct DRB_ToAddMod *DRB_config[NB_CNX_UE][8];
struct ReportConfigToAddMod *ReportConfig[NB_CNX_UE][MAX_MEAS_CONFIG]; // rb_id_t *defaultDRB; // remember the ID of the default DRB
struct QuantityConfig *QuantityConfig[NB_CNX_UE]; // MeasObjectToAddMod_t *MeasObj[NB_CNX_UE][MAX_MEAS_OBJ];
struct MeasIdToAddMod *MeasId[NB_CNX_UE][MAX_MEAS_ID]; // struct ReportConfigToAddMod *ReportConfig[NB_CNX_UE][MAX_MEAS_CONFIG];
MEAS_REPORT_LIST *measReportList[NB_CNX_UE][MAX_MEAS_ID]; // struct QuantityConfig *QuantityConfig[NB_CNX_UE];
uint32_t measTimer[NB_CNX_UE][MAX_MEAS_ID][6]; // 6 neighboring cells // struct MeasIdToAddMod *MeasId[NB_CNX_UE][MAX_MEAS_ID];
RSRP_Range_t s_measure; // MEAS_REPORT_LIST *measReportList[NB_CNX_UE][MAX_MEAS_ID];
struct MeasConfig__speedStatePars *speedStatePars; // uint32_t measTimer[NB_CNX_UE][MAX_MEAS_ID][6]; // 6 neighboring cells
struct PhysicalConfigDedicated *physicalConfigDedicated[NB_CNX_UE]; // RSRP_Range_t s_measure;
struct SPS_Config *sps_Config[NB_CNX_UE]; // struct MeasConfig__speedStatePars *speedStatePars;
MAC_MainConfig_t *mac_MainConfig[NB_CNX_UE]; // struct PhysicalConfigDedicated *physicalConfigDedicated[NB_CNX_UE];
MeasGapConfig_t *measGapConfig[NB_CNX_UE]; // struct SPS_Config *sps_Config[NB_CNX_UE];
double filter_coeff_rsrp; // [7] ??? // MAC_MainConfig_t *mac_MainConfig[NB_CNX_UE];
double filter_coeff_rsrq; // [7] ??? // MeasGapConfig_t *measGapConfig[NB_CNX_UE];
float rsrp_db[7]; // double filter_coeff_rsrp; // [7] ???
float rsrq_db[7]; // double filter_coeff_rsrq; // [7] ???
float rsrp_db_filtered[7]; // float rsrp_db[7];
float rsrq_db_filtered[7]; // float rsrq_db[7];
#if ENABLE_RAL // float rsrp_db_filtered[7];
obj_hash_table_t *ral_meas_thresholds; // float rsrq_db_filtered[7];
ral_transaction_id_t scan_transaction_id; //#if ENABLE_RAL
#endif // obj_hash_table_t *ral_meas_thresholds;
#if defined(ENABLE_SECURITY) // ral_transaction_id_t scan_transaction_id;
/* KeNB as computed from parameters within USIM card */ //#endif
uint8_t kenb[32]; //#if defined(ENABLE_SECURITY)
#endif // /* KeNB as computed from parameters within USIM card */
// uint8_t kenb[32];
/* Used integrity/ciphering algorithms */ //#endif
e_CipheringAlgorithm_r12 ciphering_algorithm; //
e_SecurityAlgorithmConfig__integrityProtAlgorithm integrity_algorithm; // /* Used integrity/ciphering algorithms */
// e_CipheringAlgorithm_r12 ciphering_algorithm;
} UE_RRC_INST; // e_SecurityAlgorithmConfig__integrityProtAlgorithm integrity_algorithm;
//
//} UE_RRC_INST;
/*NB-IoT version (for now not consider UE-side)
typedef struct UE_RRC_INST_s {
Rrc_State_t RrcState; //are the same? //NB-IoT version (for now not consider UE-side)--------------
Rrc_Sub_State_t RrcSubState;
//typedef struct UE_RRC_INST_s {
# if defined(ENABLE_USE_MME) // Rrc_State_t RrcState; //are the same?
plmn_t plmnID; // Rrc_Sub_State_t RrcSubState;
Byte_t rat; //
as_nas_info_t initialNasMsg; //# if defined(ENABLE_USE_MME)
# endif // plmn_t plmnID;
// Byte_t rat;
OAI_UECapability_t *UECap; // as_nas_info_t initialNasMsg;
uint8_t *UECapability; //# endif
uint8_t UECapability_size; //
UE_RRC_INFO Info[NB_SIG_CNX_UE]; // OAI_UECapability_t *UECap;
SRB_INFO Srb0[NB_SIG_CNX_UE]; // uint8_t *UECapability;
SRB_INFO_TABLE_ENTRY Srb1[NB_CNX_UE]; // uint8_t UECapability_size;
SRB_INFO_TABLE_ENTRY Srb1bis[NB_CNX_UE]; //not exist srb2 // UE_RRC_INFO Info[NB_SIG_CNX_UE];
// SRB_INFO Srb0[NB_SIG_CNX_UE];
//needed for NB-IoT? // SRB_INFO_TABLE_ENTRY Srb1[NB_CNX_UE];
HANDOVER_INFO_UE HandoverInfoUe; // SRB_INFO_TABLE_ENTRY Srb1bis[NB_CNX_UE]; //not exist srb2
//
uint8_t *SIB1_NB[NB_CNX_UE]; // //needed for NB-IoT?
uint8_t sizeof_SIB1_NB[N_NBB_CNX_UE]; // HANDOVER_INFO_UE HandoverInfoUe;
uint8_t *SI_NB[NB_CNX_UE]; //
uint8_t sizeof_SI_NB[NB_CNX_UE]; // uint8_t *SIB1_NB[NB_CNX_UE];
uint8_t SIB1_NB_Status[NB_CNX_UE]; // uint8_t sizeof_SIB1_NB[N_NBB_CNX_UE];
uint8_t SI_NB_Status[NB_CNX_UE]; // uint8_t *SI_NB[NB_CNX_UE];
// uint8_t sizeof_SI_NB[NB_CNX_UE];
//NB-IoT SIBs // uint8_t SIB1_NB_Status[NB_CNX_UE];
SystemInformationBlockType1_NB_t *sib1_NB[NB_CNX_UE]; // uint8_t SI_NB_Status[NB_CNX_UE];
SystemInformation_NB_t *si_NB[NB_CNX_UE]; //!< Temporary storage for an SI-NB message. Decoding happens in decode_SI()-->UE side (to be changed). //
// //NB-IoT SIBs
SystemInformationBlockType2_NB_r13_t *sib2_NB[NB_CNX_UE]; // SystemInformationBlockType1_NB_t *sib1_NB[NB_CNX_UE];
SystemInformationBlockType3_NB_r13_t *sib3_NB[NB_CNX_UE]; // SystemInformation_NB_t *si_NB[NB_CNX_UE]; //!< Temporary storage for an SI-NB message. Decoding happens in decode_SI()-->UE side (to be changed).
SystemInformationBlockType4_NB_r13_t *sib4_NB[NB_CNX_UE]; //
SystemInformationBlockType5_NB_r13_t *sib5_NB[NB_CNX_UE]; // SystemInformationBlockType2_NB_r13_t *sib2_NB[NB_CNX_UE];
SystemInformationBlockType14_NB_r13_t *sib14_NB[NB_CNX_UE]; // SystemInformationBlockType3_NB_r13_t *sib3_NB[NB_CNX_UE];
SystemInformationBlockType16_NB_r13_t *sib16_NB[NB_CNX_UE]; // SystemInformationBlockType4_NB_r13_t *sib4_NB[NB_CNX_UE];
// SystemInformationBlockType5_NB_r13_t *sib5_NB[NB_CNX_UE];
/*future implementation TS 36.331 V14.2.1--(preliminary) // SystemInformationBlockType14_NB_r13_t *sib14_NB[NB_CNX_UE];
SystemInformationBlockType15_NB_r14_t *sib15_NB[NB_CNX_UE]; // SystemInformationBlockType16_NB_r13_t *sib16_NB[NB_CNX_UE];
SystemInformationBlockType20_NB_r14_t *sib20_NB[NB_CNX_UE]; //
SystemInformationBlockType22_NB_r14_t *sib22_NB[NB_CNX_UE]; // future implementation TS 36.331 V14.2.1--(preliminary)
// SystemInformationBlockType15_NB_r14_t *sib15_NB[NB_CNX_UE];
uint8_t SCPTM_flag; // SystemInformationBlockType20_NB_r14_t *sib20_NB[NB_CNX_UE];
uint8_t sizeof_SC_MCHH_MESS[]; // SystemInformationBlockType22_NB_r14_t *sib22_NB[NB_CNX_UE];
SC_MCCH_Message_NB_t scptm; //
// uint8_t SCPTM_flag;
// uint8_t sizeof_SC_MCHH_MESS[];
// delete #if defined(Rel10) || defined(Rel14)....(not used in NB-IoT) and CBA // SC_MCCH_Message_NB_t scptm;
//
uint8_t num_srb; //
struct SRB_ToAddMod_NB_r13_t *SRB1_config_NB[NB_CNX_UE]; // uint8_t num_srb;
struct SRB_ToAddMod_NB_r13_t *SRB1bis_config_NB[NB_CNX_UE]; // struct SRB_ToAddMod_NB_r13_t *SRB1_config_NB[NB_CNX_UE];
struct DRB_ToAddMod_NB_r13_t *DRB_config_NB[NB_CNX_UE][8]; // struct SRB_ToAddMod_NB_r13_t *SRB1bis_config_NB[NB_CNX_UE];
rb_id_t *defaultDRB; // remember the ID of the default DRB // struct DRB_ToAddMod_NB_r13_t *DRB_config_NB[NB_CNX_UE][8];
// rb_id_t *defaultDRB; // remember the ID of the default DRB
//no measurement Reports in NB-IoT //
// //no measurement Reports in NB-IoT
struct PhysicalConfigDedicated_NB_r13 *physicalConfigDedicated_NB[NB_CNX_UE]; //
MAC_MainConfig_NB_r13_t *mac_MainConfig_NB[NB_CNX_UE]; // struct PhysicalConfigDedicated_NB_r13 *physicalConfigDedicated_NB[NB_CNX_UE];
// MAC_MainConfig_NB_r13_t *mac_MainConfig_NB[NB_CNX_UE];
//no RAL //
// //no RAL
#if defined(ENABLE_SECURITY) //
// KeNB as computed from parameters within USIM card // //#if defined(ENABLE_SECURITY)
uint8_t kenb[32]; // /* KeNB as computed from parameters within USIM card */
#endif // uint8_t kenb[32];
//#endif
// Used integrity/ciphering algorithms // /* KeNB as computed from parameters within USIM card */
e_CipheringAlgorithm_r12 ciphering_algorithm; // uint8_t kenb[32];
e_SecurityAlgorithmConfig__integrityProtAlgorithm integrity_algorithm; //#endif
//
} UE_RRC_INST; // // Used integrity/ciphering algorithms
*/ // e_CipheringAlgorithm_r12 ciphering_algorithm;
//-------------------------------------------------------------------------- // e_SecurityAlgorithmConfig__integrityProtAlgorithm integrity_algorithm;
//
#include "proto.h" //} UE_RRC_INST;
#include "proto_nb_iot.h"
#endif #endif
/** @} */ /** @} */
...@@ -36,6 +36,10 @@ ...@@ -36,6 +36,10 @@
#include "LAYER2/MAC/extern.h" #include "LAYER2/MAC/extern.h"
#include "LAYER2/RLC/rlc.h" #include "LAYER2/RLC/rlc.h"
///NB_IoT
#include "defs_nb_iot.h"
extern eNB_RRC_INST_NB *eNB_rrc_inst_NB;
extern UE_RRC_INST *UE_rrc_inst; extern UE_RRC_INST *UE_rrc_inst;
extern eNB_RRC_INST *eNB_rrc_inst; extern eNB_RRC_INST *eNB_rrc_inst;
//extern RRC_XFACE *Rrc_xface; //extern RRC_XFACE *Rrc_xface;
......
/* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.0 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
/*! \file proto_nb_iot.h
* \brief RRC functions prototypes for eNB and UE for NB-IoT
* \author Navid Nikaein, Raymond Knopp and Michele Paffetti
* \date 2010 - 2014
* \email navid.nikaein@eurecom.fr, michele.paffetti@studio.unibo.it
* \version 1.0
*/
/** \addtogroup _rrc
* @{
*/
#include "RRC/LITE/defs_nb_iot.h"
/*NOTE: no static function should be declared in this header file*/
/*rrc_common.c*/
//int rrc_init_global_param(void);
//int L3_xface_init(void);
//void openair_rrc_top_init(int eMBMS_active, char *uecap_xer, uint8_t cba_group_active,uint8_t HO_enabled);
//void rrc_config_buffer(SRB_INFO *srb_info, uint8_t Lchan_type, uint8_t Role);
//void openair_rrc_on(const protocol_ctxt_t* const ctxt_pP);
//void rrc_top_cleanup(void);
//RRC_status_t rrc_rx_tx(protocol_ctxt_t* const ctxt_pP, const uint8_t enb_index, const int CC_id);
//long binary_search_int(int elements[], long numElem, int value);
//long binary_search_float(float elements[], long numElem, float value);
/*L2_interface.c*/
/*UE procedures*/
/*eNB procedures*/
//char openair_rrc_eNB_init(const module_id_t module_idP);
/**\brief RRC eNB task.
\param void *args_p Pointer on arguments to start the task. */
void *rrc_enb_task_NB(void *args_p);
/**\brief Entry routine to decode a UL-CCCH-Message-NB. Invokes PER decoder and parses message.
\param ctxt_pP Running context
\param Srb_info Pointer to SRB0 information structure (buffer, etc.)*/
int
rrc_eNB_decode_ccch_NB(
protocol_ctxt_t* const ctxt_pP,
const SRB_INFO_NB* const Srb_info,
const int CC_id
);
/**\brief Entry routine to decode a UL-DCCH-Message-NB. Invokes PER decoder and parses message.
\param ctxt_pP Context
\param Rx_sdu Pointer Received Message
\param sdu_size Size of incoming SDU*/
int
rrc_eNB_decode_dcch_NB(
const protocol_ctxt_t* const ctxt_pP,
const rb_id_t Srb_id,
const uint8_t* const Rx_sdu,
const sdu_size_t sdu_sizeP
);
/**\brief Generate RRCConnectionReestablishmentReject-NB
\param ctxt_pP Running context
\param ue_context_pP UE context
\param CC_id Component Carrier ID*/
void
rrc_eNB_generate_RRCConnectionReestablishmentReject_NB(
const protocol_ctxt_t* const ctxt_pP,
rrc_eNB_ue_context_NB_t* const ue_context_pP,
const int CC_id
);
void
rrc_eNB_generate_RRCConnectionReject_NB(
const protocol_ctxt_t* const ctxt_pP,
rrc_eNB_ue_context_NB_t* const ue_context_pP,
const int CC_id
);
void
rrc_eNB_generate_RRCConnectionSetup_NB(
const protocol_ctxt_t* const ctxt_pP,
rrc_eNB_ue_context_NB_t* const ue_context_pP,
const int CC_id
);
void
rrc_eNB_process_RRCConnectionReconfigurationComplete_NB(
const protocol_ctxt_t* const ctxt_pP,
rrc_eNB_ue_context_NB_t* ue_context_pP,
const uint8_t xid //transaction identifier
);
void //was under ITTI
rrc_eNB_reconfigure_DRBs_NB(const protocol_ctxt_t* const ctxt_pP,
rrc_eNB_ue_context_NB_t* ue_context_pP);
void //was under ITTI
rrc_eNB_generate_dedicatedRRCConnectionReconfiguration_NB(
const protocol_ctxt_t* const ctxt_pP,
rrc_eNB_ue_context_NB_t* const ue_context_pP
//no ho state
);
void
rrc_eNB_process_RRCConnectionSetupComplete_NB(
const protocol_ctxt_t* const ctxt_pP,
rrc_eNB_ue_context_NB_t* ue_context_pP,
RRCConnectionSetupComplete_NB_r13_IEs_t * rrcConnectionSetupComplete_NB
);
void
rrc_eNB_generate_SecurityModeCommand_NB(
const protocol_ctxt_t* const ctxt_pP,
rrc_eNB_ue_context_NB_t* const ue_context_pP
);
void
rrc_eNB_generate_UECapabilityEnquiry_NB(
const protocol_ctxt_t* const ctxt_pP,
rrc_eNB_ue_context_NB_t* const ue_context_pP
);
void
rrc_eNB_generate_defaultRRCConnectionReconfiguration_NB(const protocol_ctxt_t* const ctxt_pP,
rrc_eNB_ue_context_NB_t* const ue_context_pP
//no HO flag
);
char
openair_rrc_eNB_configuration_NB(
const module_id_t enb_mod_idP,
RrcConfigurationReq* configuration
);
/// Utilities------------------------------------------------
void
rrc_eNB_free_mem_UE_context_NB(
const protocol_ctxt_t* const ctxt_pP,
struct rrc_eNB_ue_context_NB_s* const ue_context_pP
);
/**\brief Function to get the next transaction identifier.
\param module_idP Instance ID for CH/eNB
\return a transaction identifier*/
uint8_t rrc_eNB_get_next_transaction_identifier_NB(module_id_t module_idP);
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -36,6 +36,11 @@ ...@@ -36,6 +36,11 @@
#include "COMMON/mac_rrc_primitives.h" #include "COMMON/mac_rrc_primitives.h"
#include "LAYER2/MAC/defs.h" #include "LAYER2/MAC/defs.h"
//for NB_IoT-------
#include "defs_nb_iot.h"
eNB_RRC_INST_NB *eNB_rrc_inst_NB;
//--------------------
eNB_RRC_INST *eNB_rrc_inst; eNB_RRC_INST *eNB_rrc_inst;
UE_RRC_INST *UE_rrc_inst; UE_RRC_INST *UE_rrc_inst;
//RRC_XFACE *Rrc_xface; //RRC_XFACE *Rrc_xface;
...@@ -63,7 +68,7 @@ unsigned short Data_to_read; ...@@ -63,7 +68,7 @@ unsigned short Data_to_read;
#define MAX_U32 0xFFFFFFFF #define MAX_U32 0xFFFFFFFF
uint8_t DRB2LCHAN[8]; uint8_t DRB2LCHAN[8]; //max can be 2 DRBs for NB_IoT
long logicalChannelGroup0 = 0; long logicalChannelGroup0 = 0;
long logicalChannelSR_Mask_r9=0; long logicalChannelSR_Mask_r9=0;
......
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