Commit af6ada95 authored by nepes's avatar nepes

Include SIB18-19 in a separate SI message (not the same with SIB23). Pending...

Include SIB18-19 in a separate SI message (not the same with SIB23). Pending to create another separate message for SIB21.
parent 0bb524f0
...@@ -56,7 +56,8 @@ ...@@ -56,7 +56,8 @@
# define X2AP_ENB_REGISTER_RETRY_DELAY 10 # define X2AP_ENB_REGISTER_RETRY_DELAY 10
#include "openair1/PHY/INIT/phy_init.h" #include "openair1/PHY/INIT/phy_init.h"
extern unsigned char NB_eNB_INST; extern int NB_eNB_INST;
//extern unsigned char NB_eNB_INST;
#endif #endif
extern RAN_CONTEXT_t RC; extern RAN_CONTEXT_t RC;
......
...@@ -107,7 +107,7 @@ mac_rrc_data_req( ...@@ -107,7 +107,7 @@ mac_rrc_data_req(
RC.rrc[Mod_idP]->carrier[CC_id].sizeof_SIB23); RC.rrc[Mod_idP]->carrier[CC_id].sizeof_SIB23);
if (LOG_DEBUGFLAG(DEBUG_RRC)) { if (LOG_DEBUGFLAG(DEBUG_RRC)) {
LOG_T(RRC,"[eNB %d] Frame %d BCCH request => SIB 2-3\n",Mod_idP,frameP); LOG_T(RRC,"[eNB %d] Frame %d BCCH request => SIB 2-3 \n \n",Mod_idP,frameP);
for (int i=0; i<RC.rrc[Mod_idP]->carrier[CC_id].sizeof_SIB23; i++) { for (int i=0; i<RC.rrc[Mod_idP]->carrier[CC_id].sizeof_SIB23; i++) {
LOG_T(RRC,"%x.",buffer_pP[i]); LOG_T(RRC,"%x.",buffer_pP[i]);
...@@ -117,7 +117,26 @@ mac_rrc_data_req( ...@@ -117,7 +117,26 @@ mac_rrc_data_req(
} /* LOG_DEBUGFLAG(DEBUG_RRC) */ } /* LOG_DEBUGFLAG(DEBUG_RRC) */
return(RC.rrc[Mod_idP]->carrier[CC_id].sizeof_SIB23); return(RC.rrc[Mod_idP]->carrier[CC_id].sizeof_SIB23);
} else { }
else if ((frameP%8) == 3) {
memcpy(&buffer_pP[0],
RC.rrc[Mod_idP]->carrier[CC_id].SIB181921,
RC.rrc[Mod_idP]->carrier[CC_id].sizeof_SIB181921);
if (LOG_DEBUGFLAG(DEBUG_RRC)) {
LOG_T(RRC,"[eNB %d] Frame %d BCCH request => SIB 18,19,21, size:%d \n \n",Mod_idP,frameP, RC.rrc[Mod_idP]->carrier[CC_id].sizeof_SIB181921);
for (int i=0; i<RC.rrc[Mod_idP]->carrier[CC_id].sizeof_SIB181921; i++) {
LOG_T(RRC,"%x.",buffer_pP[i]);
}
LOG_T(RRC,"\n");
} /* LOG_DEBUGFLAG(DEBUG_RRC) */
return(RC.rrc[Mod_idP]->carrier[CC_id].sizeof_SIB181921);
}
else {
return(0); return(0);
} }
} }
...@@ -209,6 +228,7 @@ mac_rrc_data_req( ...@@ -209,6 +228,7 @@ mac_rrc_data_req(
} }
if ((Srb_id & RAB_OFFSET) == BCCH_SI_BR) { // First SI message with SIB2/3 if ((Srb_id & RAB_OFFSET) == BCCH_SI_BR) { // First SI message with SIB2/3
memcpy(&buffer_pP[0], memcpy(&buffer_pP[0],
RC.rrc[Mod_idP]->carrier[CC_id].SIB23_BR, RC.rrc[Mod_idP]->carrier[CC_id].SIB23_BR,
RC.rrc[Mod_idP]->carrier[CC_id].sizeof_SIB23_BR); RC.rrc[Mod_idP]->carrier[CC_id].sizeof_SIB23_BR);
......
This diff is collapsed.
...@@ -94,6 +94,13 @@ uint8_t do_SIB23(uint8_t Mod_id, ...@@ -94,6 +94,13 @@ uint8_t do_SIB23(uint8_t Mod_id,
#endif #endif
); );
uint8_t do_SIB_SL(uint8_t Mod_id,
int CC_id
#if defined(ENABLE_ITTI)
, RrcConfigurationReq *configuration
#endif
);
/** /**
\brief Generate an RRCConnectionRequest UL-CCCH-Message (UE) based on random string or S-TMSI. This \brief Generate an RRCConnectionRequest UL-CCCH-Message (UE) based on random string or S-TMSI. This
routine only generates an mo-data establishment cause. routine only generates an mo-data establishment cause.
......
...@@ -2747,7 +2747,7 @@ rrc_ue_decode_dcch( ...@@ -2747,7 +2747,7 @@ rrc_ue_decode_dcch(
const char siWindowLength[8][5] = {"1ms","2ms","5ms","10ms","15ms","20ms","40ms","ERR"}; const char siWindowLength[8][5] = {"1ms","2ms","5ms","10ms","15ms","20ms","40ms","ERR"};
const char siWindowLength_int[7] = {1,2,5,10,15,20,40}; const char siWindowLength_int[7] = {1,2,5,10,15,20,40};
const char SIBType[12][6] = {"SIB3","SIB4","SIB5","SIB6","SIB7","SIB8","SIB9","SIB10","SIB11","SIB12","SIB13","Spare"}; const char SIBType[13][6] = {"SIB3","SIB4","SIB5","SIB6","SIB7","SIB8","SIB9","SIB10","SIB11","SIB12","SIB13","SIB19","Spare"};
const char SIBPeriod[8][6]= {"rf8","rf16","rf32","rf64","rf128","rf256","rf512","ERR"}; const char SIBPeriod[8][6]= {"rf8","rf16","rf32","rf64","rf128","rf256","rf512","ERR"};
int siPeriod_int[7] = {80,160,320,640,1280,2560,5120}; int siPeriod_int[7] = {80,160,320,640,1280,2560,5120};
......
...@@ -638,6 +638,8 @@ typedef struct { ...@@ -638,6 +638,8 @@ typedef struct {
uint8_t sizeof_SIB1; uint8_t sizeof_SIB1;
uint8_t *SIB23; uint8_t *SIB23;
uint8_t sizeof_SIB23; uint8_t sizeof_SIB23;
uint8_t *SIB181921;
uint8_t sizeof_SIB181921;
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0)) #if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
uint8_t *SIB1_BR; uint8_t *SIB1_BR;
uint8_t sizeof_SIB1_BR; uint8_t sizeof_SIB1_BR;
......
...@@ -200,6 +200,23 @@ init_SI( ...@@ -200,6 +200,23 @@ init_SI(
, configuration , configuration
#endif #endif
); );
//Call sidelink SI creation routine
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sizeof_SIB181921 = 0;
RC.rrc[ctxt_pP->module_id]->carrier[CC_id].SIB181921 = (uint8_t *) malloc16(128);
AssertFatal(RC.rrc[ctxt_pP->module_id]->carrier[CC_id].SIB181921!=NULL,"cannot allocate memory for SIB");
RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sizeof_SIB181921 = do_SIB_SL(
ctxt_pP->module_id,
CC_id
#if defined(ENABLE_ITTI)
, configuration
#endif
);
AssertFatal(RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sizeof_SIB181921 != 255,"FATAL, RC.rrc[mod].carrier[CC_id].sizeof_SIB181921 == 255");
#endif
LOG_I(RRC, "Size of SIB1: %d, size of SIB23: %d, size of SIB181921: %d \n \n", RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sizeof_SIB1, RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sizeof_SIB23, RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sizeof_SIB181921);
AssertFatal(RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sizeof_SIB23 != 255,"FATAL, RC.rrc[mod].carrier[CC_id].sizeof_SIB23 == 255"); AssertFatal(RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sizeof_SIB23 != 255,"FATAL, RC.rrc[mod].carrier[CC_id].sizeof_SIB23 == 255");
LOG_T(RRC, PROTOCOL_RRC_CTXT_FMT" SIB2/3 Contents (partial)\n", LOG_T(RRC, PROTOCOL_RRC_CTXT_FMT" SIB2/3 Contents (partial)\n",
PROTOCOL_RRC_CTXT_ARGS(ctxt_pP)); PROTOCOL_RRC_CTXT_ARGS(ctxt_pP));
......
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