Commit 54f88942 authored by winckel's avatar winckel

Created a RRC configuration message.

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@4703 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent e8215501
...@@ -19,6 +19,9 @@ MESSAGE_DEF(RRC_UL_DCCH_MESSAGE, MESSAGE_PRIORITY_MED_PLUS, RrcUlDcchMes ...@@ -19,6 +19,9 @@ MESSAGE_DEF(RRC_UL_DCCH_MESSAGE, MESSAGE_PRIORITY_MED_PLUS, RrcUlDcchMes
#endif #endif
//-------------------------------------------------------------------------------------------// //-------------------------------------------------------------------------------------------//
// eNB: ENB_APP -> RRC messages
MESSAGE_DEF(RRC_CONFIGURATION_REQ, MESSAGE_PRIORITY_MED, RrcConfigurationReq, rrc_configuration_req)
// UE: NAS -> RRC messages // UE: NAS -> RRC messages
MESSAGE_DEF(NAS_CELL_SELECTION_REQ, MESSAGE_PRIORITY_MED, NasCellSelectionReq, nas_cell_selection_req) MESSAGE_DEF(NAS_CELL_SELECTION_REQ, MESSAGE_PRIORITY_MED, NasCellSelectionReq, nas_cell_selection_req)
MESSAGE_DEF(NAS_CONN_ESTABLI_REQ, MESSAGE_PRIORITY_MED, NasConnEstabliReq, nas_conn_establi_req) MESSAGE_DEF(NAS_CONN_ESTABLI_REQ, MESSAGE_PRIORITY_MED, NasConnEstabliReq, nas_conn_establi_req)
......
...@@ -30,21 +30,33 @@ typedef UL_DCCH_Message_t RrcUlDcchMessage; ...@@ -30,21 +30,33 @@ typedef UL_DCCH_Message_t RrcUlDcchMessage;
//-------------------------------------------------------------------------------------------// //-------------------------------------------------------------------------------------------//
// Defines to access message fields. // Defines to access message fields.
#define NAS_CELL_SELECTION_REQ(mSGpTR) (mSGpTR)->ittiMsg.nas_cell_selection_req #define RRC_CONFIGURATION_REQ(mSGpTR) (mSGpTR)->ittiMsg.rrc_configuration_req
#define NAS_CONN_ESTABLI_REQ(mSGpTR) (mSGpTR)->ittiMsg.nas_conn_establi_req
#define NAS_UPLINK_DATA_REQ(mSGpTR) (mSGpTR)->ittiMsg.nas_ul_data_req
#define NAS_RAB_ESTABLI_RSP(mSGpTR) (mSGpTR)->ittiMsg.nas_rab_est_rsp #define NAS_CELL_SELECTION_REQ(mSGpTR) (mSGpTR)->ittiMsg.nas_cell_selection_req
#define NAS_CONN_ESTABLI_REQ(mSGpTR) (mSGpTR)->ittiMsg.nas_conn_establi_req
#define NAS_UPLINK_DATA_REQ(mSGpTR) (mSGpTR)->ittiMsg.nas_ul_data_req
#define NAS_CELL_SELECTION_CNF(mSGpTR) (mSGpTR)->ittiMsg.nas_cell_selection_cnf #define NAS_RAB_ESTABLI_RSP(mSGpTR) (mSGpTR)->ittiMsg.nas_rab_est_rsp
#define NAS_CELL_SELECTION_IND(mSGpTR) (mSGpTR)->ittiMsg.nas_cell_selection_ind
#define NAS_PAGING_IND(mSGpTR) (mSGpTR)->ittiMsg.nas_paging_ind #define NAS_CELL_SELECTION_CNF(mSGpTR) (mSGpTR)->ittiMsg.nas_cell_selection_cnf
#define NAS_CONN_ESTABLI_CNF(mSGpTR) (mSGpTR)->ittiMsg.nas_conn_establi_cnf #define NAS_CELL_SELECTION_IND(mSGpTR) (mSGpTR)->ittiMsg.nas_cell_selection_ind
#define NAS_CONN_RELEASE_IND(mSGpTR) (mSGpTR)->ittiMsg.nas_conn_release_ind #define NAS_PAGING_IND(mSGpTR) (mSGpTR)->ittiMsg.nas_paging_ind
#define NAS_UPLINK_DATA_CNF(mSGpTR) (mSGpTR)->ittiMsg.nas_ul_data_cnf #define NAS_CONN_ESTABLI_CNF(mSGpTR) (mSGpTR)->ittiMsg.nas_conn_establi_cnf
#define NAS_DOWNLINK_DATA_IND(mSGpTR) (mSGpTR)->ittiMsg.nas_dl_data_ind #define NAS_CONN_RELEASE_IND(mSGpTR) (mSGpTR)->ittiMsg.nas_conn_release_ind
#define NAS_UPLINK_DATA_CNF(mSGpTR) (mSGpTR)->ittiMsg.nas_ul_data_cnf
#define NAS_DOWNLINK_DATA_IND(mSGpTR) (mSGpTR)->ittiMsg.nas_dl_data_ind
//-------------------------------------------------------------------------------------------// //-------------------------------------------------------------------------------------------//
// eNB: ENB_APP -> RRC messages
typedef struct RrcConfigurationReq_s {
uint32_t cell_identity;
uint16_t tac;
uint16_t mcc;
uint16_t mnc;
} RrcConfigurationReq;
// UE: NAS -> RRC messages // UE: NAS -> RRC messages
typedef cell_info_req_t NasCellSelectionReq; typedef cell_info_req_t NasCellSelectionReq;
typedef nas_establish_req_t NasConnEstabliReq; typedef nas_establish_req_t NasConnEstabliReq;
......
...@@ -161,6 +161,31 @@ static Enb_properties_t *enb_properties[] = ...@@ -161,6 +161,31 @@ static Enb_properties_t *enb_properties[] =
}; };
/*------------------------------------------------------------------------------*/ /*------------------------------------------------------------------------------*/
static void configure_rrc()
{
uint32_t eNB_id_start = 0;
uint32_t eNB_id_end = 1;
uint32_t eNB_id;
MessageDef *msg_p;
# if defined(OAI_EMU)
eNB_id_start = oai_emulation.info.first_enb_local;
eNB_id_end = oai_emulation.info.first_enb_local + oai_emulation.info.nb_enb_local;
# endif
for (eNB_id = eNB_id_start; (eNB_id < eNB_id_end) ; eNB_id++)
{
msg_p = itti_alloc_new_message (TASK_ENB_APP, RRC_CONFIGURATION_REQ);
RRC_CONFIGURATION_REQ (msg_p).cell_identity = enb_properties[eNB_id]->eNB_id;
RRC_CONFIGURATION_REQ (msg_p).tac = enb_properties[eNB_id]->tac;
RRC_CONFIGURATION_REQ (msg_p).mcc = enb_properties[eNB_id]->mcc;
RRC_CONFIGURATION_REQ (msg_p).mnc = enb_properties[eNB_id]->mnc;
itti_send_msg_to_task (TASK_RRC_ENB, eNB_id, msg_p);
}
}
static uint32_t eNB_app_register() static uint32_t eNB_app_register()
{ {
uint32_t eNB_id_start = 0; uint32_t eNB_id_start = 0;
...@@ -256,6 +281,8 @@ void *eNB_app_task(void *args_p) ...@@ -256,6 +281,8 @@ void *eNB_app_task(void *args_p)
# endif # endif
# endif # endif
configure_rrc();
# if defined(ENABLE_USE_MME) # if defined(ENABLE_USE_MME)
/* Try to register each eNB */ /* Try to register each eNB */
registered_enb = 0; registered_enb = 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