Commit cc101de8 authored by Tien-Thinh Nguyen's avatar Tien-Thinh Nguyen

support multiple flows (3 UEs)

parent 921242e2
...@@ -34,6 +34,7 @@ OAI build/execute ...@@ -34,6 +34,7 @@ OAI build/execute
- cp ../../../targets/bin/.usim* . - cp ../../../targets/bin/.usim* .
- sudo insmod ../../../targets/bin/ue_ip.ko - sudo insmod ../../../targets/bin/ue_ip.ko
UE1: UE1:
- sudo ifconfig oip0 10.0.0.1 - sudo ifconfig oip0 10.0.0.1
- sudo iptables -A POSTROUTING -t mangle -o oip0 -d 224.0.0.3 -j MARK --set-mark 4 - sudo iptables -A POSTROUTING -t mangle -o oip0 -d 224.0.0.3 -j MARK --set-mark 4
......
...@@ -1051,6 +1051,7 @@ rrc_mac_config_req_ue( ...@@ -1051,6 +1051,7 @@ rrc_mac_config_req_ue(
,config_action_t config_action ,config_action_t config_action
,const uint32_t * const sourceL2Id ,const uint32_t * const sourceL2Id
,const uint32_t * const destinationL2Id ,const uint32_t * const destinationL2Id
,const uint32_t * const groupL2Id
#endif #endif
) )
...@@ -1384,6 +1385,8 @@ rrc_mac_config_req_ue( ...@@ -1384,6 +1385,8 @@ rrc_mac_config_req_ue(
LOG_I(MAC,"[UE %d] Configure source L2Id 0x%08x \n", Mod_idP, *sourceL2Id ); LOG_I(MAC,"[UE %d] Configure source L2Id 0x%08x \n", Mod_idP, *sourceL2Id );
} }
if (destinationL2Id) { if (destinationL2Id) {
j = 0;
k = 0;
LOG_I(MAC,"[UE %d] Configure destination L2Id 0x%08x\n", Mod_idP, *destinationL2Id ); LOG_I(MAC,"[UE %d] Configure destination L2Id 0x%08x\n", Mod_idP, *destinationL2Id );
for (k=0; k< MAX_NUM_DEST; k++) { for (k=0; k< MAX_NUM_DEST; k++) {
if ((UE_mac_inst[Mod_idP].destinationList[k] == 0) && (j == 0)) j = k+1; if ((UE_mac_inst[Mod_idP].destinationList[k] == 0) && (j == 0)) j = k+1;
...@@ -1397,9 +1400,26 @@ rrc_mac_config_req_ue( ...@@ -1397,9 +1400,26 @@ rrc_mac_config_req_ue(
LOG_I(MAC,"[UE %d] destination %d L2Id 0x%08x\n", Mod_idP,k,UE_mac_inst[Mod_idP].destinationList[k] ); LOG_I(MAC,"[UE %d] destination %d L2Id 0x%08x\n", Mod_idP,k,UE_mac_inst[Mod_idP].destinationList[k] );
} }
} }
if (groupL2Id) {
j = 0;
k = 0;
LOG_I(MAC,"[UE %d] Configure group L2Id 0x%08x\n", Mod_idP, *groupL2Id );
for (k=0; k< MAX_NUM_DEST; k++) {
if ((UE_mac_inst[Mod_idP].groupList[k] == 0) && (j == 0)) j = k+1;
if (UE_mac_inst[Mod_idP].groupList[k] == *groupL2Id) break; //group already exists!
}
if ((k == MAX_NUM_DEST) && (j > 0)) {
UE_mac_inst[Mod_idP].groupList[j-1] = *groupL2Id;
// UE_mac_inst[Mod_idP].numCommFlows++;
}
for (k=0; k< MAX_NUM_DEST; k++) {
LOG_I(MAC,"[UE %d] group %d L2Id 0x%08x\n", Mod_idP,k,UE_mac_inst[Mod_idP].groupList[k] );
}
}
//store list of LCIDs for SL //store list of LCIDs for SL
if (logicalChannelIdentity >0 ){ if (logicalChannelIdentity >0 ){
j = 0; j = 0;
k = 0;
for (k=0; k< MAX_NUM_LCID; k++) { for (k=0; k< MAX_NUM_LCID; k++) {
if ((UE_mac_inst[Mod_idP].SL_LCID[k] == 0) && (j == 0)) j = k+1; if ((UE_mac_inst[Mod_idP].SL_LCID[k] == 0) && (j == 0)) j = k+1;
if (UE_mac_inst[Mod_idP].SL_LCID[k] == logicalChannelIdentity) break; //LCID already exists! if (UE_mac_inst[Mod_idP].SL_LCID[k] == logicalChannelIdentity) break; //LCID already exists!
......
...@@ -1342,8 +1342,10 @@ typedef struct { ...@@ -1342,8 +1342,10 @@ typedef struct {
uint32_t groupL2Id; uint32_t groupL2Id;
//SL destinationL2Id //SL destinationL2Id
uint32_t destinationL2Id; uint32_t destinationL2Id;
//List of destinations //List of destinations (unicast)
uint32_t destinationList[MAX_NUM_DEST]; uint32_t destinationList[MAX_NUM_DEST];
//List of group (multicast)
uint32_t groupList[MAX_NUM_DEST];
uint8_t numCommFlows; uint8_t numCommFlows;
uint32_t SL_LCID[MAX_NUM_LCID]; uint32_t SL_LCID[MAX_NUM_LCID];
......
...@@ -934,6 +934,7 @@ int rrc_mac_config_req_ue(module_id_t module_idP, ...@@ -934,6 +934,7 @@ int rrc_mac_config_req_ue(module_id_t module_idP,
,config_action_t config_action ,config_action_t config_action
,const uint32_t * const sourceL2Id ,const uint32_t * const sourceL2Id
,const uint32_t * const destinationL2Id ,const uint32_t * const destinationL2Id
,const uint32_t * const groupL2Id
#endif #endif
); );
......
...@@ -756,6 +756,7 @@ void ue_send_sl_sdu(module_id_t module_idP, ...@@ -756,6 +756,7 @@ void ue_send_sl_sdu(module_id_t module_idP,
int rlc_sdu_len; int rlc_sdu_len;
char *rlc_sdu; char *rlc_sdu;
uint32_t destinationL2Id =0x00000000; uint32_t destinationL2Id =0x00000000;
uint32_t sourceL2Id = 0x00000000;
if (sl_discovery_flag == SL_DISCOVERY_FLAG_NO) { if (sl_discovery_flag == SL_DISCOVERY_FLAG_NO) {
...@@ -765,17 +766,22 @@ void ue_send_sl_sdu(module_id_t module_idP, ...@@ -765,17 +766,22 @@ void ue_send_sl_sdu(module_id_t module_idP,
// extract header // extract header
SLSCH_SUBHEADER_24_Bit_DST_LONG *longh = (SLSCH_SUBHEADER_24_Bit_DST_LONG *)sdu; SLSCH_SUBHEADER_24_Bit_DST_LONG *longh = (SLSCH_SUBHEADER_24_Bit_DST_LONG *)sdu;
AssertFatal(longh->E==0,"E is non-zero\n"); AssertFatal(longh->E==0,"E is non-zero\n");
AssertFatal(((longh->LCID==3)|(longh->LCID==10)),"LCID is %d (not 3 or 10)\n",longh->LCID); AssertFatal(((longh->LCID==3)|(longh->LCID==10)|(longh->LCID==4)),"LCID is %d (not 3, 4 or 10)\n",longh->LCID);
//filter incoming packet based on destination address //filter incoming packet based on destination address
destinationL2Id = (longh->DST07<<16) | (longh->DST815 <<8) | (longh->DST1623); destinationL2Id = (longh->DST07<<16) | (longh->DST815 <<8) | (longh->DST1623);
LOG_I( MAC, "[DestinationL2Id: 0x%08x] \n", destinationL2Id ); sourceL2Id = (longh->SRC07<<16) | (longh->SRC815 <<8) | (longh->SRC1623);
LOG_D( MAC, "[DestinationL2Id: 0x%08x] \n", destinationL2Id );
//in case of 1-n communication, verify that UE belongs to that group //in case of 1-n communication, verify that UE belongs to that group
int i=0; int i = 0;
for (i=0; i< MAX_NUM_DEST; i++) for (i=0; i< MAX_NUM_DEST; i++)
if (UE_mac_inst[module_idP].destinationList[i] == destinationL2Id) break; if (UE_mac_inst[module_idP].groupList[i] == destinationL2Id) break;
int j = 0;
for (j=0; j< MAX_NUM_DEST; j++)
if (UE_mac_inst[module_idP].destinationList[j] == sourceL2Id) break;
//match the destinationL2Id with UE L2Id or groupL2ID //match the destinationL2Id with UE L2Id or groupL2ID
if (!((destinationL2Id == UE_mac_inst[module_idP].sourceL2Id) | (i < MAX_NUM_DEST))){ if (!(((destinationL2Id == UE_mac_inst[module_idP].sourceL2Id) && (j < MAX_NUM_DEST)) | ((destinationL2Id == UE_mac_inst[module_idP].sourceL2Id) && (longh->LCID == 10)) | (i < MAX_NUM_DEST))){
LOG_I( MAC, "[Destination Id is neither matched with Source Id nor with Group Id, drop the packet!!! \n"); LOG_D( MAC, "[Destination Id is neither matched with Source Id nor with Group Id, drop the packet!!! \n");
return; return;
} }
...@@ -2818,6 +2824,21 @@ SLSCH_t *ue_get_slsch(module_id_t module_idP,int CC_id,frame_t frameP,sub_frame_ ...@@ -2818,6 +2824,21 @@ SLSCH_t *ue_get_slsch(module_id_t module_idP,int CC_id,frame_t frameP,sub_frame_
break; break;
} }
} }
if ((ue->sourceL2Id > 0) && (ue->groupList[j] >0) ){
rlc_status = mac_rlc_status_ind(module_idP, 0x1234,0,frameP,subframeP,ENB_FLAG_NO,MBMS_FLAG_NO,
ue->SL_LCID[i], 0xFFFF, ue->sourceL2Id, ue->groupList[j]);
if (rlc_status.bytes_in_buffer > 2){
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
ue->sltx_active = 1;
//store LCID, destinationL2Id
ue->slsch_lcid = ue->SL_LCID[i];
ue->destinationL2Id = ue->groupList[j];
break;
}
}
} }
} }
if ( ue->sltx_active == 1) break; if ( ue->sltx_active == 1) break;
......
...@@ -658,6 +658,7 @@ uint8_t do_SIB23(uint8_t Mod_id, ...@@ -658,6 +658,7 @@ uint8_t do_SIB23(uint8_t Mod_id,
sib18_part = CALLOC(1,sizeof(struct SystemInformation_r8_IEs__sib_TypeAndInfo__Member)); sib18_part = CALLOC(1,sizeof(struct SystemInformation_r8_IEs__sib_TypeAndInfo__Member));
sib19_part = CALLOC(1,sizeof(struct SystemInformation_r8_IEs__sib_TypeAndInfo__Member)); sib19_part = CALLOC(1,sizeof(struct SystemInformation_r8_IEs__sib_TypeAndInfo__Member));
//sib21_part = CALLOC(1,sizeof(struct SystemInformation_r8_IEs__sib_TypeAndInfo__Member)); //sib21_part = CALLOC(1,sizeof(struct SystemInformation_r8_IEs__sib_TypeAndInfo__Member));
memset(sib18_part,0,sizeof(struct SystemInformation_r8_IEs__sib_TypeAndInfo__Member)); memset(sib18_part,0,sizeof(struct SystemInformation_r8_IEs__sib_TypeAndInfo__Member));
memset(sib19_part,0,sizeof(struct SystemInformation_r8_IEs__sib_TypeAndInfo__Member)); memset(sib19_part,0,sizeof(struct SystemInformation_r8_IEs__sib_TypeAndInfo__Member));
//memset(sib21_part,0,sizeof(struct SystemInformation_r8_IEs__sib_TypeAndInfo__Member)); //memset(sib21_part,0,sizeof(struct SystemInformation_r8_IEs__sib_TypeAndInfo__Member));
...@@ -670,8 +671,6 @@ uint8_t do_SIB23(uint8_t Mod_id, ...@@ -670,8 +671,6 @@ uint8_t do_SIB23(uint8_t Mod_id,
*sib19 = &sib19_part->choice.sib19_v1250; *sib19 = &sib19_part->choice.sib19_v1250;
//*sib21 = &sib19_part->choice.sib21_v14x0; //*sib21 = &sib19_part->choice.sib21_v14x0;
// sib2 // sib2
(*sib2)->ac_BarringInfo = NULL; (*sib2)->ac_BarringInfo = NULL;
...@@ -1332,7 +1331,6 @@ uint8_t do_SIB23(uint8_t Mod_id, ...@@ -1332,7 +1331,6 @@ uint8_t do_SIB23(uint8_t Mod_id,
//end SIB19 //end SIB19
bcch_message->message.present = BCCH_DL_SCH_MessageType_PR_c1; bcch_message->message.present = BCCH_DL_SCH_MessageType_PR_c1;
bcch_message->message.choice.c1.present = BCCH_DL_SCH_MessageType__c1_PR_systemInformation; bcch_message->message.choice.c1.present = BCCH_DL_SCH_MessageType__c1_PR_systemInformation;
...@@ -1364,7 +1362,6 @@ uint8_t do_SIB23(uint8_t Mod_id, ...@@ -1364,7 +1362,6 @@ uint8_t do_SIB23(uint8_t Mod_id,
//ASN_SEQUENCE_ADD(&bcch_message->message.choice.c1.choice.systemInformation.criticalExtensions.choice.systemInformation_r8.sib_TypeAndInfo.list, sib21_part); //ASN_SEQUENCE_ADD(&bcch_message->message.choice.c1.choice.systemInformation.criticalExtensions.choice.systemInformation_r8.sib_TypeAndInfo.list, sib21_part);
#ifdef XER_PRINT #ifdef XER_PRINT
xer_fprint(stdout, &asn_DEF_BCCH_DL_SCH_Message, (void*)bcch_message); xer_fprint(stdout, &asn_DEF_BCCH_DL_SCH_Message, (void*)bcch_message);
#endif #endif
......
...@@ -636,7 +636,7 @@ typedef struct { ...@@ -636,7 +636,7 @@ typedef struct {
SystemInformationBlockType18_r12_t *sib18; SystemInformationBlockType18_r12_t *sib18;
SystemInformationBlockType19_r12_t *sib19; SystemInformationBlockType19_r12_t *sib19;
SystemInformationBlockType21_r14_t *sib21; SystemInformationBlockType21_r14_t *sib21;
// End - TTN
SRB_INFO SI; SRB_INFO SI;
SRB_INFO Srb0; SRB_INFO Srb0;
} rrc_eNB_carrier_data_t; } rrc_eNB_carrier_data_t;
...@@ -741,8 +741,10 @@ typedef struct UE_RRC_INST_s { ...@@ -741,8 +741,10 @@ typedef struct UE_RRC_INST_s {
uint32_t groupL2Id; uint32_t groupL2Id;
//current destination //current destination
uint32_t destinationL2Id; uint32_t destinationL2Id;
//List of destinations //List of destinations (unicast)
uint32_t destinationList[MAX_NUM_DEST]; uint32_t destinationList[MAX_NUM_DEST];
//List of groups (multicast)
uint32_t groupList[MAX_NUM_DEST];
//sl_discovery.. //sl_discovery..
SRB_INFO SL_Discovery[NB_CNX_UE]; SRB_INFO SL_Discovery[NB_CNX_UE];
#endif #endif
......
...@@ -1048,6 +1048,7 @@ rrc_ue_process_measConfig( ...@@ -1048,6 +1048,7 @@ rrc_ue_process_measConfig(
, ,
0, 0,
NULL, NULL,
NULL,
NULL NULL
#endif #endif
); );
...@@ -1567,6 +1568,7 @@ rrc_ue_process_radioResourceConfigDedicated( ...@@ -1567,6 +1568,7 @@ rrc_ue_process_radioResourceConfigDedicated(
, ,
0, 0,
NULL, NULL,
NULL,
NULL NULL
#endif #endif
); );
...@@ -1632,6 +1634,7 @@ rrc_ue_process_radioResourceConfigDedicated( ...@@ -1632,6 +1634,7 @@ rrc_ue_process_radioResourceConfigDedicated(
, ,
0, 0,
NULL, NULL,
NULL,
NULL NULL
#endif #endif
); );
...@@ -1746,6 +1749,7 @@ rrc_ue_process_radioResourceConfigDedicated( ...@@ -1746,6 +1749,7 @@ rrc_ue_process_radioResourceConfigDedicated(
, ,
0, 0,
NULL, NULL,
NULL,
NULL NULL
#endif #endif
); );
...@@ -2336,6 +2340,7 @@ rrc_ue_process_mobilityControlInfo( ...@@ -2336,6 +2340,7 @@ rrc_ue_process_mobilityControlInfo(
, ,
0, 0,
NULL, NULL,
NULL,
NULL NULL
#endif #endif
); );
...@@ -3204,6 +3209,7 @@ int decode_SIB1( const protocol_ctxt_t* const ctxt_pP, const uint8_t eNB_index, ...@@ -3204,6 +3209,7 @@ int decode_SIB1( const protocol_ctxt_t* const ctxt_pP, const uint8_t eNB_index,
, ,
0, 0,
NULL, NULL,
NULL,
NULL NULL
#endif #endif
); );
...@@ -3889,6 +3895,7 @@ uint64_t arfcn_to_freq(long arfcn) { ...@@ -3889,6 +3895,7 @@ uint64_t arfcn_to_freq(long arfcn) {
, ,
0, 0,
NULL, NULL,
NULL,
NULL NULL
#endif #endif
); );
...@@ -4075,6 +4082,7 @@ uint64_t arfcn_to_freq(long arfcn) { ...@@ -4075,6 +4082,7 @@ uint64_t arfcn_to_freq(long arfcn) {
, ,
0, 0,
NULL, NULL,
NULL,
NULL NULL
#endif #endif
); );
...@@ -4581,6 +4589,7 @@ int decode_MCCH_Message( const protocol_ctxt_t* const ctxt_pP, const uint8_t eNB ...@@ -4581,6 +4589,7 @@ int decode_MCCH_Message( const protocol_ctxt_t* const ctxt_pP, const uint8_t eNB
, ,
0, 0,
NULL, NULL,
NULL,
NULL NULL
#endif #endif
); );
...@@ -5549,10 +5558,10 @@ void *rrc_control_socket_thread_fct(void *arg) ...@@ -5549,10 +5558,10 @@ void *rrc_control_socket_thread_fct(void *arg)
j = 0; j = 0;
i = 0; i = 0;
for (i=0; i< MAX_NUM_DEST; i++) { for (i=0; i< MAX_NUM_DEST; i++) {
if ((UE_rrc_inst[module_id].destinationList[i] == 0) && (j == 0)) j = i+1; if ((UE_rrc_inst[module_id].groupList[i] == 0) && (j == 0)) j = i+1;
if (UE_rrc_inst[module_id].destinationList[i] == groupL2Id) break; //group already exists! if (UE_rrc_inst[module_id].groupList[i] == groupL2Id) break; //group already exists!
} }
if ((i == MAX_NUM_DEST) && (j > 0)) UE_rrc_inst[module_id].destinationList[j-1] = groupL2Id; if ((i == MAX_NUM_DEST) && (j > 0)) UE_rrc_inst[module_id].groupList[j-1] = groupL2Id;
// configure lower layers PDCP/MAC/PHY for this communication // configure lower layers PDCP/MAC/PHY for this communication
//Establish a new RBID/LCID for this communication //Establish a new RBID/LCID for this communication
...@@ -5681,6 +5690,7 @@ void *rrc_control_socket_thread_fct(void *arg) ...@@ -5681,6 +5690,7 @@ void *rrc_control_socket_thread_fct(void *arg)
#if defined(Rel10) || defined(Rel14) #if defined(Rel10) || defined(Rel14)
,CONFIG_ACTION_ADD, ,CONFIG_ACTION_ADD,
&sourceL2Id, &sourceL2Id,
NULL,
&groupL2Id &groupL2Id
#endif #endif
); );
...@@ -5753,7 +5763,8 @@ void *rrc_control_socket_thread_fct(void *arg) ...@@ -5753,7 +5763,8 @@ void *rrc_control_socket_thread_fct(void *arg)
#if defined(Rel10) || defined(Rel14) #if defined(Rel10) || defined(Rel14)
,CONFIG_ACTION_REMOVE, ,CONFIG_ACTION_REMOVE,
&sourceL2Id, &sourceL2Id,
&destinationL2Id &destinationL2Id,
NULL
#endif #endif
); );
...@@ -5932,7 +5943,8 @@ void *rrc_control_socket_thread_fct(void *arg) ...@@ -5932,7 +5943,8 @@ void *rrc_control_socket_thread_fct(void *arg)
#if defined(Rel10) || defined(Rel14) #if defined(Rel10) || defined(Rel14)
,CONFIG_ACTION_ADD, ,CONFIG_ACTION_ADD,
&sourceL2Id, &sourceL2Id,
&destinationL2Id &destinationL2Id,
NULL
#endif #endif
); );
...@@ -5983,7 +5995,7 @@ void *rrc_control_socket_thread_fct(void *arg) ...@@ -5983,7 +5995,7 @@ void *rrc_control_socket_thread_fct(void *arg)
i = 0; i = 0;
for (i=0; i< MAX_NUM_DEST; i++) { for (i=0; i< MAX_NUM_DEST; i++) {
if ((UE_rrc_inst[module_id].destinationList[i] == 0) && (j == 0)) j = i+1; if ((UE_rrc_inst[module_id].destinationList[i] == 0) && (j == 0)) j = i+1;
if (UE_rrc_inst[module_id].destinationList[i] == destinationL2Id) break; //group already exists! if (UE_rrc_inst[module_id].destinationList[i] == destinationL2Id) break; //destination already exists!
} }
if ((i == MAX_NUM_DEST) && (j > 0)) UE_rrc_inst[module_id].destinationList[j-1] = destinationL2Id; if ((i == MAX_NUM_DEST) && (j > 0)) UE_rrc_inst[module_id].destinationList[j-1] = destinationL2Id;
} else {//RX } else {//RX
...@@ -6118,7 +6130,8 @@ void *rrc_control_socket_thread_fct(void *arg) ...@@ -6118,7 +6130,8 @@ void *rrc_control_socket_thread_fct(void *arg)
#if defined(Rel10) || defined(Rel14) #if defined(Rel10) || defined(Rel14)
,CONFIG_ACTION_ADD, ,CONFIG_ACTION_ADD,
&sourceL2Id, &sourceL2Id,
&destinationL2Id &destinationL2Id,
NULL
#endif #endif
); );
} else {//RX } else {//RX
...@@ -6157,6 +6170,7 @@ void *rrc_control_socket_thread_fct(void *arg) ...@@ -6157,6 +6170,7 @@ void *rrc_control_socket_thread_fct(void *arg)
#if defined(Rel10) || defined(Rel14) #if defined(Rel10) || defined(Rel14)
,CONFIG_ACTION_ADD, ,CONFIG_ACTION_ADD,
&sourceL2Id, &sourceL2Id,
NULL,
NULL NULL
#endif #endif
); );
......
...@@ -775,16 +775,15 @@ void ue_stub_rx_handler(unsigned int num_bytes, char *rx_buffer) { ...@@ -775,16 +775,15 @@ void ue_stub_rx_handler(unsigned int num_bytes, char *rx_buffer) {
wakeup_thread(&UE->timer_mutex,&UE->timer_cond,&UE->instance_cnt_timer,"timer_thread"); wakeup_thread(&UE->timer_mutex,&UE->timer_cond,&UE->instance_cnt_timer,"timer_thread");
break; break;
case SLSCH: case SLSCH:
LOG_D(PHY,"Emulator SFN.SF %d.%d, Got SLSCH packet\n",emulator_absSF/10,emulator_absSF%10);
LOG_D(PHY,"Received %d bytes on UE-UE link for SFN.SF %d.%d, sending SLSCH payload (%d bytes) to MAC\n",num_bytes,
LOG_I(PHY,"Emulator SFN.SF %d.%d, Got SLSCH packet\n",emulator_absSF/10,emulator_absSF%10);
LOG_I(PHY,"Received %d bytes on UE-UE link for SFN.SF %d.%d, sending SLSCH payload (%d bytes) to MAC\n",num_bytes,
pdu->header.absSF/10,pdu->header.absSF%10, pdu->header.absSF/10,pdu->header.absSF%10,
slsch->payload_length); slsch->payload_length);
#ifdef DEBUG_UE_RX
printf("SLSCH:"); printf("SLSCH:");
for (int i=0;i<sizeof(SLSCH_t);i++) printf("%x ",((uint8_t*)slsch)[i]); for (int i=0;i<sizeof(SLSCH_t);i++) printf("%x ",((uint8_t*)slsch)[i]);
printf("\n"); printf("\n");
#endif
ue_send_sl_sdu(0, ue_send_sl_sdu(0,
0, 0,
pdu->header.absSF/10, pdu->header.absSF/10,
...@@ -796,16 +795,15 @@ void ue_stub_rx_handler(unsigned int num_bytes, char *rx_buffer) { ...@@ -796,16 +795,15 @@ void ue_stub_rx_handler(unsigned int num_bytes, char *rx_buffer) {
break; break;
case SLDCH: case SLDCH:
LOG_D(PHY,"Emulator SFN.SF %d.%d, Got SLDCH packet\n",emulator_absSF/10,emulator_absSF%10);
LOG_D(PHY,"Received %d bytes on UE-UE link for SFN.SF %d.%d, sending SLDCH payload (%d bytes) to MAC\n",num_bytes,
LOG_I(PHY,"Emulator SFN.SF %d.%d, Got SLDCH packet\n",emulator_absSF/10,emulator_absSF%10);
LOG_I(PHY,"Received %d bytes on UE-UE link for SFN.SF %d.%d, sending SLDCH payload (%d bytes) to MAC\n",num_bytes,
pdu->header.absSF/10,pdu->header.absSF%10, pdu->header.absSF/10,pdu->header.absSF%10,
sldch->payload_length); sldch->payload_length);
#ifdef DEBUG_UE_RX
printf("SLDCH:"); printf("SLDCH:");
for (int i=0;i<sizeof(SLDCH_t);i++) printf("%x ",((uint8_t*)sldch)[i]); for (int i=0;i<sizeof(SLDCH_t);i++) printf("%x ",((uint8_t*)sldch)[i]);
printf("\n"); printf("\n");
#endif
ue_send_sl_sdu(0, ue_send_sl_sdu(0,
0, 0,
pdu->header.absSF/10, pdu->header.absSF/10,
......
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