Commit 84c9c889 authored by Matthieu Kanj's avatar Matthieu Kanj

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

parent 17c94ff8
......@@ -1112,7 +1112,7 @@ int8_t mac_rrc_data_req_eNB_NB_IoT(
mib_flag_t mib_flag
)
{
SRB_INFO_NB *Srb_info;
SRB_INFO_NB_IoT *Srb_info;
uint8_t Sdu_size=0;
......@@ -1277,7 +1277,7 @@ int8_t NB_mac_rrc_data_ind_eNB(
const sdu_size_t sdu_lenP
)
{
SRB_INFO_NB *Srb_info;
SRB_INFO_NB_IoT *Srb_info;
protocol_ctxt_t ctxt;
sdu_size_t sdu_size = 0;
......@@ -1335,7 +1335,7 @@ void mac_eNB_rrc_ul_failure_NB_IoT(
const sub_frame_t subframeP,
const rnti_t rntiP)
{
struct rrc_eNB_ue_context_NB_s* ue_context_p = NULL;
struct rrc_eNB_ue_context_NB_IoT_s* ue_context_p = NULL;
ue_context_p = rrc_eNB_get_ue_context_NB(
&eNB_rrc_inst_NB_IoT[mod_idP],
rntiP);
......@@ -1441,7 +1441,7 @@ void mac_eNB_rrc_ul_in_sync_NB_IoT(
const sub_frame_t subframeP,
const rnti_t rntiP)
{
struct rrc_eNB_ue_context_NB_s* ue_context_p = NULL;
struct rrc_eNB_ue_context_NB_IoT_s* ue_context_p = NULL;
ue_context_p = rrc_eNB_get_ue_context_NB(
&eNB_rrc_inst_NB_IoT[mod_idP],
rntiP);
......@@ -1462,7 +1462,7 @@ int mac_eNB_get_rrc_status_NB_IoT(
const rnti_t rntiP
)
{
struct rrc_eNB_ue_context_NB_s* ue_context_p = NULL;
struct rrc_eNB_ue_context_NB_IoT_s* ue_context_p = NULL;
ue_context_p = rrc_eNB_get_ue_context_NB(
&eNB_rrc_inst_NB_IoT[Mod_idP],
rntiP);
......
......@@ -95,7 +95,7 @@ int errno;
/*do_MIB_NB*/
uint8_t do_MIB_NB(
rrc_eNB_carrier_data_NB_t *carrier,
rrc_eNB_carrier_data_NB_IoT_t *carrier,
uint16_t N_RB_DL,//may not needed--> for NB_IoT only 1 PRB is used
uint32_t frame)
{
......@@ -163,7 +163,7 @@ uint8_t do_MIB_NB(
/*do_SIB1_NB*/
uint8_t do_SIB1_NB(uint8_t Mod_id, int CC_id,
rrc_eNB_carrier_data_NB_t *carrier,
rrc_eNB_carrier_data_NB_IoT_t *carrier,
RrcConfigurationReq *configuration,
uint32_t frame
)
......@@ -415,7 +415,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?
uint8_t do_SIB23_NB(uint8_t Mod_id,
int CC_id,
rrc_eNB_carrier_data_NB_t *carrier,//MP: this is already a carrier[CC_id]
rrc_eNB_carrier_data_NB_IoT_t *carrier,//MP: this is already a carrier[CC_id]
RrcConfigurationReq *configuration ) //openair2/COMMON/rrc_messages_types.h
{
struct SystemInformation_NB_r13_IEs__sib_TypeAndInfo_r13__Member *sib2_NB_part;
......@@ -660,7 +660,7 @@ uint8_t do_SIB23_NB(uint8_t Mod_id,
/*do_RRCConnectionSetup_NB--> the aim is to establish SRB1 and SRB1bis(implicitly)*/
uint8_t do_RRCConnectionSetup_NB(
const protocol_ctxt_t* const ctxt_pP,
rrc_eNB_ue_context_NB_t* const ue_context_pP,
rrc_eNB_ue_context_NB_IoT_t* const ue_context_pP,
int CC_id,
uint8_t* const buffer, //Srb0.Tx_buffer.Payload
const uint8_t Transaction_id,
......
......@@ -63,7 +63,7 @@
@param frame radio frame number
@return size of encoded bit stream in bytes*/
uint8_t do_MIB_NB(
rrc_eNB_carrier_data_NB_t *carrier,
rrc_eNB_carrier_data_NB_IoT_t *carrier,
uint32_t N_RB_DL,
uint32_t frame);
......@@ -77,7 +77,7 @@ uint8_t do_MIB_NB(
@return size of encoded bit stream in bytes*/
uint8_t do_SIB1_NB(uint8_t Mod_id, int CC_id,
rrc_eNB_carrier_data_NB_t *carrier,
rrc_eNB_carrier_data_NB_IoT_t *carrier,
RrcConfigurationReq *configuration,
uint32_t frame
);
......@@ -93,7 +93,7 @@ uint8_t do_SIB1_NB(uint8_t Mod_id, int CC_id,
uint8_t do_SIB23_NB(uint8_t Mod_id,
int CC_id,
rrc_eNB_carrier_data_NB_t *carrier,
rrc_eNB_carrier_data_NB_IoT_t *carrier,
RrcConfigurationReq *configuration
);
......@@ -151,7 +151,7 @@ PhysicalConfigDedicated-NB IEs.
uint8_t
do_RRCConnectionSetup_NB(
const protocol_ctxt_t* const ctxt_pP,
rrc_eNB_ue_context_NB_t* const ue_context_pP,
rrc_eNB_ue_context_NB_IoT_t* const ue_context_pP,
int CC_id,
uint8_t* const buffer, //carrier[CC_id].Srb0.Tx_buffer.Payload
const uint8_t Transaction_id,
......
......@@ -18,7 +18,7 @@
* contact@openairinterface.org
*/
/*! \file RRC/LITE/defs_nb_iot.h
/*! \file RRC/LITE/defs_NB_IoT.h
* \brief NB-IoT RRC struct definitions and function prototypes
* \author Navid Nikaein, Raymond Knopp and Michele Paffetti
* \date 2010 - 2014, 2017
......@@ -196,12 +196,12 @@
/*I will change the name of the structure for compile purposes--> hope not to undo this process*/
typedef unsigned int uid_NB_t;
typedef unsigned int uid_NB_IoT_t;
#define UID_LINEAR_ALLOCATOR_BITMAP_SIZE (((NUMBER_OF_UE_MAX/8)/sizeof(unsigned int)) + 1)
typedef struct uid_linear_allocator_NB_s {
typedef struct uid_linear_allocator_NB_IoT_s {
unsigned int bitmap[UID_LINEAR_ALLOCATOR_BITMAP_SIZE];
} uid_allocator_NB_t;
} uid_allocator_NB_IoT_t;
#define PROTOCOL_RRC_CTXT_UE_FMT PROTOCOL_CTXT_FMT
......@@ -251,25 +251,25 @@ typedef struct uid_linear_allocator_NB_s {
/* TS 36.331: RRC-TransactionIdentifier ::= INTEGER (0..3) */
#define RRC_TRANSACTION_IDENTIFIER_NUMBER 3
typedef struct UE_S_TMSI_NB_s {
typedef struct UE_S_TMSI_NB_IoT_s {
boolean_t presence;
mme_code_t mme_code;
m_tmsi_t m_tmsi;
} __attribute__ ((__packed__)) UE_S_TMSI_NB;
} __attribute__ ((__packed__)) UE_S_TMSI_NB_IoT;
typedef enum e_rab_satus_NB_e {
E_RAB_NB_STATUS_NEW,
E_RAB_NB_STATUS_DONE, // from the eNB perspective
E_RAB_NB_STATUS_ESTABLISHED, // get the reconfigurationcomplete form UE
E_RAB_NB_STATUS_FAILED,
} e_rab_status_NB_t;
typedef enum e_rab_satus_NB_IoT_e {
E_RAB_STATUS_NEW_NB_IoT,
E_RAB_STATUS_DONE_NB_IoT, // from the eNB perspective
E_RAB_STATUS_ESTABLISHED_NB_IoT, // get the reconfigurationcomplete form UE
E_RAB_STATUS_FAILED_NB_IoT,
} e_rab_status_NB_IoT_t;
typedef struct e_rab_param_NB_s {
typedef struct e_rab_param_NB_IoT_s {
e_rab_t param;
uint8_t status;
uint8_t xid; // transaction_id
} __attribute__ ((__packed__)) e_rab_param_NB_t;
} __attribute__ ((__packed__)) e_rab_param_NB_IoT_t;
//HANDOVER_INFO not implemented in NB-IoT delete
......@@ -282,46 +282,46 @@ typedef struct {
char Payload[RRC_BUFFER_SIZE_MAX];
char Header[RRC_HEADER_SIZE_MAX];
char payload_size;
} RRC_BUFFER_NB;
} RRC_BUFFER_NB_IoT;
#define RRC_BUFFER_SIZE_NB sizeof(RRC_BUFFER_NB)
#define RRC_BUFFER_SIZE_NB_IoT sizeof(RRC_BUFFER_NB_IoT)
typedef struct RB_INFO_NB_s {
typedef struct RB_INFO_NB_IoT_s {
uint16_t Rb_id; //=Lchan_id
//LCHAN_DESC Lchan_desc[2]; no more used
//MAC_MEAS_REQ_ENTRY *Meas_entry; //may not needed for NB-IoT
} RB_INFO_NB;
} RB_INFO_NB_IoT;
typedef struct SRB_INFO_NB_s {
typedef struct SRB_INFO_NB_IoT_s {
uint16_t Srb_id; //=Lchan_id---> useful for distinguish between SRB1 and SRB1bis?
RRC_BUFFER_NB Rx_buffer;
RRC_BUFFER_NB Tx_buffer;
RRC_BUFFER_NB_IoT Rx_buffer;
RRC_BUFFER_NB_IoT Tx_buffer;
//LCHAN_DESC Lchan_desc[2]; no more used
unsigned int Trans_id;
uint8_t Active;
} SRB_INFO_NB;
} SRB_INFO_NB_IoT;
typedef struct RB_INFO_TABLE_ENTRY_NB_s {
RB_INFO_NB Rb_info;
typedef struct RB_INFO_TABLE_ENTRY_NB_IoT_s {
RB_INFO_NB_IoT Rb_info;
uint8_t Active;
uint32_t Next_check_frame;
uint8_t Status;
} RB_INFO_TABLE_ENTRY_NB;
} RB_INFO_TABLE_ENTRY_NB_IoT;
typedef struct SRB_INFO_TABLE_ENTRY_NB_s {
SRB_INFO_NB Srb_info;
typedef struct SRB_INFO_TABLE_ENTRY_NB_IoT_s {
SRB_INFO_NB_IoT Srb_info;
uint8_t Active;
uint8_t Status;
uint32_t Next_check_frame;
} SRB_INFO_TABLE_ENTRY_NB;
} SRB_INFO_TABLE_ENTRY_NB_IoT;
//MEAS_REPORT_LIST_s not implemented in NB-IoT but is used at UE side
//HANDOVER_INFO_UE not implemented in NB-IoT
//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_NB_s {
//NB-IoT eNB_RRC_UE_NB_IoT_s--(used as a context in eNB --> ue_context in rrc_eNB_ue_context)------
typedef struct eNB_RRC_UE_NB_IoT_s {
uint8_t primaryCC_id;
//in NB-IoT only SRB0, SRB1 and SRB1bis (until AS security activation) exist
......@@ -347,10 +347,10 @@ typedef struct eNB_RRC_UE_NB_s {
//No SPS(semi-persistent scheduling) in NB-IoT
//No Measurement report in NB-IoT
SRB_INFO_NB SI;
SRB_INFO_NB Srb0;
SRB_INFO_TABLE_ENTRY_NB Srb1;
SRB_INFO_TABLE_ENTRY_NB Srb1bis;
SRB_INFO_NB_IoT SI;
SRB_INFO_NB_IoT Srb0;
SRB_INFO_TABLE_ENTRY_NB_IoT Srb1;
SRB_INFO_TABLE_ENTRY_NB_IoT Srb1bis;
#if defined(ENABLE_SECURITY)
/* KeNB as derived from KASME received from EPC */
......@@ -368,7 +368,7 @@ typedef struct eNB_RRC_UE_NB_s {
/* Information from UE RRC ConnectionRequest-NB-r13_IE--> NB-IoT */
UE_S_TMSI_NB Initialue_identity_s_TMSI;
UE_S_TMSI_NB_IoT Initialue_identity_s_TMSI;
EstablishmentCause_NB_r13_t establishment_cause_NB; //different set for NB-IoT
/* Information from UE RRC ConnectionReestablishmentRequest-NB--> NB-IoT */
......@@ -387,7 +387,7 @@ typedef struct eNB_RRC_UE_NB_s {
/* Number of e_rab to be setup in the list */ //NAS list?
uint8_t nb_of_e_rabs;
/* list of e_rab to be setup by RRC layers */
e_rab_param_NB_t e_rab[NB_RB_MAX_NB_IOT];//[S1AP_MAX_E_RAB];
e_rab_param_NB_IoT_t e_rab[NB_RB_MAX_NB_IOT];//[S1AP_MAX_E_RAB];
// LG: For GTPV1 TUNNELS
uint32_t enb_gtp_teid[S1AP_MAX_E_RAB];
......@@ -399,17 +399,17 @@ typedef struct eNB_RRC_UE_NB_s {
uint32_t ue_release_timer;
//threshold of the release timer--> set in RRCConnectionRelease
uint32_t ue_release_timer_thres;
} eNB_RRC_UE_NB_t;
} eNB_RRC_UE_NB_IoT_t;
//--------------------------------------------------------------------------------
typedef uid_NB_t ue_uid_t;
typedef uid_NB_IoT_t ue_uid_t;
//generally variable called: ue_context_pP
typedef struct rrc_eNB_ue_context_NB_s {
typedef struct rrc_eNB_ue_context_NB_IoT_s {
/* Tree related data */
RB_ENTRY(rrc_eNB_ue_context_NB_s) entries;
RB_ENTRY(rrc_eNB_ue_context_NB_IoT_s) entries;
/* Uniquely identifies the UE between MME and eNB within the eNB.
* This id is encoded on 24bits.
......@@ -420,9 +420,9 @@ typedef struct rrc_eNB_ue_context_NB_s {
ue_uid_t local_uid;
/* UE id for initial connection to S1AP */
struct eNB_RRC_UE_NB_s ue_context; //context of ue in the e-nB
struct eNB_RRC_UE_NB_IoT_s ue_context; //context of ue in the e-nB
} rrc_eNB_ue_context_NB_t;
} rrc_eNB_ue_context_NB_IoT_t;
......@@ -482,8 +482,8 @@ typedef struct {
SystemInformationBlockType16_NB_r13_t *sib16_NB;
SRB_INFO_NB SI;
SRB_INFO_NB Srb0;
SRB_INFO_NB_IoT SI;
SRB_INFO_NB_IoT Srb0;
/*future implementation TS 36.331 V14.2.1
SystemInformationBlockType15_NB_r14_t *sib15;
......@@ -495,7 +495,7 @@ typedef struct {
SC_MCCH_Message_NB_t scptm;*/
} rrc_eNB_carrier_data_NB_t;
} rrc_eNB_carrier_data_NB_IoT_t;
//---------------------------------------------------
......@@ -503,10 +503,10 @@ typedef struct {
//---NB-IoT---(completely change)---------------------
typedef struct eNB_RRC_INST_NB_IoT_s {
rrc_eNB_carrier_data_NB_t carrier[MAX_NUM_CCs];
rrc_eNB_carrier_data_NB_IoT_t carrier[MAX_NUM_CCs];
uid_allocator_NB_t uid_allocator; // for rrc_ue_head
RB_HEAD(rrc_ue_tree_NB_s, rrc_eNB_ue_context_NB_s) rrc_ue_head; // ue_context tree key search by rnti
uid_allocator_NB_IoT_t uid_allocator; // for rrc_ue_head
RB_HEAD(rrc_ue_tree_NB_IoT_s, rrc_eNB_ue_context_NB_IoT_s) rrc_ue_head; // ue_context tree key search by rnti
uint8_t Nb_ue;
......
......@@ -43,7 +43,7 @@
*/
void openair_rrc_on_NB_IoT(const protocol_ctxt_t* const ctxt_pP);
void rrc_config_buffer_NB_IoT(SRB_INFO_NB *srb_info, uint8_t Lchan_type, uint8_t Role);
void rrc_config_buffer_NB_IoT(SRB_INFO_NB_IoT *srb_info, uint8_t Lchan_type, uint8_t Role);
int L3_xface_init_NB_IoT(void);
......@@ -460,7 +460,7 @@ void openair_eNB_rrc_on_NB_IoT(
);
void rrc_config_buffer_NB_IoT(
SRB_INFO_NB* Srb_info,
SRB_INFO_NB_IoT* Srb_info,
uint8_t Lchan_type,
uint8_t Role
);
......@@ -480,7 +480,7 @@ void *rrc_enb_task_NB_IoT(void *args_p);
\param Srb_info Pointer to SRB0 information structure (buffer, etc.)*/
int rrc_eNB_decode_ccch_NB_IoT(
protocol_ctxt_t* const ctxt_pP,
const SRB_INFO_NB* const Srb_info,
const SRB_INFO_NB_IoT* const Srb_info,
const int CC_id
);
......@@ -501,58 +501,58 @@ int rrc_eNB_decode_dcch_NB_IoT(
\param CC_id Component Carrier ID*/
void rrc_eNB_generate_RRCConnectionReestablishmentReject_NB_IoT(
const protocol_ctxt_t* const ctxt_pP,
rrc_eNB_ue_context_NB_t* const ue_context_pP,
rrc_eNB_ue_context_NB_IoT_t* const ue_context_pP,
const int CC_id
);
void rrc_eNB_generate_RRCConnectionReject_NB_IoT(
const protocol_ctxt_t* const ctxt_pP,
rrc_eNB_ue_context_NB_t* const ue_context_pP,
rrc_eNB_ue_context_NB_IoT_t* const ue_context_pP,
const int CC_id
);
void rrc_eNB_generate_RRCConnectionSetup_NB_IoT(
const protocol_ctxt_t* const ctxt_pP,
rrc_eNB_ue_context_NB_t* const ue_context_pP,
rrc_eNB_ue_context_NB_IoT_t* const ue_context_pP,
const int CC_id
);
void rrc_eNB_process_RRCConnectionReconfigurationComplete_NB_IoT(
const protocol_ctxt_t* const ctxt_pP,
rrc_eNB_ue_context_NB_t* ue_context_pP,
rrc_eNB_ue_context_NB_IoT_t* ue_context_pP,
const uint8_t xid //transaction identifier
);
void //was under ITTI
rrc_eNB_reconfigure_DRBs_NB_IoT(const protocol_ctxt_t* const ctxt_pP,
rrc_eNB_ue_context_NB_t* ue_context_pP);
rrc_eNB_ue_context_NB_IoT_t* ue_context_pP);
void //was under ITTI
rrc_eNB_generate_dedicatedRRCConnectionReconfiguration_NB_IoT(
const protocol_ctxt_t* const ctxt_pP,
rrc_eNB_ue_context_NB_t* const ue_context_pP
rrc_eNB_ue_context_NB_IoT_t* const ue_context_pP
//no ho state
);
void rrc_eNB_process_RRCConnectionSetupComplete_NB_IoT(
const protocol_ctxt_t* const ctxt_pP,
rrc_eNB_ue_context_NB_t* ue_context_pP,
rrc_eNB_ue_context_NB_IoT_t* ue_context_pP,
RRCConnectionSetupComplete_NB_r13_IEs_t * rrcConnectionSetupComplete_NB
);
void rrc_eNB_generate_SecurityModeCommand_NB_IoT(
const protocol_ctxt_t* const ctxt_pP,
rrc_eNB_ue_context_NB_t* const ue_context_pP
rrc_eNB_ue_context_NB_IoT_t* const ue_context_pP
);
void rrc_eNB_generate_UECapabilityEnquiry_NB_IoT(
const protocol_ctxt_t* const ctxt_pP,
rrc_eNB_ue_context_NB_t* const ue_context_pP
rrc_eNB_ue_context_NB_IoT_t* const ue_context_pP
);
void rrc_eNB_generate_defaultRRCConnectionReconfiguration_NB_IoT(const protocol_ctxt_t* const ctxt_pP,
rrc_eNB_ue_context_NB_t* const ue_context_pP
rrc_eNB_ue_context_NB_IoT_t* const ue_context_pP
//no HO flag
);
......@@ -561,12 +561,12 @@ void rrc_eNB_generate_defaultRRCConnectionReconfiguration_NB_IoT(const protocol_
void rrc_eNB_free_UE_NB_IoT(
const module_id_t enb_mod_idP,
const struct rrc_eNB_ue_context_NB_s* const ue_context_pP
const struct rrc_eNB_ue_context_NB_IoT_s* const ue_context_pP
);
void rrc_eNB_free_mem_UE_context_NB_IoT(
const protocol_ctxt_t* const ctxt_pP,
struct rrc_eNB_ue_context_NB_s* const ue_context_pP
struct rrc_eNB_ue_context_NB_IoT_s* const ue_context_pP
);
......
......@@ -135,7 +135,7 @@ void openair_eNB_rrc_on_NB_IoT(
//-----------------------------------------------------------------------------
void rrc_config_buffer_NB_IoT(
SRB_INFO_NB* Srb_info,
SRB_INFO_NB_IoT* Srb_info,
uint8_t Lchan_type,
uint8_t Role
)
......@@ -279,8 +279,8 @@ rrc_rx_tx_NB_IoT(
//uint8_t UE_id;
int32_t current_timestamp_ms, ref_timestamp_ms;
struct timeval ts;
struct rrc_eNB_ue_context_NB_s *ue_context_p = NULL;
struct rrc_eNB_ue_context_NB_s *ue_to_be_removed = NULL;
struct rrc_eNB_ue_context_NB_IoT_s *ue_context_p = NULL;
struct rrc_eNB_ue_context_NB_IoT_s *ue_to_be_removed = NULL;
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_RRC_RX_TX,VCD_FUNCTION_IN);
......@@ -384,7 +384,7 @@ rrc_rx_tx_NB_IoT(
// counter, and get the value and aggregate
// check for UL failure
RB_FOREACH(ue_context_p, rrc_ue_tree_NB_s, &(eNB_rrc_inst_NB_IoT[ctxt_pP->module_id].rrc_ue_head)) {
RB_FOREACH(ue_context_p, rrc_ue_tree_NB_IoT_s, &(eNB_rrc_inst_NB_IoT[ctxt_pP->module_id].rrc_ue_head)) {
if ((ctxt_pP->frame == 0) && (ctxt_pP->subframe==0)) {
if (ue_context_p->ue_context.Initialue_identity_s_TMSI.presence == TRUE) {
LOG_I(RRC,"UE rnti %x:S-TMSI %x failure timer %d/20000\n",
......
This diff is collapsed.
......@@ -196,11 +196,11 @@ void rrc_eNB_remove_ue_context(
//------------------------------------------------------------------------------
void
uid_linear_allocator_init_NB(
uid_allocator_NB_t* const uid_pP
uid_allocator_NB_IoT_t* const uid_pP
)
//------------------------------------------------------------------------------
{
memset(uid_pP, 0, sizeof(uid_allocator_NB_t));
memset(uid_pP, 0, sizeof(uid_allocator_NB_IoT_t));
}
......@@ -214,7 +214,7 @@ uid_linear_allocator_new_NB(
unsigned int i;
unsigned int bit_index = 1;
uid_t uid = 0;
uid_allocator_NB_t* uia_p = &rrc_instance_pP->uid_allocator;
uid_allocator_NB_IoT_t* uia_p = &rrc_instance_pP->uid_allocator;
for (i=0; i < UID_LINEAR_ALLOCATOR_BITMAP_SIZE; i++) {
if (uia_p->bitmap[i] != UINT_MAX) {
......@@ -254,7 +254,7 @@ uid_linear_allocator_free_NB(
int rrc_eNB_compare_ue_rnti_id_NB(
struct rrc_eNB_ue_context_NB_s* c1_pP, struct rrc_eNB_ue_context_NB_s* c2_pP)
struct rrc_eNB_ue_context_NB_IoT_s* c1_pP, struct rrc_eNB_ue_context_NB_IoT_s* c2_pP)
//------------------------------------------------------------------------------
{
if (c1_pP->ue_id_rnti > c2_pP->ue_id_rnti) {
......@@ -269,49 +269,49 @@ int rrc_eNB_compare_ue_rnti_id_NB(
}
/* Generate the tree management functions for NB-IoT structures */
RB_GENERATE(rrc_ue_tree_NB_s, rrc_eNB_ue_context_NB_s, entries,
RB_GENERATE(rrc_ue_tree_NB_IoT_s, rrc_eNB_ue_context_NB_IoT_s, entries,
rrc_eNB_compare_ue_rnti_id_NB);
//------------------------------------------------------------------------------
struct rrc_eNB_ue_context_NB_s*
struct rrc_eNB_ue_context_NB_IoT_s*
rrc_eNB_allocate_new_UE_context_NB(
eNB_RRC_INST_NB_IoT* rrc_instance_pP
)
//------------------------------------------------------------------------------
{
struct rrc_eNB_ue_context_NB_s* new_p;
new_p = malloc(sizeof(struct rrc_eNB_ue_context_NB_s));
struct rrc_eNB_ue_context_NB_IoT_s* new_p;
new_p = malloc(sizeof(struct rrc_eNB_ue_context_NB_IoT_s));
if (new_p == NULL) {
LOG_E(RRC, "Cannot allocate new ue context\n");
return NULL;
}
memset(new_p, 0, sizeof(struct rrc_eNB_ue_context_NB_s));
memset(new_p, 0, sizeof(struct rrc_eNB_ue_context_NB_IoT_s));
new_p->local_uid = uid_linear_allocator_new_NB(rrc_instance_pP);
return new_p;
}
struct rrc_eNB_ue_context_NB_s*
struct rrc_eNB_ue_context_NB_IoT_s*
rrc_eNB_get_ue_context_NB(
eNB_RRC_INST_NB_IoT* rrc_instance_pP,
rnti_t rntiP)
//------------------------------------------------------------------------------
{
rrc_eNB_ue_context_NB_t temp;
memset(&temp, 0, sizeof(struct rrc_eNB_ue_context_NB_s));
rrc_eNB_ue_context_NB_IoT_t temp;
memset(&temp, 0, sizeof(struct rrc_eNB_ue_context_NB_IoT_s));
/* eNB ue rrc id = 24 bits wide */
temp.ue_id_rnti = rntiP;
return RB_FIND(rrc_ue_tree_NB_s, &rrc_instance_pP->rrc_ue_head, &temp);
return RB_FIND(rrc_ue_tree_NB_IoT_s, &rrc_instance_pP->rrc_ue_head, &temp);
}
//------------------------------------------------------------------------------
void rrc_eNB_remove_ue_context_NB(
const protocol_ctxt_t* const ctxt_pP,
eNB_RRC_INST_NB_IoT* rrc_instance_pP,
struct rrc_eNB_ue_context_NB_s* ue_context_pP)
struct rrc_eNB_ue_context_NB_IoT_s* ue_context_pP)
//------------------------------------------------------------------------------
{
if (rrc_instance_pP == NULL) {
......@@ -326,7 +326,7 @@ void rrc_eNB_remove_ue_context_NB(
return;
}
RB_REMOVE(rrc_ue_tree_NB_s, &rrc_instance_pP->rrc_ue_head, ue_context_pP);
RB_REMOVE(rrc_ue_tree_NB_IoT_s, &rrc_instance_pP->rrc_ue_head, ue_context_pP);
MSC_LOG_EVENT(
MSC_RRC_ENB,
......
......@@ -86,7 +86,7 @@ void rrc_eNB_remove_ue_context(
void
uid_linear_allocator_init_NB(
uid_allocator_NB_t* const uid_pP
uid_allocator_NB_IoT_t* const uid_pP
);
......@@ -103,16 +103,16 @@ uid_linear_allocator_free_NB(
int rrc_eNB_compare_ue_rnti_id_NB(
struct rrc_eNB_ue_context_NB_s* c1_pP, struct rrc_eNB_ue_context_NB_s* c2_pP);
struct rrc_eNB_ue_context_NB_IoT_s* c1_pP, struct rrc_eNB_ue_context_NB_IoT_s* c2_pP);
RB_PROTOTYPE(rrc_ue_tree_NB_s, rrc_eNB_ue_context_NB_s, entries, rrc_eNB_compare_ue_rnti_id_NB);
RB_PROTOTYPE(rrc_ue_tree_NB_IoT_s, rrc_eNB_ue_context_NB_IoT_s, entries, rrc_eNB_compare_ue_rnti_id_NB);
struct rrc_eNB_ue_context_NB_s*
struct rrc_eNB_ue_context_NB_IoT_s*
rrc_eNB_allocate_new_UE_context_NB(
eNB_RRC_INST_NB_IoT* rrc_instance_pP
);
struct rrc_eNB_ue_context_NB_s*
struct rrc_eNB_ue_context_NB_IoT_s*
rrc_eNB_get_ue_context_NB(
eNB_RRC_INST_NB_IoT* rrc_instance_pP,
rnti_t rntiP);
......@@ -120,6 +120,6 @@ rrc_eNB_get_ue_context_NB(
void rrc_eNB_remove_ue_context_NB(
const protocol_ctxt_t* const ctxt_pP,
eNB_RRC_INST_NB_IoT* rrc_instance_pP,
struct rrc_eNB_ue_context_NB_s* ue_context_pP);
struct rrc_eNB_ue_context_NB_IoT_s* ue_context_pP);
#endif
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