longrach_numberOfRA_Preambles[MAX_NUM_CCs];// not present in NB-IoT SIB2
BOOLEAN_trach_preamblesGroupAConfig[MAX_NUM_CCs];// not present in NB-IoT SIB2
longrach_sizeOfRA_PreamblesGroupA[MAX_NUM_CCs];// not presen in NB-IoT SIB2
longrach_messageSizeGroupA[MAX_NUM_CCs];// not presen in NB-IoT SIB2
e_RACH_ConfigCommon__preambleInfo__preamblesGroupAConfig__messagePowerOffsetGroupBrach_messagePowerOffsetGroupB[MAX_NUM_CCs];// not presen in NB-IoT SIB2
schedulingInfo_NB.si_RepetitionPattern_r13=SchedulingInfo_NB_r13__si_RepetitionPattern_r13_every2ndRF;//This Indicates the starting radio frames within the SI window used for SI message transmission.
constLTE_DL_FRAME_PARMS*constframe_parms,//to be changed but not deleted
SRB_ToAddModList_NB_r13_t**SRB_configList_NB,//in order to be configured--> stanno puntando alla SRB_configlist dell ue_context
structPhysicalConfigDedicated_NB_r13**physicalConfigDedicated_NB//in order to be configured--> stanno puntando alla physicalConfigDedicated dell ue_context
);
/**
* For which SRB is used in NB-IoT??
\brief Generate an RRCConnectionReconfiguration-NB DL-DCCH-Message (eNB). This routine configures SRBToAddMod-NB (SRB1) and one DRBToAddMod-NB
(DRB3). PhysicalConfigDedicated-NB is not updated.
@param ctxt_pP Running context
@param buffer Pointer to PER-encoded ASN.1 description of DL-CCCH-Message PDU
@param Transaction_id Transaction_ID for this message
@param SRB_list_NB Pointer to SRB List to be added/modified (NULL if no additions/modifications)
@param DRB_list_NB Pointer to DRB List to be added/modified (NULL if no additions/modifications)
@param DRB_list2_NB Pointer to DRB List to be released (NULL if none to be released)
//sps not supported by NB-IoT
@param physicalConfigDedicated_NB Pointer to PhysicalConfigDedicated-NB to be modified (NULL if no modifications)
//measurement not supported by NB-IoT
@param mac_MainConfig Pointer to Mac_MainConfig(NULL if no modifications)
typedefstructUE_RRC_INFO_s{//is used in UE_RRC_INST
UE_STATE_tState;
uint8_tSIB1systemInfoValueTag;
uint32_tSIStatus;
uint32_tSIcnt;
#if defined(Rel10) || defined(Rel14)
uint8_tMCCHStatus[8];// MAX_MBSFN_AREA
#endif
uint8_tSIwindowsize;//!< Corresponds to the SIB1 si-WindowLength parameter. The unit is ms. Possible values are (final): 1,2,5,10,15,20,40
uint8_thandoverTarget;
HO_STATE_tho_state;
uint16_tSIperiod;//!< Corresponds to the SIB1 si-Periodicity parameter (multiplied by 10). Possible values are (final): 80,160,320,640,1280,2560,5120
unsignedshortUE_index;
uint32_tT300_active;
uint32_tT300_cnt;
uint32_tT304_active;
uint32_tT304_cnt;
uint32_tT310_active;
uint32_tT310_cnt;
uint32_tN310_cnt;
uint32_tN311_cnt;
rnti_trnti;
}__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
typedefstructUE_S_TMSI_s{
boolean_tpresence;
mme_code_tmme_code;
m_tmsi_tm_tmsi;
}__attribute__((__packed__))UE_S_TMSI;
/*maybe not necessary puts in comment -->it seems is not used anywhere
#if defined(ENABLE_ITTI)
typedef enum e_rab_satus_e {
E_RAB_STATUS_NEW,
E_RAB_STATUS_DONE, // from the eNB perspective
E_RAB_STATUS_ESTABLISHED, // get the reconfigurationcomplete form UE
E_RAB_STATUS_FAILED,
} e_rab_status_t;
typedef struct e_rab_param_s {
e_rab_t param;
uint8_t status;
uint8_t xid; // transaction_id
} __attribute__ ((__packed__)) e_rab_param_t;
#endif
*/
//HANDOVER_INFO not implemented in NB-IoT delete
#define RRC_HEADER_SIZE_MAX 64
#define RRC_BUFFER_SIZE_MAX 1024
typedefstruct{
charPayload[RRC_BUFFER_SIZE_MAX];
charHeader[RRC_HEADER_SIZE_MAX];
charpayload_size;
}RRC_BUFFER;
#define RRC_BUFFER_SIZE sizeof(RRC_BUFFER)
typedefstructRB_INFO_s{
uint16_tRb_id;//=Lchan_id
LCHAN_DESCLchan_desc[2];//LCHAN_DESC should be changed for NB-IoT
MAC_MEAS_REQ_ENTRY*Meas_entry;//may not needed for NB-IoT
}RB_INFO;
typedefstructSRB_INFO_s{
uint16_tSrb_id;//=Lchan_id
RRC_BUFFERRx_buffer;
RRC_BUFFERTx_buffer;
LCHAN_DESCLchan_desc[2];//LCHAN_DESC should be changed for NB-IoT
unsignedintTrans_id;
uint8_tActive;
}SRB_INFO;
typedefstructRB_INFO_TABLE_ENTRY_s{
RB_INFORb_info;
uint8_tActive;
uint32_tNext_check_frame;
uint8_tStatus;
}RB_INFO_TABLE_ENTRY;
typedefstructSRB_INFO_TABLE_ENTRY_s{//togli
SRB_INFOSrb_info;
uint8_tActive;
uint8_tStatus;
uint32_tNext_check_frame;
}SRB_INFO_TABLE_ENTRY;
//MEAS_REPORT_LIST_s not implemented in NB-IoT but is used at UE side
//HANDOVER_INFO_UE not implemented in NB-IoT
/* See NB-IoT implementation below
typedef struct eNB_RRC_UE_s { //used in rrc_eNB_ue_context
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)