Commit d498cd43 authored by Raymond Knopp's avatar Raymond Knopp

Merge branch 'l1-sidelink' of https://gitlab.eurecom.fr/matzakos/LTE-D2D into l1-sidelink

parents ff1bca51 bc4ac268
...@@ -3464,14 +3464,14 @@ SLSCH_t *ue_get_slsch(module_id_t module_idP,int CC_id,frame_t frameP,sub_frame_ ...@@ -3464,14 +3464,14 @@ SLSCH_t *ue_get_slsch(module_id_t module_idP,int CC_id,frame_t frameP,sub_frame_
LOG_D(MAC,"absSF_offset %d (test %d): Checking status (%d,Dest %d) => LCID %d => %d bytes\n",absSF_offset,slsch_test,ue->sourceL2Id,ue->sl_info[i].destinationL2Id,ue->sl_info[i].LCID,rlc_status.bytes_in_buffer); LOG_D(MAC,"absSF_offset %d (test %d): Checking status (%d,Dest %d) => LCID %d => %d bytes\n",absSF_offset,slsch_test,ue->sourceL2Id,ue->sl_info[i].destinationL2Id,ue->sl_info[i].LCID,rlc_status.bytes_in_buffer);
if (rlc_status.bytes_in_buffer > 2 || slsch_test == 1){ if (rlc_status.bytes_in_buffer > 2 || slsch_test == 1){
if (slsch_test == 1 && rlc_status.bytes_in_buffer <= 2) rlc_status.bytes_in_buffer = 300; if (slsch_test == 1 && rlc_status.bytes_in_buffer <= 2) rlc_status.bytes_in_buffer = 300;
LOG_D(MAC,"SFN.SF %d.%d: Scheduling for %d bytes in Sidelink buffer \n",frameP,subframeP,rlc_status.bytes_in_buffer); LOG_I(MAC,"SFN.SF %d.%d: Scheduling for %d bytes in Sidelink buffer \n",frameP,subframeP,rlc_status.bytes_in_buffer);
// Fill in group id for off-network communications // Fill in group id for off-network communications
ue->sltx_active = 1; ue->sltx_active = 1;
//store LCID, destinationL2Id //store LCID, destinationL2Id
ue->slsch_lcid = ue->sl_info[i].LCID; ue->slsch_lcid = ue->sl_info[i].LCID;
ue->destinationL2Id = ue->sl_info[i].destinationL2Id; ue->destinationL2Id = ue->sl_info[i].destinationL2Id;
LOG_D(MAC,"LCID %d, source L2ID 0x%08x, destinationL2Id: 0x%08x \n",ue->slsch_lcid, ue->sourceL2Id, ue->destinationL2Id); LOG_I(MAC,"LCID %d, source L2ID 0x%08x, destinationL2Id: 0x%08x \n",ue->slsch_lcid, ue->sourceL2Id, ue->destinationL2Id);
break; break;
} }
} }
...@@ -3484,13 +3484,13 @@ SLSCH_t *ue_get_slsch(module_id_t module_idP,int CC_id,frame_t frameP,sub_frame_ ...@@ -3484,13 +3484,13 @@ SLSCH_t *ue_get_slsch(module_id_t module_idP,int CC_id,frame_t frameP,sub_frame_
if (slsch_test == 1 && rlc_status.bytes_in_buffer <= 2) rlc_status.bytes_in_buffer = 300; if (slsch_test == 1 && rlc_status.bytes_in_buffer <= 2) rlc_status.bytes_in_buffer = 300;
LOG_D(MAC,"SFN.SF %d.%d: Scheduling for %d bytes in Sidelink buffer\n",frameP,subframeP,rlc_status.bytes_in_buffer); LOG_I(MAC,"SFN.SF %d.%d: Scheduling for %d bytes in Sidelink buffer\n",frameP,subframeP,rlc_status.bytes_in_buffer);
// Fill in group id for off-network communications // Fill in group id for off-network communications
ue->sltx_active = 1; ue->sltx_active = 1;
//store LCID, destinationL2Id //store LCID, destinationL2Id
ue->slsch_lcid = ue->sl_info[i].LCID; ue->slsch_lcid = ue->sl_info[i].LCID;
ue->destinationL2Id = ue->sl_info[i].groupL2Id; ue->destinationL2Id = ue->sl_info[i].groupL2Id;
LOG_D(MAC,"LCID %d, source L2ID 0x%08x, groupL2Id: 0x%08x \n",ue->slsch_lcid, ue->sourceL2Id, ue->destinationL2Id); LOG_I(MAC,"LCID %d, source L2ID 0x%08x, groupL2Id: 0x%08x \n",ue->slsch_lcid, ue->sourceL2Id, ue->destinationL2Id);
break; break;
} }
} }
......
...@@ -286,8 +286,8 @@ uint8_t do_MIB_SL(const protocol_ctxt_t* const ctxt_pP, const uint8_t eNB_index, ...@@ -286,8 +286,8 @@ uint8_t do_MIB_SL(const protocol_ctxt_t* const ctxt_pP, const uint8_t eNB_index,
uint8_t subframe = absSF%10; uint8_t subframe = absSF%10;
uint32_t reserved = 0; uint32_t reserved = 0;
UE_RRC_INST *UE = &UE_rrc_inst[ctxt_pP->module_id]; UE_RRC_INST *UE = &UE_rrc_inst[ctxt_pP->module_id];
SBCCH_SL_BCH_Message_t *sl_mib = &UE->SL_mib[eNB_index]; SBCCH_SL_BCH_Message_t *sl_mib = &UE->SL_mib_tx;
AssertFatal(eNB_index==0,"eNB_index needs to be 0\n"); AssertFatal(eNB_index==0,"eNB_index needs to be 0\n");
......
...@@ -770,6 +770,7 @@ typedef struct UE_RRC_INST_s { ...@@ -770,6 +770,7 @@ typedef struct UE_RRC_INST_s {
SystemInformationBlockType18_r12_t *sib18[NB_CNX_UE]; SystemInformationBlockType18_r12_t *sib18[NB_CNX_UE];
SystemInformationBlockType19_r12_t *sib19[NB_CNX_UE]; SystemInformationBlockType19_r12_t *sib19[NB_CNX_UE];
SBCCH_SL_BCH_Message_t SL_mib_tx;
SBCCH_SL_BCH_Message_t *SL_mib[NB_CNX_UE]; SBCCH_SL_BCH_Message_t *SL_mib[NB_CNX_UE];
uint8_t SL_MIB[5]; uint8_t SL_MIB[5];
/// Preconfiguration for Sidelink /// Preconfiguration for Sidelink
......
...@@ -5641,6 +5641,7 @@ void *rrc_control_socket_thread_fct(void *arg) ...@@ -5641,6 +5641,7 @@ void *rrc_control_socket_thread_fct(void *arg)
//get available rbid for this communication and store (LCID, G) //get available rbid for this communication and store (LCID, G)
if (groupL2Id > 0){ if (groupL2Id > 0){
for (i=0; i< MAX_NUM_LCID_DATA; i++) { for (i=0; i< MAX_NUM_LCID_DATA; i++) {
LOG_I(RRC,"[GroupCommunicationEstablishReq] checking lcid %d, sl_info[%d].groupL2Id %d\n",i,i,UE_rrc_inst[module_id].sl_info[i].groupL2Id);
if ((UE_rrc_inst[module_id].sl_info[i].LCID == 0) && (UE_rrc_inst[module_id].sl_info[i].groupL2Id == 0) && (UE_rrc_inst[module_id].sl_info[i].destinationL2Id == 0)&& (j == 0)) j = i+1; if ((UE_rrc_inst[module_id].sl_info[i].LCID == 0) && (UE_rrc_inst[module_id].sl_info[i].groupL2Id == 0) && (UE_rrc_inst[module_id].sl_info[i].destinationL2Id == 0)&& (j == 0)) j = i+1;
if (UE_rrc_inst[module_id].sl_info[i].groupL2Id == groupL2Id) { if (UE_rrc_inst[module_id].sl_info[i].groupL2Id == groupL2Id) {
if (UE_rrc_inst[module_id].sl_info[i].LCID >0 ){ if (UE_rrc_inst[module_id].sl_info[i].LCID >0 ){
...@@ -5649,7 +5650,7 @@ void *rrc_control_socket_thread_fct(void *arg) ...@@ -5649,7 +5650,7 @@ void *rrc_control_socket_thread_fct(void *arg)
UE_rrc_inst[module_id].sl_info[i].LCID = i + 3; UE_rrc_inst[module_id].sl_info[i].LCID = i + 3;
group_comm_rbid = UE_rrc_inst[module_id].sl_info[i].LCID; group_comm_rbid = UE_rrc_inst[module_id].sl_info[i].LCID;
} }
LOG_I(RRC,"[GroupCommunicationEstablishReq] rbid %d for group Id: 0x%08x\n already exists",group_comm_rbid, UE_rrc_inst[module_id].sl_info[i].groupL2Id ); LOG_I(RRC,"[GroupCommunicationEstablishReq] rbid %d for group Id: 0x%08x already exists",group_comm_rbid, UE_rrc_inst[module_id].sl_info[i].groupL2Id );
break; //(LCID, G) already exists! break; //(LCID, G) already exists!
} }
} }
......
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