Commit 9f8a468d authored by laurent's avatar laurent

remove eNB threads for RRC and MAC, MAC thread was only for DRX config...

remove eNB threads for RRC and MAC, MAC thread was only for DRX config (useless) and RRC thread has many race conditions with MAC+PHY
parent d3d76080
...@@ -302,7 +302,6 @@ void *rrc_enb_process_msg(void *); ...@@ -302,7 +302,6 @@ void *rrc_enb_process_msg(void *);
TASK_DEF(TASK_L2L1, TASK_PRIORITY_MAX, 200, NULL, NULL) \ TASK_DEF(TASK_L2L1, TASK_PRIORITY_MAX, 200, NULL, NULL) \
TASK_DEF(TASK_BM, TASK_PRIORITY_MED, 200, NULL, NULL) \ TASK_DEF(TASK_BM, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_PHY_ENB, TASK_PRIORITY_MED, 200, NULL, NULL) \ TASK_DEF(TASK_PHY_ENB, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_MAC_ENB, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_MAC_GNB, TASK_PRIORITY_MED, 200, NULL, NULL) \ TASK_DEF(TASK_MAC_GNB, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_RLC_ENB, TASK_PRIORITY_MED, 200, NULL, NULL) \ TASK_DEF(TASK_RLC_ENB, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_RRC_ENB_NB_IoT, TASK_PRIORITY_MED, 200, NULL, NULL) \ TASK_DEF(TASK_RRC_ENB_NB_IoT, TASK_PRIORITY_MED, 200, NULL, NULL) \
...@@ -310,8 +309,8 @@ void *rrc_enb_process_msg(void *); ...@@ -310,8 +309,8 @@ void *rrc_enb_process_msg(void *);
TASK_DEF(TASK_PDCP_GNB, TASK_PRIORITY_MED, 200, NULL, NULL) \ TASK_DEF(TASK_PDCP_GNB, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_DATA_FORWARDING, TASK_PRIORITY_MED, 200, NULL, NULL) \ TASK_DEF(TASK_DATA_FORWARDING, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_END_MARKER, TASK_PRIORITY_MED, 200, NULL, NULL) \ TASK_DEF(TASK_END_MARKER, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_RRC_ENB, TASK_PRIORITY_MED, 200, NULL,NULL)\ TASK_DEF(TASK_RRC_ENB, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_RRC_GNB, TASK_PRIORITY_MED, 200, NULL,NULL)\ TASK_DEF(TASK_RRC_GNB, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_RAL_ENB, TASK_PRIORITY_MED, 200, NULL, NULL) \ TASK_DEF(TASK_RAL_ENB, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_S1AP, TASK_PRIORITY_MED, 200, NULL, NULL) \ TASK_DEF(TASK_S1AP, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_NGAP, TASK_PRIORITY_MED, 200, NULL, NULL) \ TASK_DEF(TASK_NGAP, TASK_PRIORITY_MED, 200, NULL, NULL) \
...@@ -334,7 +333,7 @@ void *rrc_enb_process_msg(void *); ...@@ -334,7 +333,7 @@ void *rrc_enb_process_msg(void *);
TASK_DEF(TASK_RRC_NRUE, TASK_PRIORITY_MED, 200, NULL, NULL) \ TASK_DEF(TASK_RRC_NRUE, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_NAS_UE, TASK_PRIORITY_MED, 200, NULL, NULL) \ TASK_DEF(TASK_NAS_UE, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_RAL_UE, TASK_PRIORITY_MED, 200, NULL, NULL) \ TASK_DEF(TASK_RAL_UE, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_GTPV1_U, TASK_PRIORITY_MED, 1000,NULL, NULL)\ TASK_DEF(TASK_GTPV1_U, TASK_PRIORITY_MED, 1000, NULL, NULL) \
TASK_DEF(TASK_CU_F1, TASK_PRIORITY_MED, 200, NULL, NULL) \ TASK_DEF(TASK_CU_F1, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_DU_F1, TASK_PRIORITY_MED, 200, NULL, NULL) \ TASK_DEF(TASK_DU_F1, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_CUCP_E1, TASK_PRIORITY_MED, 200, NULL, NULL) \ TASK_DEF(TASK_CUCP_E1, TASK_PRIORITY_MED, 200, NULL, NULL) \
......
...@@ -53,11 +53,8 @@ int create_tasks(uint32_t enb_nb) { ...@@ -53,11 +53,8 @@ int create_tasks(uint32_t enb_nb) {
LOG_I(ENB_APP, "Creating ENB_APP eNB Task\n"); LOG_I(ENB_APP, "Creating ENB_APP eNB Task\n");
rc = itti_create_task (TASK_ENB_APP, eNB_app_task, NULL); rc = itti_create_task (TASK_ENB_APP, eNB_app_task, NULL);
AssertFatal(rc >= 0, "Create task for eNB APP failed\n"); AssertFatal(rc >= 0, "Create task for eNB APP failed\n");
rrc_enb_init();
LOG_I(RRC,"Creating RRC eNB Task\n"); itti_mark_task_ready(TASK_RRC_ENB);
rc = itti_create_task (TASK_RRC_ENB, rrc_enb_task, NULL);
AssertFatal(rc >= 0, "Create task for RRC eNB failed\n");
if (get_softmodem_params()->emulate_l1 || (EPC_MODE_ENABLED && split73 != SPLIT73_DU)) { if (get_softmodem_params()->emulate_l1 || (EPC_MODE_ENABLED && split73 != SPLIT73_DU)) {
rc = itti_create_task(TASK_SCTP, sctp_eNB_task, NULL); rc = itti_create_task(TASK_SCTP, sctp_eNB_task, NULL);
AssertFatal(rc >= 0, "Create task for SCTP failed\n"); AssertFatal(rc >= 0, "Create task for SCTP failed\n");
...@@ -89,11 +86,5 @@ int create_tasks(uint32_t enb_nb) { ...@@ -89,11 +86,5 @@ int create_tasks(uint32_t enb_nb) {
AssertFatal(rc >= 0, "Create task for GTPV1U failed\n"); AssertFatal(rc >= 0, "Create task for GTPV1U failed\n");
} }
if (!NODE_IS_CU(type)) {
LOG_I(MAC,"Creating MAC eNB Task\n");
rc = itti_create_task(TASK_MAC_ENB, mac_enb_task, NULL);
AssertFatal(rc >= 0, "Create task for MAC eNB failed\n");
}
return 0; return 0;
} }
...@@ -482,6 +482,7 @@ int main ( int argc, char **argv ) ...@@ -482,6 +482,7 @@ int main ( int argc, char **argv )
MessageDef *msg_p = itti_alloc_new_message (TASK_ENB_APP, 0, RRC_CONFIGURATION_REQ); MessageDef *msg_p = itti_alloc_new_message (TASK_ENB_APP, 0, RRC_CONFIGURATION_REQ);
RRC_CONFIGURATION_REQ(msg_p) = RC.rrc[enb_id]->configuration; RRC_CONFIGURATION_REQ(msg_p) = RC.rrc[enb_id]->configuration;
itti_send_msg_to_task (TASK_RRC_ENB, ENB_MODULE_ID_TO_INSTANCE(enb_id), msg_p); itti_send_msg_to_task (TASK_RRC_ENB, ENB_MODULE_ID_TO_INSTANCE(enb_id), msg_p);
rrc_enb_process_itti_msg(NULL);
} }
node_type = RC.rrc[0]->node_type; node_type = RC.rrc[0]->node_type;
} }
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -116,8 +116,8 @@ void read_config_and_init(void); ...@@ -116,8 +116,8 @@ void read_config_and_init(void);
int RCconfig_X2(MessageDef *msg_p, uint32_t i); int RCconfig_X2(MessageDef *msg_p, uint32_t i);
int RCconfig_M2(MessageDef *msg_p, uint32_t i); int RCconfig_M2(MessageDef *msg_p, uint32_t i);
void fill_SL_configuration(MessageDef *msg_p, ccparams_sidelink_t *SLconfig,int cell_idx,int cc_idx,char *config_fname); void fill_SL_configuration(RrcConfigurationReq *RRCcfg, ccparams_sidelink_t *SLconfig, int cell_idx, int cc_idx, char *config_fname);
void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, int cell_idx,int cc_idx,char *config_fname,char *brparamspath); void fill_eMTC_configuration(RrcConfigurationReq *RRCcfg, ccparams_eMTC_t *eMTCconfig, int cell_idx, int cc_idx, char *config_fname, char *brparamspath);
int RCconfig_DU_F1(MessageDef *msg_p, uint32_t i); int RCconfig_DU_F1(MessageDef *msg_p, uint32_t i);
void handle_f1ap_setup_resp(f1ap_setup_resp_t *resp); void handle_f1ap_setup_resp(f1ap_setup_resp_t *resp);
......
...@@ -40,254 +40,254 @@ ...@@ -40,254 +40,254 @@
#include "enb_paramdef.h" #include "enb_paramdef.h"
#include "enb_paramdef_sidelink.h" #include "enb_paramdef_sidelink.h"
void fill_SL_configuration(MessageDef *msg_p, ccparams_sidelink_t *SLconfig,int cell_idx,int cc_idx,char *config_fname) { void fill_SL_configuration(RrcConfigurationReq *RRCcfg, ccparams_sidelink_t *SLconfig, int cell_idx, int cc_idx, char *config_fname)
{
printf("Configuring SL\n"); printf("Configuring SL\n");
//SIB18 //SIB18
if (strcmp(SLconfig->rxPool_sc_CP_Len,"normal")==0) { if (strcmp(SLconfig->rxPool_sc_CP_Len,"normal")==0) {
RRC_CONFIGURATION_REQ (msg_p).rxPool_sc_CP_Len[cc_idx] = LTE_SL_CP_Len_r12_normal; RRCcfg->rxPool_sc_CP_Len[cc_idx] = LTE_SL_CP_Len_r12_normal;
} else if (strcmp(SLconfig->rxPool_sc_CP_Len,"extended")==0) { } else if (strcmp(SLconfig->rxPool_sc_CP_Len,"extended")==0) {
RRC_CONFIGURATION_REQ (msg_p).rxPool_sc_CP_Len[cc_idx] = LTE_SL_CP_Len_r12_extended; RRCcfg->rxPool_sc_CP_Len[cc_idx] = LTE_SL_CP_Len_r12_extended;
} else } else
AssertFatal (0, AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for rxPool_sc_CP_Len choice: normal,extended!\n", "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for rxPool_sc_CP_Len choice: normal,extended!\n",
config_fname, cell_idx, SLconfig->rxPool_sc_CP_Len); config_fname, cell_idx, SLconfig->rxPool_sc_CP_Len);
if (strcmp(SLconfig->rxPool_sc_Period,"sf40")==0) { if (strcmp(SLconfig->rxPool_sc_Period,"sf40")==0) {
RRC_CONFIGURATION_REQ (msg_p).rxPool_sc_Period[cc_idx] = LTE_SL_PeriodComm_r12_sf40; RRCcfg->rxPool_sc_Period[cc_idx] = LTE_SL_PeriodComm_r12_sf40;
} else if (strcmp(SLconfig->rxPool_sc_Period,"sf60")==0) { } else if (strcmp(SLconfig->rxPool_sc_Period,"sf60")==0) {
RRC_CONFIGURATION_REQ (msg_p).rxPool_sc_Period[cc_idx] = LTE_SL_PeriodComm_r12_sf60; RRCcfg->rxPool_sc_Period[cc_idx] = LTE_SL_PeriodComm_r12_sf60;
} else if (strcmp(SLconfig->rxPool_sc_Period,"sf70")==0) { } else if (strcmp(SLconfig->rxPool_sc_Period,"sf70")==0) {
RRC_CONFIGURATION_REQ (msg_p).rxPool_sc_Period[cc_idx] = LTE_SL_PeriodComm_r12_sf70; RRCcfg->rxPool_sc_Period[cc_idx] = LTE_SL_PeriodComm_r12_sf70;
} else if (strcmp(SLconfig->rxPool_sc_Period,"sf80")==0) { } else if (strcmp(SLconfig->rxPool_sc_Period,"sf80")==0) {
RRC_CONFIGURATION_REQ (msg_p).rxPool_sc_Period[cc_idx] = LTE_SL_PeriodComm_r12_sf80; RRCcfg->rxPool_sc_Period[cc_idx] = LTE_SL_PeriodComm_r12_sf80;
} else if (strcmp(SLconfig->rxPool_sc_Period,"sf120")==0) { } else if (strcmp(SLconfig->rxPool_sc_Period,"sf120")==0) {
RRC_CONFIGURATION_REQ (msg_p).rxPool_sc_Period[cc_idx] = LTE_SL_PeriodComm_r12_sf120; RRCcfg->rxPool_sc_Period[cc_idx] = LTE_SL_PeriodComm_r12_sf120;
} else if (strcmp(SLconfig->rxPool_sc_Period,"sf140")==0) { } else if (strcmp(SLconfig->rxPool_sc_Period,"sf140")==0) {
RRC_CONFIGURATION_REQ (msg_p).rxPool_sc_Period[cc_idx] = LTE_SL_PeriodComm_r12_sf140; RRCcfg->rxPool_sc_Period[cc_idx] = LTE_SL_PeriodComm_r12_sf140;
} else if (strcmp(SLconfig->rxPool_sc_Period,"sf160")==0) { } else if (strcmp(SLconfig->rxPool_sc_Period,"sf160")==0) {
RRC_CONFIGURATION_REQ (msg_p).rxPool_sc_Period[cc_idx] = LTE_SL_PeriodComm_r12_sf160; RRCcfg->rxPool_sc_Period[cc_idx] = LTE_SL_PeriodComm_r12_sf160;
} else if (strcmp(SLconfig->rxPool_sc_Period,"sf240")==0) { } else if (strcmp(SLconfig->rxPool_sc_Period,"sf240")==0) {
RRC_CONFIGURATION_REQ (msg_p).rxPool_sc_Period[cc_idx] = LTE_SL_PeriodComm_r12_sf240; RRCcfg->rxPool_sc_Period[cc_idx] = LTE_SL_PeriodComm_r12_sf240;
} else if (strcmp(SLconfig->rxPool_sc_Period,"sf280")==0) { } else if (strcmp(SLconfig->rxPool_sc_Period,"sf280")==0) {
RRC_CONFIGURATION_REQ (msg_p).rxPool_sc_Period[cc_idx] = LTE_SL_PeriodComm_r12_sf280; RRCcfg->rxPool_sc_Period[cc_idx] = LTE_SL_PeriodComm_r12_sf280;
} else if (strcmp(SLconfig->rxPool_sc_Period,"sf320")==0) { } else if (strcmp(SLconfig->rxPool_sc_Period,"sf320")==0) {
RRC_CONFIGURATION_REQ (msg_p).rxPool_sc_Period[cc_idx] = LTE_SL_PeriodComm_r12_sf320; RRCcfg->rxPool_sc_Period[cc_idx] = LTE_SL_PeriodComm_r12_sf320;
} else if (strcmp(SLconfig->rxPool_sc_Period,"spare6")==0) { } else if (strcmp(SLconfig->rxPool_sc_Period,"spare6")==0) {
RRC_CONFIGURATION_REQ (msg_p).rxPool_sc_Period[cc_idx] = LTE_SL_PeriodComm_r12_spare6; RRCcfg->rxPool_sc_Period[cc_idx] = LTE_SL_PeriodComm_r12_spare6;
} else if (strcmp(SLconfig->rxPool_sc_Period,"spare5")==0) { } else if (strcmp(SLconfig->rxPool_sc_Period,"spare5")==0) {
RRC_CONFIGURATION_REQ (msg_p).rxPool_sc_Period[cc_idx] = LTE_SL_PeriodComm_r12_spare5; RRCcfg->rxPool_sc_Period[cc_idx] = LTE_SL_PeriodComm_r12_spare5;
} else if (strcmp(SLconfig->rxPool_sc_Period,"spare4")==0) { } else if (strcmp(SLconfig->rxPool_sc_Period,"spare4")==0) {
RRC_CONFIGURATION_REQ (msg_p).rxPool_sc_Period[cc_idx] = LTE_SL_PeriodComm_r12_spare4; RRCcfg->rxPool_sc_Period[cc_idx] = LTE_SL_PeriodComm_r12_spare4;
} else if (strcmp(SLconfig->rxPool_sc_Period,"spare3")==0) { } else if (strcmp(SLconfig->rxPool_sc_Period,"spare3")==0) {
RRC_CONFIGURATION_REQ (msg_p).rxPool_sc_Period[cc_idx] = LTE_SL_PeriodComm_r12_spare3; RRCcfg->rxPool_sc_Period[cc_idx] = LTE_SL_PeriodComm_r12_spare3;
} else if (strcmp(SLconfig->rxPool_sc_Period,"spare2")==0) { } else if (strcmp(SLconfig->rxPool_sc_Period,"spare2")==0) {
RRC_CONFIGURATION_REQ (msg_p).rxPool_sc_Period[cc_idx] = LTE_SL_PeriodComm_r12_spare2; RRCcfg->rxPool_sc_Period[cc_idx] = LTE_SL_PeriodComm_r12_spare2;
} else if (strcmp(SLconfig->rxPool_sc_Period,"spare")==0) { } else if (strcmp(SLconfig->rxPool_sc_Period,"spare")==0) {
RRC_CONFIGURATION_REQ (msg_p).rxPool_sc_Period[cc_idx] = LTE_SL_PeriodComm_r12_spare; RRCcfg->rxPool_sc_Period[cc_idx] = LTE_SL_PeriodComm_r12_spare;
} else } else
AssertFatal (0, AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for rxPool_sc_Period choice: sf40,sf60,sf70,sf80,sf120,sf140,sf160,sf240,sf280,sf320,spare6,spare5,spare4,spare3,spare2,spare!\n", "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for rxPool_sc_Period choice: sf40,sf60,sf70,sf80,sf120,sf140,sf160,sf240,sf280,sf320,spare6,spare5,spare4,spare3,spare2,spare!\n",
config_fname, cell_idx, SLconfig->rxPool_sc_Period); config_fname, cell_idx, SLconfig->rxPool_sc_Period);
if (strcmp(SLconfig->rxPool_data_CP_Len,"normal")==0) { if (strcmp(SLconfig->rxPool_data_CP_Len,"normal")==0) {
RRC_CONFIGURATION_REQ (msg_p).rxPool_data_CP_Len[cc_idx] = LTE_SL_CP_Len_r12_normal; RRCcfg->rxPool_data_CP_Len[cc_idx] = LTE_SL_CP_Len_r12_normal;
} else if (strcmp(SLconfig->rxPool_data_CP_Len,"extended")==0) { } else if (strcmp(SLconfig->rxPool_data_CP_Len,"extended")==0) {
RRC_CONFIGURATION_REQ (msg_p).rxPool_data_CP_Len[cc_idx] = LTE_SL_CP_Len_r12_extended; RRCcfg->rxPool_data_CP_Len[cc_idx] = LTE_SL_CP_Len_r12_extended;
} else } else
AssertFatal (0, AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for rxPool_data_CP_Len choice: normal,extended!\n", "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for rxPool_data_CP_Len choice: normal,extended!\n",
config_fname, cell_idx, SLconfig->rxPool_data_CP_Len); config_fname, cell_idx, SLconfig->rxPool_data_CP_Len);
RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_prb_Num[cc_idx] = SLconfig->rxPool_ResourceConfig_prb_Num; RRCcfg->rxPool_ResourceConfig_prb_Num[cc_idx] = SLconfig->rxPool_ResourceConfig_prb_Num;
RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_prb_Start[cc_idx] = SLconfig->rxPool_ResourceConfig_prb_Start; RRCcfg->rxPool_ResourceConfig_prb_Start[cc_idx] = SLconfig->rxPool_ResourceConfig_prb_Start;
RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_prb_End[cc_idx] = SLconfig->rxPool_ResourceConfig_prb_End; RRCcfg->rxPool_ResourceConfig_prb_End[cc_idx] = SLconfig->rxPool_ResourceConfig_prb_End;
if (strcmp(SLconfig->rxPool_ResourceConfig_offsetIndicator_present,"prNothing")==0) { if (strcmp(SLconfig->rxPool_ResourceConfig_offsetIndicator_present,"prNothing")==0) {
RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_offsetIndicator_present[cc_idx] = LTE_SL_OffsetIndicator_r12_PR_NOTHING; RRCcfg->rxPool_ResourceConfig_offsetIndicator_present[cc_idx] = LTE_SL_OffsetIndicator_r12_PR_NOTHING;
} else if (strcmp(SLconfig->rxPool_ResourceConfig_offsetIndicator_present,"prSmall")==0) { } else if (strcmp(SLconfig->rxPool_ResourceConfig_offsetIndicator_present,"prSmall")==0) {
RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_offsetIndicator_present[cc_idx] = LTE_SL_OffsetIndicator_r12_PR_small_r12; RRCcfg->rxPool_ResourceConfig_offsetIndicator_present[cc_idx] = LTE_SL_OffsetIndicator_r12_PR_small_r12;
} else if (strcmp(SLconfig->rxPool_ResourceConfig_offsetIndicator_present,"prLarge")==0) { } else if (strcmp(SLconfig->rxPool_ResourceConfig_offsetIndicator_present,"prLarge")==0) {
RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_offsetIndicator_present[cc_idx] = LTE_SL_OffsetIndicator_r12_PR_large_r12; RRCcfg->rxPool_ResourceConfig_offsetIndicator_present[cc_idx] = LTE_SL_OffsetIndicator_r12_PR_large_r12;
} else } else
AssertFatal (0, AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for rxPool_ResourceConfig_offsetIndicator_present choice: prNothing,prSmal,prLarge!\n", "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for rxPool_ResourceConfig_offsetIndicator_present choice: prNothing,prSmal,prLarge!\n",
config_fname, cell_idx, SLconfig->rxPool_ResourceConfig_offsetIndicator_present); config_fname, cell_idx, SLconfig->rxPool_ResourceConfig_offsetIndicator_present);
RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_offsetIndicator_choice[cc_idx] = SLconfig->rxPool_ResourceConfig_offsetIndicator_choice; RRCcfg->rxPool_ResourceConfig_offsetIndicator_choice[cc_idx] = SLconfig->rxPool_ResourceConfig_offsetIndicator_choice;
if (strcmp(SLconfig->rxPool_ResourceConfig_subframeBitmap_present,"prNothing")==0) { if (strcmp(SLconfig->rxPool_ResourceConfig_subframeBitmap_present,"prNothing")==0) {
RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_subframeBitmap_present[cc_idx] = LTE_SubframeBitmapSL_r12_PR_NOTHING; RRCcfg->rxPool_ResourceConfig_subframeBitmap_present[cc_idx] = LTE_SubframeBitmapSL_r12_PR_NOTHING;
} else if (strcmp(SLconfig->rxPool_ResourceConfig_subframeBitmap_present,"prBs4")==0) { } else if (strcmp(SLconfig->rxPool_ResourceConfig_subframeBitmap_present,"prBs4")==0) {
RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_subframeBitmap_present[cc_idx] = LTE_SubframeBitmapSL_r12_PR_bs4_r12; RRCcfg->rxPool_ResourceConfig_subframeBitmap_present[cc_idx] = LTE_SubframeBitmapSL_r12_PR_bs4_r12;
} else if (strcmp(SLconfig->rxPool_ResourceConfig_subframeBitmap_present,"prBs8")==0) { } else if (strcmp(SLconfig->rxPool_ResourceConfig_subframeBitmap_present,"prBs8")==0) {
RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_subframeBitmap_present[cc_idx] = LTE_SubframeBitmapSL_r12_PR_bs8_r12; RRCcfg->rxPool_ResourceConfig_subframeBitmap_present[cc_idx] = LTE_SubframeBitmapSL_r12_PR_bs8_r12;
} else if (strcmp(SLconfig->rxPool_ResourceConfig_subframeBitmap_present,"prBs12")==0) { } else if (strcmp(SLconfig->rxPool_ResourceConfig_subframeBitmap_present,"prBs12")==0) {
RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_subframeBitmap_present[cc_idx] = LTE_SubframeBitmapSL_r12_PR_bs12_r12; RRCcfg->rxPool_ResourceConfig_subframeBitmap_present[cc_idx] = LTE_SubframeBitmapSL_r12_PR_bs12_r12;
} else if (strcmp(SLconfig->rxPool_ResourceConfig_subframeBitmap_present,"prBs16")==0) { } else if (strcmp(SLconfig->rxPool_ResourceConfig_subframeBitmap_present,"prBs16")==0) {
RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_subframeBitmap_present[cc_idx] = LTE_SubframeBitmapSL_r12_PR_bs16_r12; RRCcfg->rxPool_ResourceConfig_subframeBitmap_present[cc_idx] = LTE_SubframeBitmapSL_r12_PR_bs16_r12;
} else if (strcmp(SLconfig->rxPool_ResourceConfig_subframeBitmap_present,"prBs30")==0) { } else if (strcmp(SLconfig->rxPool_ResourceConfig_subframeBitmap_present,"prBs30")==0) {
RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_subframeBitmap_present[cc_idx] = LTE_SubframeBitmapSL_r12_PR_bs30_r12; RRCcfg->rxPool_ResourceConfig_subframeBitmap_present[cc_idx] = LTE_SubframeBitmapSL_r12_PR_bs30_r12;
} else if (strcmp(SLconfig->rxPool_ResourceConfig_subframeBitmap_present,"prBs40")==0) { } else if (strcmp(SLconfig->rxPool_ResourceConfig_subframeBitmap_present,"prBs40")==0) {
RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_subframeBitmap_present[cc_idx] = LTE_SubframeBitmapSL_r12_PR_bs40_r12; RRCcfg->rxPool_ResourceConfig_subframeBitmap_present[cc_idx] = LTE_SubframeBitmapSL_r12_PR_bs40_r12;
} else if (strcmp(SLconfig->rxPool_ResourceConfig_subframeBitmap_present,"prBs42")==0) { } else if (strcmp(SLconfig->rxPool_ResourceConfig_subframeBitmap_present,"prBs42")==0) {
RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_subframeBitmap_present[cc_idx] = LTE_SubframeBitmapSL_r12_PR_bs42_r12; RRCcfg->rxPool_ResourceConfig_subframeBitmap_present[cc_idx] = LTE_SubframeBitmapSL_r12_PR_bs42_r12;
} else } else
AssertFatal (0, AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for rxPool_ResourceConfig_subframeBitmap_present choice: prNothing,prBs4,prBs8,prBs12,prBs16,prBs30,prBs40,prBs42!\n", "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for rxPool_ResourceConfig_subframeBitmap_present choice: prNothing,prBs4,prBs8,prBs12,prBs16,prBs30,prBs40,prBs42!\n",
config_fname, cell_idx, SLconfig->rxPool_ResourceConfig_subframeBitmap_present); config_fname, cell_idx, SLconfig->rxPool_ResourceConfig_subframeBitmap_present);
RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_subframeBitmap_choice_bs_buf[cc_idx] = SLconfig->rxPool_ResourceConfig_subframeBitmap_choice_bs_buf; RRCcfg->rxPool_ResourceConfig_subframeBitmap_choice_bs_buf[cc_idx] = SLconfig->rxPool_ResourceConfig_subframeBitmap_choice_bs_buf;
RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_subframeBitmap_choice_bs_size[cc_idx] = SLconfig->rxPool_ResourceConfig_subframeBitmap_choice_bs_size; RRCcfg->rxPool_ResourceConfig_subframeBitmap_choice_bs_size[cc_idx] = SLconfig->rxPool_ResourceConfig_subframeBitmap_choice_bs_size;
RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused[cc_idx] = SLconfig->rxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused; RRCcfg->rxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused[cc_idx] = SLconfig->rxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused;
//SIB19 - for discRxPool //SIB19 - for discRxPool
if (strcmp(SLconfig->discRxPool_cp_Len,"normal")==0) { if (strcmp(SLconfig->discRxPool_cp_Len,"normal")==0) {
RRC_CONFIGURATION_REQ (msg_p).discRxPool_cp_Len[cc_idx] = LTE_SL_CP_Len_r12_normal; RRCcfg->discRxPool_cp_Len[cc_idx] = LTE_SL_CP_Len_r12_normal;
} else if (strcmp(SLconfig->discRxPool_cp_Len,"extended")==0) { } else if (strcmp(SLconfig->discRxPool_cp_Len,"extended")==0) {
RRC_CONFIGURATION_REQ (msg_p).discRxPool_cp_Len[cc_idx] = LTE_SL_CP_Len_r12_extended; RRCcfg->discRxPool_cp_Len[cc_idx] = LTE_SL_CP_Len_r12_extended;
} else } else
AssertFatal (0, AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for discRxPool_cp_Len choice: normal,extended!\n", "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for discRxPool_cp_Len choice: normal,extended!\n",
config_fname, cell_idx, SLconfig->discRxPool_cp_Len); config_fname, cell_idx, SLconfig->discRxPool_cp_Len);
if (strcmp(SLconfig->discRxPool_discPeriod,"rf32")==0) { if (strcmp(SLconfig->discRxPool_discPeriod,"rf32")==0) {
RRC_CONFIGURATION_REQ (msg_p).discRxPool_discPeriod[cc_idx] = LTE_SL_DiscResourcePool_r12__discPeriod_r12_rf32; RRCcfg->discRxPool_discPeriod[cc_idx] = LTE_SL_DiscResourcePool_r12__discPeriod_r12_rf32;
} else if (strcmp(SLconfig->discRxPool_discPeriod,"rf64")==0) { } else if (strcmp(SLconfig->discRxPool_discPeriod,"rf64")==0) {
RRC_CONFIGURATION_REQ (msg_p).discRxPool_discPeriod[cc_idx] = LTE_SL_DiscResourcePool_r12__discPeriod_r12_rf64; RRCcfg->discRxPool_discPeriod[cc_idx] = LTE_SL_DiscResourcePool_r12__discPeriod_r12_rf64;
} else if (strcmp(SLconfig->discRxPool_discPeriod,"rf128")==0) { } else if (strcmp(SLconfig->discRxPool_discPeriod,"rf128")==0) {
RRC_CONFIGURATION_REQ (msg_p).discRxPool_discPeriod[cc_idx] = LTE_SL_DiscResourcePool_r12__discPeriod_r12_rf128; RRCcfg->discRxPool_discPeriod[cc_idx] = LTE_SL_DiscResourcePool_r12__discPeriod_r12_rf128;
} else if (strcmp(SLconfig->discRxPool_discPeriod,"rf256")==0) { } else if (strcmp(SLconfig->discRxPool_discPeriod,"rf256")==0) {
RRC_CONFIGURATION_REQ (msg_p).discRxPool_discPeriod[cc_idx] = LTE_SL_DiscResourcePool_r12__discPeriod_r12_rf256; RRCcfg->discRxPool_discPeriod[cc_idx] = LTE_SL_DiscResourcePool_r12__discPeriod_r12_rf256;
} else if (strcmp(SLconfig->discRxPool_discPeriod,"rf512")==0) { } else if (strcmp(SLconfig->discRxPool_discPeriod,"rf512")==0) {
RRC_CONFIGURATION_REQ (msg_p).discRxPool_discPeriod[cc_idx] = LTE_SL_DiscResourcePool_r12__discPeriod_r12_rf512; RRCcfg->discRxPool_discPeriod[cc_idx] = LTE_SL_DiscResourcePool_r12__discPeriod_r12_rf512;
} else if (strcmp(SLconfig->discRxPool_discPeriod,"rf1024")==0) { } else if (strcmp(SLconfig->discRxPool_discPeriod,"rf1024")==0) {
RRC_CONFIGURATION_REQ (msg_p).discRxPool_discPeriod[cc_idx] = LTE_SL_DiscResourcePool_r12__discPeriod_r12_rf1024; RRCcfg->discRxPool_discPeriod[cc_idx] = LTE_SL_DiscResourcePool_r12__discPeriod_r12_rf1024;
} else if (strcmp(SLconfig->discRxPool_discPeriod,"rf16")==0) { } else if (strcmp(SLconfig->discRxPool_discPeriod,"rf16")==0) {
RRC_CONFIGURATION_REQ (msg_p).discRxPool_discPeriod[cc_idx] = LTE_SL_DiscResourcePool_r12__discPeriod_r12_rf16_v1310; RRCcfg->discRxPool_discPeriod[cc_idx] = LTE_SL_DiscResourcePool_r12__discPeriod_r12_rf16_v1310;
} else if (strcmp(SLconfig->discRxPool_discPeriod,"spare")==0) { } else if (strcmp(SLconfig->discRxPool_discPeriod,"spare")==0) {
RRC_CONFIGURATION_REQ (msg_p).discRxPool_discPeriod[cc_idx] = LTE_SL_DiscResourcePool_r12__discPeriod_r12_spare; RRCcfg->discRxPool_discPeriod[cc_idx] = LTE_SL_DiscResourcePool_r12__discPeriod_r12_spare;
} else } else
AssertFatal (0, AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for discRxPool_discPeriod choice: rf32,rf64,rf128,rf512,rf1024,rf16,spare!\n", "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for discRxPool_discPeriod choice: rf32,rf64,rf128,rf512,rf1024,rf16,spare!\n",
config_fname, cell_idx, SLconfig->discRxPool_discPeriod); config_fname, cell_idx, SLconfig->discRxPool_discPeriod);
RRC_CONFIGURATION_REQ (msg_p).discRxPool_numRetx[cc_idx] = SLconfig->discRxPool_numRetx; RRCcfg->discRxPool_numRetx[cc_idx] = SLconfig->discRxPool_numRetx;
RRC_CONFIGURATION_REQ (msg_p).discRxPool_numRepetition[cc_idx] = SLconfig->discRxPool_numRepetition; RRCcfg->discRxPool_numRepetition[cc_idx] = SLconfig->discRxPool_numRepetition;
RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_prb_Num[cc_idx] = SLconfig->discRxPool_ResourceConfig_prb_Num; RRCcfg->discRxPool_ResourceConfig_prb_Num[cc_idx] = SLconfig->discRxPool_ResourceConfig_prb_Num;
RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_prb_Start[cc_idx] = SLconfig->discRxPool_ResourceConfig_prb_Start; RRCcfg->discRxPool_ResourceConfig_prb_Start[cc_idx] = SLconfig->discRxPool_ResourceConfig_prb_Start;
RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_prb_End[cc_idx] = SLconfig->discRxPool_ResourceConfig_prb_End; RRCcfg->discRxPool_ResourceConfig_prb_End[cc_idx] = SLconfig->discRxPool_ResourceConfig_prb_End;
if (strcmp(SLconfig->discRxPool_ResourceConfig_offsetIndicator_present,"prNothing")==0) { if (strcmp(SLconfig->discRxPool_ResourceConfig_offsetIndicator_present,"prNothing")==0) {
RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_offsetIndicator_present[cc_idx] = LTE_SL_OffsetIndicator_r12_PR_NOTHING; RRCcfg->discRxPool_ResourceConfig_offsetIndicator_present[cc_idx] = LTE_SL_OffsetIndicator_r12_PR_NOTHING;
} else if (strcmp(SLconfig->discRxPool_ResourceConfig_offsetIndicator_present,"prSmall")==0) { } else if (strcmp(SLconfig->discRxPool_ResourceConfig_offsetIndicator_present,"prSmall")==0) {
RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_offsetIndicator_present[cc_idx] = LTE_SL_OffsetIndicator_r12_PR_small_r12; RRCcfg->discRxPool_ResourceConfig_offsetIndicator_present[cc_idx] = LTE_SL_OffsetIndicator_r12_PR_small_r12;
} else if (strcmp(SLconfig->discRxPool_ResourceConfig_offsetIndicator_present,"prLarge")==0) { } else if (strcmp(SLconfig->discRxPool_ResourceConfig_offsetIndicator_present,"prLarge")==0) {
RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_offsetIndicator_present[cc_idx] = LTE_SL_OffsetIndicator_r12_PR_large_r12; RRCcfg->discRxPool_ResourceConfig_offsetIndicator_present[cc_idx] = LTE_SL_OffsetIndicator_r12_PR_large_r12;
} else } else
AssertFatal (0, AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for discRxPool_ResourceConfig_offsetIndicator_present choice: prNothing,prSmal,prLarge!\n", "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for discRxPool_ResourceConfig_offsetIndicator_present choice: prNothing,prSmal,prLarge!\n",
config_fname, cell_idx, SLconfig->discRxPool_ResourceConfig_offsetIndicator_present); config_fname, cell_idx, SLconfig->discRxPool_ResourceConfig_offsetIndicator_present);
RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_offsetIndicator_choice[cc_idx] = SLconfig->discRxPool_ResourceConfig_offsetIndicator_choice; RRCcfg->discRxPool_ResourceConfig_offsetIndicator_choice[cc_idx] = SLconfig->discRxPool_ResourceConfig_offsetIndicator_choice;
if (strcmp(SLconfig->discRxPool_ResourceConfig_subframeBitmap_present,"prNothing")==0) { if (strcmp(SLconfig->discRxPool_ResourceConfig_subframeBitmap_present,"prNothing")==0) {
RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_subframeBitmap_present[cc_idx] = LTE_SubframeBitmapSL_r12_PR_NOTHING; RRCcfg->discRxPool_ResourceConfig_subframeBitmap_present[cc_idx] = LTE_SubframeBitmapSL_r12_PR_NOTHING;
} else if (strcmp(SLconfig->discRxPool_ResourceConfig_subframeBitmap_present,"prBs4")==0) { } else if (strcmp(SLconfig->discRxPool_ResourceConfig_subframeBitmap_present,"prBs4")==0) {
RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_subframeBitmap_present[cc_idx] = LTE_SubframeBitmapSL_r12_PR_bs4_r12; RRCcfg->discRxPool_ResourceConfig_subframeBitmap_present[cc_idx] = LTE_SubframeBitmapSL_r12_PR_bs4_r12;
} else if (strcmp(SLconfig->discRxPool_ResourceConfig_subframeBitmap_present,"prBs8")==0) { } else if (strcmp(SLconfig->discRxPool_ResourceConfig_subframeBitmap_present,"prBs8")==0) {
RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_subframeBitmap_present[cc_idx] = LTE_SubframeBitmapSL_r12_PR_bs8_r12; RRCcfg->discRxPool_ResourceConfig_subframeBitmap_present[cc_idx] = LTE_SubframeBitmapSL_r12_PR_bs8_r12;
} else if (strcmp(SLconfig->discRxPool_ResourceConfig_subframeBitmap_present,"prBs12")==0) { } else if (strcmp(SLconfig->discRxPool_ResourceConfig_subframeBitmap_present,"prBs12")==0) {
RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_subframeBitmap_present[cc_idx] = LTE_SubframeBitmapSL_r12_PR_bs12_r12; RRCcfg->discRxPool_ResourceConfig_subframeBitmap_present[cc_idx] = LTE_SubframeBitmapSL_r12_PR_bs12_r12;
} else if (strcmp(SLconfig->discRxPool_ResourceConfig_subframeBitmap_present,"prBs16")==0) { } else if (strcmp(SLconfig->discRxPool_ResourceConfig_subframeBitmap_present,"prBs16")==0) {
RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_subframeBitmap_present[cc_idx] = LTE_SubframeBitmapSL_r12_PR_bs16_r12; RRCcfg->discRxPool_ResourceConfig_subframeBitmap_present[cc_idx] = LTE_SubframeBitmapSL_r12_PR_bs16_r12;
} else if (strcmp(SLconfig->discRxPool_ResourceConfig_subframeBitmap_present,"prBs30")==0) { } else if (strcmp(SLconfig->discRxPool_ResourceConfig_subframeBitmap_present,"prBs30")==0) {
RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_subframeBitmap_present[cc_idx] = LTE_SubframeBitmapSL_r12_PR_bs30_r12; RRCcfg->discRxPool_ResourceConfig_subframeBitmap_present[cc_idx] = LTE_SubframeBitmapSL_r12_PR_bs30_r12;
} else if (strcmp(SLconfig->discRxPool_ResourceConfig_subframeBitmap_present,"prBs40")==0) { } else if (strcmp(SLconfig->discRxPool_ResourceConfig_subframeBitmap_present,"prBs40")==0) {
RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_subframeBitmap_present[cc_idx] = LTE_SubframeBitmapSL_r12_PR_bs40_r12; RRCcfg->discRxPool_ResourceConfig_subframeBitmap_present[cc_idx] = LTE_SubframeBitmapSL_r12_PR_bs40_r12;
} else if (strcmp(SLconfig->discRxPool_ResourceConfig_subframeBitmap_present,"prBs42")==0) { } else if (strcmp(SLconfig->discRxPool_ResourceConfig_subframeBitmap_present,"prBs42")==0) {
RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_subframeBitmap_present[cc_idx] = LTE_SubframeBitmapSL_r12_PR_bs42_r12; RRCcfg->discRxPool_ResourceConfig_subframeBitmap_present[cc_idx] = LTE_SubframeBitmapSL_r12_PR_bs42_r12;
} else } else
AssertFatal (0, AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for discRxPool_ResourceConfig_subframeBitmap_present choice: prNothing,prBs4,prBs8,prBs12,prBs16,prBs30,prBs40,prBs42!\n", "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for discRxPool_ResourceConfig_subframeBitmap_present choice: prNothing,prBs4,prBs8,prBs12,prBs16,prBs30,prBs40,prBs42!\n",
config_fname, cell_idx, SLconfig->discRxPool_ResourceConfig_subframeBitmap_present); config_fname, cell_idx, SLconfig->discRxPool_ResourceConfig_subframeBitmap_present);
RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_subframeBitmap_choice_bs_buf[cc_idx] = SLconfig->discRxPool_ResourceConfig_subframeBitmap_choice_bs_buf; RRCcfg->discRxPool_ResourceConfig_subframeBitmap_choice_bs_buf[cc_idx] = SLconfig->discRxPool_ResourceConfig_subframeBitmap_choice_bs_buf;
RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_subframeBitmap_choice_bs_size[cc_idx] = SLconfig->discRxPool_ResourceConfig_subframeBitmap_choice_bs_size; RRCcfg->discRxPool_ResourceConfig_subframeBitmap_choice_bs_size[cc_idx] = SLconfig->discRxPool_ResourceConfig_subframeBitmap_choice_bs_size;
RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused[cc_idx] = SLconfig->discRxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused; RRCcfg->discRxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused[cc_idx] = SLconfig->discRxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused;
//SIB19 - For discRxPoolPS //SIB19 - For discRxPoolPS
if (strcmp(SLconfig->discRxPoolPS_cp_Len,"normal")==0) { if (strcmp(SLconfig->discRxPoolPS_cp_Len,"normal")==0) {
RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_cp_Len[cc_idx] = LTE_SL_CP_Len_r12_normal; RRCcfg->discRxPoolPS_cp_Len[cc_idx] = LTE_SL_CP_Len_r12_normal;
} else if (strcmp(SLconfig->discRxPoolPS_cp_Len,"extended")==0) { } else if (strcmp(SLconfig->discRxPoolPS_cp_Len,"extended")==0) {
RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_cp_Len[cc_idx] = LTE_SL_CP_Len_r12_extended; RRCcfg->discRxPoolPS_cp_Len[cc_idx] = LTE_SL_CP_Len_r12_extended;
} else } else
AssertFatal (0, AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for discRxPoolPS_cp_Len choice: normal,extended!\n", "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for discRxPoolPS_cp_Len choice: normal,extended!\n",
config_fname, cell_idx, SLconfig->discRxPoolPS_cp_Len); config_fname, cell_idx, SLconfig->discRxPoolPS_cp_Len);
if (strcmp(SLconfig->discRxPoolPS_discPeriod,"rf32")==0) { if (strcmp(SLconfig->discRxPoolPS_discPeriod,"rf32")==0) {
RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_discPeriod[cc_idx] = LTE_SL_DiscResourcePool_r12__discPeriod_r12_rf32; RRCcfg->discRxPoolPS_discPeriod[cc_idx] = LTE_SL_DiscResourcePool_r12__discPeriod_r12_rf32;
} else if (strcmp(SLconfig->discRxPoolPS_discPeriod,"rf64")==0) { } else if (strcmp(SLconfig->discRxPoolPS_discPeriod,"rf64")==0) {
RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_discPeriod[cc_idx] = LTE_SL_DiscResourcePool_r12__discPeriod_r12_rf64; RRCcfg->discRxPoolPS_discPeriod[cc_idx] = LTE_SL_DiscResourcePool_r12__discPeriod_r12_rf64;
} else if (strcmp(SLconfig->discRxPoolPS_discPeriod,"rf128")==0) { } else if (strcmp(SLconfig->discRxPoolPS_discPeriod,"rf128")==0) {
RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_discPeriod[cc_idx] = LTE_SL_DiscResourcePool_r12__discPeriod_r12_rf128; RRCcfg->discRxPoolPS_discPeriod[cc_idx] = LTE_SL_DiscResourcePool_r12__discPeriod_r12_rf128;
} else if (strcmp(SLconfig->discRxPoolPS_discPeriod,"rf256")==0) { } else if (strcmp(SLconfig->discRxPoolPS_discPeriod,"rf256")==0) {
RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_discPeriod[cc_idx] = LTE_SL_DiscResourcePool_r12__discPeriod_r12_rf256; RRCcfg->discRxPoolPS_discPeriod[cc_idx] = LTE_SL_DiscResourcePool_r12__discPeriod_r12_rf256;
} else if (strcmp(SLconfig->discRxPoolPS_discPeriod,"rf512")==0) { } else if (strcmp(SLconfig->discRxPoolPS_discPeriod,"rf512")==0) {
RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_discPeriod[cc_idx] = LTE_SL_DiscResourcePool_r12__discPeriod_r12_rf512; RRCcfg->discRxPoolPS_discPeriod[cc_idx] = LTE_SL_DiscResourcePool_r12__discPeriod_r12_rf512;
} else if (strcmp(SLconfig->discRxPoolPS_discPeriod,"rf1024")==0) { } else if (strcmp(SLconfig->discRxPoolPS_discPeriod,"rf1024")==0) {
RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_discPeriod[cc_idx] = LTE_SL_DiscResourcePool_r12__discPeriod_r12_rf1024; RRCcfg->discRxPoolPS_discPeriod[cc_idx] = LTE_SL_DiscResourcePool_r12__discPeriod_r12_rf1024;
} else if (strcmp(SLconfig->discRxPoolPS_discPeriod,"rf16")==0) { } else if (strcmp(SLconfig->discRxPoolPS_discPeriod,"rf16")==0) {
RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_discPeriod[cc_idx] = LTE_SL_DiscResourcePool_r12__discPeriod_r12_rf16_v1310; RRCcfg->discRxPoolPS_discPeriod[cc_idx] = LTE_SL_DiscResourcePool_r12__discPeriod_r12_rf16_v1310;
} else if (strcmp(SLconfig->discRxPoolPS_discPeriod,"spare")==0) { } else if (strcmp(SLconfig->discRxPoolPS_discPeriod,"spare")==0) {
RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_discPeriod[cc_idx] = LTE_SL_DiscResourcePool_r12__discPeriod_r12_spare; RRCcfg->discRxPoolPS_discPeriod[cc_idx] = LTE_SL_DiscResourcePool_r12__discPeriod_r12_spare;
} else } else
AssertFatal (0, AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for discRxPoolPS_discPeriod choice: rf32,rf64,rf128,rf512,rf1024,rf16,spare!\n", "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for discRxPoolPS_discPeriod choice: rf32,rf64,rf128,rf512,rf1024,rf16,spare!\n",
config_fname, cell_idx, SLconfig->discRxPoolPS_discPeriod); config_fname, cell_idx, SLconfig->discRxPoolPS_discPeriod);
RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_numRetx[cc_idx] = SLconfig->discRxPoolPS_numRetx; RRCcfg->discRxPoolPS_numRetx[cc_idx] = SLconfig->discRxPoolPS_numRetx;
RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_numRepetition[cc_idx] = SLconfig->discRxPoolPS_numRepetition; RRCcfg->discRxPoolPS_numRepetition[cc_idx] = SLconfig->discRxPoolPS_numRepetition;
RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_ResourceConfig_prb_Num[cc_idx] = SLconfig->discRxPoolPS_ResourceConfig_prb_Num; RRCcfg->discRxPoolPS_ResourceConfig_prb_Num[cc_idx] = SLconfig->discRxPoolPS_ResourceConfig_prb_Num;
RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_ResourceConfig_prb_Start[cc_idx] = SLconfig->discRxPoolPS_ResourceConfig_prb_Start; RRCcfg->discRxPoolPS_ResourceConfig_prb_Start[cc_idx] = SLconfig->discRxPoolPS_ResourceConfig_prb_Start;
RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_ResourceConfig_prb_End[cc_idx] = SLconfig->discRxPoolPS_ResourceConfig_prb_End; RRCcfg->discRxPoolPS_ResourceConfig_prb_End[cc_idx] = SLconfig->discRxPoolPS_ResourceConfig_prb_End;
if (strcmp(SLconfig->discRxPoolPS_ResourceConfig_offsetIndicator_present,"prNothing")==0) { if (strcmp(SLconfig->discRxPoolPS_ResourceConfig_offsetIndicator_present,"prNothing")==0) {
RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_ResourceConfig_offsetIndicator_present[cc_idx] = LTE_SL_OffsetIndicator_r12_PR_NOTHING; RRCcfg->discRxPoolPS_ResourceConfig_offsetIndicator_present[cc_idx] = LTE_SL_OffsetIndicator_r12_PR_NOTHING;
} else if (strcmp(SLconfig->discRxPoolPS_ResourceConfig_offsetIndicator_present,"prSmall")==0) { } else if (strcmp(SLconfig->discRxPoolPS_ResourceConfig_offsetIndicator_present,"prSmall")==0) {
RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_ResourceConfig_offsetIndicator_present[cc_idx] = LTE_SL_OffsetIndicator_r12_PR_small_r12; RRCcfg->discRxPoolPS_ResourceConfig_offsetIndicator_present[cc_idx] = LTE_SL_OffsetIndicator_r12_PR_small_r12;
} else if (strcmp(SLconfig->discRxPoolPS_ResourceConfig_offsetIndicator_present,"prLarge")==0) { } else if (strcmp(SLconfig->discRxPoolPS_ResourceConfig_offsetIndicator_present,"prLarge")==0) {
RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_ResourceConfig_offsetIndicator_present[cc_idx] = LTE_SL_OffsetIndicator_r12_PR_large_r12; RRCcfg->discRxPoolPS_ResourceConfig_offsetIndicator_present[cc_idx] = LTE_SL_OffsetIndicator_r12_PR_large_r12;
} else } else
AssertFatal (0, AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for discRxPoolPS_ResourceConfig_offsetIndicator_present choice: prNothing,prSmal,prLarge!\n", "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for discRxPoolPS_ResourceConfig_offsetIndicator_present choice: prNothing,prSmal,prLarge!\n",
config_fname, cell_idx, SLconfig->discRxPoolPS_ResourceConfig_offsetIndicator_present); config_fname, cell_idx, SLconfig->discRxPoolPS_ResourceConfig_offsetIndicator_present);
RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_ResourceConfig_offsetIndicator_choice[cc_idx] = SLconfig->discRxPoolPS_ResourceConfig_offsetIndicator_choice; RRCcfg->discRxPoolPS_ResourceConfig_offsetIndicator_choice[cc_idx] = SLconfig->discRxPoolPS_ResourceConfig_offsetIndicator_choice;
if (strcmp(SLconfig->discRxPoolPS_ResourceConfig_subframeBitmap_present,"prNothing")==0) { if (strcmp(SLconfig->discRxPoolPS_ResourceConfig_subframeBitmap_present,"prNothing")==0) {
RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_ResourceConfig_subframeBitmap_present[cc_idx] = LTE_SubframeBitmapSL_r12_PR_NOTHING; RRCcfg->discRxPoolPS_ResourceConfig_subframeBitmap_present[cc_idx] = LTE_SubframeBitmapSL_r12_PR_NOTHING;
} else if (strcmp(SLconfig->discRxPoolPS_ResourceConfig_subframeBitmap_present,"prBs4")==0) { } else if (strcmp(SLconfig->discRxPoolPS_ResourceConfig_subframeBitmap_present,"prBs4")==0) {
RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_ResourceConfig_subframeBitmap_present[cc_idx] = LTE_SubframeBitmapSL_r12_PR_bs4_r12; RRCcfg->discRxPoolPS_ResourceConfig_subframeBitmap_present[cc_idx] = LTE_SubframeBitmapSL_r12_PR_bs4_r12;
} else if (strcmp(SLconfig->discRxPoolPS_ResourceConfig_subframeBitmap_present,"prBs8")==0) { } else if (strcmp(SLconfig->discRxPoolPS_ResourceConfig_subframeBitmap_present,"prBs8")==0) {
RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_ResourceConfig_subframeBitmap_present[cc_idx] = LTE_SubframeBitmapSL_r12_PR_bs8_r12; RRCcfg->discRxPoolPS_ResourceConfig_subframeBitmap_present[cc_idx] = LTE_SubframeBitmapSL_r12_PR_bs8_r12;
} else if (strcmp(SLconfig->discRxPoolPS_ResourceConfig_subframeBitmap_present,"prBs12")==0) { } else if (strcmp(SLconfig->discRxPoolPS_ResourceConfig_subframeBitmap_present,"prBs12")==0) {
RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_ResourceConfig_subframeBitmap_present[cc_idx] = LTE_SubframeBitmapSL_r12_PR_bs12_r12; RRCcfg->discRxPoolPS_ResourceConfig_subframeBitmap_present[cc_idx] = LTE_SubframeBitmapSL_r12_PR_bs12_r12;
} else if (strcmp(SLconfig->discRxPoolPS_ResourceConfig_subframeBitmap_present,"prBs16")==0) { } else if (strcmp(SLconfig->discRxPoolPS_ResourceConfig_subframeBitmap_present,"prBs16")==0) {
RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_ResourceConfig_subframeBitmap_present[cc_idx] = LTE_SubframeBitmapSL_r12_PR_bs16_r12; RRCcfg->discRxPoolPS_ResourceConfig_subframeBitmap_present[cc_idx] = LTE_SubframeBitmapSL_r12_PR_bs16_r12;
} else if (strcmp(SLconfig->discRxPoolPS_ResourceConfig_subframeBitmap_present,"prBs30")==0) { } else if (strcmp(SLconfig->discRxPoolPS_ResourceConfig_subframeBitmap_present,"prBs30")==0) {
RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_ResourceConfig_subframeBitmap_present[cc_idx] = LTE_SubframeBitmapSL_r12_PR_bs30_r12; RRCcfg->discRxPoolPS_ResourceConfig_subframeBitmap_present[cc_idx] = LTE_SubframeBitmapSL_r12_PR_bs30_r12;
} else if (strcmp(SLconfig->discRxPoolPS_ResourceConfig_subframeBitmap_present,"prBs40")==0) { } else if (strcmp(SLconfig->discRxPoolPS_ResourceConfig_subframeBitmap_present,"prBs40")==0) {
RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_ResourceConfig_subframeBitmap_present[cc_idx] = LTE_SubframeBitmapSL_r12_PR_bs40_r12; RRCcfg->discRxPoolPS_ResourceConfig_subframeBitmap_present[cc_idx] = LTE_SubframeBitmapSL_r12_PR_bs40_r12;
} else if (strcmp(SLconfig->discRxPoolPS_ResourceConfig_subframeBitmap_present,"prBs42")==0) { } else if (strcmp(SLconfig->discRxPoolPS_ResourceConfig_subframeBitmap_present,"prBs42")==0) {
RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_ResourceConfig_subframeBitmap_present[cc_idx] = LTE_SubframeBitmapSL_r12_PR_bs42_r12; RRCcfg->discRxPoolPS_ResourceConfig_subframeBitmap_present[cc_idx] = LTE_SubframeBitmapSL_r12_PR_bs42_r12;
} else } else
AssertFatal (0, AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for discRxPoolPS_ResourceConfig_subframeBitmap_present choice: prNothing,prBs4,prBs8,prBs12,prBs16,prBs30,prBs40,prBs42!\n", "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for discRxPoolPS_ResourceConfig_subframeBitmap_present choice: prNothing,prBs4,prBs8,prBs12,prBs16,prBs30,prBs40,prBs42!\n",
config_fname, cell_idx, SLconfig->discRxPoolPS_ResourceConfig_subframeBitmap_present); config_fname, cell_idx, SLconfig->discRxPoolPS_ResourceConfig_subframeBitmap_present);
RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_buf[cc_idx] = SLconfig->discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_buf; RRCcfg->discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_buf[cc_idx] = SLconfig->discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_buf;
RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_size[cc_idx] = SLconfig->discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_size; RRCcfg->discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_size[cc_idx] = SLconfig->discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_size;
RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_bits_unused[cc_idx] = SLconfig->discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_bits_unused; RRCcfg->discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_bits_unused[cc_idx] = SLconfig->discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_bits_unused;
} // sidelink_configured==1 } // sidelink_configured==1
...@@ -39,8 +39,8 @@ ...@@ -39,8 +39,8 @@
#include "RRC_config_tools.h" #include "RRC_config_tools.h"
#include "enb_paramdef.h" #include "enb_paramdef.h"
void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, int cell_idx,int cc_idx,char *config_fname,char *brparamspath) { void fill_eMTC_configuration(RrcConfigurationReq *RRCcfg, ccparams_eMTC_t *eMTCconfig, int cell_idx, int cc_idx, char *config_fname, char *brparamspath)
{
paramdef_t schedulingInfoBrParams[] = SI_INFO_BR_DESC(eMTCconfig); paramdef_t schedulingInfoBrParams[] = SI_INFO_BR_DESC(eMTCconfig);
paramlist_def_t schedulingInfoBrParamList = {ENB_CONFIG_STRING_SCHEDULING_INFO_BR, NULL, 0}; paramlist_def_t schedulingInfoBrParamList = {ENB_CONFIG_STRING_SCHEDULING_INFO_BR, NULL, 0};
paramdef_t rachcelevelParams[] = RACH_CE_LEVELINFOLIST_R13_DESC(eMTCconfig); paramdef_t rachcelevelParams[] = RACH_CE_LEVELINFOLIST_R13_DESC(eMTCconfig);
...@@ -57,96 +57,88 @@ void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, in ...@@ -57,96 +57,88 @@ void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, in
printf("Found parameters for eMTC from %s : %s\n",config_fname,brparamspath); printf("Found parameters for eMTC from %s : %s\n",config_fname,brparamspath);
RRC_CONFIGURATION_REQ(msg_p).schedulingInfoSIB1_BR_r13[cc_idx] = eMTCconfig->schedulingInfoSIB1_BR_r13; RRCcfg->schedulingInfoSIB1_BR_r13[cc_idx] = eMTCconfig->schedulingInfoSIB1_BR_r13;
if (!strcmp(eMTCconfig->cellSelectionInfoCE_r13, "ENABLE")) { if (!strcmp(eMTCconfig->cellSelectionInfoCE_r13, "ENABLE")) {
RRC_CONFIGURATION_REQ(msg_p).cellSelectionInfoCE_r13[cc_idx] = true; RRCcfg->cellSelectionInfoCE_r13[cc_idx] = true;
RRC_CONFIGURATION_REQ(msg_p).q_RxLevMinCE_r13[cc_idx]= eMTCconfig->q_RxLevMinCE_r13; RRCcfg->q_RxLevMinCE_r13[cc_idx] = eMTCconfig->q_RxLevMinCE_r13;
// RRC_CONFIGURATION_REQ(msg_p).q_QualMinRSRQ_CE_r13[cc_idx]= calloc(1, sizeof(long)); // RRCcfg->q_QualMinRSRQ_CE_r13[cc_idx]= calloc(1, sizeof(long));
// *RRC_CONFIGURATION_REQ(msg_p).q_QualMinRSRQ_CE_r13[cc_idx]= q_QualMinRSRQ_CE_r13; // *RRCcfg->q_QualMinRSRQ_CE_r13[cc_idx]= q_QualMinRSRQ_CE_r13;
} else { } else {
RRC_CONFIGURATION_REQ(msg_p).cellSelectionInfoCE_r13[cc_idx] = false; RRCcfg->cellSelectionInfoCE_r13[cc_idx] = false;
} }
if (!strcmp(eMTCconfig->bandwidthReducedAccessRelatedInfo_r13, "ENABLE")) { if (!strcmp(eMTCconfig->bandwidthReducedAccessRelatedInfo_r13, "ENABLE")) {
RRC_CONFIGURATION_REQ(msg_p).bandwidthReducedAccessRelatedInfo_r13[cc_idx] = true; RRCcfg->bandwidthReducedAccessRelatedInfo_r13[cc_idx] = true;
if (!strcmp(eMTCconfig->si_WindowLength_BR_r13, "ms20")) { if (!strcmp(eMTCconfig->si_WindowLength_BR_r13, "ms20")) {
RRC_CONFIGURATION_REQ(msg_p).si_WindowLength_BR_r13[cc_idx] = 0; RRCcfg->si_WindowLength_BR_r13[cc_idx] = 0;
} else if (!strcmp(eMTCconfig->si_WindowLength_BR_r13, "ms40")) { } else if (!strcmp(eMTCconfig->si_WindowLength_BR_r13, "ms40")) {
RRC_CONFIGURATION_REQ(msg_p).si_WindowLength_BR_r13[cc_idx] = 1; RRCcfg->si_WindowLength_BR_r13[cc_idx] = 1;
} else if (!strcmp(eMTCconfig->si_WindowLength_BR_r13, "ms60")) { } else if (!strcmp(eMTCconfig->si_WindowLength_BR_r13, "ms60")) {
RRC_CONFIGURATION_REQ(msg_p).si_WindowLength_BR_r13[cc_idx] = 2; RRCcfg->si_WindowLength_BR_r13[cc_idx] = 2;
} else if (!strcmp(eMTCconfig->si_WindowLength_BR_r13, "ms80")) { } else if (!strcmp(eMTCconfig->si_WindowLength_BR_r13, "ms80")) {
RRC_CONFIGURATION_REQ(msg_p).si_WindowLength_BR_r13[cc_idx] = 3; RRCcfg->si_WindowLength_BR_r13[cc_idx] = 3;
} else if (!strcmp(eMTCconfig->si_WindowLength_BR_r13, "ms120")) { } else if (!strcmp(eMTCconfig->si_WindowLength_BR_r13, "ms120")) {
RRC_CONFIGURATION_REQ(msg_p).si_WindowLength_BR_r13[cc_idx] = 4; RRCcfg->si_WindowLength_BR_r13[cc_idx] = 4;
} else if (!strcmp(eMTCconfig->si_WindowLength_BR_r13, "ms160")) { } else if (!strcmp(eMTCconfig->si_WindowLength_BR_r13, "ms160")) {
RRC_CONFIGURATION_REQ(msg_p).si_WindowLength_BR_r13[cc_idx] = 5; RRCcfg->si_WindowLength_BR_r13[cc_idx] = 5;
} else if (!strcmp(eMTCconfig->si_WindowLength_BR_r13, "ms200")) { } else if (!strcmp(eMTCconfig->si_WindowLength_BR_r13, "ms200")) {
RRC_CONFIGURATION_REQ(msg_p).si_WindowLength_BR_r13[cc_idx] = 6; RRCcfg->si_WindowLength_BR_r13[cc_idx] = 6;
} else if (!strcmp(eMTCconfig->si_WindowLength_BR_r13, "spare")) { } else if (!strcmp(eMTCconfig->si_WindowLength_BR_r13, "spare")) {
RRC_CONFIGURATION_REQ(msg_p).si_WindowLength_BR_r13[cc_idx] = 7; RRCcfg->si_WindowLength_BR_r13[cc_idx] = 7;
} }
if (!strcmp(eMTCconfig->si_RepetitionPattern_r13, "everyRF")) { if (!strcmp(eMTCconfig->si_RepetitionPattern_r13, "everyRF")) {
RRC_CONFIGURATION_REQ(msg_p).si_RepetitionPattern_r13[cc_idx] = 0; RRCcfg->si_RepetitionPattern_r13[cc_idx] = 0;
} else if (!strcmp(eMTCconfig->si_RepetitionPattern_r13, "every2ndRF")) { } else if (!strcmp(eMTCconfig->si_RepetitionPattern_r13, "every2ndRF")) {
RRC_CONFIGURATION_REQ(msg_p).si_RepetitionPattern_r13[cc_idx] = 1; RRCcfg->si_RepetitionPattern_r13[cc_idx] = 1;
} else if (!strcmp(eMTCconfig->si_RepetitionPattern_r13, "every4thRF")) { } else if (!strcmp(eMTCconfig->si_RepetitionPattern_r13, "every4thRF")) {
RRC_CONFIGURATION_REQ(msg_p).si_RepetitionPattern_r13[cc_idx] = 2; RRCcfg->si_RepetitionPattern_r13[cc_idx] = 2;
} else if (!strcmp(eMTCconfig->si_RepetitionPattern_r13, "every8thRF")) { } else if (!strcmp(eMTCconfig->si_RepetitionPattern_r13, "every8thRF")) {
RRC_CONFIGURATION_REQ(msg_p).si_RepetitionPattern_r13[cc_idx] = 3; RRCcfg->si_RepetitionPattern_r13[cc_idx] = 3;
} }
} else { } else {
RRC_CONFIGURATION_REQ(msg_p).bandwidthReducedAccessRelatedInfo_r13[cc_idx] = false; RRCcfg->bandwidthReducedAccessRelatedInfo_r13[cc_idx] = false;
} }
char schedulingInfoBrPath[MAX_OPTNAME_SIZE * 2]; char schedulingInfoBrPath[MAX_OPTNAME_SIZE * 2];
config_getlist(&schedulingInfoBrParamList, NULL, 0, brparamspath); config_getlist(&schedulingInfoBrParamList, NULL, 0, brparamspath);
RRC_CONFIGURATION_REQ (msg_p).scheduling_info_br_size[cc_idx] = schedulingInfoBrParamList.numelt; RRCcfg->scheduling_info_br_size[cc_idx] = schedulingInfoBrParamList.numelt;
int siInfoindex; int siInfoindex;
for (siInfoindex = 0; siInfoindex < schedulingInfoBrParamList.numelt; siInfoindex++) { for (siInfoindex = 0; siInfoindex < schedulingInfoBrParamList.numelt; siInfoindex++) {
sprintf(schedulingInfoBrPath, "%s.%s.[%i]", brparamspath, ENB_CONFIG_STRING_EMTC_PARAMETERS, siInfoindex); sprintf(schedulingInfoBrPath, "%s.%s.[%i]", brparamspath, ENB_CONFIG_STRING_EMTC_PARAMETERS, siInfoindex);
config_get(schedulingInfoBrParams, sizeof(schedulingInfoBrParams) / sizeof(paramdef_t), schedulingInfoBrPath); config_get(schedulingInfoBrParams, sizeof(schedulingInfoBrParams) / sizeof(paramdef_t), schedulingInfoBrPath);
RRC_CONFIGURATION_REQ (msg_p).si_Narrowband_r13[cc_idx][siInfoindex] = eMTCconfig->si_Narrowband_r13; RRCcfg->si_Narrowband_r13[cc_idx][siInfoindex] = eMTCconfig->si_Narrowband_r13;
RRC_CONFIGURATION_REQ (msg_p).si_TBS_r13[cc_idx][siInfoindex] = eMTCconfig->si_TBS_r13; RRCcfg->si_TBS_r13[cc_idx][siInfoindex] = eMTCconfig->si_TBS_r13;
} }
// RRCcfg->radioresourceconfig[cc_idx].system_info_value_tag_SI_size[cc_idx] = 0;
RRCcfg->fdd_DownlinkOrTddSubframeBitmapBR_r13[cc_idx] = CALLOC(1, sizeof(BOOLEAN_t));
// RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[cc_idx].system_info_value_tag_SI_size[cc_idx] = 0;
RRC_CONFIGURATION_REQ(msg_p).fdd_DownlinkOrTddSubframeBitmapBR_r13[cc_idx] = CALLOC(1, sizeof(BOOLEAN_t));
if (!strcmp(eMTCconfig->fdd_DownlinkOrTddSubframeBitmapBR_r13, "subframePattern40-r13")) { if (!strcmp(eMTCconfig->fdd_DownlinkOrTddSubframeBitmapBR_r13, "subframePattern40-r13")) {
*RRC_CONFIGURATION_REQ(msg_p).fdd_DownlinkOrTddSubframeBitmapBR_r13[cc_idx] = false; *RRCcfg->fdd_DownlinkOrTddSubframeBitmapBR_r13[cc_idx] = false;
RRC_CONFIGURATION_REQ(msg_p).fdd_DownlinkOrTddSubframeBitmapBR_val_r13[cc_idx] = eMTCconfig->fdd_DownlinkOrTddSubframeBitmapBR_val_r13; RRCcfg->fdd_DownlinkOrTddSubframeBitmapBR_val_r13[cc_idx] = eMTCconfig->fdd_DownlinkOrTddSubframeBitmapBR_val_r13;
} else { } else {
*RRC_CONFIGURATION_REQ(msg_p).fdd_DownlinkOrTddSubframeBitmapBR_r13[cc_idx] = true; *RRCcfg->fdd_DownlinkOrTddSubframeBitmapBR_r13[cc_idx] = true;
RRC_CONFIGURATION_REQ(msg_p).fdd_DownlinkOrTddSubframeBitmapBR_val_r13[cc_idx] = eMTCconfig->fdd_DownlinkOrTddSubframeBitmapBR_val_r13; RRCcfg->fdd_DownlinkOrTddSubframeBitmapBR_val_r13[cc_idx] = eMTCconfig->fdd_DownlinkOrTddSubframeBitmapBR_val_r13;
} }
RRC_CONFIGURATION_REQ(msg_p).startSymbolBR_r13[cc_idx] = eMTCconfig->startSymbolBR_r13; RRCcfg->startSymbolBR_r13[cc_idx] = eMTCconfig->startSymbolBR_r13;
if (!strcmp(eMTCconfig->si_HoppingConfigCommon_r13, "off")) { if (!strcmp(eMTCconfig->si_HoppingConfigCommon_r13, "off")) {
RRC_CONFIGURATION_REQ(msg_p).si_HoppingConfigCommon_r13[cc_idx] = 1; RRCcfg->si_HoppingConfigCommon_r13[cc_idx] = 1;
} else if (!strcmp(eMTCconfig->si_HoppingConfigCommon_r13, "on")) { } else if (!strcmp(eMTCconfig->si_HoppingConfigCommon_r13, "on")) {
RRC_CONFIGURATION_REQ(msg_p).si_HoppingConfigCommon_r13[cc_idx] = 0; RRCcfg->si_HoppingConfigCommon_r13[cc_idx] = 0;
} }
RRCcfg->si_ValidityTime_r13[cc_idx] = calloc(1, sizeof(long));
RRC_CONFIGURATION_REQ(msg_p).si_ValidityTime_r13[cc_idx] = calloc(1, sizeof(long));
if (!strcmp(eMTCconfig->si_ValidityTime_r13, "true")) { if (!strcmp(eMTCconfig->si_ValidityTime_r13, "true")) {
*RRC_CONFIGURATION_REQ(msg_p).si_ValidityTime_r13[cc_idx] = 0; *RRCcfg->si_ValidityTime_r13[cc_idx] = 0;
} else { } else {
AssertFatal(0, AssertFatal(0,
"Failed to parse eNB configuration file %s, enb %d si_ValidityTime_r13 unknown value!\n", "Failed to parse eNB configuration file %s, enb %d si_ValidityTime_r13 unknown value!\n",
...@@ -156,107 +148,100 @@ void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, in ...@@ -156,107 +148,100 @@ void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, in
if (!strcmp(eMTCconfig->freqHoppingParametersDL_r13, "ENABLE")) if (!strcmp(eMTCconfig->freqHoppingParametersDL_r13, "ENABLE"))
{ {
RRC_CONFIGURATION_REQ(msg_p).freqHoppingParametersDL_r13[cc_idx] = true; RRCcfg->freqHoppingParametersDL_r13[cc_idx] = true;
if (!strcmp(eMTCconfig->interval_DLHoppingConfigCommonModeA_r13, "interval-TDD-r13")) if (!strcmp(eMTCconfig->interval_DLHoppingConfigCommonModeA_r13, "interval-TDD-r13"))
RRC_CONFIGURATION_REQ(msg_p).interval_DLHoppingConfigCommonModeA_r13[cc_idx] = false; RRCcfg->interval_DLHoppingConfigCommonModeA_r13[cc_idx] = false;
else else
RRC_CONFIGURATION_REQ(msg_p).interval_DLHoppingConfigCommonModeA_r13[cc_idx] = true; RRCcfg->interval_DLHoppingConfigCommonModeA_r13[cc_idx] = true;
RRC_CONFIGURATION_REQ(msg_p).interval_DLHoppingConfigCommonModeA_r13_val[cc_idx] = eMTCconfig->interval_DLHoppingConfigCommonModeA_r13_val; RRCcfg->interval_DLHoppingConfigCommonModeA_r13_val[cc_idx] = eMTCconfig->interval_DLHoppingConfigCommonModeA_r13_val;
if (!strcmp(eMTCconfig->interval_DLHoppingConfigCommonModeB_r13, "interval-TDD-r13")) if (!strcmp(eMTCconfig->interval_DLHoppingConfigCommonModeB_r13, "interval-TDD-r13"))
RRC_CONFIGURATION_REQ(msg_p).interval_DLHoppingConfigCommonModeB_r13[cc_idx] = false; RRCcfg->interval_DLHoppingConfigCommonModeB_r13[cc_idx] = false;
else else
RRC_CONFIGURATION_REQ(msg_p).interval_DLHoppingConfigCommonModeB_r13[cc_idx] = true; RRCcfg->interval_DLHoppingConfigCommonModeB_r13[cc_idx] = true;
RRC_CONFIGURATION_REQ(msg_p).interval_DLHoppingConfigCommonModeB_r13_val[cc_idx] = eMTCconfig->interval_DLHoppingConfigCommonModeB_r13_val; RRCcfg->interval_DLHoppingConfigCommonModeB_r13_val[cc_idx] = eMTCconfig->interval_DLHoppingConfigCommonModeB_r13_val;
RRC_CONFIGURATION_REQ(msg_p).mpdcch_pdsch_HoppingNB_r13[cc_idx] = calloc(1, sizeof(long)); RRCcfg->mpdcch_pdsch_HoppingNB_r13[cc_idx] = calloc(1, sizeof(long));
if (!strcmp(eMTCconfig->mpdcch_pdsch_HoppingNB_r13, "nb2")) { if (!strcmp(eMTCconfig->mpdcch_pdsch_HoppingNB_r13, "nb2")) {
*RRC_CONFIGURATION_REQ(msg_p).mpdcch_pdsch_HoppingNB_r13[cc_idx] = 0; *RRCcfg->mpdcch_pdsch_HoppingNB_r13[cc_idx] = 0;
} else if (!strcmp(eMTCconfig->mpdcch_pdsch_HoppingNB_r13, "nb4")) { } else if (!strcmp(eMTCconfig->mpdcch_pdsch_HoppingNB_r13, "nb4")) {
*RRC_CONFIGURATION_REQ(msg_p).mpdcch_pdsch_HoppingNB_r13[cc_idx] = 1; *RRCcfg->mpdcch_pdsch_HoppingNB_r13[cc_idx] = 1;
} else { } else {
AssertFatal(0, AssertFatal(0,
"Failed to parse eNB configuration file %s, enb %d mpdcch_pdsch_HoppingNB_r13 unknown value!\n", "Failed to parse eNB configuration file %s, enb %d mpdcch_pdsch_HoppingNB_r13 unknown value!\n",
config_fname, cell_idx); config_fname, cell_idx);
} }
RRCcfg->mpdcch_pdsch_HoppingOffset_r13[cc_idx] = calloc(1, sizeof(long));
RRC_CONFIGURATION_REQ(msg_p).mpdcch_pdsch_HoppingOffset_r13[cc_idx] = calloc(1, sizeof(long)); *RRCcfg->mpdcch_pdsch_HoppingOffset_r13[cc_idx] = eMTCconfig->mpdcch_pdsch_HoppingOffset_r13;
*RRC_CONFIGURATION_REQ(msg_p).mpdcch_pdsch_HoppingOffset_r13[cc_idx] = eMTCconfig->mpdcch_pdsch_HoppingOffset_r13;
} }
else else
{ {
RRC_CONFIGURATION_REQ(msg_p).freqHoppingParametersDL_r13[cc_idx] = false; RRCcfg->freqHoppingParametersDL_r13[cc_idx] = false;
} }
/** ------------------------------SIB2/3 BR------------------------------------------ */ /** ------------------------------SIB2/3 BR------------------------------------------ */
RRCcfg->radioresourceconfig_BR[cc_idx].prach_root = eMTCconfig->ccparams.prach_root;
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].prach_root = eMTCconfig->ccparams.prach_root; if ((eMTCconfig->ccparams.prach_root < 0) || (eMTCconfig->ccparams.prach_root > 1023))
AssertFatal(0, "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for prach_root choice: 0..1023 !\n", config_fname, cell_idx, eMTCconfig->ccparams.prach_root);
if ((eMTCconfig->ccparams.prach_root <0) || (eMTCconfig->ccparams.prach_root > 1023)) RRCcfg->radioresourceconfig_BR[cc_idx].prach_config_index = eMTCconfig->ccparams.prach_config_index;
AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for prach_root choice: 0..1023 !\n",
config_fname, cell_idx,eMTCconfig->ccparams.prach_root);
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].prach_config_index = eMTCconfig->ccparams.prach_config_index; if ((eMTCconfig->ccparams.prach_config_index < 0) || (eMTCconfig->ccparams.prach_config_index > 63))
AssertFatal(
if ((eMTCconfig->ccparams.prach_config_index <0) || (eMTCconfig->ccparams.prach_config_index > 63)) 0, "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for prach_config_index choice: 0..1023 !\n", config_fname, cell_idx, eMTCconfig->ccparams.prach_config_index);
AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for prach_config_index choice: 0..1023 !\n",
config_fname, cell_idx,eMTCconfig->ccparams.prach_config_index);
if (!eMTCconfig->ccparams.prach_high_speed) if (!eMTCconfig->ccparams.prach_high_speed)
AssertFatal (0, AssertFatal(0, "Failed to parse eNB configuration file %s, enb %d define %s: ENABLE,DISABLE!\n", config_fname, cell_idx, ENB_CONFIG_STRING_PRACH_HIGH_SPEED);
"Failed to parse eNB configuration file %s, enb %d define %s: ENABLE,DISABLE!\n",
config_fname, cell_idx,ENB_CONFIG_STRING_PRACH_HIGH_SPEED);
else if (strcmp(eMTCconfig->ccparams.prach_high_speed, "ENABLE") == 0) { else if (strcmp(eMTCconfig->ccparams.prach_high_speed, "ENABLE") == 0) {
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].prach_high_speed = true; RRCcfg->radioresourceconfig_BR[cc_idx].prach_high_speed = true;
} else if (strcmp(eMTCconfig->ccparams.prach_high_speed, "DISABLE") == 0) { } else if (strcmp(eMTCconfig->ccparams.prach_high_speed, "DISABLE") == 0) {
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].prach_high_speed = false; RRCcfg->radioresourceconfig_BR[cc_idx].prach_high_speed = false;
} else } else
AssertFatal (0, AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for prach_config choice: ENABLE,DISABLE !\n", "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for prach_config choice: ENABLE,DISABLE !\n",
config_fname, cell_idx,eMTCconfig->ccparams.prach_high_speed); config_fname, cell_idx,eMTCconfig->ccparams.prach_high_speed);
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].prach_zero_correlation = eMTCconfig->ccparams.prach_zero_correlation; RRCcfg->radioresourceconfig_BR[cc_idx].prach_zero_correlation = eMTCconfig->ccparams.prach_zero_correlation;
if ((eMTCconfig->ccparams.prach_zero_correlation <0) || (eMTCconfig->ccparams.prach_zero_correlation > 15)) if ((eMTCconfig->ccparams.prach_zero_correlation <0) || (eMTCconfig->ccparams.prach_zero_correlation > 15))
AssertFatal (0, AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for prach_zero_correlation choice: 0..15!\n", "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for prach_zero_correlation choice: 0..15!\n",
config_fname, cell_idx,eMTCconfig->ccparams.prach_zero_correlation); config_fname, cell_idx,eMTCconfig->ccparams.prach_zero_correlation);
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].prach_freq_offset = eMTCconfig->ccparams.prach_freq_offset; RRCcfg->radioresourceconfig_BR[cc_idx].prach_freq_offset = eMTCconfig->ccparams.prach_freq_offset;
if ((eMTCconfig->ccparams.prach_freq_offset <0) || (eMTCconfig->ccparams.prach_freq_offset > 94)) if ((eMTCconfig->ccparams.prach_freq_offset <0) || (eMTCconfig->ccparams.prach_freq_offset > 94))
AssertFatal (0, AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for prach_freq_offset choice: 0..94!\n", "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for prach_freq_offset choice: 0..94!\n",
config_fname, cell_idx,eMTCconfig->ccparams.prach_freq_offset); config_fname, cell_idx,eMTCconfig->ccparams.prach_freq_offset);
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].pucch_delta_shift = eMTCconfig->ccparams.pucch_delta_shift-1; RRCcfg->radioresourceconfig_BR[cc_idx].pucch_delta_shift = eMTCconfig->ccparams.pucch_delta_shift - 1;
if ((eMTCconfig->ccparams.pucch_delta_shift <1) || (eMTCconfig->ccparams.pucch_delta_shift > 3)) if ((eMTCconfig->ccparams.pucch_delta_shift <1) || (eMTCconfig->ccparams.pucch_delta_shift > 3))
AssertFatal (0, AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for pucch_delta_shift choice: 1..3!\n", "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for pucch_delta_shift choice: 1..3!\n",
config_fname, cell_idx,eMTCconfig->ccparams.pucch_delta_shift); config_fname, cell_idx,eMTCconfig->ccparams.pucch_delta_shift);
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].pucch_nRB_CQI = eMTCconfig->ccparams.pucch_nRB_CQI; RRCcfg->radioresourceconfig_BR[cc_idx].pucch_nRB_CQI = eMTCconfig->ccparams.pucch_nRB_CQI;
if ((eMTCconfig->ccparams.pucch_nRB_CQI <0) || (eMTCconfig->ccparams.pucch_nRB_CQI > 98)) if ((eMTCconfig->ccparams.pucch_nRB_CQI <0) || (eMTCconfig->ccparams.pucch_nRB_CQI > 98))
AssertFatal (0, AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for pucch_nRB_CQI choice: 0..98!\n", "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for pucch_nRB_CQI choice: 0..98!\n",
config_fname, cell_idx,eMTCconfig->ccparams.pucch_nRB_CQI); config_fname, cell_idx,eMTCconfig->ccparams.pucch_nRB_CQI);
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].pucch_nCS_AN = eMTCconfig->ccparams.pucch_nCS_AN; RRCcfg->radioresourceconfig_BR[cc_idx].pucch_nCS_AN = eMTCconfig->ccparams.pucch_nCS_AN;
if ((eMTCconfig->ccparams.pucch_nCS_AN <0) || (eMTCconfig->ccparams.pucch_nCS_AN > 7)) if ((eMTCconfig->ccparams.pucch_nCS_AN <0) || (eMTCconfig->ccparams.pucch_nCS_AN > 7))
AssertFatal (0, AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for pucch_nCS_AN choice: 0..7!\n", "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for pucch_nCS_AN choice: 0..7!\n",
config_fname, cell_idx,eMTCconfig->ccparams.pucch_nCS_AN); config_fname, cell_idx,eMTCconfig->ccparams.pucch_nCS_AN);
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].pucch_n1_AN = eMTCconfig->ccparams.pucch_n1_AN; RRCcfg->radioresourceconfig_BR[cc_idx].pucch_n1_AN = eMTCconfig->ccparams.pucch_n1_AN;
if ((eMTCconfig->ccparams.pucch_n1_AN <0) || (eMTCconfig->ccparams.pucch_n1_AN > 2047)) if ((eMTCconfig->ccparams.pucch_n1_AN <0) || (eMTCconfig->ccparams.pucch_n1_AN > 2047))
AssertFatal (0, AssertFatal (0,
...@@ -264,21 +249,21 @@ void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, in ...@@ -264,21 +249,21 @@ void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, in
config_fname, cell_idx,eMTCconfig->ccparams.pucch_n1_AN); config_fname, cell_idx,eMTCconfig->ccparams.pucch_n1_AN);
//#endif //#endif
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].pdsch_referenceSignalPower = eMTCconfig->ccparams.pdsch_referenceSignalPower; RRCcfg->radioresourceconfig_BR[cc_idx].pdsch_referenceSignalPower = eMTCconfig->ccparams.pdsch_referenceSignalPower;
if ((eMTCconfig->ccparams.pdsch_referenceSignalPower <-60) || (eMTCconfig->ccparams.pdsch_referenceSignalPower > 50)) if ((eMTCconfig->ccparams.pdsch_referenceSignalPower <-60) || (eMTCconfig->ccparams.pdsch_referenceSignalPower > 50))
AssertFatal (0, AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for pdsch_referenceSignalPower choice:-60..50!\n", "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for pdsch_referenceSignalPower choice:-60..50!\n",
config_fname, cell_idx,eMTCconfig->ccparams.pdsch_referenceSignalPower); config_fname, cell_idx,eMTCconfig->ccparams.pdsch_referenceSignalPower);
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].pdsch_p_b = eMTCconfig->ccparams.pdsch_p_b; RRCcfg->radioresourceconfig_BR[cc_idx].pdsch_p_b = eMTCconfig->ccparams.pdsch_p_b;
if ((eMTCconfig->ccparams.pdsch_p_b <0) || (eMTCconfig->ccparams.pdsch_p_b > 3)) if ((eMTCconfig->ccparams.pdsch_p_b <0) || (eMTCconfig->ccparams.pdsch_p_b > 3))
AssertFatal (0, AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for pdsch_p_b choice: 0..3!\n", "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for pdsch_p_b choice: 0..3!\n",
config_fname, cell_idx,eMTCconfig->ccparams.pdsch_p_b); config_fname, cell_idx,eMTCconfig->ccparams.pdsch_p_b);
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].pusch_n_SB = eMTCconfig->ccparams.pusch_n_SB; RRCcfg->radioresourceconfig_BR[cc_idx].pusch_n_SB = eMTCconfig->ccparams.pusch_n_SB;
if ((eMTCconfig->ccparams.pusch_n_SB <1) || (eMTCconfig->ccparams.pusch_n_SB > 4)) if ((eMTCconfig->ccparams.pusch_n_SB <1) || (eMTCconfig->ccparams.pusch_n_SB > 4))
AssertFatal (0, AssertFatal (0,
...@@ -290,15 +275,15 @@ void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, in ...@@ -290,15 +275,15 @@ void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, in
"Failed to parse eNB configuration file %s, enb %d define %s: interSubframe,intraAndInterSubframe!\n", "Failed to parse eNB configuration file %s, enb %d define %s: interSubframe,intraAndInterSubframe!\n",
config_fname, cell_idx,ENB_CONFIG_STRING_PUSCH_HOPPINGMODE); config_fname, cell_idx,ENB_CONFIG_STRING_PUSCH_HOPPINGMODE);
else if (strcmp(eMTCconfig->ccparams.pusch_hoppingMode,"interSubFrame")==0) { else if (strcmp(eMTCconfig->ccparams.pusch_hoppingMode,"interSubFrame")==0) {
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].pusch_hoppingMode = LTE_PUSCH_ConfigCommon__pusch_ConfigBasic__hoppingMode_interSubFrame; RRCcfg->radioresourceconfig_BR[cc_idx].pusch_hoppingMode = LTE_PUSCH_ConfigCommon__pusch_ConfigBasic__hoppingMode_interSubFrame;
} else if (strcmp(eMTCconfig->ccparams.pusch_hoppingMode,"intraAndInterSubFrame")==0) { } else if (strcmp(eMTCconfig->ccparams.pusch_hoppingMode,"intraAndInterSubFrame")==0) {
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].pusch_hoppingMode = LTE_PUSCH_ConfigCommon__pusch_ConfigBasic__hoppingMode_intraAndInterSubFrame; RRCcfg->radioresourceconfig_BR[cc_idx].pusch_hoppingMode = LTE_PUSCH_ConfigCommon__pusch_ConfigBasic__hoppingMode_intraAndInterSubFrame;
} else } else
AssertFatal (0, AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pusch_hoppingMode choice: interSubframe,intraAndInterSubframe!\n", "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pusch_hoppingMode choice: interSubframe,intraAndInterSubframe!\n",
config_fname, cell_idx,eMTCconfig->ccparams.pusch_hoppingMode); config_fname, cell_idx,eMTCconfig->ccparams.pusch_hoppingMode);
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].pusch_hoppingOffset = eMTCconfig->ccparams.pusch_hoppingOffset; RRCcfg->radioresourceconfig_BR[cc_idx].pusch_hoppingOffset = eMTCconfig->ccparams.pusch_hoppingOffset;
if ((eMTCconfig->ccparams.pusch_hoppingOffset<0) || (eMTCconfig->ccparams.pusch_hoppingOffset>98)) if ((eMTCconfig->ccparams.pusch_hoppingOffset<0) || (eMTCconfig->ccparams.pusch_hoppingOffset>98))
AssertFatal (0, AssertFatal (0,
...@@ -310,9 +295,9 @@ void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, in ...@@ -310,9 +295,9 @@ void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, in
"Failed to parse eNB configuration file %s, enb %d define %s: ENABLE,DISABLE!\n", "Failed to parse eNB configuration file %s, enb %d define %s: ENABLE,DISABLE!\n",
config_fname, cell_idx,ENB_CONFIG_STRING_PUSCH_ENABLE64QAM); config_fname, cell_idx,ENB_CONFIG_STRING_PUSCH_ENABLE64QAM);
else if (strcmp(eMTCconfig->ccparams.pusch_enable64QAM, "ENABLE") == 0) { else if (strcmp(eMTCconfig->ccparams.pusch_enable64QAM, "ENABLE") == 0) {
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].pusch_enable64QAM = true; RRCcfg->radioresourceconfig_BR[cc_idx].pusch_enable64QAM = true;
} else if (strcmp(eMTCconfig->ccparams.pusch_enable64QAM, "DISABLE") == 0) { } else if (strcmp(eMTCconfig->ccparams.pusch_enable64QAM, "DISABLE") == 0) {
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].pusch_enable64QAM = false; RRCcfg->radioresourceconfig_BR[cc_idx].pusch_enable64QAM = false;
} else } else
AssertFatal (0, AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pusch_enable64QAM choice: ENABLE,DISABLE!\n", "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pusch_enable64QAM choice: ENABLE,DISABLE!\n",
...@@ -323,15 +308,15 @@ void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, in ...@@ -323,15 +308,15 @@ void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, in
"Failed to parse eNB configuration file %s, enb %d define %s: ENABLE,DISABLE!\n", "Failed to parse eNB configuration file %s, enb %d define %s: ENABLE,DISABLE!\n",
config_fname, cell_idx,ENB_CONFIG_STRING_PUSCH_GROUP_HOPPING_EN); config_fname, cell_idx,ENB_CONFIG_STRING_PUSCH_GROUP_HOPPING_EN);
else if (strcmp(eMTCconfig->ccparams.pusch_groupHoppingEnabled, "ENABLE") == 0) { else if (strcmp(eMTCconfig->ccparams.pusch_groupHoppingEnabled, "ENABLE") == 0) {
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].pusch_groupHoppingEnabled = true; RRCcfg->radioresourceconfig_BR[cc_idx].pusch_groupHoppingEnabled = true;
} else if (strcmp(eMTCconfig->ccparams.pusch_groupHoppingEnabled, "DISABLE") == 0) { } else if (strcmp(eMTCconfig->ccparams.pusch_groupHoppingEnabled, "DISABLE") == 0) {
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].pusch_groupHoppingEnabled= false; RRCcfg->radioresourceconfig_BR[cc_idx].pusch_groupHoppingEnabled = false;
} else } else
AssertFatal (0, AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pusch_groupHoppingEnabled choice: ENABLE,DISABLE!\n", "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pusch_groupHoppingEnabled choice: ENABLE,DISABLE!\n",
config_fname, cell_idx,eMTCconfig->ccparams.pusch_groupHoppingEnabled); config_fname, cell_idx,eMTCconfig->ccparams.pusch_groupHoppingEnabled);
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].pusch_groupAssignment = eMTCconfig->ccparams.pusch_groupAssignment; RRCcfg->radioresourceconfig_BR[cc_idx].pusch_groupAssignment = eMTCconfig->ccparams.pusch_groupAssignment;
if ((eMTCconfig->ccparams.pusch_groupAssignment<0)||(eMTCconfig->ccparams.pusch_groupAssignment>29)) if ((eMTCconfig->ccparams.pusch_groupAssignment<0)||(eMTCconfig->ccparams.pusch_groupAssignment>29))
AssertFatal (0, AssertFatal (0,
...@@ -343,15 +328,15 @@ void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, in ...@@ -343,15 +328,15 @@ void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, in
"Failed to parse eNB configuration file %s, enb %d define %s: ENABLE,DISABLE!\n", "Failed to parse eNB configuration file %s, enb %d define %s: ENABLE,DISABLE!\n",
config_fname, cell_idx,ENB_CONFIG_STRING_PUSCH_SEQUENCE_HOPPING_EN); config_fname, cell_idx,ENB_CONFIG_STRING_PUSCH_SEQUENCE_HOPPING_EN);
else if (strcmp(eMTCconfig->ccparams.pusch_sequenceHoppingEnabled, "ENABLE") == 0) { else if (strcmp(eMTCconfig->ccparams.pusch_sequenceHoppingEnabled, "ENABLE") == 0) {
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].pusch_sequenceHoppingEnabled = true; RRCcfg->radioresourceconfig_BR[cc_idx].pusch_sequenceHoppingEnabled = true;
} else if (strcmp(eMTCconfig->ccparams.pusch_sequenceHoppingEnabled, "DISABLE") == 0) { } else if (strcmp(eMTCconfig->ccparams.pusch_sequenceHoppingEnabled, "DISABLE") == 0) {
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].pusch_sequenceHoppingEnabled = false; RRCcfg->radioresourceconfig_BR[cc_idx].pusch_sequenceHoppingEnabled = false;
} else } else
AssertFatal (0, AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pusch_sequenceHoppingEnabled choice: ENABLE,DISABLE!\n", "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pusch_sequenceHoppingEnabled choice: ENABLE,DISABLE!\n",
config_fname, cell_idx,eMTCconfig->ccparams.pusch_sequenceHoppingEnabled); config_fname, cell_idx,eMTCconfig->ccparams.pusch_sequenceHoppingEnabled);
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].pusch_nDMRS1= eMTCconfig->ccparams.pusch_nDMRS1; //cyclic_shift in RRC! RRCcfg->radioresourceconfig_BR[cc_idx].pusch_nDMRS1 = eMTCconfig->ccparams.pusch_nDMRS1; // cyclic_shift in RRC!
if ((eMTCconfig->ccparams.pusch_nDMRS1 <0) || (eMTCconfig->ccparams.pusch_nDMRS1>7)) if ((eMTCconfig->ccparams.pusch_nDMRS1 <0) || (eMTCconfig->ccparams.pusch_nDMRS1>7))
AssertFatal (0, AssertFatal (0,
...@@ -359,48 +344,50 @@ void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, in ...@@ -359,48 +344,50 @@ void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, in
config_fname, cell_idx,eMTCconfig->ccparams.pusch_nDMRS1); config_fname, cell_idx,eMTCconfig->ccparams.pusch_nDMRS1);
if (strcmp(eMTCconfig->ccparams.phich_duration,"NORMAL")==0) { if (strcmp(eMTCconfig->ccparams.phich_duration,"NORMAL")==0) {
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].phich_duration= LTE_PHICH_Config__phich_Duration_normal; RRCcfg->radioresourceconfig_BR[cc_idx].phich_duration = LTE_PHICH_Config__phich_Duration_normal;
} else if (strcmp(eMTCconfig->ccparams.phich_duration,"EXTENDED")==0) { } else if (strcmp(eMTCconfig->ccparams.phich_duration,"EXTENDED")==0) {
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].phich_duration= LTE_PHICH_Config__phich_Duration_extended; RRCcfg->radioresourceconfig_BR[cc_idx].phich_duration = LTE_PHICH_Config__phich_Duration_extended;
} else } else
AssertFatal (0, AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for phich_duration choice: NORMAL,EXTENDED!\n", "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for phich_duration choice: NORMAL,EXTENDED!\n",
config_fname, cell_idx,eMTCconfig->ccparams.phich_duration); config_fname, cell_idx,eMTCconfig->ccparams.phich_duration);
if (strcmp(eMTCconfig->ccparams.phich_resource,"ONESIXTH")==0) { if (strcmp(eMTCconfig->ccparams.phich_resource,"ONESIXTH")==0) {
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].phich_resource= LTE_PHICH_Config__phich_Resource_oneSixth ; RRCcfg->radioresourceconfig_BR[cc_idx].phich_resource = LTE_PHICH_Config__phich_Resource_oneSixth;
} else if (strcmp(eMTCconfig->ccparams.phich_resource,"HALF")==0) { } else if (strcmp(eMTCconfig->ccparams.phich_resource,"HALF")==0) {
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].phich_resource= LTE_PHICH_Config__phich_Resource_half; RRCcfg->radioresourceconfig_BR[cc_idx].phich_resource = LTE_PHICH_Config__phich_Resource_half;
} else if (strcmp(eMTCconfig->ccparams.phich_resource,"ONE")==0) { } else if (strcmp(eMTCconfig->ccparams.phich_resource,"ONE")==0) {
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].phich_resource= LTE_PHICH_Config__phich_Resource_one; RRCcfg->radioresourceconfig_BR[cc_idx].phich_resource = LTE_PHICH_Config__phich_Resource_one;
} else if (strcmp(eMTCconfig->ccparams.phich_resource,"TWO")==0) { } else if (strcmp(eMTCconfig->ccparams.phich_resource,"TWO")==0) {
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].phich_resource= LTE_PHICH_Config__phich_Resource_two; RRCcfg->radioresourceconfig_BR[cc_idx].phich_resource = LTE_PHICH_Config__phich_Resource_two;
} else } else
AssertFatal (0, AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for phich_resource choice: ONESIXTH,HALF,ONE,TWO!\n", "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for phich_resource choice: ONESIXTH,HALF,ONE,TWO!\n",
config_fname, cell_idx,eMTCconfig->ccparams.phich_resource); config_fname, cell_idx,eMTCconfig->ccparams.phich_resource);
printf("phich.resource eMTC %ld (%s), phich.duration eMTC %ld (%s)\n", printf("phich.resource eMTC %ld (%s), phich.duration eMTC %ld (%s)\n",
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].phich_resource,eMTCconfig->ccparams.phich_resource, RRCcfg->radioresourceconfig_BR[cc_idx].phich_resource,
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].phich_duration,eMTCconfig->ccparams.phich_duration); eMTCconfig->ccparams.phich_resource,
RRCcfg->radioresourceconfig_BR[cc_idx].phich_duration,
eMTCconfig->ccparams.phich_duration);
if (strcmp(eMTCconfig->ccparams.srs_enable, "ENABLE") == 0) { if (strcmp(eMTCconfig->ccparams.srs_enable, "ENABLE") == 0) {
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].srs_enable= true; RRCcfg->radioresourceconfig_BR[cc_idx].srs_enable = true;
} else if (strcmp(eMTCconfig->ccparams.srs_enable, "DISABLE") == 0) { } else if (strcmp(eMTCconfig->ccparams.srs_enable, "DISABLE") == 0) {
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].srs_enable= false; RRCcfg->radioresourceconfig_BR[cc_idx].srs_enable = false;
} else } else
AssertFatal (0, AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for srs_BandwidthConfig choice: ENABLE,DISABLE !\n", "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for srs_BandwidthConfig choice: ENABLE,DISABLE !\n",
config_fname, cell_idx,eMTCconfig->ccparams.srs_enable); config_fname, cell_idx,eMTCconfig->ccparams.srs_enable);
if (RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].srs_enable== true) { if (RRCcfg->radioresourceconfig_BR[cc_idx].srs_enable == true) {
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].srs_BandwidthConfig= eMTCconfig->ccparams.srs_BandwidthConfig; RRCcfg->radioresourceconfig_BR[cc_idx].srs_BandwidthConfig = eMTCconfig->ccparams.srs_BandwidthConfig;
if ((eMTCconfig->ccparams.srs_BandwidthConfig < 0) || (eMTCconfig->ccparams.srs_BandwidthConfig >7)) if ((eMTCconfig->ccparams.srs_BandwidthConfig < 0) || (eMTCconfig->ccparams.srs_BandwidthConfig >7))
AssertFatal (0, "Failed to parse eNB configuration file %s, enb %d unknown value %d for srs_BandwidthConfig choice: 0...7\n", AssertFatal (0, "Failed to parse eNB configuration file %s, enb %d unknown value %d for srs_BandwidthConfig choice: 0...7\n",
config_fname, cell_idx,eMTCconfig->ccparams.srs_BandwidthConfig); config_fname, cell_idx,eMTCconfig->ccparams.srs_BandwidthConfig);
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].srs_SubframeConfig= eMTCconfig->ccparams.srs_SubframeConfig; RRCcfg->radioresourceconfig_BR[cc_idx].srs_SubframeConfig = eMTCconfig->ccparams.srs_SubframeConfig;
if ((eMTCconfig->ccparams.srs_SubframeConfig<0) || (eMTCconfig->ccparams.srs_SubframeConfig>15)) if ((eMTCconfig->ccparams.srs_SubframeConfig<0) || (eMTCconfig->ccparams.srs_SubframeConfig>15))
AssertFatal (0, AssertFatal (0,
...@@ -408,25 +395,25 @@ void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, in ...@@ -408,25 +395,25 @@ void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, in
config_fname, cell_idx,eMTCconfig->ccparams.srs_SubframeConfig); config_fname, cell_idx,eMTCconfig->ccparams.srs_SubframeConfig);
if (strcmp(eMTCconfig->ccparams.srs_ackNackST, "ENABLE") == 0) { if (strcmp(eMTCconfig->ccparams.srs_ackNackST, "ENABLE") == 0) {
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].srs_ackNackST= true; RRCcfg->radioresourceconfig_BR[cc_idx].srs_ackNackST = true;
} else if (strcmp(eMTCconfig->ccparams.srs_ackNackST, "DISABLE") == 0) { } else if (strcmp(eMTCconfig->ccparams.srs_ackNackST, "DISABLE") == 0) {
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].srs_ackNackST= false; RRCcfg->radioresourceconfig_BR[cc_idx].srs_ackNackST = false;
} else } else
AssertFatal (0, AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for srs_BandwidthConfig choice: ENABLE,DISABLE !\n", "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for srs_BandwidthConfig choice: ENABLE,DISABLE !\n",
config_fname, cell_idx,eMTCconfig->ccparams.srs_ackNackST); config_fname, cell_idx,eMTCconfig->ccparams.srs_ackNackST);
if (strcmp(eMTCconfig->ccparams.srs_MaxUpPts, "ENABLE") == 0) { if (strcmp(eMTCconfig->ccparams.srs_MaxUpPts, "ENABLE") == 0) {
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].srs_MaxUpPts= true; RRCcfg->radioresourceconfig_BR[cc_idx].srs_MaxUpPts = true;
} else if (strcmp(eMTCconfig->ccparams.srs_MaxUpPts, "DISABLE") == 0) { } else if (strcmp(eMTCconfig->ccparams.srs_MaxUpPts, "DISABLE") == 0) {
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].srs_MaxUpPts= false; RRCcfg->radioresourceconfig_BR[cc_idx].srs_MaxUpPts = false;
} else } else
AssertFatal (0, AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for srs_MaxUpPts choice: ENABLE,DISABLE !\n", "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for srs_MaxUpPts choice: ENABLE,DISABLE !\n",
config_fname, cell_idx,eMTCconfig->ccparams.srs_MaxUpPts); config_fname, cell_idx,eMTCconfig->ccparams.srs_MaxUpPts);
} }
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].pusch_p0_Nominal= eMTCconfig->ccparams.pusch_p0_Nominal; RRCcfg->radioresourceconfig_BR[cc_idx].pusch_p0_Nominal = eMTCconfig->ccparams.pusch_p0_Nominal;
if ((eMTCconfig->ccparams.pusch_p0_Nominal<-126) || (eMTCconfig->ccparams.pusch_p0_Nominal>24)) if ((eMTCconfig->ccparams.pusch_p0_Nominal<-126) || (eMTCconfig->ccparams.pusch_p0_Nominal>24))
AssertFatal (0, AssertFatal (0,
...@@ -434,21 +421,21 @@ void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, in ...@@ -434,21 +421,21 @@ void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, in
config_fname, cell_idx,eMTCconfig->ccparams.pusch_p0_Nominal); config_fname, cell_idx,eMTCconfig->ccparams.pusch_p0_Nominal);
if (strcmp(eMTCconfig->ccparams.pusch_alpha,"AL0")==0) { if (strcmp(eMTCconfig->ccparams.pusch_alpha,"AL0")==0) {
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].pusch_alpha= LTE_Alpha_r12_al0; RRCcfg->radioresourceconfig_BR[cc_idx].pusch_alpha = LTE_Alpha_r12_al0;
} else if (strcmp(eMTCconfig->ccparams.pusch_alpha,"AL04")==0) { } else if (strcmp(eMTCconfig->ccparams.pusch_alpha,"AL04")==0) {
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].pusch_alpha= LTE_Alpha_r12_al04; RRCcfg->radioresourceconfig_BR[cc_idx].pusch_alpha = LTE_Alpha_r12_al04;
} else if (strcmp(eMTCconfig->ccparams.pusch_alpha,"AL05")==0) { } else if (strcmp(eMTCconfig->ccparams.pusch_alpha,"AL05")==0) {
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].pusch_alpha= LTE_Alpha_r12_al05; RRCcfg->radioresourceconfig_BR[cc_idx].pusch_alpha = LTE_Alpha_r12_al05;
} else if (strcmp(eMTCconfig->ccparams.pusch_alpha,"AL06")==0) { } else if (strcmp(eMTCconfig->ccparams.pusch_alpha,"AL06")==0) {
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].pusch_alpha= LTE_Alpha_r12_al06; RRCcfg->radioresourceconfig_BR[cc_idx].pusch_alpha = LTE_Alpha_r12_al06;
} else if (strcmp(eMTCconfig->ccparams.pusch_alpha,"AL07")==0) { } else if (strcmp(eMTCconfig->ccparams.pusch_alpha,"AL07")==0) {
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].pusch_alpha= LTE_Alpha_r12_al07; RRCcfg->radioresourceconfig_BR[cc_idx].pusch_alpha = LTE_Alpha_r12_al07;
} else if (strcmp(eMTCconfig->ccparams.pusch_alpha,"AL08")==0) { } else if (strcmp(eMTCconfig->ccparams.pusch_alpha,"AL08")==0) {
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].pusch_alpha= LTE_Alpha_r12_al08; RRCcfg->radioresourceconfig_BR[cc_idx].pusch_alpha = LTE_Alpha_r12_al08;
} else if (strcmp(eMTCconfig->ccparams.pusch_alpha,"AL09")==0) { } else if (strcmp(eMTCconfig->ccparams.pusch_alpha,"AL09")==0) {
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].pusch_alpha= LTE_Alpha_r12_al09; RRCcfg->radioresourceconfig_BR[cc_idx].pusch_alpha = LTE_Alpha_r12_al09;
} else if (strcmp(eMTCconfig->ccparams.pusch_alpha,"AL1")==0) { } else if (strcmp(eMTCconfig->ccparams.pusch_alpha,"AL1")==0) {
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].pusch_alpha= LTE_Alpha_r12_al1; RRCcfg->radioresourceconfig_BR[cc_idx].pusch_alpha = LTE_Alpha_r12_al1;
} }
else else
...@@ -456,14 +443,14 @@ void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, in ...@@ -456,14 +443,14 @@ void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, in
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pucch_Alpha choice: AL0,AL04,AL05,AL06,AL07,AL08,AL09,AL1!\n", "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pucch_Alpha choice: AL0,AL04,AL05,AL06,AL07,AL08,AL09,AL1!\n",
config_fname, cell_idx,eMTCconfig->ccparams.pusch_alpha); config_fname, cell_idx,eMTCconfig->ccparams.pusch_alpha);
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].pucch_p0_Nominal= eMTCconfig->ccparams.pucch_p0_Nominal; RRCcfg->radioresourceconfig_BR[cc_idx].pucch_p0_Nominal = eMTCconfig->ccparams.pucch_p0_Nominal;
if ((eMTCconfig->ccparams.pucch_p0_Nominal<-127) || (eMTCconfig->ccparams.pucch_p0_Nominal>-96)) if ((eMTCconfig->ccparams.pucch_p0_Nominal<-127) || (eMTCconfig->ccparams.pucch_p0_Nominal>-96))
AssertFatal (0, AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for pucch_p0_Nominal choice: -127..-96 !\n", "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for pucch_p0_Nominal choice: -127..-96 !\n",
config_fname, cell_idx,eMTCconfig->ccparams.pucch_p0_Nominal); config_fname, cell_idx,eMTCconfig->ccparams.pucch_p0_Nominal);
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].msg3_delta_Preamble= eMTCconfig->ccparams.msg3_delta_Preamble; RRCcfg->radioresourceconfig_BR[cc_idx].msg3_delta_Preamble = eMTCconfig->ccparams.msg3_delta_Preamble;
if ((eMTCconfig->ccparams.msg3_delta_Preamble<-1) || (eMTCconfig->ccparams.msg3_delta_Preamble>6)) if ((eMTCconfig->ccparams.msg3_delta_Preamble<-1) || (eMTCconfig->ccparams.msg3_delta_Preamble>6))
AssertFatal (0, AssertFatal (0,
...@@ -471,63 +458,63 @@ void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, in ...@@ -471,63 +458,63 @@ void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, in
config_fname, cell_idx,eMTCconfig->ccparams.msg3_delta_Preamble); config_fname, cell_idx,eMTCconfig->ccparams.msg3_delta_Preamble);
if (strcmp(eMTCconfig->ccparams.pucch_deltaF_Format1,"deltaF_2")==0) { if (strcmp(eMTCconfig->ccparams.pucch_deltaF_Format1,"deltaF_2")==0) {
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].pucch_deltaF_Format1= LTE_DeltaFList_PUCCH__deltaF_PUCCH_Format1_deltaF_2; RRCcfg->radioresourceconfig_BR[cc_idx].pucch_deltaF_Format1 = LTE_DeltaFList_PUCCH__deltaF_PUCCH_Format1_deltaF_2;
} else if (strcmp(eMTCconfig->ccparams.pucch_deltaF_Format1,"deltaF0")==0) { } else if (strcmp(eMTCconfig->ccparams.pucch_deltaF_Format1,"deltaF0")==0) {
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].pucch_deltaF_Format1= LTE_DeltaFList_PUCCH__deltaF_PUCCH_Format1_deltaF0; RRCcfg->radioresourceconfig_BR[cc_idx].pucch_deltaF_Format1 = LTE_DeltaFList_PUCCH__deltaF_PUCCH_Format1_deltaF0;
} else if (strcmp(eMTCconfig->ccparams.pucch_deltaF_Format1,"deltaF2")==0) { } else if (strcmp(eMTCconfig->ccparams.pucch_deltaF_Format1,"deltaF2")==0) {
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].pucch_deltaF_Format1= LTE_DeltaFList_PUCCH__deltaF_PUCCH_Format1_deltaF2; RRCcfg->radioresourceconfig_BR[cc_idx].pucch_deltaF_Format1 = LTE_DeltaFList_PUCCH__deltaF_PUCCH_Format1_deltaF2;
} else } else
AssertFatal (0, AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pucch_deltaF_Format1 choice: deltaF_2,dltaF0,deltaF2!\n", "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pucch_deltaF_Format1 choice: deltaF_2,dltaF0,deltaF2!\n",
config_fname, cell_idx,eMTCconfig->ccparams.pucch_deltaF_Format1); config_fname, cell_idx,eMTCconfig->ccparams.pucch_deltaF_Format1);
if (strcmp(eMTCconfig->ccparams.pucch_deltaF_Format1b,"deltaF1")==0) { if (strcmp(eMTCconfig->ccparams.pucch_deltaF_Format1b,"deltaF1")==0) {
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].pucch_deltaF_Format1b= LTE_DeltaFList_PUCCH__deltaF_PUCCH_Format1b_deltaF1; RRCcfg->radioresourceconfig_BR[cc_idx].pucch_deltaF_Format1b = LTE_DeltaFList_PUCCH__deltaF_PUCCH_Format1b_deltaF1;
} else if (strcmp(eMTCconfig->ccparams.pucch_deltaF_Format1b,"deltaF3")==0) { } else if (strcmp(eMTCconfig->ccparams.pucch_deltaF_Format1b,"deltaF3")==0) {
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].pucch_deltaF_Format1b= LTE_DeltaFList_PUCCH__deltaF_PUCCH_Format1b_deltaF3; RRCcfg->radioresourceconfig_BR[cc_idx].pucch_deltaF_Format1b = LTE_DeltaFList_PUCCH__deltaF_PUCCH_Format1b_deltaF3;
} else if (strcmp(eMTCconfig->ccparams.pucch_deltaF_Format1b,"deltaF5")==0) { } else if (strcmp(eMTCconfig->ccparams.pucch_deltaF_Format1b,"deltaF5")==0) {
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].pucch_deltaF_Format1b= LTE_DeltaFList_PUCCH__deltaF_PUCCH_Format1b_deltaF5; RRCcfg->radioresourceconfig_BR[cc_idx].pucch_deltaF_Format1b = LTE_DeltaFList_PUCCH__deltaF_PUCCH_Format1b_deltaF5;
} else } else
AssertFatal (0, AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pucch_deltaF_Format1b choice: deltaF1,dltaF3,deltaF5!\n", "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pucch_deltaF_Format1b choice: deltaF1,dltaF3,deltaF5!\n",
config_fname, cell_idx,eMTCconfig->ccparams.pucch_deltaF_Format1b); config_fname, cell_idx,eMTCconfig->ccparams.pucch_deltaF_Format1b);
if (strcmp(eMTCconfig->ccparams.pucch_deltaF_Format2,"deltaF_2")==0) { if (strcmp(eMTCconfig->ccparams.pucch_deltaF_Format2,"deltaF_2")==0) {
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].pucch_deltaF_Format2= LTE_DeltaFList_PUCCH__deltaF_PUCCH_Format2_deltaF_2; RRCcfg->radioresourceconfig_BR[cc_idx].pucch_deltaF_Format2 = LTE_DeltaFList_PUCCH__deltaF_PUCCH_Format2_deltaF_2;
} else if (strcmp(eMTCconfig->ccparams.pucch_deltaF_Format2,"deltaF0")==0) { } else if (strcmp(eMTCconfig->ccparams.pucch_deltaF_Format2,"deltaF0")==0) {
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].pucch_deltaF_Format2= LTE_DeltaFList_PUCCH__deltaF_PUCCH_Format2_deltaF0; RRCcfg->radioresourceconfig_BR[cc_idx].pucch_deltaF_Format2 = LTE_DeltaFList_PUCCH__deltaF_PUCCH_Format2_deltaF0;
} else if (strcmp(eMTCconfig->ccparams.pucch_deltaF_Format2,"deltaF1")==0) { } else if (strcmp(eMTCconfig->ccparams.pucch_deltaF_Format2,"deltaF1")==0) {
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].pucch_deltaF_Format2= LTE_DeltaFList_PUCCH__deltaF_PUCCH_Format2_deltaF1; RRCcfg->radioresourceconfig_BR[cc_idx].pucch_deltaF_Format2 = LTE_DeltaFList_PUCCH__deltaF_PUCCH_Format2_deltaF1;
} else if (strcmp(eMTCconfig->ccparams.pucch_deltaF_Format2,"deltaF2")==0) { } else if (strcmp(eMTCconfig->ccparams.pucch_deltaF_Format2,"deltaF2")==0) {
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].pucch_deltaF_Format2= LTE_DeltaFList_PUCCH__deltaF_PUCCH_Format2_deltaF2; RRCcfg->radioresourceconfig_BR[cc_idx].pucch_deltaF_Format2 = LTE_DeltaFList_PUCCH__deltaF_PUCCH_Format2_deltaF2;
} else } else
AssertFatal (0, AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pucch_deltaF_Format2 choice: deltaF_2,dltaF0,deltaF1,deltaF2!\n", "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pucch_deltaF_Format2 choice: deltaF_2,dltaF0,deltaF1,deltaF2!\n",
config_fname, cell_idx,eMTCconfig->ccparams.pucch_deltaF_Format2); config_fname, cell_idx,eMTCconfig->ccparams.pucch_deltaF_Format2);
if (strcmp(eMTCconfig->ccparams.pucch_deltaF_Format2a,"deltaF_2")==0) { if (strcmp(eMTCconfig->ccparams.pucch_deltaF_Format2a,"deltaF_2")==0) {
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].pucch_deltaF_Format2a= LTE_DeltaFList_PUCCH__deltaF_PUCCH_Format2a_deltaF_2; RRCcfg->radioresourceconfig_BR[cc_idx].pucch_deltaF_Format2a = LTE_DeltaFList_PUCCH__deltaF_PUCCH_Format2a_deltaF_2;
} else if (strcmp(eMTCconfig->ccparams.pucch_deltaF_Format2a,"deltaF0")==0) { } else if (strcmp(eMTCconfig->ccparams.pucch_deltaF_Format2a,"deltaF0")==0) {
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].pucch_deltaF_Format2a= LTE_DeltaFList_PUCCH__deltaF_PUCCH_Format2a_deltaF0; RRCcfg->radioresourceconfig_BR[cc_idx].pucch_deltaF_Format2a = LTE_DeltaFList_PUCCH__deltaF_PUCCH_Format2a_deltaF0;
} else if (strcmp(eMTCconfig->ccparams.pucch_deltaF_Format2a,"deltaF2")==0) { } else if (strcmp(eMTCconfig->ccparams.pucch_deltaF_Format2a,"deltaF2")==0) {
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].pucch_deltaF_Format2a= LTE_DeltaFList_PUCCH__deltaF_PUCCH_Format2a_deltaF2; RRCcfg->radioresourceconfig_BR[cc_idx].pucch_deltaF_Format2a = LTE_DeltaFList_PUCCH__deltaF_PUCCH_Format2a_deltaF2;
} else } else
AssertFatal (0, AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pucch_deltaF_Format2a choice: deltaF_2,dltaF0,deltaF2!\n", "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pucch_deltaF_Format2a choice: deltaF_2,dltaF0,deltaF2!\n",
config_fname, cell_idx,eMTCconfig->ccparams.pucch_deltaF_Format2a); config_fname, cell_idx,eMTCconfig->ccparams.pucch_deltaF_Format2a);
if (strcmp(eMTCconfig->ccparams.pucch_deltaF_Format2b,"deltaF_2")==0) { if (strcmp(eMTCconfig->ccparams.pucch_deltaF_Format2b,"deltaF_2")==0) {
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].pucch_deltaF_Format2b= LTE_DeltaFList_PUCCH__deltaF_PUCCH_Format2b_deltaF_2; RRCcfg->radioresourceconfig_BR[cc_idx].pucch_deltaF_Format2b = LTE_DeltaFList_PUCCH__deltaF_PUCCH_Format2b_deltaF_2;
} else if (strcmp(eMTCconfig->ccparams.pucch_deltaF_Format2b,"deltaF0")==0) { } else if (strcmp(eMTCconfig->ccparams.pucch_deltaF_Format2b,"deltaF0")==0) {
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].pucch_deltaF_Format2b= LTE_DeltaFList_PUCCH__deltaF_PUCCH_Format2b_deltaF0; RRCcfg->radioresourceconfig_BR[cc_idx].pucch_deltaF_Format2b = LTE_DeltaFList_PUCCH__deltaF_PUCCH_Format2b_deltaF0;
} else if (strcmp(eMTCconfig->ccparams.pucch_deltaF_Format2b,"deltaF2")==0) { } else if (strcmp(eMTCconfig->ccparams.pucch_deltaF_Format2b,"deltaF2")==0) {
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].pucch_deltaF_Format2b= LTE_DeltaFList_PUCCH__deltaF_PUCCH_Format2b_deltaF2; RRCcfg->radioresourceconfig_BR[cc_idx].pucch_deltaF_Format2b = LTE_DeltaFList_PUCCH__deltaF_PUCCH_Format2b_deltaF2;
} else } else
AssertFatal (0, AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pucch_deltaF_Format2b choice: deltaF_2,dltaF0,deltaF2!\n", "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pucch_deltaF_Format2b choice: deltaF_2,dltaF0,deltaF2!\n",
config_fname, cell_idx,eMTCconfig->ccparams.pucch_deltaF_Format2b); config_fname, cell_idx,eMTCconfig->ccparams.pucch_deltaF_Format2b);
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].rach_numberOfRA_Preambles= (eMTCconfig->ccparams.rach_numberOfRA_Preambles/4)-1; RRCcfg->radioresourceconfig_BR[cc_idx].rach_numberOfRA_Preambles = (eMTCconfig->ccparams.rach_numberOfRA_Preambles / 4) - 1;
if ((eMTCconfig->ccparams.rach_numberOfRA_Preambles <4) || (eMTCconfig->ccparams.rach_numberOfRA_Preambles >64) || ((eMTCconfig->ccparams.rach_numberOfRA_Preambles&3)!=0)) if ((eMTCconfig->ccparams.rach_numberOfRA_Preambles <4) || (eMTCconfig->ccparams.rach_numberOfRA_Preambles >64) || ((eMTCconfig->ccparams.rach_numberOfRA_Preambles&3)!=0))
AssertFatal (0, AssertFatal (0,
...@@ -535,8 +522,8 @@ void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, in ...@@ -535,8 +522,8 @@ void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, in
config_fname, cell_idx,eMTCconfig->ccparams.rach_numberOfRA_Preambles); config_fname, cell_idx,eMTCconfig->ccparams.rach_numberOfRA_Preambles);
if (strcmp(eMTCconfig->ccparams.rach_preamblesGroupAConfig, "ENABLE") == 0) { if (strcmp(eMTCconfig->ccparams.rach_preamblesGroupAConfig, "ENABLE") == 0) {
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].rach_preamblesGroupAConfig= true; RRCcfg->radioresourceconfig_BR[cc_idx].rach_preamblesGroupAConfig = true;
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].rach_sizeOfRA_PreamblesGroupA= (eMTCconfig->ccparams.rach_sizeOfRA_PreamblesGroupA/4)-1; RRCcfg->radioresourceconfig_BR[cc_idx].rach_sizeOfRA_PreamblesGroupA = (eMTCconfig->ccparams.rach_sizeOfRA_PreamblesGroupA / 4) - 1;
if ((eMTCconfig->ccparams.rach_numberOfRA_Preambles <4) || (eMTCconfig->ccparams.rach_numberOfRA_Preambles>60) || ((eMTCconfig->ccparams.rach_numberOfRA_Preambles&3)!=0)) if ((eMTCconfig->ccparams.rach_numberOfRA_Preambles <4) || (eMTCconfig->ccparams.rach_numberOfRA_Preambles>60) || ((eMTCconfig->ccparams.rach_numberOfRA_Preambles&3)!=0))
AssertFatal (0, AssertFatal (0,
...@@ -545,19 +532,19 @@ void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, in ...@@ -545,19 +532,19 @@ void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, in
switch (eMTCconfig->ccparams.rach_messageSizeGroupA) { switch (eMTCconfig->ccparams.rach_messageSizeGroupA) {
case 56: case 56:
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].rach_messageSizeGroupA= LTE_RACH_ConfigCommon__preambleInfo__preamblesGroupAConfig__messageSizeGroupA_b56; RRCcfg->radioresourceconfig_BR[cc_idx].rach_messageSizeGroupA = LTE_RACH_ConfigCommon__preambleInfo__preamblesGroupAConfig__messageSizeGroupA_b56;
break; break;
case 144: case 144:
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].rach_messageSizeGroupA= LTE_RACH_ConfigCommon__preambleInfo__preamblesGroupAConfig__messageSizeGroupA_b144; RRCcfg->radioresourceconfig_BR[cc_idx].rach_messageSizeGroupA = LTE_RACH_ConfigCommon__preambleInfo__preamblesGroupAConfig__messageSizeGroupA_b144;
break; break;
case 208: case 208:
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].rach_messageSizeGroupA= LTE_RACH_ConfigCommon__preambleInfo__preamblesGroupAConfig__messageSizeGroupA_b208; RRCcfg->radioresourceconfig_BR[cc_idx].rach_messageSizeGroupA = LTE_RACH_ConfigCommon__preambleInfo__preamblesGroupAConfig__messageSizeGroupA_b208;
break; break;
case 256: case 256:
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].rach_messageSizeGroupA= LTE_RACH_ConfigCommon__preambleInfo__preamblesGroupAConfig__messageSizeGroupA_b256; RRCcfg->radioresourceconfig_BR[cc_idx].rach_messageSizeGroupA = LTE_RACH_ConfigCommon__preambleInfo__preamblesGroupAConfig__messageSizeGroupA_b256;
break; break;
default: default:
...@@ -568,40 +555,40 @@ void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, in ...@@ -568,40 +555,40 @@ void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, in
} }
if (strcmp(eMTCconfig->ccparams.rach_messagePowerOffsetGroupB,"minusinfinity")==0) { if (strcmp(eMTCconfig->ccparams.rach_messagePowerOffsetGroupB,"minusinfinity")==0) {
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].rach_messagePowerOffsetGroupB= LTE_RACH_ConfigCommon__preambleInfo__preamblesGroupAConfig__messagePowerOffsetGroupB_minusinfinity; RRCcfg->radioresourceconfig_BR[cc_idx].rach_messagePowerOffsetGroupB = LTE_RACH_ConfigCommon__preambleInfo__preamblesGroupAConfig__messagePowerOffsetGroupB_minusinfinity;
} else if (strcmp(eMTCconfig->ccparams.rach_messagePowerOffsetGroupB,"dB0")==0) { } else if (strcmp(eMTCconfig->ccparams.rach_messagePowerOffsetGroupB,"dB0")==0) {
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].rach_messagePowerOffsetGroupB= LTE_RACH_ConfigCommon__preambleInfo__preamblesGroupAConfig__messagePowerOffsetGroupB_dB0; RRCcfg->radioresourceconfig_BR[cc_idx].rach_messagePowerOffsetGroupB = LTE_RACH_ConfigCommon__preambleInfo__preamblesGroupAConfig__messagePowerOffsetGroupB_dB0;
} else if (strcmp(eMTCconfig->ccparams.rach_messagePowerOffsetGroupB,"dB5")==0) { } else if (strcmp(eMTCconfig->ccparams.rach_messagePowerOffsetGroupB,"dB5")==0) {
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].rach_messagePowerOffsetGroupB= LTE_RACH_ConfigCommon__preambleInfo__preamblesGroupAConfig__messagePowerOffsetGroupB_dB5; RRCcfg->radioresourceconfig_BR[cc_idx].rach_messagePowerOffsetGroupB = LTE_RACH_ConfigCommon__preambleInfo__preamblesGroupAConfig__messagePowerOffsetGroupB_dB5;
} else if (strcmp(eMTCconfig->ccparams.rach_messagePowerOffsetGroupB,"dB8")==0) { } else if (strcmp(eMTCconfig->ccparams.rach_messagePowerOffsetGroupB,"dB8")==0) {
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].rach_messagePowerOffsetGroupB= LTE_RACH_ConfigCommon__preambleInfo__preamblesGroupAConfig__messagePowerOffsetGroupB_dB8; RRCcfg->radioresourceconfig_BR[cc_idx].rach_messagePowerOffsetGroupB = LTE_RACH_ConfigCommon__preambleInfo__preamblesGroupAConfig__messagePowerOffsetGroupB_dB8;
} else if (strcmp(eMTCconfig->ccparams.rach_messagePowerOffsetGroupB,"dB10")==0) { } else if (strcmp(eMTCconfig->ccparams.rach_messagePowerOffsetGroupB,"dB10")==0) {
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].rach_messagePowerOffsetGroupB= LTE_RACH_ConfigCommon__preambleInfo__preamblesGroupAConfig__messagePowerOffsetGroupB_dB10; RRCcfg->radioresourceconfig_BR[cc_idx].rach_messagePowerOffsetGroupB = LTE_RACH_ConfigCommon__preambleInfo__preamblesGroupAConfig__messagePowerOffsetGroupB_dB10;
} else if (strcmp(eMTCconfig->ccparams.rach_messagePowerOffsetGroupB,"dB12")==0) { } else if (strcmp(eMTCconfig->ccparams.rach_messagePowerOffsetGroupB,"dB12")==0) {
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].rach_messagePowerOffsetGroupB= LTE_RACH_ConfigCommon__preambleInfo__preamblesGroupAConfig__messagePowerOffsetGroupB_dB12; RRCcfg->radioresourceconfig_BR[cc_idx].rach_messagePowerOffsetGroupB = LTE_RACH_ConfigCommon__preambleInfo__preamblesGroupAConfig__messagePowerOffsetGroupB_dB12;
} else if (strcmp(eMTCconfig->ccparams.rach_messagePowerOffsetGroupB,"dB15")==0) { } else if (strcmp(eMTCconfig->ccparams.rach_messagePowerOffsetGroupB,"dB15")==0) {
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].rach_messagePowerOffsetGroupB= LTE_RACH_ConfigCommon__preambleInfo__preamblesGroupAConfig__messagePowerOffsetGroupB_dB15; RRCcfg->radioresourceconfig_BR[cc_idx].rach_messagePowerOffsetGroupB = LTE_RACH_ConfigCommon__preambleInfo__preamblesGroupAConfig__messagePowerOffsetGroupB_dB15;
} else if (strcmp(eMTCconfig->ccparams.rach_messagePowerOffsetGroupB,"dB18")==0) { } else if (strcmp(eMTCconfig->ccparams.rach_messagePowerOffsetGroupB,"dB18")==0) {
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].rach_messagePowerOffsetGroupB= LTE_RACH_ConfigCommon__preambleInfo__preamblesGroupAConfig__messagePowerOffsetGroupB_dB18; RRCcfg->radioresourceconfig_BR[cc_idx].rach_messagePowerOffsetGroupB = LTE_RACH_ConfigCommon__preambleInfo__preamblesGroupAConfig__messagePowerOffsetGroupB_dB18;
} else } else
AssertFatal (0, AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for rach_messagePowerOffsetGroupB choice: minusinfinity,dB0,dB5,dB8,dB10,dB12,dB15,dB18!\n", "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for rach_messagePowerOffsetGroupB choice: minusinfinity,dB0,dB5,dB8,dB10,dB12,dB15,dB18!\n",
config_fname, cell_idx,eMTCconfig->ccparams.rach_messagePowerOffsetGroupB); config_fname, cell_idx,eMTCconfig->ccparams.rach_messagePowerOffsetGroupB);
} else if (strcmp(eMTCconfig->ccparams.rach_preamblesGroupAConfig, "DISABLE") == 0) { } else if (strcmp(eMTCconfig->ccparams.rach_preamblesGroupAConfig, "DISABLE") == 0) {
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].rach_preamblesGroupAConfig= false; RRCcfg->radioresourceconfig_BR[cc_idx].rach_preamblesGroupAConfig = false;
} else } else
AssertFatal (0, AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for rach_preamblesGroupAConfig choice: ENABLE,DISABLE !\n", "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for rach_preamblesGroupAConfig choice: ENABLE,DISABLE !\n",
config_fname, cell_idx,eMTCconfig->ccparams.rach_preamblesGroupAConfig); config_fname, cell_idx,eMTCconfig->ccparams.rach_preamblesGroupAConfig);
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].rach_preambleInitialReceivedTargetPower= (eMTCconfig->ccparams.rach_preambleInitialReceivedTargetPower+120)/2; RRCcfg->radioresourceconfig_BR[cc_idx].rach_preambleInitialReceivedTargetPower = (eMTCconfig->ccparams.rach_preambleInitialReceivedTargetPower + 120) / 2;
if ((eMTCconfig->ccparams.rach_preambleInitialReceivedTargetPower<-120) || (eMTCconfig->ccparams.rach_preambleInitialReceivedTargetPower>-90) || ((eMTCconfig->ccparams.rach_preambleInitialReceivedTargetPower&1)!=0)) if ((eMTCconfig->ccparams.rach_preambleInitialReceivedTargetPower<-120) || (eMTCconfig->ccparams.rach_preambleInitialReceivedTargetPower>-90) || ((eMTCconfig->ccparams.rach_preambleInitialReceivedTargetPower&1)!=0))
AssertFatal (0, AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for rach_preambleInitialReceivedTargetPower choice: -120,-118,...,-90 !\n", "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for rach_preambleInitialReceivedTargetPower choice: -120,-118,...,-90 !\n",
config_fname, cell_idx,eMTCconfig->ccparams.rach_preambleInitialReceivedTargetPower); config_fname, cell_idx,eMTCconfig->ccparams.rach_preambleInitialReceivedTargetPower);
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].rach_powerRampingStep= eMTCconfig->ccparams.rach_powerRampingStep/2; RRCcfg->radioresourceconfig_BR[cc_idx].rach_powerRampingStep = eMTCconfig->ccparams.rach_powerRampingStep / 2;
if ((eMTCconfig->ccparams.rach_powerRampingStep<0) || (eMTCconfig->ccparams.rach_powerRampingStep>6) || ((eMTCconfig->ccparams.rach_powerRampingStep&1)!=0)) if ((eMTCconfig->ccparams.rach_powerRampingStep<0) || (eMTCconfig->ccparams.rach_powerRampingStep>6) || ((eMTCconfig->ccparams.rach_powerRampingStep&1)!=0))
AssertFatal (0, AssertFatal (0,
...@@ -610,47 +597,47 @@ void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, in ...@@ -610,47 +597,47 @@ void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, in
switch (eMTCconfig->ccparams.rach_preambleTransMax) { switch (eMTCconfig->ccparams.rach_preambleTransMax) {
case 3: case 3:
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].rach_preambleTransMax= LTE_PreambleTransMax_n3; RRCcfg->radioresourceconfig_BR[cc_idx].rach_preambleTransMax = LTE_PreambleTransMax_n3;
break; break;
case 4: case 4:
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].rach_preambleTransMax= LTE_PreambleTransMax_n4; RRCcfg->radioresourceconfig_BR[cc_idx].rach_preambleTransMax = LTE_PreambleTransMax_n4;
break; break;
case 5: case 5:
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].rach_preambleTransMax= LTE_PreambleTransMax_n5; RRCcfg->radioresourceconfig_BR[cc_idx].rach_preambleTransMax = LTE_PreambleTransMax_n5;
break; break;
case 6: case 6:
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].rach_preambleTransMax= LTE_PreambleTransMax_n6; RRCcfg->radioresourceconfig_BR[cc_idx].rach_preambleTransMax = LTE_PreambleTransMax_n6;
break; break;
case 7: case 7:
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].rach_preambleTransMax= LTE_PreambleTransMax_n7; RRCcfg->radioresourceconfig_BR[cc_idx].rach_preambleTransMax = LTE_PreambleTransMax_n7;
break; break;
case 8: case 8:
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].rach_preambleTransMax= LTE_PreambleTransMax_n8; RRCcfg->radioresourceconfig_BR[cc_idx].rach_preambleTransMax = LTE_PreambleTransMax_n8;
break; break;
case 10: case 10:
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].rach_preambleTransMax= LTE_PreambleTransMax_n10; RRCcfg->radioresourceconfig_BR[cc_idx].rach_preambleTransMax = LTE_PreambleTransMax_n10;
break; break;
case 20: case 20:
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].rach_preambleTransMax= LTE_PreambleTransMax_n20; RRCcfg->radioresourceconfig_BR[cc_idx].rach_preambleTransMax = LTE_PreambleTransMax_n20;
break; break;
case 50: case 50:
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].rach_preambleTransMax= LTE_PreambleTransMax_n50; RRCcfg->radioresourceconfig_BR[cc_idx].rach_preambleTransMax = LTE_PreambleTransMax_n50;
break; break;
case 100: case 100:
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].rach_preambleTransMax= LTE_PreambleTransMax_n100; RRCcfg->radioresourceconfig_BR[cc_idx].rach_preambleTransMax = LTE_PreambleTransMax_n100;
break; break;
case 200: case 200:
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].rach_preambleTransMax= LTE_PreambleTransMax_n200; RRCcfg->radioresourceconfig_BR[cc_idx].rach_preambleTransMax = LTE_PreambleTransMax_n200;
break; break;
default: default:
...@@ -660,21 +647,21 @@ void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, in ...@@ -660,21 +647,21 @@ void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, in
break; break;
} }
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].rach_raResponseWindowSize= (eMTCconfig->ccparams.rach_raResponseWindowSize==10)?7:eMTCconfig->ccparams.rach_raResponseWindowSize-2; RRCcfg->radioresourceconfig_BR[cc_idx].rach_raResponseWindowSize = (eMTCconfig->ccparams.rach_raResponseWindowSize == 10) ? 7 : eMTCconfig->ccparams.rach_raResponseWindowSize - 2;
if ((eMTCconfig->ccparams.rach_raResponseWindowSize<0)||(eMTCconfig->ccparams.rach_raResponseWindowSize==9)||(eMTCconfig->ccparams.rach_raResponseWindowSize>10)) if ((eMTCconfig->ccparams.rach_raResponseWindowSize<0)||(eMTCconfig->ccparams.rach_raResponseWindowSize==9)||(eMTCconfig->ccparams.rach_raResponseWindowSize>10))
AssertFatal (0, AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for rach_raResponseWindowSize choice: 2,3,4,5,6,7,8,10!\n", "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for rach_raResponseWindowSize choice: 2,3,4,5,6,7,8,10!\n",
config_fname, cell_idx,eMTCconfig->ccparams.rach_raResponseWindowSize); config_fname, cell_idx,eMTCconfig->ccparams.rach_raResponseWindowSize);
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].rach_macContentionResolutionTimer= (eMTCconfig->ccparams.rach_macContentionResolutionTimer/8)-1; RRCcfg->radioresourceconfig_BR[cc_idx].rach_macContentionResolutionTimer = (eMTCconfig->ccparams.rach_macContentionResolutionTimer / 8) - 1;
if ((eMTCconfig->ccparams.rach_macContentionResolutionTimer<8) || (eMTCconfig->ccparams.rach_macContentionResolutionTimer>64) || ((eMTCconfig->ccparams.rach_macContentionResolutionTimer&7)!=0)) if ((eMTCconfig->ccparams.rach_macContentionResolutionTimer<8) || (eMTCconfig->ccparams.rach_macContentionResolutionTimer>64) || ((eMTCconfig->ccparams.rach_macContentionResolutionTimer&7)!=0))
AssertFatal (0, AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for rach_macContentionResolutionTimer choice: 8,16,...,56,64!\n", "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for rach_macContentionResolutionTimer choice: 8,16,...,56,64!\n",
config_fname, cell_idx,eMTCconfig->ccparams.rach_macContentionResolutionTimer); config_fname, cell_idx,eMTCconfig->ccparams.rach_macContentionResolutionTimer);
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].rach_maxHARQ_Msg3Tx= eMTCconfig->ccparams.rach_maxHARQ_Msg3Tx; RRCcfg->radioresourceconfig_BR[cc_idx].rach_maxHARQ_Msg3Tx = eMTCconfig->ccparams.rach_maxHARQ_Msg3Tx;
if ((eMTCconfig->ccparams.rach_maxHARQ_Msg3Tx<0) || (eMTCconfig->ccparams.rach_maxHARQ_Msg3Tx>8)) if ((eMTCconfig->ccparams.rach_maxHARQ_Msg3Tx<0) || (eMTCconfig->ccparams.rach_maxHARQ_Msg3Tx>8))
AssertFatal (0, AssertFatal (0,
...@@ -683,47 +670,47 @@ void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, in ...@@ -683,47 +670,47 @@ void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, in
switch (eMTCconfig->preambleTransMax_CE_r13) { switch (eMTCconfig->preambleTransMax_CE_r13) {
case 3: case 3:
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].preambleTransMax_CE_r13= LTE_PreambleTransMax_n3; RRCcfg->radioresourceconfig_BR[cc_idx].preambleTransMax_CE_r13 = LTE_PreambleTransMax_n3;
break; break;
case 4: case 4:
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].preambleTransMax_CE_r13= LTE_PreambleTransMax_n4; RRCcfg->radioresourceconfig_BR[cc_idx].preambleTransMax_CE_r13 = LTE_PreambleTransMax_n4;
break; break;
case 5: case 5:
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].preambleTransMax_CE_r13= LTE_PreambleTransMax_n5; RRCcfg->radioresourceconfig_BR[cc_idx].preambleTransMax_CE_r13 = LTE_PreambleTransMax_n5;
break; break;
case 6: case 6:
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].preambleTransMax_CE_r13= LTE_PreambleTransMax_n6; RRCcfg->radioresourceconfig_BR[cc_idx].preambleTransMax_CE_r13 = LTE_PreambleTransMax_n6;
break; break;
case 7: case 7:
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].preambleTransMax_CE_r13= LTE_PreambleTransMax_n7; RRCcfg->radioresourceconfig_BR[cc_idx].preambleTransMax_CE_r13 = LTE_PreambleTransMax_n7;
break; break;
case 8: case 8:
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].preambleTransMax_CE_r13= LTE_PreambleTransMax_n8; RRCcfg->radioresourceconfig_BR[cc_idx].preambleTransMax_CE_r13 = LTE_PreambleTransMax_n8;
break; break;
case 10: case 10:
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].preambleTransMax_CE_r13= LTE_PreambleTransMax_n10; RRCcfg->radioresourceconfig_BR[cc_idx].preambleTransMax_CE_r13 = LTE_PreambleTransMax_n10;
break; break;
case 20: case 20:
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].preambleTransMax_CE_r13= LTE_PreambleTransMax_n20; RRCcfg->radioresourceconfig_BR[cc_idx].preambleTransMax_CE_r13 = LTE_PreambleTransMax_n20;
break; break;
case 50: case 50:
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].preambleTransMax_CE_r13= LTE_PreambleTransMax_n50; RRCcfg->radioresourceconfig_BR[cc_idx].preambleTransMax_CE_r13 = LTE_PreambleTransMax_n50;
break; break;
case 100: case 100:
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].preambleTransMax_CE_r13= LTE_PreambleTransMax_n100; RRCcfg->radioresourceconfig_BR[cc_idx].preambleTransMax_CE_r13 = LTE_PreambleTransMax_n100;
break; break;
case 200: case 200:
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].preambleTransMax_CE_r13= LTE_PreambleTransMax_n200; RRCcfg->radioresourceconfig_BR[cc_idx].preambleTransMax_CE_r13 = LTE_PreambleTransMax_n200;
break; break;
default: default:
...@@ -735,19 +722,19 @@ void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, in ...@@ -735,19 +722,19 @@ void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, in
switch (eMTCconfig->ccparams.pcch_defaultPagingCycle) { switch (eMTCconfig->ccparams.pcch_defaultPagingCycle) {
case 32: case 32:
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].pcch_defaultPagingCycle= LTE_PCCH_Config__defaultPagingCycle_rf32; RRCcfg->radioresourceconfig_BR[cc_idx].pcch_defaultPagingCycle = LTE_PCCH_Config__defaultPagingCycle_rf32;
break; break;
case 64: case 64:
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].pcch_defaultPagingCycle= LTE_PCCH_Config__defaultPagingCycle_rf64; RRCcfg->radioresourceconfig_BR[cc_idx].pcch_defaultPagingCycle = LTE_PCCH_Config__defaultPagingCycle_rf64;
break; break;
case 128: case 128:
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].pcch_defaultPagingCycle= LTE_PCCH_Config__defaultPagingCycle_rf128; RRCcfg->radioresourceconfig_BR[cc_idx].pcch_defaultPagingCycle = LTE_PCCH_Config__defaultPagingCycle_rf128;
break; break;
case 256: case 256:
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].pcch_defaultPagingCycle= LTE_PCCH_Config__defaultPagingCycle_rf256; RRCcfg->radioresourceconfig_BR[cc_idx].pcch_defaultPagingCycle = LTE_PCCH_Config__defaultPagingCycle_rf256;
break; break;
default: default:
...@@ -758,21 +745,21 @@ void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, in ...@@ -758,21 +745,21 @@ void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, in
} }
if (strcmp(eMTCconfig->ccparams.pcch_nB, "fourT") == 0) { if (strcmp(eMTCconfig->ccparams.pcch_nB, "fourT") == 0) {
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].pcch_nB= LTE_PCCH_Config__nB_fourT; RRCcfg->radioresourceconfig_BR[cc_idx].pcch_nB = LTE_PCCH_Config__nB_fourT;
} else if (strcmp(eMTCconfig->ccparams.pcch_nB, "twoT") == 0) { } else if (strcmp(eMTCconfig->ccparams.pcch_nB, "twoT") == 0) {
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].pcch_nB= LTE_PCCH_Config__nB_twoT; RRCcfg->radioresourceconfig_BR[cc_idx].pcch_nB = LTE_PCCH_Config__nB_twoT;
} else if (strcmp(eMTCconfig->ccparams.pcch_nB, "oneT") == 0) { } else if (strcmp(eMTCconfig->ccparams.pcch_nB, "oneT") == 0) {
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].pcch_nB= LTE_PCCH_Config__nB_oneT; RRCcfg->radioresourceconfig_BR[cc_idx].pcch_nB = LTE_PCCH_Config__nB_oneT;
} else if (strcmp(eMTCconfig->ccparams.pcch_nB, "halfT") == 0) { } else if (strcmp(eMTCconfig->ccparams.pcch_nB, "halfT") == 0) {
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].pcch_nB= LTE_PCCH_Config__nB_halfT; RRCcfg->radioresourceconfig_BR[cc_idx].pcch_nB = LTE_PCCH_Config__nB_halfT;
} else if (strcmp(eMTCconfig->ccparams.pcch_nB, "quarterT") == 0) { } else if (strcmp(eMTCconfig->ccparams.pcch_nB, "quarterT") == 0) {
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].pcch_nB= LTE_PCCH_Config__nB_quarterT; RRCcfg->radioresourceconfig_BR[cc_idx].pcch_nB = LTE_PCCH_Config__nB_quarterT;
} else if (strcmp(eMTCconfig->ccparams.pcch_nB, "oneEighthT") == 0) { } else if (strcmp(eMTCconfig->ccparams.pcch_nB, "oneEighthT") == 0) {
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].pcch_nB= LTE_PCCH_Config__nB_oneEighthT; RRCcfg->radioresourceconfig_BR[cc_idx].pcch_nB = LTE_PCCH_Config__nB_oneEighthT;
} else if (strcmp(eMTCconfig->ccparams.pcch_nB, "oneSixteenthT") == 0) { } else if (strcmp(eMTCconfig->ccparams.pcch_nB, "oneSixteenthT") == 0) {
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].pcch_nB= LTE_PCCH_Config__nB_oneSixteenthT; RRCcfg->radioresourceconfig_BR[cc_idx].pcch_nB = LTE_PCCH_Config__nB_oneSixteenthT;
} else if (strcmp(eMTCconfig->ccparams.pcch_nB, "oneThirtySecondT") == 0) { } else if (strcmp(eMTCconfig->ccparams.pcch_nB, "oneThirtySecondT") == 0) {
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].pcch_nB= LTE_PCCH_Config__nB_oneThirtySecondT; RRCcfg->radioresourceconfig_BR[cc_idx].pcch_nB = LTE_PCCH_Config__nB_oneThirtySecondT;
} else } else
AssertFatal (0, AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pcch_nB choice: fourT,twoT,oneT,halfT,quarterT,oneighthT,oneSixteenthT,oneThirtySecondT !\n", "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pcch_nB choice: fourT,twoT,oneT,halfT,quarterT,oneighthT,oneSixteenthT,oneThirtySecondT !\n",
...@@ -780,19 +767,19 @@ void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, in ...@@ -780,19 +767,19 @@ void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, in
switch (eMTCconfig->ccparams.bcch_modificationPeriodCoeff) { switch (eMTCconfig->ccparams.bcch_modificationPeriodCoeff) {
case 2: case 2:
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].bcch_modificationPeriodCoeff= LTE_BCCH_Config__modificationPeriodCoeff_n2; RRCcfg->radioresourceconfig_BR[cc_idx].bcch_modificationPeriodCoeff = LTE_BCCH_Config__modificationPeriodCoeff_n2;
break; break;
case 4: case 4:
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].bcch_modificationPeriodCoeff= LTE_BCCH_Config__modificationPeriodCoeff_n4; RRCcfg->radioresourceconfig_BR[cc_idx].bcch_modificationPeriodCoeff = LTE_BCCH_Config__modificationPeriodCoeff_n4;
break; break;
case 8: case 8:
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].bcch_modificationPeriodCoeff= LTE_BCCH_Config__modificationPeriodCoeff_n8; RRCcfg->radioresourceconfig_BR[cc_idx].bcch_modificationPeriodCoeff = LTE_BCCH_Config__modificationPeriodCoeff_n8;
break; break;
case 16: case 16:
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].bcch_modificationPeriodCoeff= LTE_BCCH_Config__modificationPeriodCoeff_n16; RRCcfg->radioresourceconfig_BR[cc_idx].bcch_modificationPeriodCoeff = LTE_BCCH_Config__modificationPeriodCoeff_n16;
break; break;
default: default:
...@@ -802,40 +789,40 @@ void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, in ...@@ -802,40 +789,40 @@ void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, in
break; break;
} }
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].ue_TimersAndConstants_t300= eMTCconfig->ccparams.ue_TimersAndConstants_t300; RRCcfg->radioresourceconfig_BR[cc_idx].ue_TimersAndConstants_t300 = eMTCconfig->ccparams.ue_TimersAndConstants_t300;
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].ue_TimersAndConstants_t301= eMTCconfig->ccparams.ue_TimersAndConstants_t301; RRCcfg->radioresourceconfig_BR[cc_idx].ue_TimersAndConstants_t301 = eMTCconfig->ccparams.ue_TimersAndConstants_t301;
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].ue_TimersAndConstants_t310= eMTCconfig->ccparams.ue_TimersAndConstants_t310; RRCcfg->radioresourceconfig_BR[cc_idx].ue_TimersAndConstants_t310 = eMTCconfig->ccparams.ue_TimersAndConstants_t310;
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].ue_TimersAndConstants_t311= eMTCconfig->ccparams.ue_TimersAndConstants_t311; RRCcfg->radioresourceconfig_BR[cc_idx].ue_TimersAndConstants_t311 = eMTCconfig->ccparams.ue_TimersAndConstants_t311;
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].ue_TimersAndConstants_n310= eMTCconfig->ccparams.ue_TimersAndConstants_n310; RRCcfg->radioresourceconfig_BR[cc_idx].ue_TimersAndConstants_n310 = eMTCconfig->ccparams.ue_TimersAndConstants_n310;
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].ue_TimersAndConstants_n311= eMTCconfig->ccparams.ue_TimersAndConstants_n311; RRCcfg->radioresourceconfig_BR[cc_idx].ue_TimersAndConstants_n311 = eMTCconfig->ccparams.ue_TimersAndConstants_n311;
switch (eMTCconfig->ccparams.ue_TransmissionMode) { switch (eMTCconfig->ccparams.ue_TransmissionMode) {
case 1: case 1:
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].ue_TransmissionMode= LTE_AntennaInfoDedicated__transmissionMode_tm1; RRCcfg->radioresourceconfig_BR[cc_idx].ue_TransmissionMode = LTE_AntennaInfoDedicated__transmissionMode_tm1;
break; break;
case 2: case 2:
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].ue_TransmissionMode= LTE_AntennaInfoDedicated__transmissionMode_tm2; RRCcfg->radioresourceconfig_BR[cc_idx].ue_TransmissionMode = LTE_AntennaInfoDedicated__transmissionMode_tm2;
break; break;
case 3: case 3:
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].ue_TransmissionMode= LTE_AntennaInfoDedicated__transmissionMode_tm3; RRCcfg->radioresourceconfig_BR[cc_idx].ue_TransmissionMode = LTE_AntennaInfoDedicated__transmissionMode_tm3;
break; break;
case 4: case 4:
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].ue_TransmissionMode= LTE_AntennaInfoDedicated__transmissionMode_tm4; RRCcfg->radioresourceconfig_BR[cc_idx].ue_TransmissionMode = LTE_AntennaInfoDedicated__transmissionMode_tm4;
break; break;
case 5: case 5:
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].ue_TransmissionMode= LTE_AntennaInfoDedicated__transmissionMode_tm5; RRCcfg->radioresourceconfig_BR[cc_idx].ue_TransmissionMode = LTE_AntennaInfoDedicated__transmissionMode_tm5;
break; break;
case 6: case 6:
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].ue_TransmissionMode= LTE_AntennaInfoDedicated__transmissionMode_tm6; RRCcfg->radioresourceconfig_BR[cc_idx].ue_TransmissionMode = LTE_AntennaInfoDedicated__transmissionMode_tm6;
break; break;
case 7: case 7:
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].ue_TransmissionMode= LTE_AntennaInfoDedicated__transmissionMode_tm7; RRCcfg->radioresourceconfig_BR[cc_idx].ue_TransmissionMode = LTE_AntennaInfoDedicated__transmissionMode_tm7;
break; break;
default: default:
...@@ -847,79 +834,77 @@ void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, in ...@@ -847,79 +834,77 @@ void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, in
if (!strcmp(eMTCconfig->prach_ConfigCommon_v1310, "ENABLE")) { if (!strcmp(eMTCconfig->prach_ConfigCommon_v1310, "ENABLE")) {
RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig_BR[cc_idx].prach_ConfigCommon_v1310 = true; RRCcfg->radioresourceconfig_BR[cc_idx].prach_ConfigCommon_v1310 = true;
RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig_BR[cc_idx].mpdcch_startSF_CSS_RA_r13 = calloc(1, sizeof(BOOLEAN_t)); RRCcfg->radioresourceconfig_BR[cc_idx].mpdcch_startSF_CSS_RA_r13 = calloc(1, sizeof(BOOLEAN_t));
if (!strcmp(eMTCconfig->mpdcch_startSF_CSS_RA_r13, "tdd-r13")) { if (!strcmp(eMTCconfig->mpdcch_startSF_CSS_RA_r13, "tdd-r13")) {
*RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig_BR[cc_idx].mpdcch_startSF_CSS_RA_r13 = false; *RRCcfg->radioresourceconfig_BR[cc_idx].mpdcch_startSF_CSS_RA_r13 = false;
} else { } else {
*RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig_BR[cc_idx].mpdcch_startSF_CSS_RA_r13 = true; *RRCcfg->radioresourceconfig_BR[cc_idx].mpdcch_startSF_CSS_RA_r13 = true;
} }
if (!strcmp(eMTCconfig->mpdcch_startSF_CSS_RA_r13_val, "v1")) { if (!strcmp(eMTCconfig->mpdcch_startSF_CSS_RA_r13_val, "v1")) {
RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig_BR[cc_idx].mpdcch_startSF_CSS_RA_r13_val = 0; RRCcfg->radioresourceconfig_BR[cc_idx].mpdcch_startSF_CSS_RA_r13_val = 0;
} else if (!strcmp(eMTCconfig->mpdcch_startSF_CSS_RA_r13_val, "v1dot5")) { } else if (!strcmp(eMTCconfig->mpdcch_startSF_CSS_RA_r13_val, "v1dot5")) {
RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig_BR[cc_idx].mpdcch_startSF_CSS_RA_r13_val = 1; RRCcfg->radioresourceconfig_BR[cc_idx].mpdcch_startSF_CSS_RA_r13_val = 1;
} else if (!strcmp(eMTCconfig->mpdcch_startSF_CSS_RA_r13_val, "v2")) { } else if (!strcmp(eMTCconfig->mpdcch_startSF_CSS_RA_r13_val, "v2")) {
RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig_BR[cc_idx].mpdcch_startSF_CSS_RA_r13_val = 2; RRCcfg->radioresourceconfig_BR[cc_idx].mpdcch_startSF_CSS_RA_r13_val = 2;
} else if (!strcmp(eMTCconfig->mpdcch_startSF_CSS_RA_r13_val, "v2dot5")) { } else if (!strcmp(eMTCconfig->mpdcch_startSF_CSS_RA_r13_val, "v2dot5")) {
RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig_BR[cc_idx].mpdcch_startSF_CSS_RA_r13_val = 3; RRCcfg->radioresourceconfig_BR[cc_idx].mpdcch_startSF_CSS_RA_r13_val = 3;
} else if (!strcmp(eMTCconfig->mpdcch_startSF_CSS_RA_r13_val, "v4")) { } else if (!strcmp(eMTCconfig->mpdcch_startSF_CSS_RA_r13_val, "v4")) {
RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig_BR[cc_idx].mpdcch_startSF_CSS_RA_r13_val = 4; RRCcfg->radioresourceconfig_BR[cc_idx].mpdcch_startSF_CSS_RA_r13_val = 4;
} else if (!strcmp(eMTCconfig->mpdcch_startSF_CSS_RA_r13_val, "v5")) { } else if (!strcmp(eMTCconfig->mpdcch_startSF_CSS_RA_r13_val, "v5")) {
RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig_BR[cc_idx].mpdcch_startSF_CSS_RA_r13_val = 5; RRCcfg->radioresourceconfig_BR[cc_idx].mpdcch_startSF_CSS_RA_r13_val = 5;
} else if (!strcmp(eMTCconfig->mpdcch_startSF_CSS_RA_r13_val, "v8")) { } else if (!strcmp(eMTCconfig->mpdcch_startSF_CSS_RA_r13_val, "v8")) {
RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig_BR[cc_idx].mpdcch_startSF_CSS_RA_r13_val = 6; RRCcfg->radioresourceconfig_BR[cc_idx].mpdcch_startSF_CSS_RA_r13_val = 6;
} else if (!strcmp(eMTCconfig->mpdcch_startSF_CSS_RA_r13_val, "10")) { } else if (!strcmp(eMTCconfig->mpdcch_startSF_CSS_RA_r13_val, "10")) {
RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig_BR[cc_idx].mpdcch_startSF_CSS_RA_r13_val = 7; RRCcfg->radioresourceconfig_BR[cc_idx].mpdcch_startSF_CSS_RA_r13_val = 7;
} else { } else {
AssertFatal(0, AssertFatal(0,
"Failed to parse eNB configuration file %s, enb %d mpdcch_startSF_CSS_RA_r13_val! Unknown Value !!\n", "Failed to parse eNB configuration file %s, enb %d mpdcch_startSF_CSS_RA_r13_val! Unknown Value !!\n",
config_fname, cell_idx); config_fname, cell_idx);
} }
RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig_BR[cc_idx].prach_HoppingOffset_r13 = calloc(1, sizeof(long)); RRCcfg->radioresourceconfig_BR[cc_idx].prach_HoppingOffset_r13 = calloc(1, sizeof(long));
*RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig_BR[cc_idx].prach_HoppingOffset_r13 = eMTCconfig->prach_HoppingOffset_r13; *RRCcfg->radioresourceconfig_BR[cc_idx].prach_HoppingOffset_r13 = eMTCconfig->prach_HoppingOffset_r13;
} else { } else {
RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig_BR[cc_idx].prach_ConfigCommon_v1310 = false; RRCcfg->radioresourceconfig_BR[cc_idx].prach_ConfigCommon_v1310 = false;
} }
RRCcfg->pdsch_maxNumRepetitionCEmodeA_r13[cc_idx] = CALLOC(1, sizeof(long));
RRC_CONFIGURATION_REQ(msg_p).pdsch_maxNumRepetitionCEmodeA_r13[cc_idx] = CALLOC(1, sizeof(long));
if (!strcmp(eMTCconfig->pdsch_maxNumRepetitionCEmodeA_r13, "r16")) { if (!strcmp(eMTCconfig->pdsch_maxNumRepetitionCEmodeA_r13, "r16")) {
*RRC_CONFIGURATION_REQ(msg_p).pdsch_maxNumRepetitionCEmodeA_r13[cc_idx] = 0; *RRCcfg->pdsch_maxNumRepetitionCEmodeA_r13[cc_idx] = 0;
} else if (!strcmp(eMTCconfig->pdsch_maxNumRepetitionCEmodeA_r13, "r32")) { } else if (!strcmp(eMTCconfig->pdsch_maxNumRepetitionCEmodeA_r13, "r32")) {
*RRC_CONFIGURATION_REQ(msg_p).pdsch_maxNumRepetitionCEmodeA_r13[cc_idx] = 1; *RRCcfg->pdsch_maxNumRepetitionCEmodeA_r13[cc_idx] = 1;
} else { } else {
AssertFatal (0, AssertFatal (0,
"Failed to parse eNB configuration file %s, pdsch_maxNumRepetitionCEmodeA_r13 unknown value!\n", "Failed to parse eNB configuration file %s, pdsch_maxNumRepetitionCEmodeA_r13 unknown value!\n",
config_fname); config_fname);
} }
RRCcfg->pusch_maxNumRepetitionCEmodeA_r13[cc_idx] = CALLOC(1, sizeof(long));
RRC_CONFIGURATION_REQ(msg_p).pusch_maxNumRepetitionCEmodeA_r13[cc_idx] = CALLOC(1, sizeof(long));
if (!strcmp(eMTCconfig->pusch_maxNumRepetitionCEmodeA_r13, "r8")) { if (!strcmp(eMTCconfig->pusch_maxNumRepetitionCEmodeA_r13, "r8")) {
*RRC_CONFIGURATION_REQ(msg_p).pusch_maxNumRepetitionCEmodeA_r13[cc_idx] = 0; *RRCcfg->pusch_maxNumRepetitionCEmodeA_r13[cc_idx] = 0;
} else if (!strcmp(eMTCconfig->pusch_maxNumRepetitionCEmodeA_r13, "r16")) { } else if (!strcmp(eMTCconfig->pusch_maxNumRepetitionCEmodeA_r13, "r16")) {
*RRC_CONFIGURATION_REQ(msg_p).pusch_maxNumRepetitionCEmodeA_r13[cc_idx] = 1; *RRCcfg->pusch_maxNumRepetitionCEmodeA_r13[cc_idx] = 1;
} else if (!strcmp(eMTCconfig->pusch_maxNumRepetitionCEmodeA_r13, "r32")) { } else if (!strcmp(eMTCconfig->pusch_maxNumRepetitionCEmodeA_r13, "r32")) {
*RRC_CONFIGURATION_REQ(msg_p).pusch_maxNumRepetitionCEmodeA_r13[cc_idx] = 2; *RRCcfg->pusch_maxNumRepetitionCEmodeA_r13[cc_idx] = 2;
} else { } else {
AssertFatal (0, AssertFatal (0,
"Failed to parse eNB configuration file %s, pusch_maxNumRepetitionCEmodeA_r13 unknown value!\n", "Failed to parse eNB configuration file %s, pusch_maxNumRepetitionCEmodeA_r13 unknown value!\n",
config_fname); config_fname);
} }
RRC_CONFIGURATION_REQ(msg_p).pusch_repetitionLevelCEmodeA_r13[cc_idx] = CALLOC(1, sizeof(long)); RRCcfg->pusch_repetitionLevelCEmodeA_r13[cc_idx] = CALLOC(1, sizeof(long));
if (!strcmp(eMTCconfig->pusch_repetitionLevelCEmodeA_r13, "l1")) { if (!strcmp(eMTCconfig->pusch_repetitionLevelCEmodeA_r13, "l1")) {
*RRC_CONFIGURATION_REQ(msg_p).pusch_repetitionLevelCEmodeA_r13[cc_idx] = 0; *RRCcfg->pusch_repetitionLevelCEmodeA_r13[cc_idx] = 0;
} else if (!strcmp(eMTCconfig->pusch_repetitionLevelCEmodeA_r13, "l2")) { } else if (!strcmp(eMTCconfig->pusch_repetitionLevelCEmodeA_r13, "l2")) {
*RRC_CONFIGURATION_REQ(msg_p).pusch_repetitionLevelCEmodeA_r13[cc_idx] = 1; *RRCcfg->pusch_repetitionLevelCEmodeA_r13[cc_idx] = 1;
} else if (!strcmp(eMTCconfig->pusch_repetitionLevelCEmodeA_r13, "l3")) { } else if (!strcmp(eMTCconfig->pusch_repetitionLevelCEmodeA_r13, "l3")) {
*RRC_CONFIGURATION_REQ(msg_p).pusch_repetitionLevelCEmodeA_r13[cc_idx] = 2; *RRCcfg->pusch_repetitionLevelCEmodeA_r13[cc_idx] = 2;
} else if (!strcmp(eMTCconfig->pusch_repetitionLevelCEmodeA_r13, "l4")) { } else if (!strcmp(eMTCconfig->pusch_repetitionLevelCEmodeA_r13, "l4")) {
*RRC_CONFIGURATION_REQ(msg_p).pusch_repetitionLevelCEmodeA_r13[cc_idx] = 3; *RRCcfg->pusch_repetitionLevelCEmodeA_r13[cc_idx] = 3;
} else { } else {
AssertFatal (0, AssertFatal (0,
"Failed to parse eNB configuration file %s, pusch_repetitionLevelCEmodeA_r13 unknown value!\n", "Failed to parse eNB configuration file %s, pusch_repetitionLevelCEmodeA_r13 unknown value!\n",
...@@ -928,39 +913,39 @@ void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, in ...@@ -928,39 +913,39 @@ void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, in
char rachCELevelInfoListPath[MAX_OPTNAME_SIZE * 2]; char rachCELevelInfoListPath[MAX_OPTNAME_SIZE * 2];
config_getlist(&rachcelevellist, NULL, 0, brparamspath); config_getlist(&rachcelevellist, NULL, 0, brparamspath);
RRC_CONFIGURATION_REQ (msg_p).rach_CE_LevelInfoList_r13_size[cc_idx] = rachcelevellist.numelt; RRCcfg->rach_CE_LevelInfoList_r13_size[cc_idx] = rachcelevellist.numelt;
int rachCEInfoIndex; int rachCEInfoIndex;
for (rachCEInfoIndex = 0; rachCEInfoIndex < rachcelevellist.numelt; rachCEInfoIndex++) { for (rachCEInfoIndex = 0; rachCEInfoIndex < rachcelevellist.numelt; rachCEInfoIndex++) {
sprintf(rachCELevelInfoListPath, "%s.%s.[%i]", brparamspath, ENB_CONFIG_STRING_RACH_CE_LEVELINFOLIST_R13, rachCEInfoIndex); sprintf(rachCELevelInfoListPath, "%s.%s.[%i]", brparamspath, ENB_CONFIG_STRING_RACH_CE_LEVELINFOLIST_R13, rachCEInfoIndex);
config_get(rachcelevelParams, sizeof(rachcelevelParams) / sizeof(paramdef_t), rachCELevelInfoListPath); config_get(rachcelevelParams, sizeof(rachcelevelParams) / sizeof(paramdef_t), rachCELevelInfoListPath);
RRC_CONFIGURATION_REQ (msg_p).firstPreamble_r13[cc_idx][rachCEInfoIndex] = eMTCconfig->firstPreamble_r13; RRCcfg->firstPreamble_r13[cc_idx][rachCEInfoIndex] = eMTCconfig->firstPreamble_r13;
RRC_CONFIGURATION_REQ (msg_p).lastPreamble_r13[cc_idx][rachCEInfoIndex] = eMTCconfig->lastPreamble_r13; RRCcfg->lastPreamble_r13[cc_idx][rachCEInfoIndex] = eMTCconfig->lastPreamble_r13;
switch (eMTCconfig->ra_ResponseWindowSize_r13) { switch (eMTCconfig->ra_ResponseWindowSize_r13) {
case 20: case 20:
RRC_CONFIGURATION_REQ (msg_p).ra_ResponseWindowSize_r13[cc_idx][rachCEInfoIndex] = LTE_RACH_CE_LevelInfo_r13__ra_ResponseWindowSize_r13_sf20; RRCcfg->ra_ResponseWindowSize_r13[cc_idx][rachCEInfoIndex] = LTE_RACH_CE_LevelInfo_r13__ra_ResponseWindowSize_r13_sf20;
break; break;
case 50: case 50:
RRC_CONFIGURATION_REQ (msg_p).ra_ResponseWindowSize_r13[cc_idx][rachCEInfoIndex] = LTE_RACH_CE_LevelInfo_r13__ra_ResponseWindowSize_r13_sf50; RRCcfg->ra_ResponseWindowSize_r13[cc_idx][rachCEInfoIndex] = LTE_RACH_CE_LevelInfo_r13__ra_ResponseWindowSize_r13_sf50;
break; break;
case 80: case 80:
RRC_CONFIGURATION_REQ (msg_p).ra_ResponseWindowSize_r13[cc_idx][rachCEInfoIndex] = LTE_RACH_CE_LevelInfo_r13__ra_ResponseWindowSize_r13_sf80; RRCcfg->ra_ResponseWindowSize_r13[cc_idx][rachCEInfoIndex] = LTE_RACH_CE_LevelInfo_r13__ra_ResponseWindowSize_r13_sf80;
break; break;
case 120: case 120:
RRC_CONFIGURATION_REQ (msg_p).ra_ResponseWindowSize_r13[cc_idx][rachCEInfoIndex] = LTE_RACH_CE_LevelInfo_r13__ra_ResponseWindowSize_r13_sf120; RRCcfg->ra_ResponseWindowSize_r13[cc_idx][rachCEInfoIndex] = LTE_RACH_CE_LevelInfo_r13__ra_ResponseWindowSize_r13_sf120;
break; break;
case 180: case 180:
RRC_CONFIGURATION_REQ (msg_p).ra_ResponseWindowSize_r13[cc_idx][rachCEInfoIndex] = LTE_RACH_CE_LevelInfo_r13__ra_ResponseWindowSize_r13_sf180; RRCcfg->ra_ResponseWindowSize_r13[cc_idx][rachCEInfoIndex] = LTE_RACH_CE_LevelInfo_r13__ra_ResponseWindowSize_r13_sf180;
break; break;
case 240: case 240:
RRC_CONFIGURATION_REQ (msg_p).ra_ResponseWindowSize_r13[cc_idx][rachCEInfoIndex] = LTE_RACH_CE_LevelInfo_r13__ra_ResponseWindowSize_r13_sf240; RRCcfg->ra_ResponseWindowSize_r13[cc_idx][rachCEInfoIndex] = LTE_RACH_CE_LevelInfo_r13__ra_ResponseWindowSize_r13_sf240;
break; break;
case 320: case 320:
RRC_CONFIGURATION_REQ (msg_p).ra_ResponseWindowSize_r13[cc_idx][rachCEInfoIndex] = LTE_RACH_CE_LevelInfo_r13__ra_ResponseWindowSize_r13_sf320; RRCcfg->ra_ResponseWindowSize_r13[cc_idx][rachCEInfoIndex] = LTE_RACH_CE_LevelInfo_r13__ra_ResponseWindowSize_r13_sf320;
break; break;
case 400: case 400:
RRC_CONFIGURATION_REQ (msg_p).ra_ResponseWindowSize_r13[cc_idx][rachCEInfoIndex] = LTE_RACH_CE_LevelInfo_r13__ra_ResponseWindowSize_r13_sf400; RRCcfg->ra_ResponseWindowSize_r13[cc_idx][rachCEInfoIndex] = LTE_RACH_CE_LevelInfo_r13__ra_ResponseWindowSize_r13_sf400;
break; break;
default: default:
AssertFatal(1==0, AssertFatal(1==0,
...@@ -970,35 +955,35 @@ void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, in ...@@ -970,35 +955,35 @@ void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, in
switch(eMTCconfig->mac_ContentionResolutionTimer_r13) { switch(eMTCconfig->mac_ContentionResolutionTimer_r13) {
case 80: case 80:
RRC_CONFIGURATION_REQ (msg_p).mac_ContentionResolutionTimer_r13[cc_idx][rachCEInfoIndex] = LTE_RACH_CE_LevelInfo_r13__mac_ContentionResolutionTimer_r13_sf80; RRCcfg->mac_ContentionResolutionTimer_r13[cc_idx][rachCEInfoIndex] = LTE_RACH_CE_LevelInfo_r13__mac_ContentionResolutionTimer_r13_sf80;
break; break;
case 100: case 100:
RRC_CONFIGURATION_REQ (msg_p).mac_ContentionResolutionTimer_r13[cc_idx][rachCEInfoIndex] = LTE_RACH_CE_LevelInfo_r13__mac_ContentionResolutionTimer_r13_sf100; RRCcfg->mac_ContentionResolutionTimer_r13[cc_idx][rachCEInfoIndex] = LTE_RACH_CE_LevelInfo_r13__mac_ContentionResolutionTimer_r13_sf100;
break; break;
case 120: case 120:
RRC_CONFIGURATION_REQ (msg_p).mac_ContentionResolutionTimer_r13[cc_idx][rachCEInfoIndex] = LTE_RACH_CE_LevelInfo_r13__mac_ContentionResolutionTimer_r13_sf120; RRCcfg->mac_ContentionResolutionTimer_r13[cc_idx][rachCEInfoIndex] = LTE_RACH_CE_LevelInfo_r13__mac_ContentionResolutionTimer_r13_sf120;
break; break;
case 160: case 160:
RRC_CONFIGURATION_REQ (msg_p).mac_ContentionResolutionTimer_r13[cc_idx][rachCEInfoIndex] = LTE_RACH_CE_LevelInfo_r13__mac_ContentionResolutionTimer_r13_sf160; RRCcfg->mac_ContentionResolutionTimer_r13[cc_idx][rachCEInfoIndex] = LTE_RACH_CE_LevelInfo_r13__mac_ContentionResolutionTimer_r13_sf160;
break; break;
case 200: case 200:
RRC_CONFIGURATION_REQ (msg_p).mac_ContentionResolutionTimer_r13[cc_idx][rachCEInfoIndex] = LTE_RACH_CE_LevelInfo_r13__mac_ContentionResolutionTimer_r13_sf200; RRCcfg->mac_ContentionResolutionTimer_r13[cc_idx][rachCEInfoIndex] = LTE_RACH_CE_LevelInfo_r13__mac_ContentionResolutionTimer_r13_sf200;
break; break;
case 240: case 240:
RRC_CONFIGURATION_REQ (msg_p).mac_ContentionResolutionTimer_r13[cc_idx][rachCEInfoIndex] = LTE_RACH_CE_LevelInfo_r13__mac_ContentionResolutionTimer_r13_sf240; RRCcfg->mac_ContentionResolutionTimer_r13[cc_idx][rachCEInfoIndex] = LTE_RACH_CE_LevelInfo_r13__mac_ContentionResolutionTimer_r13_sf240;
break; break;
case 480: case 480:
RRC_CONFIGURATION_REQ (msg_p).mac_ContentionResolutionTimer_r13[cc_idx][rachCEInfoIndex] = LTE_RACH_CE_LevelInfo_r13__mac_ContentionResolutionTimer_r13_sf480; RRCcfg->mac_ContentionResolutionTimer_r13[cc_idx][rachCEInfoIndex] = LTE_RACH_CE_LevelInfo_r13__mac_ContentionResolutionTimer_r13_sf480;
break; break;
case 960: case 960:
RRC_CONFIGURATION_REQ (msg_p).mac_ContentionResolutionTimer_r13[cc_idx][rachCEInfoIndex] = LTE_RACH_CE_LevelInfo_r13__mac_ContentionResolutionTimer_r13_sf960; RRCcfg->mac_ContentionResolutionTimer_r13[cc_idx][rachCEInfoIndex] = LTE_RACH_CE_LevelInfo_r13__mac_ContentionResolutionTimer_r13_sf960;
break; break;
default: default:
AssertFatal(1==0,"Illegal mac_ContentionResolutionTimer_r13 %d\n", AssertFatal(1==0,"Illegal mac_ContentionResolutionTimer_r13 %d\n",
eMTCconfig->mac_ContentionResolutionTimer_r13); eMTCconfig->mac_ContentionResolutionTimer_r13);
break; break;
} }
RRC_CONFIGURATION_REQ (msg_p).rar_HoppingConfig_r13[cc_idx][rachCEInfoIndex] = eMTCconfig->rar_HoppingConfig_r13; RRCcfg->rar_HoppingConfig_r13[cc_idx][rachCEInfoIndex] = eMTCconfig->rar_HoppingConfig_r13;
AssertFatal(eMTCconfig->rar_HoppingConfig_r13 == 1 , AssertFatal(eMTCconfig->rar_HoppingConfig_r13 == 1 ,
"illegal rar_HoppingConfig_r13 %d (should be 1 only for now, can be 0 when RAR frequency hopping is supported\n",eMTCconfig->rar_HoppingConfig_r13); "illegal rar_HoppingConfig_r13 %d (should be 1 only for now, can be 0 when RAR frequency hopping is supported\n",eMTCconfig->rar_HoppingConfig_r13);
...@@ -1006,55 +991,53 @@ void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, in ...@@ -1006,55 +991,53 @@ void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, in
char rsrpRangeListPath[MAX_OPTNAME_SIZE * 2]; char rsrpRangeListPath[MAX_OPTNAME_SIZE * 2];
config_getlist(&rsrprangelist, NULL, 0, brparamspath); config_getlist(&rsrprangelist, NULL, 0, brparamspath);
RRC_CONFIGURATION_REQ (msg_p).rsrp_range_list_size[cc_idx] = rsrprangelist.numelt; RRCcfg->rsrp_range_list_size[cc_idx] = rsrprangelist.numelt;
int rsrprangeindex; int rsrprangeindex;
for (rsrprangeindex = 0; rsrprangeindex < rsrprangelist.numelt; rsrprangeindex++) { for (rsrprangeindex = 0; rsrprangeindex < rsrprangelist.numelt; rsrprangeindex++) {
sprintf(rsrpRangeListPath, "%s.%s.[%i]", brparamspath, ENB_CONFIG_STRING_RSRP_RANGE_LIST, rsrprangeindex); sprintf(rsrpRangeListPath, "%s.%s.[%i]", brparamspath, ENB_CONFIG_STRING_RSRP_RANGE_LIST, rsrprangeindex);
config_get(rsrprangeParams, sizeof(rsrprangeParams) / sizeof(paramdef_t), rsrpRangeListPath); config_get(rsrprangeParams, sizeof(rsrprangeParams) / sizeof(paramdef_t), rsrpRangeListPath);
RRC_CONFIGURATION_REQ (msg_p).rsrp_range[cc_idx][rsrprangeindex] = eMTCconfig->rsrp_range_br; RRCcfg->rsrp_range[cc_idx][rsrprangeindex] = eMTCconfig->rsrp_range_br;
} }
char prachparameterscePath[MAX_OPTNAME_SIZE * 2]; char prachparameterscePath[MAX_OPTNAME_SIZE * 2];
config_getlist(&prachParamslist, NULL, 0, brparamspath); config_getlist(&prachParamslist, NULL, 0, brparamspath);
RRC_CONFIGURATION_REQ (msg_p).prach_parameters_list_size[cc_idx] = prachParamslist.numelt; RRCcfg->prach_parameters_list_size[cc_idx] = prachParamslist.numelt;
int prachparamsindex; int prachparamsindex;
for (prachparamsindex = 0; prachparamsindex < prachParamslist.numelt; prachparamsindex++) { for (prachparamsindex = 0; prachparamsindex < prachParamslist.numelt; prachparamsindex++) {
sprintf(prachparameterscePath, "%s.%s.[%i]", brparamspath, ENB_CONFIG_STRING_PRACH_PARAMETERS_CE_R13, prachparamsindex); sprintf(prachparameterscePath, "%s.%s.[%i]", brparamspath, ENB_CONFIG_STRING_PRACH_PARAMETERS_CE_R13, prachparamsindex);
config_get(prachParams, sizeof(prachParams) / sizeof(paramdef_t), prachparameterscePath); config_get(prachParams, sizeof(prachParams) / sizeof(paramdef_t), prachparameterscePath);
RRC_CONFIGURATION_REQ (msg_p).prach_config_index[cc_idx][prachparamsindex] = eMTCconfig->prach_config_index_br; RRCcfg->prach_config_index[cc_idx][prachparamsindex] = eMTCconfig->prach_config_index_br;
RRC_CONFIGURATION_REQ (msg_p).prach_freq_offset[cc_idx][prachparamsindex] = eMTCconfig->prach_freq_offset_br; RRCcfg->prach_freq_offset[cc_idx][prachparamsindex] = eMTCconfig->prach_freq_offset_br;
RRC_CONFIGURATION_REQ (msg_p).prach_StartingSubframe_r13[cc_idx][prachparamsindex] = calloc(1, sizeof(long)); RRCcfg->prach_StartingSubframe_r13[cc_idx][prachparamsindex] = calloc(1, sizeof(long));
switch(eMTCconfig->prach_StartingSubframe_r13) { switch(eMTCconfig->prach_StartingSubframe_r13) {
case 2: case 2:
*RRC_CONFIGURATION_REQ (msg_p).prach_StartingSubframe_r13[cc_idx][prachparamsindex] = LTE_PRACH_ParametersCE_r13__prach_StartingSubframe_r13_sf2; *RRCcfg->prach_StartingSubframe_r13[cc_idx][prachparamsindex] = LTE_PRACH_ParametersCE_r13__prach_StartingSubframe_r13_sf2;
break; break;
case 4: case 4:
*RRC_CONFIGURATION_REQ (msg_p).prach_StartingSubframe_r13[cc_idx][prachparamsindex] = LTE_PRACH_ParametersCE_r13__prach_StartingSubframe_r13_sf4; *RRCcfg->prach_StartingSubframe_r13[cc_idx][prachparamsindex] = LTE_PRACH_ParametersCE_r13__prach_StartingSubframe_r13_sf4;
break; break;
case 8: case 8:
*RRC_CONFIGURATION_REQ (msg_p).prach_StartingSubframe_r13[cc_idx][prachparamsindex] = LTE_PRACH_ParametersCE_r13__prach_StartingSubframe_r13_sf8; *RRCcfg->prach_StartingSubframe_r13[cc_idx][prachparamsindex] = LTE_PRACH_ParametersCE_r13__prach_StartingSubframe_r13_sf8;
break; break;
case 16: case 16:
*RRC_CONFIGURATION_REQ (msg_p).prach_StartingSubframe_r13[cc_idx][prachparamsindex] = LTE_PRACH_ParametersCE_r13__prach_StartingSubframe_r13_sf16; *RRCcfg->prach_StartingSubframe_r13[cc_idx][prachparamsindex] = LTE_PRACH_ParametersCE_r13__prach_StartingSubframe_r13_sf16;
break; break;
case 32: case 32:
*RRC_CONFIGURATION_REQ (msg_p).prach_StartingSubframe_r13[cc_idx][prachparamsindex] = LTE_PRACH_ParametersCE_r13__prach_StartingSubframe_r13_sf32; *RRCcfg->prach_StartingSubframe_r13[cc_idx][prachparamsindex] = LTE_PRACH_ParametersCE_r13__prach_StartingSubframe_r13_sf32;
break; break;
case 64: case 64:
*RRC_CONFIGURATION_REQ (msg_p).prach_StartingSubframe_r13[cc_idx][prachparamsindex] = LTE_PRACH_ParametersCE_r13__prach_StartingSubframe_r13_sf64; *RRCcfg->prach_StartingSubframe_r13[cc_idx][prachparamsindex] = LTE_PRACH_ParametersCE_r13__prach_StartingSubframe_r13_sf64;
break; break;
case 128: case 128:
*RRC_CONFIGURATION_REQ (msg_p).prach_StartingSubframe_r13[cc_idx][prachparamsindex] = LTE_PRACH_ParametersCE_r13__prach_StartingSubframe_r13_sf128; *RRCcfg->prach_StartingSubframe_r13[cc_idx][prachparamsindex] = LTE_PRACH_ParametersCE_r13__prach_StartingSubframe_r13_sf128;
break; break;
case 256: case 256:
*RRC_CONFIGURATION_REQ (msg_p).prach_StartingSubframe_r13[cc_idx][prachparamsindex] = LTE_PRACH_ParametersCE_r13__prach_StartingSubframe_r13_sf256; *RRCcfg->prach_StartingSubframe_r13[cc_idx][prachparamsindex] = LTE_PRACH_ParametersCE_r13__prach_StartingSubframe_r13_sf256;
break; break;
default: default:
AssertFatal(1==0,"prach_StartingSubframe_r13 %d is illegal\n", AssertFatal(1==0,"prach_StartingSubframe_r13 %d is illegal\n",
...@@ -1062,9 +1045,11 @@ void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, in ...@@ -1062,9 +1045,11 @@ void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, in
break; break;
} }
RRC_CONFIGURATION_REQ (msg_p).maxNumPreambleAttemptCE_r13[cc_idx][prachparamsindex] = calloc(1, sizeof(long)); RRCcfg->maxNumPreambleAttemptCE_r13[cc_idx][prachparamsindex] = calloc(1, sizeof(long));
if (eMTCconfig->maxNumPreambleAttemptCE_r13==10) *RRC_CONFIGURATION_REQ (msg_p).maxNumPreambleAttemptCE_r13[cc_idx][prachparamsindex] = 6; if (eMTCconfig->maxNumPreambleAttemptCE_r13 == 10)
else *RRC_CONFIGURATION_REQ (msg_p).maxNumPreambleAttemptCE_r13[cc_idx][prachparamsindex] = eMTCconfig->maxNumPreambleAttemptCE_r13-3; *RRCcfg->maxNumPreambleAttemptCE_r13[cc_idx][prachparamsindex] = 6;
else
*RRCcfg->maxNumPreambleAttemptCE_r13[cc_idx][prachparamsindex] = eMTCconfig->maxNumPreambleAttemptCE_r13 - 3;
AssertFatal(eMTCconfig->maxNumPreambleAttemptCE_r13 > 2 && eMTCconfig->maxNumPreambleAttemptCE_r13 <11, AssertFatal(eMTCconfig->maxNumPreambleAttemptCE_r13 > 2 && eMTCconfig->maxNumPreambleAttemptCE_r13 <11,
"prachparamsindex %d: Illegal maxNumPreambleAttemptCE_r13 %d\n", "prachparamsindex %d: Illegal maxNumPreambleAttemptCE_r13 %d\n",
prachparamsindex,eMTCconfig->maxNumPreambleAttemptCE_r13); prachparamsindex,eMTCconfig->maxNumPreambleAttemptCE_r13);
...@@ -1072,28 +1057,28 @@ void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, in ...@@ -1072,28 +1057,28 @@ void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, in
switch(eMTCconfig->numRepetitionPerPreambleAttempt_r13) { switch(eMTCconfig->numRepetitionPerPreambleAttempt_r13) {
case 1: case 1:
RRC_CONFIGURATION_REQ (msg_p).numRepetitionPerPreambleAttempt_r13[cc_idx][prachparamsindex] = LTE_PRACH_ParametersCE_r13__numRepetitionPerPreambleAttempt_r13_n1; RRCcfg->numRepetitionPerPreambleAttempt_r13[cc_idx][prachparamsindex] = LTE_PRACH_ParametersCE_r13__numRepetitionPerPreambleAttempt_r13_n1;
break; break;
case 2: case 2:
RRC_CONFIGURATION_REQ (msg_p).numRepetitionPerPreambleAttempt_r13[cc_idx][prachparamsindex] = LTE_PRACH_ParametersCE_r13__numRepetitionPerPreambleAttempt_r13_n2; RRCcfg->numRepetitionPerPreambleAttempt_r13[cc_idx][prachparamsindex] = LTE_PRACH_ParametersCE_r13__numRepetitionPerPreambleAttempt_r13_n2;
break; break;
case 4: case 4:
RRC_CONFIGURATION_REQ (msg_p).numRepetitionPerPreambleAttempt_r13[cc_idx][prachparamsindex] = LTE_PRACH_ParametersCE_r13__numRepetitionPerPreambleAttempt_r13_n4; RRCcfg->numRepetitionPerPreambleAttempt_r13[cc_idx][prachparamsindex] = LTE_PRACH_ParametersCE_r13__numRepetitionPerPreambleAttempt_r13_n4;
break; break;
case 8: case 8:
RRC_CONFIGURATION_REQ (msg_p).numRepetitionPerPreambleAttempt_r13[cc_idx][prachparamsindex] = LTE_PRACH_ParametersCE_r13__numRepetitionPerPreambleAttempt_r13_n8; RRCcfg->numRepetitionPerPreambleAttempt_r13[cc_idx][prachparamsindex] = LTE_PRACH_ParametersCE_r13__numRepetitionPerPreambleAttempt_r13_n8;
break; break;
case 16: case 16:
RRC_CONFIGURATION_REQ (msg_p).numRepetitionPerPreambleAttempt_r13[cc_idx][prachparamsindex] = LTE_PRACH_ParametersCE_r13__numRepetitionPerPreambleAttempt_r13_n16; RRCcfg->numRepetitionPerPreambleAttempt_r13[cc_idx][prachparamsindex] = LTE_PRACH_ParametersCE_r13__numRepetitionPerPreambleAttempt_r13_n16;
break; break;
case 32: case 32:
RRC_CONFIGURATION_REQ (msg_p).numRepetitionPerPreambleAttempt_r13[cc_idx][prachparamsindex] = LTE_PRACH_ParametersCE_r13__numRepetitionPerPreambleAttempt_r13_n32; RRCcfg->numRepetitionPerPreambleAttempt_r13[cc_idx][prachparamsindex] = LTE_PRACH_ParametersCE_r13__numRepetitionPerPreambleAttempt_r13_n32;
break; break;
case 64: case 64:
RRC_CONFIGURATION_REQ (msg_p).numRepetitionPerPreambleAttempt_r13[cc_idx][prachparamsindex] = LTE_PRACH_ParametersCE_r13__numRepetitionPerPreambleAttempt_r13_n64; RRCcfg->numRepetitionPerPreambleAttempt_r13[cc_idx][prachparamsindex] = LTE_PRACH_ParametersCE_r13__numRepetitionPerPreambleAttempt_r13_n64;
break; break;
case 128: case 128:
RRC_CONFIGURATION_REQ (msg_p).numRepetitionPerPreambleAttempt_r13[cc_idx][prachparamsindex] = LTE_PRACH_ParametersCE_r13__numRepetitionPerPreambleAttempt_r13_n128; RRCcfg->numRepetitionPerPreambleAttempt_r13[cc_idx][prachparamsindex] = LTE_PRACH_ParametersCE_r13__numRepetitionPerPreambleAttempt_r13_n128;
break; break;
default: default:
AssertFatal(1==0, AssertFatal(1==0,
...@@ -1103,31 +1088,31 @@ void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, in ...@@ -1103,31 +1088,31 @@ void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, in
} }
switch (eMTCconfig->mpdcch_NumRepetition_RA_r13) { switch (eMTCconfig->mpdcch_NumRepetition_RA_r13) {
case 1: case 1:
RRC_CONFIGURATION_REQ (msg_p).mpdcch_NumRepetition_RA_r13[cc_idx][prachparamsindex] = LTE_PRACH_ParametersCE_r13__mpdcch_NumRepetition_RA_r13_r1; RRCcfg->mpdcch_NumRepetition_RA_r13[cc_idx][prachparamsindex] = LTE_PRACH_ParametersCE_r13__mpdcch_NumRepetition_RA_r13_r1;
break; break;
case 2: case 2:
RRC_CONFIGURATION_REQ (msg_p).mpdcch_NumRepetition_RA_r13[cc_idx][prachparamsindex] = LTE_PRACH_ParametersCE_r13__mpdcch_NumRepetition_RA_r13_r2; RRCcfg->mpdcch_NumRepetition_RA_r13[cc_idx][prachparamsindex] = LTE_PRACH_ParametersCE_r13__mpdcch_NumRepetition_RA_r13_r2;
break; break;
case 4: case 4:
RRC_CONFIGURATION_REQ (msg_p).mpdcch_NumRepetition_RA_r13[cc_idx][prachparamsindex] = LTE_PRACH_ParametersCE_r13__mpdcch_NumRepetition_RA_r13_r4; RRCcfg->mpdcch_NumRepetition_RA_r13[cc_idx][prachparamsindex] = LTE_PRACH_ParametersCE_r13__mpdcch_NumRepetition_RA_r13_r4;
break; break;
case 8: case 8:
RRC_CONFIGURATION_REQ (msg_p).mpdcch_NumRepetition_RA_r13[cc_idx][prachparamsindex] = LTE_PRACH_ParametersCE_r13__mpdcch_NumRepetition_RA_r13_r8; RRCcfg->mpdcch_NumRepetition_RA_r13[cc_idx][prachparamsindex] = LTE_PRACH_ParametersCE_r13__mpdcch_NumRepetition_RA_r13_r8;
break; break;
case 16: case 16:
RRC_CONFIGURATION_REQ (msg_p).mpdcch_NumRepetition_RA_r13[cc_idx][prachparamsindex] = LTE_PRACH_ParametersCE_r13__mpdcch_NumRepetition_RA_r13_r16; RRCcfg->mpdcch_NumRepetition_RA_r13[cc_idx][prachparamsindex] = LTE_PRACH_ParametersCE_r13__mpdcch_NumRepetition_RA_r13_r16;
break; break;
case 32: case 32:
RRC_CONFIGURATION_REQ (msg_p).mpdcch_NumRepetition_RA_r13[cc_idx][prachparamsindex] = LTE_PRACH_ParametersCE_r13__mpdcch_NumRepetition_RA_r13_r32; RRCcfg->mpdcch_NumRepetition_RA_r13[cc_idx][prachparamsindex] = LTE_PRACH_ParametersCE_r13__mpdcch_NumRepetition_RA_r13_r32;
break; break;
case 64: case 64:
RRC_CONFIGURATION_REQ (msg_p).mpdcch_NumRepetition_RA_r13[cc_idx][prachparamsindex] = LTE_PRACH_ParametersCE_r13__mpdcch_NumRepetition_RA_r13_r64; RRCcfg->mpdcch_NumRepetition_RA_r13[cc_idx][prachparamsindex] = LTE_PRACH_ParametersCE_r13__mpdcch_NumRepetition_RA_r13_r64;
break; break;
case 128: case 128:
RRC_CONFIGURATION_REQ (msg_p).mpdcch_NumRepetition_RA_r13[cc_idx][prachparamsindex] = LTE_PRACH_ParametersCE_r13__mpdcch_NumRepetition_RA_r13_r128; RRCcfg->mpdcch_NumRepetition_RA_r13[cc_idx][prachparamsindex] = LTE_PRACH_ParametersCE_r13__mpdcch_NumRepetition_RA_r13_r128;
break; break;
case 256: case 256:
RRC_CONFIGURATION_REQ (msg_p).mpdcch_NumRepetition_RA_r13[cc_idx][prachparamsindex] = LTE_PRACH_ParametersCE_r13__mpdcch_NumRepetition_RA_r13_r256; RRCcfg->mpdcch_NumRepetition_RA_r13[cc_idx][prachparamsindex] = LTE_PRACH_ParametersCE_r13__mpdcch_NumRepetition_RA_r13_r256;
break; break;
default: default:
AssertFatal (1==0, AssertFatal (1==0,
...@@ -1136,7 +1121,7 @@ void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, in ...@@ -1136,7 +1121,7 @@ void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, in
break; break;
} }
RRC_CONFIGURATION_REQ (msg_p).prach_HoppingConfig_r13[cc_idx][prachparamsindex] = eMTCconfig->prach_HoppingConfig_r13; RRCcfg->prach_HoppingConfig_r13[cc_idx][prachparamsindex] = eMTCconfig->prach_HoppingConfig_r13;
AssertFatal (eMTCconfig->prach_HoppingConfig_r13 >=0 && eMTCconfig->prach_HoppingConfig_r13 < 2, AssertFatal (eMTCconfig->prach_HoppingConfig_r13 >=0 && eMTCconfig->prach_HoppingConfig_r13 < 2,
"Illegal prach_HoppingConfig_r13 %d\n",eMTCconfig->prach_HoppingConfig_r13); "Illegal prach_HoppingConfig_r13 %d\n",eMTCconfig->prach_HoppingConfig_r13);
...@@ -1144,22 +1129,22 @@ void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, in ...@@ -1144,22 +1129,22 @@ void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, in
int maxavailablenarrowband_count = prachParams[7].numelt; int maxavailablenarrowband_count = prachParams[7].numelt;
RRC_CONFIGURATION_REQ (msg_p).max_available_narrow_band_size[cc_idx][prachparamsindex] = maxavailablenarrowband_count; RRCcfg->max_available_narrow_band_size[cc_idx][prachparamsindex] = maxavailablenarrowband_count;
int narrow_band_index; int narrow_band_index;
for (narrow_band_index = 0; narrow_band_index < maxavailablenarrowband_count; narrow_band_index++) { for (narrow_band_index = 0; narrow_band_index < maxavailablenarrowband_count; narrow_band_index++) {
RRC_CONFIGURATION_REQ (msg_p).max_available_narrow_band[cc_idx][prachparamsindex][narrow_band_index] = prachParams[7].iptr[narrow_band_index]; RRCcfg->max_available_narrow_band[cc_idx][prachparamsindex][narrow_band_index] = prachParams[7].iptr[narrow_band_index];
} }
} }
char n1PUCCHInfoParamsPath[MAX_OPTNAME_SIZE * 2]; char n1PUCCHInfoParamsPath[MAX_OPTNAME_SIZE * 2];
config_getlist(&n1PUCCHInfoList, NULL, 0, brparamspath); config_getlist(&n1PUCCHInfoList, NULL, 0, brparamspath);
RRC_CONFIGURATION_REQ (msg_p).pucch_info_value_size[cc_idx] = n1PUCCHInfoList.numelt; RRCcfg->pucch_info_value_size[cc_idx] = n1PUCCHInfoList.numelt;
int n1PUCCHinfolistindex; int n1PUCCHinfolistindex;
for (n1PUCCHinfolistindex = 0; n1PUCCHinfolistindex < n1PUCCHInfoList.numelt; n1PUCCHinfolistindex++) { for (n1PUCCHinfolistindex = 0; n1PUCCHinfolistindex < n1PUCCHInfoList.numelt; n1PUCCHinfolistindex++) {
sprintf(n1PUCCHInfoParamsPath, "%s.%s.[%i]", brparamspath, ENB_CONFIG_STRING_N1PUCCH_AN_INFOLIST_R13, n1PUCCHinfolistindex); sprintf(n1PUCCHInfoParamsPath, "%s.%s.[%i]", brparamspath, ENB_CONFIG_STRING_N1PUCCH_AN_INFOLIST_R13, n1PUCCHinfolistindex);
config_get(n1PUCCH_ANR13Params, sizeof(n1PUCCH_ANR13Params) / sizeof(paramdef_t), n1PUCCHInfoParamsPath); config_get(n1PUCCH_ANR13Params, sizeof(n1PUCCH_ANR13Params) / sizeof(paramdef_t), n1PUCCHInfoParamsPath);
RRC_CONFIGURATION_REQ (msg_p).pucch_info_value[cc_idx][n1PUCCHinfolistindex] = eMTCconfig->pucch_info_value; RRCcfg->pucch_info_value[cc_idx][n1PUCCHinfolistindex] = eMTCconfig->pucch_info_value;
} }
char PCCHConfigv1310Path[MAX_OPTNAME_SIZE*2 + 16]; char PCCHConfigv1310Path[MAX_OPTNAME_SIZE*2 + 16];
...@@ -1169,9 +1154,9 @@ void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, in ...@@ -1169,9 +1154,9 @@ void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, in
/** PCCH CONFIG V1310 */ /** PCCH CONFIG V1310 */
RRC_CONFIGURATION_REQ(msg_p).pcch_config_v1310[cc_idx] = true; RRCcfg->pcch_config_v1310[cc_idx] = true;
RRC_CONFIGURATION_REQ(msg_p).paging_narrowbands_r13[cc_idx] = eMTCconfig->paging_narrowbands_r13; RRCcfg->paging_narrowbands_r13[cc_idx] = eMTCconfig->paging_narrowbands_r13;
RRC_CONFIGURATION_REQ(msg_p).mpdcch_numrepetition_paging_r13[cc_idx] = eMTCconfig->mpdcch_numrepetition_paging_r13; RRCcfg->mpdcch_numrepetition_paging_r13[cc_idx] = eMTCconfig->mpdcch_numrepetition_paging_r13;
AssertFatal (eMTCconfig->mpdcch_numrepetition_paging_r13 == 0 || AssertFatal (eMTCconfig->mpdcch_numrepetition_paging_r13 == 0 ||
eMTCconfig->mpdcch_numrepetition_paging_r13 == 1 || eMTCconfig->mpdcch_numrepetition_paging_r13 == 1 ||
...@@ -1186,31 +1171,29 @@ void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, in ...@@ -1186,31 +1171,29 @@ void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, in
"illegal mpdcch_numrepetition_paging_r13 %d\n", "illegal mpdcch_numrepetition_paging_r13 %d\n",
eMTCconfig->mpdcch_numrepetition_paging_r13); eMTCconfig->mpdcch_numrepetition_paging_r13);
// RRC_CONFIGURATION_REQ(msg_p).nb_v1310[cc_idx] = CALLOC(1, sizeof(long)); // RRCcfg->nb_v1310[cc_idx] = CALLOC(1, sizeof(long));
// if (!strcmp(nb_v1310, "one64thT")) { // if (!strcmp(nb_v1310, "one64thT")) {
// *RRC_CONFIGURATION_REQ(msg_p).nb_v1310[cc_idx] = 0; // *RRCcfg->nb_v1310[cc_idx] = 0;
// } else if (!strcmp(nb_v1310, "one128thT")) { // } else if (!strcmp(nb_v1310, "one128thT")) {
// *RRC_CONFIGURATION_REQ(msg_p).nb_v1310[cc_idx] = 1; // *RRCcfg->nb_v1310[cc_idx] = 1;
// } else if (!strcmp(nb_v1310, "one256thT")) { // } else if (!strcmp(nb_v1310, "one256thT")) {
// *RRC_CONFIGURATION_REQ(msg_p).nb_v1310[cc_idx] = 2; // *RRCcfg->nb_v1310[cc_idx] = 2;
// } else { // } else {
// AssertFatal(0, // AssertFatal(0,
// "Failed to parse eNB configuration file %s, nb_v1310, unknown value !\n", // "Failed to parse eNB configuration file %s, nb_v1310, unknown value !\n",
// config_fname); // config_fname);
// } // }
RRCcfg->pucch_NumRepetitionCE_Msg4_Level0_r13[cc_idx] = CALLOC(1, sizeof(long));
RRC_CONFIGURATION_REQ (msg_p).pucch_NumRepetitionCE_Msg4_Level0_r13[cc_idx] = CALLOC(1, sizeof(long));
// ++cnt; // check this ,, the conter is up above // ++cnt; // check this ,, the conter is up above
if (!strcmp(eMTCconfig->pucch_NumRepetitionCE_Msg4_Level0_r13, "n1")) { if (!strcmp(eMTCconfig->pucch_NumRepetitionCE_Msg4_Level0_r13, "n1")) {
*RRC_CONFIGURATION_REQ (msg_p).pucch_NumRepetitionCE_Msg4_Level0_r13[cc_idx] = 0; *RRCcfg->pucch_NumRepetitionCE_Msg4_Level0_r13[cc_idx] = 0;
} else if (!strcmp(eMTCconfig->pucch_NumRepetitionCE_Msg4_Level0_r13, "n2")) { } else if (!strcmp(eMTCconfig->pucch_NumRepetitionCE_Msg4_Level0_r13, "n2")) {
*RRC_CONFIGURATION_REQ (msg_p).pucch_NumRepetitionCE_Msg4_Level0_r13[cc_idx] = 1; *RRCcfg->pucch_NumRepetitionCE_Msg4_Level0_r13[cc_idx] = 1;
} else if (!strcmp(eMTCconfig->pucch_NumRepetitionCE_Msg4_Level0_r13, "n4")) { } else if (!strcmp(eMTCconfig->pucch_NumRepetitionCE_Msg4_Level0_r13, "n4")) {
*RRC_CONFIGURATION_REQ (msg_p).pucch_NumRepetitionCE_Msg4_Level0_r13[cc_idx] = 2; *RRCcfg->pucch_NumRepetitionCE_Msg4_Level0_r13[cc_idx] = 2;
} else if (!strcmp(eMTCconfig->pucch_NumRepetitionCE_Msg4_Level0_r13, "n8")) { } else if (!strcmp(eMTCconfig->pucch_NumRepetitionCE_Msg4_Level0_r13, "n8")) {
*RRC_CONFIGURATION_REQ (msg_p).pucch_NumRepetitionCE_Msg4_Level0_r13[cc_idx] = 3; *RRCcfg->pucch_NumRepetitionCE_Msg4_Level0_r13[cc_idx] = 3;
} else { } else {
AssertFatal (0, AssertFatal (0,
"Failed to parse eNB configuration file %s, pucch_NumRepetitionCE_Msg4_Level0_r13 unknown value!\n", "Failed to parse eNB configuration file %s, pucch_NumRepetitionCE_Msg4_Level0_r13 unknown value!\n",
...@@ -1220,29 +1203,28 @@ void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, in ...@@ -1220,29 +1203,28 @@ void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, in
/** SIB2 FREQ HOPPING PARAMETERS R13 */ /** SIB2 FREQ HOPPING PARAMETERS R13 */
RRC_CONFIGURATION_REQ(msg_p).sib2_freq_hoppingParameters_r13_exists[cc_idx] = true; RRCcfg->sib2_freq_hoppingParameters_r13_exists[cc_idx] = true;
char sib2FreqHoppingParametersR13Path[MAX_OPTNAME_SIZE*2 + 16]; char sib2FreqHoppingParametersR13Path[MAX_OPTNAME_SIZE*2 + 16];
sprintf(sib2FreqHoppingParametersR13Path, "%s.%s", brparamspath, ENB_CONFIG_STRING_SIB2_FREQ_HOPPINGPARAMETERS_R13); sprintf(sib2FreqHoppingParametersR13Path, "%s.%s", brparamspath, ENB_CONFIG_STRING_SIB2_FREQ_HOPPINGPARAMETERS_R13);
config_get(sib2freqhoppingParams, sizeof(sib2freqhoppingParams)/sizeof(paramdef_t), sib2FreqHoppingParametersR13Path); config_get(sib2freqhoppingParams, sizeof(sib2freqhoppingParams)/sizeof(paramdef_t), sib2FreqHoppingParametersR13Path);
RRCcfg->sib2_interval_ULHoppingConfigCommonModeA_r13[cc_idx] = CALLOC(1, sizeof(long));
RRC_CONFIGURATION_REQ(msg_p).sib2_interval_ULHoppingConfigCommonModeA_r13[cc_idx] = CALLOC(1, sizeof(long));
if (!strcmp(eMTCconfig->sib2_interval_ULHoppingConfigCommonModeA_r13, "FDD")) { if (!strcmp(eMTCconfig->sib2_interval_ULHoppingConfigCommonModeA_r13, "FDD")) {
*RRC_CONFIGURATION_REQ(msg_p).sib2_interval_ULHoppingConfigCommonModeA_r13[cc_idx] = 0; *RRCcfg->sib2_interval_ULHoppingConfigCommonModeA_r13[cc_idx] = 0;
switch(eMTCconfig->sib2_interval_ULHoppingConfigCommonModeA_r13_val) { switch(eMTCconfig->sib2_interval_ULHoppingConfigCommonModeA_r13_val) {
case 1: case 1:
RRC_CONFIGURATION_REQ(msg_p).sib2_interval_ULHoppingConfigCommonModeA_r13_val[cc_idx] = 0; RRCcfg->sib2_interval_ULHoppingConfigCommonModeA_r13_val[cc_idx] = 0;
break; break;
case 2: case 2:
RRC_CONFIGURATION_REQ(msg_p).sib2_interval_ULHoppingConfigCommonModeA_r13_val[cc_idx] = 1; RRCcfg->sib2_interval_ULHoppingConfigCommonModeA_r13_val[cc_idx] = 1;
break; break;
case 4: case 4:
RRC_CONFIGURATION_REQ(msg_p).sib2_interval_ULHoppingConfigCommonModeA_r13_val[cc_idx] = 2; RRCcfg->sib2_interval_ULHoppingConfigCommonModeA_r13_val[cc_idx] = 2;
break; break;
case 8: case 8:
RRC_CONFIGURATION_REQ(msg_p).sib2_interval_ULHoppingConfigCommonModeA_r13_val[cc_idx] = 3; RRCcfg->sib2_interval_ULHoppingConfigCommonModeA_r13_val[cc_idx] = 3;
break; break;
default: default:
AssertFatal(1==0, AssertFatal(1==0,
...@@ -1250,19 +1232,19 @@ void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, in ...@@ -1250,19 +1232,19 @@ void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, in
eMTCconfig->sib2_interval_ULHoppingConfigCommonModeA_r13_val); eMTCconfig->sib2_interval_ULHoppingConfigCommonModeA_r13_val);
} }
} else if (!strcmp(eMTCconfig->sib2_interval_ULHoppingConfigCommonModeA_r13, "TDD")) { } else if (!strcmp(eMTCconfig->sib2_interval_ULHoppingConfigCommonModeA_r13, "TDD")) {
*RRC_CONFIGURATION_REQ(msg_p).sib2_interval_ULHoppingConfigCommonModeA_r13[cc_idx] = 1; *RRCcfg->sib2_interval_ULHoppingConfigCommonModeA_r13[cc_idx] = 1;
switch(eMTCconfig->sib2_interval_ULHoppingConfigCommonModeA_r13_val) { switch(eMTCconfig->sib2_interval_ULHoppingConfigCommonModeA_r13_val) {
case 1: case 1:
RRC_CONFIGURATION_REQ(msg_p).sib2_interval_ULHoppingConfigCommonModeA_r13_val[cc_idx] = 0; RRCcfg->sib2_interval_ULHoppingConfigCommonModeA_r13_val[cc_idx] = 0;
break; break;
case 5: case 5:
RRC_CONFIGURATION_REQ(msg_p).sib2_interval_ULHoppingConfigCommonModeA_r13_val[cc_idx] = 1; RRCcfg->sib2_interval_ULHoppingConfigCommonModeA_r13_val[cc_idx] = 1;
break; break;
case 10: case 10:
RRC_CONFIGURATION_REQ(msg_p).sib2_interval_ULHoppingConfigCommonModeA_r13_val[cc_idx] = 2; RRCcfg->sib2_interval_ULHoppingConfigCommonModeA_r13_val[cc_idx] = 2;
break; break;
case 20: case 20:
RRC_CONFIGURATION_REQ(msg_p).sib2_interval_ULHoppingConfigCommonModeA_r13_val[cc_idx] = 3; RRCcfg->sib2_interval_ULHoppingConfigCommonModeA_r13_val[cc_idx] = 3;
break; break;
default: default:
AssertFatal(1==0, AssertFatal(1==0,
......
...@@ -353,12 +353,9 @@ int DU_handle_DL_RRC_MESSAGE_TRANSFER(instance_t instance, ...@@ -353,12 +353,9 @@ int DU_handle_DL_RRC_MESSAGE_TRANSFER(instance_t instance,
if (mac_MainConfig->drx_Config == NULL) { if (mac_MainConfig->drx_Config == NULL) {
LOG_W(F1AP, "drx_Configuration parameter is NULL, cannot configure local UE parameters or CDRX is deactivated\n"); LOG_W(F1AP, "drx_Configuration parameter is NULL, cannot configure local UE parameters or CDRX is deactivated\n");
} else { } else {
MessageDef *message_p = NULL; rrc_mac_drx_config_req_t req = {.rnti = ctxt.rntiMaybeUEid, .drx_Configuration = mac_MainConfig->drx_Config};
/* Send DRX configuration to MAC task to configure timers of local UE context */ /* Send DRX configuration to MAC task to configure timers of local UE context */
message_p = itti_alloc_new_message(TASK_DU_F1, 0, RRC_MAC_DRX_CONFIG_REQ); eNB_Config_Local_DRX(instance, &req);
RRC_MAC_DRX_CONFIG_REQ(message_p).rnti = ctxt.rntiMaybeUEid;
RRC_MAC_DRX_CONFIG_REQ(message_p).drx_Configuration = mac_MainConfig->drx_Config;
itti_send_msg_to_task(TASK_MAC_ENB, ctxt.instance, message_p);
LOG_D(F1AP, "DRX configured in MAC Main Configuration for RRC Connection Reconfiguration\n"); LOG_D(F1AP, "DRX configured in MAC Main Configuration for RRC Connection Reconfiguration\n");
} }
......
...@@ -470,7 +470,7 @@ check_ul_failure(module_id_t module_idP, int CC_id, int UE_id, ...@@ -470,7 +470,7 @@ check_ul_failure(module_id_t module_idP, int CC_id, int UE_id,
if (UE_info->UE_sched_ctrl[UE_id].ul_failure_timer > 4000) { if (UE_info->UE_sched_ctrl[UE_id].ul_failure_timer > 4000) {
// note: probably ul_failure_timer should be less than UE radio link failure time(see T310/N310/N311) // note: probably ul_failure_timer should be less than UE radio link failure time(see T310/N310/N311)
if (NODE_IS_DU(RC.rrc[module_idP]->node_type)) { if (NODE_IS_DU(RC.rrc[module_idP]->node_type)) {
MessageDef *m = itti_alloc_new_message(TASK_MAC_ENB, 0, F1AP_UE_CONTEXT_RELEASE_REQ); MessageDef *m = itti_alloc_new_message(TASK_PHY_ENB, 0, F1AP_UE_CONTEXT_RELEASE_REQ);
F1AP_UE_CONTEXT_RELEASE_REQ(m).rnti = rnti; F1AP_UE_CONTEXT_RELEASE_REQ(m).rnti = rnti;
F1AP_UE_CONTEXT_RELEASE_REQ(m).cause = F1AP_CAUSE_RADIO_NETWORK; F1AP_UE_CONTEXT_RELEASE_REQ(m).cause = F1AP_CAUSE_RADIO_NETWORK;
F1AP_UE_CONTEXT_RELEASE_REQ(m).cause_value = 1; // 1 = F1AP_CauseRadioNetwork_rl_failure F1AP_UE_CONTEXT_RELEASE_REQ(m).cause_value = 1; // 1 = F1AP_CauseRadioNetwork_rl_failure
......
...@@ -1396,10 +1396,16 @@ initiate_ra_proc(module_id_t module_idP, ...@@ -1396,10 +1396,16 @@ initiate_ra_proc(module_id_t module_idP,
ra[i].RA_rnti = ra_rnti; ra[i].RA_rnti = ra_rnti;
ra[i].preamble_index = preamble_index; ra[i].preamble_index = preamble_index;
failure_cnt = 0; failure_cnt = 0;
LOG_D(MAC, LOG_I(MAC,
"[eNB %d][RAPROC] CC_id %d Frame %d Activating RAR generation in Frame %d, subframe %d for process %d, rnti %x, state %d\n", "[eNB %d][RAPROC] CC_id %d Frame %d Activating RAR generation in Frame %d, subframe %d for process %d, rnti %x, state %d\n",
module_idP, CC_id, frameP, ra[i].Msg2_frame, module_idP,
ra[i].Msg2_subframe, i, ra[i].rnti, ra[i].state); CC_id,
frameP,
ra[i].Msg2_frame,
ra[i].Msg2_subframe,
i,
ra[i].rnti,
ra[i].state);
return; return;
} }
} }
......
...@@ -3206,11 +3206,7 @@ void schedule_ulsch_rnti_fairRR(module_id_t module_idP, ...@@ -3206,11 +3206,7 @@ void schedule_ulsch_rnti_fairRR(module_id_t module_idP,
UE_template->nb_rb_ul[harq_pid] = rb_table[rb_table_index]; UE_template->nb_rb_ul[harq_pid] = rb_table[rb_table_index];
UE_template->first_rb_ul[harq_pid] = first_rb[CC_id]; UE_template->first_rb_ul[harq_pid] = first_rb[CC_id];
UE_template->cqi_req[harq_pid] = cqi_req; UE_template->cqi_req[harq_pid] = cqi_req;
UE_sched_ctrl->ul_scheduled |= (1<<harq_pid); UE_sched_ctrl->ul_scheduled |= (1 << harq_pid);
if (UE_id == UE_info->list.head)
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_UE0_SCHEDULED,UE_sched_ctrl->ul_scheduled);
// adjust total UL buffer status by TBS, wait for UL sdus to do final update // adjust total UL buffer status by TBS, wait for UL sdus to do final update
/*LOG_D(MAC,"[eNB %d] CC_id %d UE %d/%x : adjusting ul_total_buffer, old %d, TBS %d\n", module_idP,CC_id,UE_id,rnti,UE_template->ul_total_buffer,UE_template->TBS_UL[harq_pid]); /*LOG_D(MAC,"[eNB %d] CC_id %d UE %d/%x : adjusting ul_total_buffer, old %d, TBS %d\n", module_idP,CC_id,UE_id,rnti,UE_template->ul_total_buffer,UE_template->TBS_UL[harq_pid]);
if (UE_template->ul_total_buffer > UE_template->TBS_UL[harq_pid]) if (UE_template->ul_total_buffer > UE_template->TBS_UL[harq_pid])
......
...@@ -1989,12 +1989,11 @@ find_UE_id(module_id_t mod_idP, ...@@ -1989,12 +1989,11 @@ find_UE_id(module_id_t mod_idP,
rnti_t rntiP) rnti_t rntiP)
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
{ {
int UE_id;
UE_info_t *UE_info = &RC.mac[mod_idP]->UE_info; UE_info_t *UE_info = &RC.mac[mod_idP]->UE_info;
if(!UE_info) if(!UE_info)
return -1; return -1;
for (UE_id = 0; UE_id < MAX_MOBILES_PER_ENB; UE_id++) { for (int UE_id = 0; UE_id < MAX_MOBILES_PER_ENB; UE_id++) {
if (UE_info->active[UE_id] == true) { if (UE_info->active[UE_id] == true) {
int CC_id = UE_PCCID(mod_idP, UE_id); int CC_id = UE_PCCID(mod_idP, UE_id);
if (CC_id>=0 && CC_id<NFAPI_CC_MAX && UE_info->UE_template[CC_id][UE_id].rnti == rntiP) { if (CC_id>=0 && CC_id<NFAPI_CC_MAX && UE_info->UE_template[CC_id][UE_id].rnti == rntiP) {
...@@ -2144,6 +2143,7 @@ inline void add_ue_list(UE_list_t *listP, int UE_id) { ...@@ -2144,6 +2143,7 @@ inline void add_ue_list(UE_list_t *listP, int UE_id) {
while (*cur >= 0) while (*cur >= 0)
cur = &listP->next[*cur]; cur = &listP->next[*cur];
*cur = UE_id; *cur = UE_id;
LOG_D(MAC, "added UE %d in UE list\n", UE_id);
} }
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
......
...@@ -109,6 +109,7 @@ void lte_dump_mac_stats(eNB_MAC_INST *mac, FILE *fd) ...@@ -109,6 +109,7 @@ void lte_dump_mac_stats(eNB_MAC_INST *mac, FILE *fd)
UE_info->eNB_UE_stats[CC_id][UE_id].dlsch_errors); UE_info->eNB_UE_stats[CC_id][UE_id].dlsch_errors);
} }
} }
fflush(fd);
return; return;
} }
...@@ -270,47 +271,3 @@ int l2_init_eNB(void) ...@@ -270,47 +271,3 @@ int l2_init_eNB(void)
return (1); return (1);
} }
//-----------------------------------------------------------------------------
/*
* Main loop of MAC itti message handling
*/
void *mac_enb_task(void *arg)
//-----------------------------------------------------------------------------
{
MessageDef *received_msg = NULL;
int result;
itti_mark_task_ready(TASK_MAC_ENB); // void function 10/2019
LOG_I(MAC,"Starting main loop of MAC message task\n");
while (1) {
itti_receive_msg(TASK_MAC_ENB, &received_msg);
switch (ITTI_MSG_ID(received_msg)) {
case RRC_MAC_DRX_CONFIG_REQ:
LOG_I(MAC, "MAC Task Received RRC_MAC_DRX_CONFIG_REQ\n");
/* Set timers and thresholds values in local MAC context of UE */
eNB_Config_Local_DRX(ITTI_MSG_DESTINATION_INSTANCE(received_msg), &received_msg->ittiMsg.rrc_mac_drx_config_req);
break;
case TERMINATE_MESSAGE:
LOG_W(MAC, " *** Exiting MAC thread\n");
itti_exit_task();
break;
default:
LOG_E(MAC, "MAC instance received unhandled message: %d:%s\n",
ITTI_MSG_ID(received_msg),
ITTI_MSG_NAME(received_msg));
break;
} // end switch
result = itti_free(ITTI_MSG_ORIGIN_ID(received_msg), received_msg);
AssertFatal(result == EXIT_SUCCESS, "Failed to free memory (%d)!\n", result);
received_msg = NULL;
} // end while
return NULL;
}
...@@ -971,48 +971,50 @@ void release_UE_in_freeList(module_id_t mod_id) { ...@@ -971,48 +971,50 @@ void release_UE_in_freeList(module_id_t mod_id) {
for(int ue_num = 0; ue_num < sizeofArray(eNB_MAC->UE_free_ctrl) ; ue_num++) { for(int ue_num = 0; ue_num < sizeofArray(eNB_MAC->UE_free_ctrl) ; ue_num++) {
rnti_t rnti = eNB_MAC->UE_free_ctrl[ue_num].rnti; rnti_t rnti = eNB_MAC->UE_free_ctrl[ue_num].rnti;
if (!rnti)
if(rnti != 0) { continue;
protocol_ctxt_t ctxt; protocol_ctxt_t ctxt;
PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, mod_id, ENB_FLAG_YES, rnti, 0, 0,mod_id); PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, mod_id, ENB_FLAG_YES, rnti, 0, 0, mod_id);
for (int CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++) { for (int CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++) {
eNB_PHY = RC.eNB[mod_id][CC_id]; eNB_PHY = RC.eNB[mod_id][CC_id];
int id; int id;
// clean ULSCH entries for rnti // clean ULSCH entries for rnti
id = find_ulsch(rnti,eNB_PHY,eNB_MAC->UE_free_ctrl[ue_num].raFlag ? SEARCH_EXIST_RA : SEARCH_EXIST); id = find_ulsch(rnti, eNB_PHY, eNB_MAC->UE_free_ctrl[ue_num].raFlag ? SEARCH_EXIST_RA : SEARCH_EXIST);
if (id>=0) clean_eNb_ulsch(eNB_PHY->ulsch[id]); if (id >= 0)
clean_eNb_ulsch(eNB_PHY->ulsch[id]);
// clean DLSCH entries for rnti // clean DLSCH entries for rnti
id = find_dlsch(rnti,eNB_PHY,eNB_MAC->UE_free_ctrl[ue_num].raFlag ? SEARCH_EXIST_RA : SEARCH_EXIST); id = find_dlsch(rnti, eNB_PHY, eNB_MAC->UE_free_ctrl[ue_num].raFlag ? SEARCH_EXIST_RA : SEARCH_EXIST);
if (id>=0) clean_eNb_dlsch(eNB_PHY->dlsch[id][0]); if (id >= 0)
clean_eNb_dlsch(eNB_PHY->dlsch[id][0]);
// clean UCI entries for rnti // clean UCI entries for rnti
for (int i=0; i<NUMBER_OF_UCI_MAX; i++) { for (int i = 0; i < NUMBER_OF_UCI_MAX; i++) {
if(eNB_PHY->uci_vars[i].rnti == rnti) { if (eNB_PHY->uci_vars[i].rnti == rnti) {
LOG_I(MAC, "clean eNb uci_vars[%d] UE %x \n",i, rnti); LOG_I(MAC, "clean eNb uci_vars[%d] UE %x \n", i, rnti);
memset(&eNB_PHY->uci_vars[i],0,sizeof(LTE_eNB_UCI)); memset(&eNB_PHY->uci_vars[i], 0, sizeof(LTE_eNB_UCI));
} }
} }
for(int j = 0; j < 10; j++) { for(int j = 0; j < 10; j++) {
nfapi_ul_config_request_body_t *ul_req_tmp = &eNB_MAC->UL_req_tmp[CC_id][j].ul_config_request_body; nfapi_ul_config_request_body_t *ul_req_tmp = &eNB_MAC->UL_req_tmp[CC_id][j].ul_config_request_body;
if(ul_req_tmp) { if (ul_req_tmp) {
int pdu_number = ul_req_tmp->number_of_pdus; int pdu_number = ul_req_tmp->number_of_pdus;
for(int pdu_index = pdu_number-1; pdu_index >= 0; pdu_index--) { for (int pdu_index = pdu_number - 1; pdu_index >= 0; pdu_index--) {
if((ul_req_tmp->ul_config_pdu_list[pdu_index].ulsch_pdu.ulsch_pdu_rel8.rnti == rnti) || if ((ul_req_tmp->ul_config_pdu_list[pdu_index].ulsch_pdu.ulsch_pdu_rel8.rnti == rnti)
(ul_req_tmp->ul_config_pdu_list[pdu_index].uci_harq_pdu.ue_information.ue_information_rel8.rnti == rnti) || || (ul_req_tmp->ul_config_pdu_list[pdu_index].uci_harq_pdu.ue_information.ue_information_rel8.rnti == rnti)
(ul_req_tmp->ul_config_pdu_list[pdu_index].uci_cqi_pdu.ue_information.ue_information_rel8.rnti == rnti) || || (ul_req_tmp->ul_config_pdu_list[pdu_index].uci_cqi_pdu.ue_information.ue_information_rel8.rnti == rnti)
(ul_req_tmp->ul_config_pdu_list[pdu_index].uci_sr_pdu.ue_information.ue_information_rel8.rnti == rnti) || || (ul_req_tmp->ul_config_pdu_list[pdu_index].uci_sr_pdu.ue_information.ue_information_rel8.rnti == rnti)
(ul_req_tmp->ul_config_pdu_list[pdu_index].srs_pdu.srs_pdu_rel8.rnti == rnti)) { || (ul_req_tmp->ul_config_pdu_list[pdu_index].srs_pdu.srs_pdu_rel8.rnti == rnti)) {
LOG_I(RRC, "remove UE %x from ul_config_pdu_list %d/%d\n", rnti, pdu_index, pdu_number); LOG_I(RRC, "remove UE %x from ul_config_pdu_list %d/%d\n", rnti, pdu_index, pdu_number);
if(pdu_index < pdu_number -1) { if (pdu_index < pdu_number - 1) {
memcpy(&ul_req_tmp->ul_config_pdu_list[pdu_index], &ul_req_tmp->ul_config_pdu_list[pdu_index+1], (pdu_number-1-pdu_index) * sizeof(nfapi_ul_config_request_pdu_t)); memcpy(&ul_req_tmp->ul_config_pdu_list[pdu_index], &ul_req_tmp->ul_config_pdu_list[pdu_index + 1], (pdu_number - 1 - pdu_index) * sizeof(nfapi_ul_config_request_pdu_t));
} }
ul_req_tmp->number_of_pdus--; ul_req_tmp->number_of_pdus--;
...@@ -1049,7 +1051,6 @@ void release_UE_in_freeList(module_id_t mod_id) { ...@@ -1049,7 +1051,6 @@ void release_UE_in_freeList(module_id_t mod_id) {
LOG_I(RRC, "[release_UE_in_freeList] remove UE %x from freeList ra context: %d\n", rnti, eNB_MAC->UE_free_ctrl[ue_num].raFlag); LOG_I(RRC, "[release_UE_in_freeList] remove UE %x from freeList ra context: %d\n", rnti, eNB_MAC->UE_free_ctrl[ue_num].raFlag);
eNB_MAC->UE_free_ctrl[ue_num].rnti = 0; eNB_MAC->UE_free_ctrl[ue_num].rnti = 0;
} }
}
pthread_mutex_unlock(&lock_ue_freelist); pthread_mutex_unlock(&lock_ue_freelist);
} }
...@@ -2658,7 +2659,6 @@ void rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt_t ...@@ -2658,7 +2659,6 @@ void rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt_t
uint8_t buffer[RRC_BUF_SIZE]; uint8_t buffer[RRC_BUF_SIZE];
uint16_t size; uint16_t size;
int i; int i;
MessageDef *message_p = NULL;
/* Configure SRB1/SRB2, PhysicalConfigDedicated, LTE_MAC_MainConfig for UE */ /* Configure SRB1/SRB2, PhysicalConfigDedicated, LTE_MAC_MainConfig for UE */
eNB_RRC_INST *rrc_inst = RC.rrc[ctxt_pP->module_id]; eNB_RRC_INST *rrc_inst = RC.rrc[ctxt_pP->module_id];
struct LTE_PhysicalConfigDedicated **physicalConfigDedicated = &ue_context_pP->ue_context.physicalConfigDedicated; struct LTE_PhysicalConfigDedicated **physicalConfigDedicated = &ue_context_pP->ue_context.physicalConfigDedicated;
...@@ -2854,10 +2854,8 @@ void rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt_t ...@@ -2854,10 +2854,8 @@ void rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt_t
LOG_W(RRC, "drx_Configuration parameter is NULL, cannot configure local UE parameters or CDRX is deactivated\n"); LOG_W(RRC, "drx_Configuration parameter is NULL, cannot configure local UE parameters or CDRX is deactivated\n");
} else { } else {
/* Send DRX configuration to MAC task to configure timers of local UE context */ /* Send DRX configuration to MAC task to configure timers of local UE context */
message_p = itti_alloc_new_message(TASK_RRC_ENB, 0, RRC_MAC_DRX_CONFIG_REQ); rrc_mac_drx_config_req_t req = {.rnti = rnti, .drx_Configuration = mac_MainConfig->drx_Config};
RRC_MAC_DRX_CONFIG_REQ(message_p).rnti = rnti; eNB_Config_Local_DRX(module_id, &req);
RRC_MAC_DRX_CONFIG_REQ(message_p).drx_Configuration = mac_MainConfig->drx_Config;
itti_send_msg_to_task(TASK_MAC_ENB, module_id, message_p);
LOG_D(RRC, "DRX configured in MAC Main Configuration for RRC Connection Reconfiguration\n"); LOG_D(RRC, "DRX configured in MAC Main Configuration for RRC Connection Reconfiguration\n");
} }
} }
...@@ -5952,7 +5950,7 @@ rrc_eNB_decode_ccch( ...@@ -5952,7 +5950,7 @@ rrc_eNB_decode_ccch(
} }
c_rnti = BIT_STRING_to_uint16(&rrcConnectionReestablishmentRequest->ue_Identity.c_RNTI); c_rnti = BIT_STRING_to_uint16(&rrcConnectionReestablishmentRequest->ue_Identity.c_RNTI);
LOG_D(RRC, "c_rnti is %x\n", c_rnti); LOG_I(RRC, "reestablishment, previous c_rnti is %x (new is %x)\n", c_rnti, ctxt_pP->rnti);
ue_context_p = rrc_eNB_get_ue_context(RC.rrc[ctxt_pP->module_id], c_rnti); ue_context_p = rrc_eNB_get_ue_context(RC.rrc[ctxt_pP->module_id], c_rnti);
if (ue_context_p == NULL) { if (ue_context_p == NULL) {
...@@ -6008,7 +6006,7 @@ rrc_eNB_decode_ccch( ...@@ -6008,7 +6006,7 @@ rrc_eNB_decode_ccch(
if((RC.mac[ctxt_pP->module_id]->UE_info.UE_sched_ctrl[UE_id].ue_reestablishment_reject_timer > 0) && if((RC.mac[ctxt_pP->module_id]->UE_info.UE_sched_ctrl[UE_id].ue_reestablishment_reject_timer > 0) &&
(RC.mac[ctxt_pP->module_id]->UE_info.UE_sched_ctrl[UE_id].ue_reestablishment_reject_timer_thres > 20)) { (RC.mac[ctxt_pP->module_id]->UE_info.UE_sched_ctrl[UE_id].ue_reestablishment_reject_timer_thres > 20)) {
LOG_E(RRC, LOG_E(RRC,
PROTOCOL_RRC_CTXT_UE_FMT" RCConnectionReestablishmentComplete(Previous) don't receive, delete the Previous UE\n", PROTOCOL_RRC_CTXT_UE_FMT " RCConnectionReestablishmentComplete not received, but we get a new RRCConnectionReestablishmentRequest, we delete the Previous UE\n",
PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP)); PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP));
RC.mac[ctxt_pP->module_id]->UE_info.UE_sched_ctrl[UE_id].ue_reestablishment_reject_timer = 1000; RC.mac[ctxt_pP->module_id]->UE_info.UE_sched_ctrl[UE_id].ue_reestablishment_reject_timer = 1000;
rrc_eNB_previous_SRB2(ue_context_p); rrc_eNB_previous_SRB2(ue_context_p);
...@@ -6027,10 +6025,9 @@ rrc_eNB_decode_ccch( ...@@ -6027,10 +6025,9 @@ rrc_eNB_decode_ccch(
if(ue_context_p->ue_context.ue_reestablishment_timer > 0) { if(ue_context_p->ue_context.ue_reestablishment_timer > 0) {
LOG_E(RRC, LOG_E(RRC,
PROTOCOL_RRC_CTXT_UE_FMT" RRRCConnectionReconfigurationComplete(Previous) don't receive, delete the Previous UE,\nprevious Status %d, new Status RRC_RECONFIGURED\n", PROTOCOL_RRC_CTXT_UE_FMT " RRRCConnectionReconfigurationComplete not received, delete the Previous UE,\nprevious Status %d, new Status RRC_RECONFIGURED\n",
PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP), PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP),
ue_context_p->ue_context.StatusRrc ue_context_p->ue_context.StatusRrc);
);
ue_context_p->ue_context.StatusRrc = RRC_RECONFIGURED; ue_context_p->ue_context.StatusRrc = RRC_RECONFIGURED;
protocol_ctxt_t ctxt_old_p; protocol_ctxt_t ctxt_old_p;
PROTOCOL_CTXT_SET_BY_INSTANCE(&ctxt_old_p, PROTOCOL_CTXT_SET_BY_INSTANCE(&ctxt_old_p,
...@@ -8082,13 +8079,14 @@ void *rrc_enb_process_itti_msg(void *notUsed) { ...@@ -8082,13 +8079,14 @@ void *rrc_enb_process_itti_msg(void *notUsed) {
protocol_ctxt_t ctxt; protocol_ctxt_t ctxt;
memset(&ctxt, 0, sizeof(ctxt)); memset(&ctxt, 0, sizeof(ctxt));
// Wait for a message // Wait for a message
itti_receive_msg(TASK_RRC_ENB, &msg_p); itti_poll_msg(TASK_RRC_ENB, &msg_p);
while (msg_p) {
msg_name_p = ITTI_MSG_NAME(msg_p); msg_name_p = ITTI_MSG_NAME(msg_p);
instance = ITTI_MSG_DESTINATION_INSTANCE(msg_p); instance = ITTI_MSG_DESTINATION_INSTANCE(msg_p);
/* RRC_SUBFRAME_PROCESS is sent every subframe, do not log it */ /* RRC_SUBFRAME_PROCESS is sent every subframe, do not log it */
if (ITTI_MSG_ID(msg_p) != RRC_SUBFRAME_PROCESS) if (ITTI_MSG_ID(msg_p) != RRC_SUBFRAME_PROCESS)
LOG_D(RRC,"Received message %s\n",msg_name_p); LOG_D(RRC, "Received message %s\n", msg_name_p);
switch (ITTI_MSG_ID(msg_p)) { switch (ITTI_MSG_ID(msg_p)) {
case TERMINATE_MESSAGE: case TERMINATE_MESSAGE:
...@@ -8102,51 +8100,28 @@ void *rrc_enb_process_itti_msg(void *notUsed) { ...@@ -8102,51 +8100,28 @@ void *rrc_enb_process_itti_msg(void *notUsed) {
/* Messages from MAC */ /* Messages from MAC */
case RRC_MAC_CCCH_DATA_IND: case RRC_MAC_CCCH_DATA_IND:
PROTOCOL_CTXT_SET_BY_INSTANCE(&ctxt, PROTOCOL_CTXT_SET_BY_INSTANCE(
RRC_MAC_CCCH_DATA_IND(msg_p).enb_index, &ctxt, RRC_MAC_CCCH_DATA_IND(msg_p).enb_index, ENB_FLAG_YES, RRC_MAC_CCCH_DATA_IND(msg_p).rnti, msg_p->ittiMsgHeader.lte_time.frame, msg_p->ittiMsgHeader.lte_time.slot);
ENB_FLAG_YES, LOG_I(RRC, "Decoding CCCH : inst %ld, CC_id %d, ctxt %p, sib_info_p->Rx_buffer.payload_size %d\n", instance, RRC_MAC_CCCH_DATA_IND(msg_p).CC_id, &ctxt, RRC_MAC_CCCH_DATA_IND(msg_p).sdu_size);
RRC_MAC_CCCH_DATA_IND(msg_p).rnti,
msg_p->ittiMsgHeader.lte_time.frame,
msg_p->ittiMsgHeader.lte_time.slot);
LOG_I(RRC,"Decoding CCCH : inst %ld, CC_id %d, ctxt %p, sib_info_p->Rx_buffer.payload_size %d\n",
instance,
RRC_MAC_CCCH_DATA_IND(msg_p).CC_id,
&ctxt,
RRC_MAC_CCCH_DATA_IND(msg_p).sdu_size);
if (RRC_MAC_CCCH_DATA_IND(msg_p).sdu_size >= CCCH_SDU_SIZE) { if (RRC_MAC_CCCH_DATA_IND(msg_p).sdu_size >= CCCH_SDU_SIZE) {
LOG_I(RRC, "CCCH message has size %d > %d\n", LOG_I(RRC, "CCCH message has size %d > %d\n", RRC_MAC_CCCH_DATA_IND(msg_p).sdu_size, CCCH_SDU_SIZE);
RRC_MAC_CCCH_DATA_IND(msg_p).sdu_size,CCCH_SDU_SIZE);
break; break;
} }
rrc_eNB_decode_ccch(&ctxt, rrc_eNB_decode_ccch(&ctxt, (uint8_t *)RRC_MAC_CCCH_DATA_IND(msg_p).sdu, RRC_MAC_CCCH_DATA_IND(msg_p).sdu_size, RRC_MAC_CCCH_DATA_IND(msg_p).CC_id);
(uint8_t *)RRC_MAC_CCCH_DATA_IND(msg_p).sdu,
RRC_MAC_CCCH_DATA_IND(msg_p).sdu_size,
RRC_MAC_CCCH_DATA_IND(msg_p).CC_id);
break; break;
/* Messages from PDCP */ /* Messages from PDCP */
case RRC_DCCH_DATA_IND: case RRC_DCCH_DATA_IND:
PROTOCOL_CTXT_SET_BY_INSTANCE(&ctxt, PROTOCOL_CTXT_SET_BY_INSTANCE(&ctxt, instance, ENB_FLAG_YES, RRC_DCCH_DATA_IND(msg_p).rnti, msg_p->ittiMsgHeader.lte_time.frame, msg_p->ittiMsgHeader.lte_time.slot);
instance, LOG_D(RRC, PROTOCOL_RRC_CTXT_UE_FMT " Received on DCCH %d %s\n", PROTOCOL_RRC_CTXT_UE_ARGS(&ctxt), RRC_DCCH_DATA_IND(msg_p).dcch_index, msg_name_p);
ENB_FLAG_YES, rrc_eNB_decode_dcch(&ctxt, RRC_DCCH_DATA_IND(msg_p).dcch_index, RRC_DCCH_DATA_IND(msg_p).sdu_p, RRC_DCCH_DATA_IND(msg_p).sdu_size);
RRC_DCCH_DATA_IND(msg_p).rnti,
msg_p->ittiMsgHeader.lte_time.frame,
msg_p->ittiMsgHeader.lte_time.slot);
LOG_D(RRC, PROTOCOL_RRC_CTXT_UE_FMT" Received on DCCH %d %s\n",
PROTOCOL_RRC_CTXT_UE_ARGS(&ctxt),
RRC_DCCH_DATA_IND(msg_p).dcch_index,
msg_name_p);
rrc_eNB_decode_dcch(&ctxt,
RRC_DCCH_DATA_IND(msg_p).dcch_index,
RRC_DCCH_DATA_IND(msg_p).sdu_p,
RRC_DCCH_DATA_IND(msg_p).sdu_size);
// Message buffer has been processed, free it now. // Message buffer has been processed, free it now.
result = itti_free(ITTI_MSG_ORIGIN_ID(msg_p), RRC_DCCH_DATA_IND(msg_p).sdu_p); result = itti_free(ITTI_MSG_ORIGIN_ID(msg_p), RRC_DCCH_DATA_IND(msg_p).sdu_p);
if (result != EXIT_SUCCESS) { if (result != EXIT_SUCCESS) {
LOG_I(RRC, "Failed to free memory (%d)!\n",result); LOG_I(RRC, "Failed to free memory (%d)!\n", result);
break; break;
} }
...@@ -8218,15 +8193,15 @@ void *rrc_enb_process_itti_msg(void *notUsed) { ...@@ -8218,15 +8193,15 @@ void *rrc_enb_process_itti_msg(void *notUsed) {
if (ue_context_p == NULL) { if (ue_context_p == NULL) {
/* is it possible? */ /* is it possible? */
LOG_E(RRC, "could not find UE (rnti %x) while processing X2AP_HANDOVER_REQ_ACK\n", LOG_E(RRC, "could not find UE (rnti %x) while processing X2AP_HANDOVER_REQ_ACK\n", X2AP_HANDOVER_REQ_ACK(msg_p).rnti);
X2AP_HANDOVER_REQ_ACK(msg_p).rnti);
exit(1); exit(1);
} }
LOG_I(RRC, "[eNB %ld] source eNB receives the X2 HO ACK %s\n", instance, msg_name_p); LOG_I(RRC, "[eNB %ld] source eNB receives the X2 HO ACK %s\n", instance, msg_name_p);
DevAssert(ue_context_p != NULL); DevAssert(ue_context_p != NULL);
if (ue_context_p->ue_context.handover_info->state != HO_REQUEST) abort(); if (ue_context_p->ue_context.handover_info->state != HO_REQUEST)
abort();
hash_rc = hashtable_get(RC.gtpv1u_data_g->ue_mapping, ue_context_p->ue_context.rnti, (void **)&gtpv1u_ue_data_p); hash_rc = hashtable_get(RC.gtpv1u_data_g->ue_mapping, ue_context_p->ue_context.rnti, (void **)&gtpv1u_ue_data_p);
...@@ -8242,26 +8217,22 @@ void *rrc_enb_process_itti_msg(void *notUsed) { ...@@ -8242,26 +8217,22 @@ void *rrc_enb_process_itti_msg(void *notUsed) {
nb_e_rabs_tobesetup = x2ap_handover_req_ack->nb_e_rabs_tobesetup; nb_e_rabs_tobesetup = x2ap_handover_req_ack->nb_e_rabs_tobesetup;
ue_context_p->ue_context.nb_x2u_e_rabs = nb_e_rabs_tobesetup; ue_context_p->ue_context.nb_x2u_e_rabs = nb_e_rabs_tobesetup;
for(int i=0; i< nb_e_rabs_tobesetup; i++) { for (int i = 0; i < nb_e_rabs_tobesetup; i++) {
ip_offset = 0; ip_offset = 0;
eps_bearer_id = x2ap_handover_req_ack->e_rabs_tobesetup[i].e_rab_id; eps_bearer_id = x2ap_handover_req_ack->e_rabs_tobesetup[i].e_rab_id;
ue_context_p->ue_context.enb_gtp_x2u_ebi[i] = eps_bearer_id; ue_context_p->ue_context.enb_gtp_x2u_ebi[i] = eps_bearer_id;
ue_context_p->ue_context.enb_gtp_x2u_teid[i] = x2ap_handover_req_ack->e_rabs_tobesetup[i].gtp_teid; ue_context_p->ue_context.enb_gtp_x2u_teid[i] = x2ap_handover_req_ack->e_rabs_tobesetup[i].gtp_teid;
gtpv1u_ue_data_p->bearers[eps_bearer_id - GTPV1U_BEARER_OFFSET].teid_teNB = x2ap_handover_req_ack->e_rabs_tobesetup[i].gtp_teid; gtpv1u_ue_data_p->bearers[eps_bearer_id - GTPV1U_BEARER_OFFSET].teid_teNB = x2ap_handover_req_ack->e_rabs_tobesetup[i].gtp_teid;
if ((x2ap_handover_req_ack->e_rabs_tobesetup[i].eNB_addr.length == 4) || if ((x2ap_handover_req_ack->e_rabs_tobesetup[i].eNB_addr.length == 4) || (x2ap_handover_req_ack->e_rabs_tobesetup[i].eNB_addr.length == 20)) {
(x2ap_handover_req_ack->e_rabs_tobesetup[i].eNB_addr.length == 20)) {
in_addr = *((in_addr_t *)x2ap_handover_req_ack->e_rabs_tobesetup[i].eNB_addr.buffer); in_addr = *((in_addr_t *)x2ap_handover_req_ack->e_rabs_tobesetup[i].eNB_addr.buffer);
ip_offset = 4; ip_offset = 4;
gtpv1u_ue_data_p->bearers[eps_bearer_id - GTPV1U_BEARER_OFFSET].tenb_ip_addr = in_addr; gtpv1u_ue_data_p->bearers[eps_bearer_id - GTPV1U_BEARER_OFFSET].tenb_ip_addr = in_addr;
ue_context_p->ue_context.enb_gtp_x2u_addrs[i] = x2ap_handover_req_ack->e_rabs_tobesetup[i].eNB_addr; ue_context_p->ue_context.enb_gtp_x2u_addrs[i] = x2ap_handover_req_ack->e_rabs_tobesetup[i].eNB_addr;
} }
if ((x2ap_handover_req_ack->e_rabs_tobesetup[i].eNB_addr.length == 16) || if ((x2ap_handover_req_ack->e_rabs_tobesetup[i].eNB_addr.length == 16) || (x2ap_handover_req_ack->e_rabs_tobesetup[i].eNB_addr.length == 20)) {
(x2ap_handover_req_ack->e_rabs_tobesetup[i].eNB_addr.length == 20)) { memcpy(gtpv1u_ue_data_p->bearers[eps_bearer_id - GTPV1U_BEARER_OFFSET].tenb_ip6_addr.s6_addr, &x2ap_handover_req_ack->e_rabs_tobesetup[i].eNB_addr.buffer[ip_offset], 16);
memcpy(gtpv1u_ue_data_p->bearers[eps_bearer_id - GTPV1U_BEARER_OFFSET].tenb_ip6_addr.s6_addr,
&x2ap_handover_req_ack->e_rabs_tobesetup[i].eNB_addr.buffer[ip_offset],
16);
} }
} }
} }
...@@ -8277,7 +8248,8 @@ void *rrc_enb_process_itti_msg(void *notUsed) { ...@@ -8277,7 +8248,8 @@ void *rrc_enb_process_itti_msg(void *notUsed) {
LOG_I(RRC, "[eNB %ld] source eNB receives the X2 UE CONTEXT RELEASE %s\n", instance, msg_name_p); LOG_I(RRC, "[eNB %ld] source eNB receives the X2 UE CONTEXT RELEASE %s\n", instance, msg_name_p);
DevAssert(ue_context_p != NULL); DevAssert(ue_context_p != NULL);
if (ue_context_p->ue_context.handover_info->state != HO_COMPLETE) abort(); if (ue_context_p->ue_context.handover_info->state != HO_COMPLETE)
abort();
ue_context_p->ue_context.handover_info->state = HO_RELEASE; ue_context_p->ue_context.handover_info->state = HO_RELEASE;
break; break;
...@@ -8303,13 +8275,8 @@ void *rrc_enb_process_itti_msg(void *notUsed) { ...@@ -8303,13 +8275,8 @@ void *rrc_enb_process_itti_msg(void *notUsed) {
ue_context_p = rrc_eNB_get_ue_context(RC.rrc[instance], X2AP_HANDOVER_CANCEL(msg_p).rnti); ue_context_p = rrc_eNB_get_ue_context(RC.rrc[instance], X2AP_HANDOVER_CANCEL(msg_p).rnti);
if (ue_context_p != NULL && if (ue_context_p != NULL && ue_context_p->ue_context.handover_info != NULL) {
ue_context_p->ue_context.handover_info != NULL) { LOG_I(RRC, "[eNB %ld] eNB receives X2 HANDOVER CANCEL for rnti %x, cause %s [%s]\n", instance, X2AP_HANDOVER_CANCEL(msg_p).rnti, cause, msg_name_p);
LOG_I(RRC, "[eNB %ld] eNB receives X2 HANDOVER CANCEL for rnti %x, cause %s [%s]\n",
instance,
X2AP_HANDOVER_CANCEL(msg_p).rnti,
cause,
msg_name_p);
if (X2AP_HANDOVER_CANCEL(msg_p).cause == X2AP_T_RELOC_PREP_TIMEOUT) { if (X2AP_HANDOVER_CANCEL(msg_p).cause == X2AP_T_RELOC_PREP_TIMEOUT) {
/* for prep timeout, simply return to normal state */ /* for prep timeout, simply return to normal state */
...@@ -8330,8 +8297,7 @@ void *rrc_enb_process_itti_msg(void *notUsed) { ...@@ -8330,8 +8297,7 @@ void *rrc_enb_process_itti_msg(void *notUsed) {
else else
failure_cause = "UE not in handover"; failure_cause = "UE not in handover";
LOG_W(RRC, "[eNB %ld] cannot process (%s) X2 HANDOVER CANCEL for rnti %x, cause %s, ignoring\n", LOG_W(RRC, "[eNB %ld] cannot process (%s) X2 HANDOVER CANCEL for rnti %x, cause %s, ignoring\n", instance, failure_cause, X2AP_HANDOVER_CANCEL(msg_p).rnti, cause);
instance, failure_cause, X2AP_HANDOVER_CANCEL(msg_p).rnti, cause);
} }
break; break;
...@@ -8364,9 +8330,8 @@ void *rrc_enb_process_itti_msg(void *notUsed) { ...@@ -8364,9 +8330,8 @@ void *rrc_enb_process_itti_msg(void *notUsed) {
/* Messages from F1AP task */ /* Messages from F1AP task */
case F1AP_SETUP_REQ: case F1AP_SETUP_REQ:
AssertFatal(NODE_IS_CU(RC.rrc[instance]->node_type), AssertFatal(NODE_IS_CU(RC.rrc[instance]->node_type), "should not receive F1AP_SETUP_REQUEST, need call by CU!\n");
"should not receive F1AP_SETUP_REQUEST, need call by CU!\n"); LOG_I(RRC, "[eNB %ld] Received %s : %p\n", instance, msg_name_p, &F1AP_SETUP_REQ(msg_p));
LOG_I(RRC,"[eNB %ld] Received %s : %p\n", instance, msg_name_p, &F1AP_SETUP_REQ(msg_p));
handle_f1_setup_req(&F1AP_SETUP_REQ(msg_p)); handle_f1_setup_req(&F1AP_SETUP_REQ(msg_p));
break; break;
...@@ -8375,47 +8340,43 @@ void *rrc_enb_process_itti_msg(void *notUsed) { ...@@ -8375,47 +8340,43 @@ void *rrc_enb_process_itti_msg(void *notUsed) {
break; break;
case M2AP_SETUP_RESP: case M2AP_SETUP_RESP:
rrc_eNB_process_M2AP_SETUP_RESP(&ctxt,0/*CC_id*/,ENB_INSTANCE_TO_MODULE_ID(instance),&M2AP_SETUP_RESP(msg_p)); rrc_eNB_process_M2AP_SETUP_RESP(&ctxt, 0 /*CC_id*/, ENB_INSTANCE_TO_MODULE_ID(instance), &M2AP_SETUP_RESP(msg_p));
break; break;
case M2AP_MBMS_SCHEDULING_INFORMATION: case M2AP_MBMS_SCHEDULING_INFORMATION:
rrc_eNB_process_M2AP_MBMS_SCHEDULING_INFORMATION(&ctxt,0/*CC_id*/,ENB_INSTANCE_TO_MODULE_ID(instance),&M2AP_MBMS_SCHEDULING_INFORMATION(msg_p)); rrc_eNB_process_M2AP_MBMS_SCHEDULING_INFORMATION(&ctxt, 0 /*CC_id*/, ENB_INSTANCE_TO_MODULE_ID(instance), &M2AP_MBMS_SCHEDULING_INFORMATION(msg_p));
break; break;
case M2AP_MBMS_SESSION_START_REQ: case M2AP_MBMS_SESSION_START_REQ:
rrc_eNB_process_M2AP_MBMS_SESSION_START_REQ(&ctxt,0/*CC_id*/,ENB_INSTANCE_TO_MODULE_ID(instance),&M2AP_MBMS_SESSION_START_REQ(msg_p)); rrc_eNB_process_M2AP_MBMS_SESSION_START_REQ(&ctxt, 0 /*CC_id*/, ENB_INSTANCE_TO_MODULE_ID(instance), &M2AP_MBMS_SESSION_START_REQ(msg_p));
break; break;
case M2AP_MBMS_SESSION_STOP_REQ: case M2AP_MBMS_SESSION_STOP_REQ:
rrc_eNB_process_M2AP_MBMS_SESSION_STOP_REQ(&ctxt,&M2AP_MBMS_SESSION_STOP_REQ(msg_p)); rrc_eNB_process_M2AP_MBMS_SESSION_STOP_REQ(&ctxt, &M2AP_MBMS_SESSION_STOP_REQ(msg_p));
break; break;
case M2AP_RESET: case M2AP_RESET:
rrc_eNB_process_M2AP_RESET(&ctxt,&M2AP_RESET(msg_p)); rrc_eNB_process_M2AP_RESET(&ctxt, &M2AP_RESET(msg_p));
break; break;
case M2AP_ENB_CONFIGURATION_UPDATE_ACK: case M2AP_ENB_CONFIGURATION_UPDATE_ACK:
rrc_eNB_process_M2AP_ENB_CONFIGURATION_UPDATE_ACK(&ctxt,&M2AP_ENB_CONFIGURATION_UPDATE_ACK(msg_p)); rrc_eNB_process_M2AP_ENB_CONFIGURATION_UPDATE_ACK(&ctxt, &M2AP_ENB_CONFIGURATION_UPDATE_ACK(msg_p));
break; break;
case M2AP_ERROR_INDICATION: case M2AP_ERROR_INDICATION:
rrc_eNB_process_M2AP_ERROR_INDICATION(&ctxt,&M2AP_ERROR_INDICATION(msg_p)); rrc_eNB_process_M2AP_ERROR_INDICATION(&ctxt, &M2AP_ERROR_INDICATION(msg_p));
break; break;
case M2AP_MBMS_SERVICE_COUNTING_REQ: case M2AP_MBMS_SERVICE_COUNTING_REQ:
rrc_eNB_process_M2AP_MBMS_SERVICE_COUNTING_REQ(&ctxt,&M2AP_MBMS_SERVICE_COUNTING_REQ(msg_p)); rrc_eNB_process_M2AP_MBMS_SERVICE_COUNTING_REQ(&ctxt, &M2AP_MBMS_SERVICE_COUNTING_REQ(msg_p));
break; break;
case M2AP_MCE_CONFIGURATION_UPDATE: case M2AP_MCE_CONFIGURATION_UPDATE:
rrc_eNB_process_M2AP_MCE_CONFIGURATION_UPDATE(&ctxt,&M2AP_MCE_CONFIGURATION_UPDATE(msg_p)); rrc_eNB_process_M2AP_MCE_CONFIGURATION_UPDATE(&ctxt, &M2AP_MCE_CONFIGURATION_UPDATE(msg_p));
break; break;
case RLC_SDU_INDICATION: case RLC_SDU_INDICATION:
process_rlc_sdu_indication(instance, process_rlc_sdu_indication(instance, RLC_SDU_INDICATION(msg_p).rnti, RLC_SDU_INDICATION(msg_p).is_successful, RLC_SDU_INDICATION(msg_p).srb_id, RLC_SDU_INDICATION(msg_p).message_id);
RLC_SDU_INDICATION(msg_p).rnti,
RLC_SDU_INDICATION(msg_p).is_successful,
RLC_SDU_INDICATION(msg_p).srb_id,
RLC_SDU_INDICATION(msg_p).message_id);
break; break;
default: default:
...@@ -8426,32 +8387,11 @@ void *rrc_enb_process_itti_msg(void *notUsed) { ...@@ -8426,32 +8387,11 @@ void *rrc_enb_process_itti_msg(void *notUsed) {
result = itti_free(ITTI_MSG_ORIGIN_ID(msg_p), msg_p); result = itti_free(ITTI_MSG_ORIGIN_ID(msg_p), msg_p);
if (result != EXIT_SUCCESS) { if (result != EXIT_SUCCESS) {
LOG_I(RRC, "Failed to free memory (%d)!\n",result); LOG_I(RRC, "Failed to free memory (%d)!\n", result);
}
msg_p = NULL;
return NULL;
}
//-----------------------------------------------------------------------------
void *
rrc_enb_task(
void *args_p
)
//-----------------------------------------------------------------------------
{
rrc_enb_init();
itti_mark_task_ready(TASK_RRC_ENB);
LOG_I(RRC,"Entering main loop of RRC message task\n");
while (1) {
(void) rrc_enb_process_itti_msg(NULL);
{
//extern volatile int go_nr;
void rrc_go_nr(void);
//if (go_nr) rrc_go_nr();
} }
itti_poll_msg(TASK_RRC_ENB, &msg_p);
} }
return NULL;
} }
/*------------------------------------------------------------------------------*/ /*------------------------------------------------------------------------------*/
...@@ -8799,5 +8739,6 @@ rrc_rx_tx( ...@@ -8799,5 +8739,6 @@ rrc_rx_tx(
RRC_SUBFRAME_PROCESS(message_p).ctxt = *ctxt_pP; RRC_SUBFRAME_PROCESS(message_p).ctxt = *ctxt_pP;
RRC_SUBFRAME_PROCESS(message_p).CC_id = CC_id; RRC_SUBFRAME_PROCESS(message_p).CC_id = CC_id;
itti_send_msg_to_task(TASK_RRC_ENB, ctxt_pP->module_id, message_p); itti_send_msg_to_task(TASK_RRC_ENB, ctxt_pP->module_id, message_p);
rrc_enb_process_itti_msg(NULL);
return RRC_OK; return RRC_OK;
} }
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