Commit 7e77fb67 authored by Tien-Thinh Nguyen's avatar Tien-Thinh Nguyen

support SidelinkUEInformation (eNB) and RRCConnectionReconfiguration (SL)

parent 418da5b4
...@@ -1369,8 +1369,7 @@ uint8_t do_SidelinkUEInformation(uint8_t Mod_id, uint8_t *buffer, SL_Destinatio ...@@ -1369,8 +1369,7 @@ uint8_t do_SidelinkUEInformation(uint8_t Mod_id, uint8_t *buffer, SL_Destinatio
UL_DCCH_Message_t ul_dcch_msg; UL_DCCH_Message_t ul_dcch_msg;
SidelinkUEInformation_r12_t *sidelinkUEInformation; SidelinkUEInformation_r12_t *sidelinkUEInformation;
ARFCN_ValueEUTRA_r9_t commRxInterestedFreq[] = {2565000000.0}; //sidelink communication frequency ARFCN_ValueEUTRA_r9_t carrierFreq[] = {2565000000.0};//sidelink communication frequency
ARFCN_ValueEUTRA_r9_t carrierFreq[] = {2565000000.0};
memset((void *)&ul_dcch_msg,0,sizeof(UL_DCCH_Message_t)); memset((void *)&ul_dcch_msg,0,sizeof(UL_DCCH_Message_t));
...@@ -1383,7 +1382,8 @@ uint8_t do_SidelinkUEInformation(uint8_t Mod_id, uint8_t *buffer, SL_Destinatio ...@@ -1383,7 +1382,8 @@ uint8_t do_SidelinkUEInformation(uint8_t Mod_id, uint8_t *buffer, SL_Destinatio
switch(mode) { switch(mode) {
//if SIB18 is available case 1,2,3,4 //if SIB18 is available case 1,2,3,4
case 1: // to receive sidelink communication case 1: // to receive sidelink communication
sidelinkUEInformation->criticalExtensions.choice.c1.choice.sidelinkUEInformation_r12.commRxInterestedFreq_r12 = &commRxInterestedFreq[0]; sidelinkUEInformation->criticalExtensions.choice.c1.choice.sidelinkUEInformation_r12.commRxInterestedFreq_r12 = &carrierFreq[0];
sidelinkUEInformation->criticalExtensions.choice.c1.choice.sidelinkUEInformation_r12.commRxInterestedFreq_r12[0] = carrierFreq[0];
break; break;
case 2: //to transmit non-relay related one-to-many sidelink communication case 2: //to transmit non-relay related one-to-many sidelink communication
//commTxResourceReq //commTxResourceReq
...@@ -2186,11 +2186,13 @@ do_RRCConnectionReconfiguration( ...@@ -2186,11 +2186,13 @@ do_RRCConnectionReconfiguration(
RSRP_Range_t *rsrp, RSRP_Range_t *rsrp,
C_RNTI_t *cba_rnti, C_RNTI_t *cba_rnti,
struct RRCConnectionReconfiguration_r8_IEs__dedicatedInfoNASList struct RRCConnectionReconfiguration_r8_IEs__dedicatedInfoNASList
*dedicatedInfoNASList *dedicatedInfoNASList,
SL_CommConfig_r12_t *sl_CommConfig,
SL_DiscConfig_r12_t *sl_DiscConfig
#if defined(Rel10) || defined(Rel14) #if defined(Rel10) || defined(Rel14)
, SCellToAddMod_r10_t *SCell_config , SCellToAddMod_r10_t *SCell_config
#endif #endif
) )
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
{ {
...@@ -2282,6 +2284,18 @@ do_RRCConnectionReconfiguration( ...@@ -2282,6 +2284,18 @@ do_RRCConnectionReconfiguration(
rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.dedicatedInfoNASList = dedicatedInfoNASList; rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.dedicatedInfoNASList = dedicatedInfoNASList;
rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.securityConfigHO = NULL; rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.securityConfigHO = NULL;
//TTN for D2D
//allocate dedicated resource pools for SL communication (sl_CommConfig_r12)
if (sl_CommConfig) {
rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.nonCriticalExtension->nonCriticalExtension->nonCriticalExtension->nonCriticalExtension->nonCriticalExtension->sl_CommConfig_r12 = sl_CommConfig;
rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.nonCriticalExtension->nonCriticalExtension->nonCriticalExtension->nonCriticalExtension->nonCriticalExtension->sl_CommConfig_r12[0] = sl_CommConfig[0];
}
//allocate dedicated resource pools for SL discovery (sl_DiscConfig)
if (sl_DiscConfig){
rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.nonCriticalExtension->nonCriticalExtension->nonCriticalExtension->nonCriticalExtension->nonCriticalExtension->sl_DiscConfig_r12 = sl_DiscConfig;
rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.nonCriticalExtension->nonCriticalExtension->nonCriticalExtension->nonCriticalExtension->nonCriticalExtension->sl_DiscConfig_r12[0] = sl_DiscConfig[0];
}
enc_rval = uper_encode_to_buffer(&asn_DEF_DL_DCCH_Message, enc_rval = uper_encode_to_buffer(&asn_DEF_DL_DCCH_Message,
(void*)&dl_dcch_msg, (void*)&dl_dcch_msg,
buffer, buffer,
......
...@@ -199,7 +199,9 @@ do_RRCConnectionReconfiguration( ...@@ -199,7 +199,9 @@ do_RRCConnectionReconfiguration(
struct MeasConfig__speedStatePars *speedStatePars, struct MeasConfig__speedStatePars *speedStatePars,
RSRP_Range_t *rsrp, RSRP_Range_t *rsrp,
C_RNTI_t *cba_rnti, C_RNTI_t *cba_rnti,
struct RRCConnectionReconfiguration_r8_IEs__dedicatedInfoNASList* dedicatedInfoNASList struct RRCConnectionReconfiguration_r8_IEs__dedicatedInfoNASList* dedicatedInfoNASList,
SL_CommConfig_r12_t *sl_CommConfig,
SL_DiscConfig_r12_t *sl_DiscConfig
#if defined(Rel10) || defined(Rel14) #if defined(Rel10) || defined(Rel14)
, SCellToAddMod_r10_t *SCell_config , SCellToAddMod_r10_t *SCell_config
#endif #endif
......
...@@ -294,7 +294,10 @@ rrc_eNB_generate_RRCConnectionReconfiguration_handover( ...@@ -294,7 +294,10 @@ rrc_eNB_generate_RRCConnectionReconfiguration_handover(
int int
rrc_eNB_generate_RRCConnectionReconfiguration_Sidelink( rrc_eNB_generate_RRCConnectionReconfiguration_Sidelink(
const protocol_ctxt_t* const ctxt_pP, const protocol_ctxt_t* const ctxt_pP,
rrc_eNB_ue_context_t* const ue_context_pP rrc_eNB_ue_context_t* const ue_context_pP,
SL_DestinationIdentity_r12_t* SL_DestinationIdentity,
int n_destinations,
int n_discoveryMessages
); );
/** \brief process the received SidelinkUEInformation message at UE /** \brief process the received SidelinkUEInformation message at UE
...@@ -305,7 +308,7 @@ void ...@@ -305,7 +308,7 @@ void
rrc_eNB_process_SidelinkUEInformation( rrc_eNB_process_SidelinkUEInformation(
const protocol_ctxt_t* const ctxt_pP, const protocol_ctxt_t* const ctxt_pP,
rrc_eNB_ue_context_t* ue_context_pP, rrc_eNB_ue_context_t* ue_context_pP,
SidelinkUEInformation_r12_t * sidelinkUEInformation SidelinkUEInformation_r12_t* sidelinkUEInformation
); );
//L2_interface.c //L2_interface.c
......
...@@ -1898,6 +1898,19 @@ rrc_ue_process_rrcConnectionReconfiguration( ...@@ -1898,6 +1898,19 @@ rrc_ue_process_rrcConnectionReconfiguration(
rrc_ue_process_radioResourceConfigDedicated(ctxt_pP,eNB_index, rrcConnectionReconfiguration_r8->radioResourceConfigDedicated); rrc_ue_process_radioResourceConfigDedicated(ctxt_pP,eNB_index, rrcConnectionReconfiguration_r8->radioResourceConfigDedicated);
} }
//TTN for D2D
//if RRCConnectionReconfiguration message includes the sl-CommConfig
if (rrcConnectionReconfiguration_r8->nonCriticalExtension->nonCriticalExtension->nonCriticalExtension->nonCriticalExtension->nonCriticalExtension->sl_CommConfig_r12->commTxResources_r12->present != SL_CommConfig_r12__commTxResources_r12_PR_NOTHING){
LOG_I(RRC,"sl-CommConfig is present\n");
//rrc_ue_process_sidelink_commTxPool()
}
//if RRCConnectionReconfiguration message includes the sl-DiscConfig
if (rrcConnectionReconfiguration_r8->nonCriticalExtension->nonCriticalExtension->nonCriticalExtension->nonCriticalExtension->nonCriticalExtension->sl_DiscConfig_r12->discTxResources_r12->present != SL_DiscConfig_r12__discTxResources_r12_PR_NOTHING ){
LOG_I(RRC,"sl-CommConfig is present\n");
//rrc_ue_process_sidelink_discTxPool()
}
#if defined(ENABLE_ITTI) #if defined(ENABLE_ITTI)
/* Check if there is dedicated NAS information to forward to NAS */ /* Check if there is dedicated NAS information to forward to NAS */
...@@ -4873,9 +4886,18 @@ void rrc_ue_generate_SidelinkUEInformation( const protocol_ctxt_t* const ctxt_pP ...@@ -4873,9 +4886,18 @@ void rrc_ue_generate_SidelinkUEInformation( const protocol_ctxt_t* const ctxt_pP
uint8_t buffer[100]; uint8_t buffer[100];
//Generate SidelinkUEInformation //Generate SidelinkUEInformation
size = do_SidelinkUEInformation(ctxt_pP->module_id, buffer, destinationInfoList, discTxResourceReq, mode);
if ((UE_rrc_inst[ctxt_pP->module_id].Info[eNB_index].SIStatus&8192) != 0) {//if SIB18 is available
size = do_SidelinkUEInformation(ctxt_pP->module_id, buffer, destinationInfoList, NULL, mode);
LOG_I(RRC,"[UE %d][RRC_UE] Frame %d : Logical Channel UL-DCCH, Generating SidelinkUEInformation (bytes%d, eNB %d)\n", LOG_I(RRC,"[UE %d][RRC_UE] Frame %d : Logical Channel UL-DCCH, Generating SidelinkUEInformation (bytes%d, eNB %d)\n",
ctxt_pP->module_id,ctxt_pP->frame, size, eNB_index); ctxt_pP->module_id,ctxt_pP->frame, size, eNB_index);
}
if ((UE_rrc_inst[ctxt_pP->module_id].Info[eNB_index].SIStatus&16384) != 0) {//if SIB19 is available
size = do_SidelinkUEInformation(ctxt_pP->module_id, buffer, NULL, discTxResourceReq, mode);
LOG_I(RRC,"[UE %d][RRC_UE] Frame %d : Logical Channel UL-DCCH, Generating SidelinkUEInformation (bytes%d, eNB %d)\n",
ctxt_pP->module_id,ctxt_pP->frame, size, eNB_index);
}
} }
This diff is collapsed.
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