Commit 9cf15c80 authored by Tien-Thinh Nguyen's avatar Tien-Thinh Nguyen

polish the code/update instructions

parent f2653443
......@@ -48,8 +48,8 @@ UE1 and UE2: Get and build vencore_app from d2d-l3-stub (branch: l3_stub)
--------------------------------
TEST ONE-TO-MANY
Run UE1 then UE2, for example:
UE1: sudo ./lte-softmodem-stub -U --emul_iface eth0
UE2: sudo ./lte-softmodem-stub -U --emul_iface eno1
UE1: sudo ./lte-softmodem-stub -U --emul-iface eth0
UE2: sudo ./lte-softmodem-stub -U --emul-iface eno1
Test with Ping
- Sender - UE1: ping -I oip0 224.0.0.1
......@@ -63,20 +63,20 @@ Filter the incomming packets according to GroupL2Id: receiver (one-to-many) can
For the moment, both sender and receiver use the same set of Ids (hardcoded)
UE1 (sender)
- sudo ./lte-softmodem-stub -U --emul_iface eth0
- sudo ./lte-softmodem-stub -U --emul-iface eth0
- ./vencore_app #send the sourceL2Id, groupL2Id to OAI
- ping -I oip0 224.0.0.1
UE2(receiver)
- sudo ./lte-softmodem-stub -U --emul_iface eno1
- sudo ./lte-softmodem-stub -U --emul-iface eno1
#we can see the incomming packets from OAI log, however, cannot see from Wireshark -> they are discarded at MAC layer
- ./vencore_app #we can see the packets appearing in Wireshark
--------------------------------------
TEST PC5-S (UE1 -sender, UE2 - receiver)
step 1:
- UE1: sudo ./lte-softmodem-stub -U --emul_iface eth0
- UE1: sudo ./lte-softmodem-stub -U --emul-iface eth0
step 2:
- UE2: sudo ./lte-softmodem-stub -U --emul_iface eno1
- UE2: sudo ./lte-softmodem-stub -U --emul-iface eno1
- UE2: ./vencore_app -r #listen to incomming message from PC5-S
step 3:
- UE1: ./vencore_app -s #send a message via PC5-S (e.g., DirectCommunicationRequest)
......@@ -85,9 +85,9 @@ step 3:
--------------------------------------
TEST PC5-D
step 1:
- UE1: sudo ./lte-softmodem-stub -U --emul_iface eth0
- UE1: sudo ./lte-softmodem-stub -U --emul-iface eth0
- UE1: ./vencore_app -d #send a PC5-Discovery-Announcement via PC5D
step 2:
- UE2: sudo ./lte-softmodem-stub -U --emul_iface eno1
- UE2: sudo ./lte-softmodem-stub -U --emul-iface eno1
- UE2: ./vencore_app -d #send a PC5-Discovery-Announcement via PC5D
......@@ -433,7 +433,7 @@ typedef struct {
ip_traffic_type_t traffic_type;
uint32_t sourceL2Id;
uint32_t destinationL2Id;
} __attribute__((__packed__)) pdcp_data_header_t;
} __attribute__((__packed__)) pc5s_header_t;
//new PC5S-message
typedef struct {
......@@ -442,7 +442,7 @@ typedef struct {
//example of PC5-S messages
typedef struct {
pdcp_data_header_t pdcp_data_header;
pc5s_header_t pc5s_header;
union {
uint8_t status;
PC5SignallingMessage pc5_signalling_message;
......
......@@ -215,12 +215,12 @@ int pdcp_fifo_flush_sdus(const protocol_ctxt_t* const ctxt_pP)
#ifdef PDCP_DEBUG
sl_pc5s_msg_recv = calloc(1, sizeof(sidelink_pc5s_element));
memcpy((void*)sl_pc5s_msg_recv, (void*)(sdu_p->data+sizeof(pdcp_data_ind_header_t)), sizeof(sidelink_pc5s_element));
LOG_D(PDCP,"Received PC5S message, header traffic_type: %d)\n", sl_pc5s_msg_recv->pdcp_data_header.traffic_type);
LOG_D(PDCP,"Received PC5S message, header rb_id: %d)\n", sl_pc5s_msg_recv->pdcp_data_header.rb_id);
LOG_D(PDCP,"Received PC5S message, header data_size: %d)\n", sl_pc5s_msg_recv->pdcp_data_header.data_size);
LOG_D(PDCP,"Received PC5S message, header inst: %d)\n", sl_pc5s_msg_recv->pdcp_data_header.inst);
LOG_D(PDCP,"Received PC5-S message, sourceL2Id: 0x%08x\n)\n", sl_pc5s_msg_recv->pdcp_data_header.sourceL2Id);
LOG_D(PDCP,"Received PC5-S message, destinationL1Id: 0x%08x\n)\n", sl_pc5s_msg_recv->pdcp_data_header.destinationL2Id);
LOG_D(PDCP,"Received PC5S message, header traffic_type: %d)\n", sl_pc5s_msg_recv->pc5s_header.traffic_type);
LOG_D(PDCP,"Received PC5S message, header rb_id: %d)\n", sl_pc5s_msg_recv->pc5s_header.rb_id);
LOG_D(PDCP,"Received PC5S message, header data_size: %d)\n", sl_pc5s_msg_recv->pc5s_header.data_size);
LOG_D(PDCP,"Received PC5S message, header inst: %d)\n", sl_pc5s_msg_recv->pc5s_header.inst);
LOG_D(PDCP,"Received PC5-S message, sourceL2Id: 0x%08x\n)\n", sl_pc5s_msg_recv->pc5s_header.sourceL2Id);
LOG_D(PDCP,"Received PC5-S message, destinationL1Id: 0x%08x\n)\n", sl_pc5s_msg_recv->pc5s_header.destinationL2Id);
free(sl_pc5s_msg_recv);
#endif
memset(send_buf, 0, BUFSIZE);
......@@ -436,7 +436,7 @@ int pdcp_fifo_read_input_sdus (const protocol_ctxt_t* const ctxt_pP)
uint32_t sourceL2Id;
uint32_t groupL2Id;
module_id_t module_id = 0;
pdcp_data_header_t *pdcp_data_header;
pc5s_header_t *pc5s_header;
#endif
# if defined(PDCP_USE_NETLINK_QUEUES)
......@@ -581,15 +581,15 @@ int pdcp_fifo_read_input_sdus (const protocol_ctxt_t* const ctxt_pP)
// exit(EXIT_FAILURE);
// }
if (bytes_received > 0) {
pdcp_data_header = calloc(1, sizeof(pdcp_data_header_t));
memcpy((void *)pdcp_data_header, (void *)receive_buf, sizeof(pdcp_data_header_t));
pc5s_header = calloc(1, sizeof(pc5s_header_t));
memcpy((void *)pc5s_header, (void *)receive_buf, sizeof(pc5s_header_t));
if (pdcp_data_header->traffic_type == TRAFFIC_PC5S_SESSION_INIT){
if (pc5s_header->traffic_type == TRAFFIC_PC5S_SESSION_INIT){
//send reply to ProSe app
LOG_D(PDCP,"Received a request to open PDCP socket and establish a new PDCP session ... send response to ProSe App \n");
memset(send_buf, 0, BUFSIZE);
sl_pc5s_msg_send = calloc(1, sizeof(sidelink_pc5s_element));
sl_pc5s_msg_send->pdcp_data_header.traffic_type = TRAFFIC_PC5S_SESSION_INIT;
sl_pc5s_msg_send->pc5s_header.traffic_type = TRAFFIC_PC5S_SESSION_INIT;
sl_pc5s_msg_send->pc5sPrimitive.status = 1;
memcpy((void *)send_buf, (void *)sl_pc5s_msg_send, sizeof(sidelink_pc5s_element));
......@@ -599,56 +599,56 @@ int pdcp_fifo_read_input_sdus (const protocol_ctxt_t* const ctxt_pP)
LOG_E(PDCP, "ERROR: Failed to send to ProSe App\n");
exit(EXIT_FAILURE);
}
} else if (pdcp_data_header->traffic_type == TRAFFIC_PC5S_SIGNALLING) { //if containing PC5-S message -> send to other UE
} else if (pc5s_header->traffic_type == TRAFFIC_PC5S_SIGNALLING) { //if containing PC5-S message -> send to other UE
LOG_D(PDCP,"Received PC5-S message ... send to the other UE\n");
#ifdef PDCP_DEBUG
LOG_D(PDCP,"Received PC5-S message, traffic_type: %d)\n", pdcp_data_header->traffic_type);
LOG_D(PDCP,"Received PC5-S message, rbid: %d)\n", pdcp_data_header->rb_id);
LOG_D(PDCP,"Received PC5-S message, data_size: %d)\n", pdcp_data_header->data_size);
LOG_D(PDCP,"Received PC5-S message, inst: %d)\n", pdcp_data_header->inst);
LOG_D(PDCP,"Received PC5-S message,sourceL2Id: 0x%08x\n)\n", pdcp_data_header->sourceL2Id);
LOG_D(PDCP,"Received PC5-S message,destinationL1Id: 0x%08x\n)\n", pdcp_data_header->destinationL2Id);
LOG_D(PDCP,"Received PC5-S message, traffic_type: %d)\n", pc5s_header->traffic_type);
LOG_D(PDCP,"Received PC5-S message, rbid: %d)\n", pc5s_header->rb_id);
LOG_D(PDCP,"Received PC5-S message, data_size: %d)\n", pc5s_header->data_size);
LOG_D(PDCP,"Received PC5-S message, inst: %d)\n", pc5s_header->inst);
LOG_D(PDCP,"Received PC5-S message,sourceL2Id: 0x%08x\n)\n", pc5s_header->sourceL2Id);
LOG_D(PDCP,"Received PC5-S message,destinationL1Id: 0x%08x\n)\n", pc5s_header->destinationL2Id);
#endif
#ifdef OAI_EMU
// overwrite function input parameters, because only one netlink socket for all instances
if (pdcp_data_header->inst < oai_emulation.info.nb_enb_local) {
if (pc5s_header->inst < oai_emulation.info.nb_enb_local) {
ctxt.frame = ctxt_cpy.frame;
ctxt.enb_flag = ENB_FLAG_YES;
ctxt.module_id = pdcp_data_header.inst + oai_emulation.info.first_enb_local;
ctxt.rnti = oai_emulation.info.eNB_ue_module_id_to_rnti[ctxt.module_id ][pdcp_data_header->rb_id / maxDRB + oai_emulation.info.first_ue_local];
rab_id = pdcp_data_header->rb_id % maxDRB;
ctxt.module_id = pc5s_header.inst + oai_emulation.info.first_enb_local;
ctxt.rnti = oai_emulation.info.eNB_ue_module_id_to_rnti[ctxt.module_id ][pc5s_header->rb_id / maxDRB + oai_emulation.info.first_ue_local];
rab_id = pc5s_header->rb_id % maxDRB;
} else {
ctxt.frame = ctxt_cpy.frame;
ctxt.enb_flag = ENB_FLAG_NO;
ctxt.module_id = pdcp_data_header->inst - oai_emulation.info.nb_enb_local + oai_emulation.info.first_ue_local;
ctxt.module_id = pc5s_header->inst - oai_emulation.info.nb_enb_local + oai_emulation.info.first_ue_local;
ctxt.rnti = pdcp_UE_UE_module_id_to_rnti[ctxt.module_id];
rab_id = pdcp_data_header->rb_id % maxDRB;
rab_id = pc5s_header->rb_id % maxDRB;
}
CHECK_CTXT_ARGS(&ctxt);
AssertFatal (rab_id < maxDRB, "RB id is too high (%u/%d)!\n", rab_id, maxDRB);
/*LGpdcp_read_header.inst = (pdcp_data_header.inst >= oai_emulation.info.nb_enb_local) ? \
pdcp_data_header.inst - oai_emulation.info.nb_enb_local+ NB_eNB_INST + oai_emulation.info.first_ue_local :
pdcp_data_header.inst + oai_emulation.info.first_enb_local;*/
/*LGpdcp_read_header.inst = (pc5s_header.inst >= oai_emulation.info.nb_enb_local) ? \
pc5s_header.inst - oai_emulation.info.nb_enb_local+ NB_eNB_INST + oai_emulation.info.first_ue_local :
pc5s_header.inst + oai_emulation.info.first_enb_local;*/
#else // OAI_EMU
/* TODO: do we have to reset to 0 or not? not for a scenario with 1 UE at least */
// pdcp_data_header.inst = 0;
// pc5s_header.inst = 0;
//#warning "TO DO CORRCT VALUES FOR ue mod id, enb mod id"
ctxt.frame = ctxt_cpy.frame;
ctxt.enb_flag = ctxt_cpy.enb_flag;
LOG_I(PDCP, "[PDCP] pdcp_data_header->rb_id = %d\n", pdcp_data_header->rb_id);
LOG_I(PDCP, "[PDCP] pc5s_header->rb_id = %d\n", pc5s_header->rb_id);
if (ctxt_cpy.enb_flag) {
ctxt.module_id = 0;
rab_id = pdcp_data_header->rb_id % maxDRB;
rab_id = pc5s_header->rb_id % maxDRB;
ctxt.rnti = pdcp_eNB_UE_instance_to_rnti[pdcp_eNB_UE_instance_to_rnti_index];
} else {
ctxt.module_id = 0;
rab_id = pdcp_data_header->rb_id % maxDRB;
rab_id = pc5s_header->rb_id % maxDRB;
ctxt.rnti = pdcp_UE_UE_module_id_to_rnti[ctxt.module_id];
}
#endif
......@@ -678,15 +678,15 @@ int pdcp_fifo_read_input_sdus (const protocol_ctxt_t* const ctxt_pP)
#ifdef PDCP_DEBUG
LOG_I(PDCP, "[FRAME %5u][UE][NETLINK][IP->PDCP] INST %d: Received socket with length %d on Rab %d \n",
ctxt.frame,
pdcp_data_header->inst,
pc5s_header->inst,
bytes_received,
pdcp_data_header->rb_id);
pc5s_header->rb_id);
LOG_I(PDCP, "[FRAME %5u][UE][IP][INSTANCE %u][RB %u][--- PDCP_DATA_REQ / %d Bytes --->][PDCP][MOD %u][UE %u][RB %u]\n",
ctxt.frame,
pdcp_data_header->inst,
pdcp_data_header->rb_id,
pdcp_data_header->data_size,
pc5s_header->inst,
pc5s_header->rb_id,
pc5s_header->data_size,
ctxt.module_id,
ctxt.rnti,
rab_id);
......@@ -698,10 +698,10 @@ int pdcp_fifo_read_input_sdus (const protocol_ctxt_t* const ctxt_pP)
0,
MSC_AS_TIME_FMT" DATA-REQ inst %u rb %u rab %u size %u",
MSC_AS_TIME_ARGS(ctxt_pP),
pdcp_data_header.inst,
pdcp_data_header.rb_id,
pc5s_header.inst,
pc5s_header.rb_id,
rab_id,
pdcp_data_header.data_size);
pc5s_header.data_size);
pdcp_data_req(
&ctxt,
......@@ -709,12 +709,12 @@ int pdcp_fifo_read_input_sdus (const protocol_ctxt_t* const ctxt_pP)
rab_id,
RLC_MUI_UNDEFINED,
RLC_SDU_CONFIRM_NO,
pdcp_data_header->data_size,
pc5s_header->data_size,
(unsigned char *)receive_buf,
PDCP_TRANSMISSION_MODE_DATA
#ifdef Rel14
,&pdcp_data_header->sourceL2Id
,&pdcp_data_header->destinationL2Id
,&pc5s_header->sourceL2Id
,&pc5s_header->destinationL2Id
#endif
);
} else {
......@@ -725,16 +725,16 @@ int pdcp_fifo_read_input_sdus (const protocol_ctxt_t* const ctxt_pP)
0,
MSC_AS_TIME_FMT" DATA-REQ inst %u rb %u rab %u size %u",
MSC_AS_TIME_ARGS(ctxt_pP),
pdcp_data_header.inst,
pdcp_data_header.rb_id,
pc5s_header.inst,
pc5s_header.rb_id,
rab_id,
pdcp_data_header.data_size);
pc5s_header.data_size);
LOG_D(PDCP,
"[FRAME %5u][UE][IP][INSTANCE %u][RB %u][--- PDCP_DATA_REQ / %d Bytes ---X][PDCP][MOD %u][UE %u][RB %u] NON INSTANCIATED INSTANCE key 0x%"PRIx64", DROPPED\n",
ctxt.frame,
pdcp_data_header->inst,
pdcp_data_header->rb_id,
pdcp_data_header->data_size,
pc5s_header->inst,
pc5s_header->rb_id,
pc5s_header->data_size,
ctxt.module_id,
ctxt.rnti,
rab_id,
......@@ -744,9 +744,9 @@ int pdcp_fifo_read_input_sdus (const protocol_ctxt_t* const ctxt_pP)
LOG_D(PDCP, "Forcing send on DEFAULT_RAB_ID\n");
LOG_D(PDCP, "[FRAME %5u][eNB][IP][INSTANCE %u][RB %u][--- PDCP_DATA_REQ / %d Bytes --->][PDCP][MOD %u][UE %u][RB DEFAULT_RAB_ID %u]\n",
ctxt.frame,
pdcp_data_header->inst,
pdcp_data_header->rb_id,
pdcp_data_header->data_size,
pc5s_header->inst,
pc5s_header->rb_id,
pc5s_header->data_size,
ctxt.module_id,
ctxt.rnti,
DEFAULT_RAB_ID);
......@@ -756,10 +756,10 @@ int pdcp_fifo_read_input_sdus (const protocol_ctxt_t* const ctxt_pP)
NULL,0,
MSC_AS_TIME_FMT" DATA-REQ inst %u rb %u default rab %u size %u",
MSC_AS_TIME_ARGS(ctxt_pP),
pdcp_data_header->inst,
pdcp_data_header->rb_id,
pc5s_header->inst,
pc5s_header->rb_id,
DEFAULT_RAB_ID,
pdcp_data_header->data_size);
pc5s_header->data_size);
pdcp_data_req (
&ctxt,
......@@ -767,12 +767,12 @@ int pdcp_fifo_read_input_sdus (const protocol_ctxt_t* const ctxt_pP)
DEFAULT_RAB_ID,
RLC_MUI_UNDEFINED,
RLC_SDU_CONFIRM_NO,
pdcp_data_header->data_size,
pc5s_header->data_size,
(unsigned char *)receive_buf,
PDCP_TRANSMISSION_MODE_DATA
#ifdef Rel14
,&pdcp_data_header->sourceL2Id
,&pdcp_data_header->destinationL2Id
,&pc5s_header->sourceL2Id
,&pc5s_header->destinationL2Id
#endif
);
}
......
......@@ -103,7 +103,6 @@ typedef enum {
} Group_Communication_Status_t;
struct GroupCommunicationEstablishReq {
uint8_t type; //0 - rx, 1 - tx
uint32_t sourceL2Id;
uint32_t groupL2Id;
uint32_t groupIpAddress;
......@@ -129,11 +128,12 @@ struct PC5SEstablishReq{
};
struct PC5SEstablishRsp{
uint32_t sourceL2Id;
uint32_t destinationL2Id;
uint8_t status;
uint32_t slrbid_lcid28;
uint32_t slrbid_lcid29;
uint32_t slrbid_lcid30;
};
//PC5_DISCOVERY MESSAGE
typedef struct {
unsigned char payload[PC5_DISCOVERY_PAYLOAD_SIZE];
......
......@@ -5536,7 +5536,6 @@ void *rrc_control_socket_thread_fct(void *arg)
#ifdef DEBUG_CTRL_SOCKET
LOG_I(RRC,"[GroupCommunicationEstablishReq] Received on socket from ProSe App (msg type: %d)\n",sl_ctrl_msg_recv->type);
LOG_I(RRC,"[GroupCommunicationEstablishReq] type: %d\n",sl_ctrl_msg_recv->sidelinkPrimitive.group_comm_establish_req.type);
LOG_I(RRC,"[GroupCommunicationEstablishReq] source Id: 0x%08x\n",sl_ctrl_msg_recv->sidelinkPrimitive.group_comm_establish_req.sourceL2Id);
LOG_I(RRC,"[GroupCommunicationEstablishReq] group Id: 0x%08x\n",sl_ctrl_msg_recv->sidelinkPrimitive.group_comm_establish_req.groupL2Id);
LOG_I(RRC,"[GroupCommunicationEstablishReq] group IP Address: " IPV4_ADDR "\n",IPV4_ADDR_FORMAT(sl_ctrl_msg_recv->sidelinkPrimitive.group_comm_establish_req.groupIpAddress));
......@@ -5567,15 +5566,7 @@ void *rrc_control_socket_thread_fct(void *arg)
*(UE->DRB_config[0][0]->eps_BearerIdentity) = 3;
UE->DRB_config[0][0]->logicalChannelIdentity = CALLOC(1, sizeof(long));
*(UE->DRB_config[0][0]->logicalChannelIdentity) = UE->DRB_config[0][0]->drb_Identity; //(long) (ue_context_pP->ue_context.e_rab[i].param.e_rab_id + 2); // value : x+2
/*
struct RLC_Config *DRB_rlc_config = CALLOC(1,sizeof(struct RLC_Config));
struct PDCP_Config *DRB_pdcp_config = CALLOC(1,sizeof(struct PDCP_Config));
struct PDCP_Config__rlc_UM *PDCP_rlc_UM = CALLOC(1,sizeof(struct PDCP_Config__rlc_UM));
struct LogicalChannelConfig *DRB_lchan_config = CALLOC(1,sizeof(struct LogicalChannelConfig));
struct LogicalChannelConfig__ul_SpecificParameters
*DRB_ul_SpecificParameters = CALLOC(1, sizeof(struct LogicalChannelConfig__ul_SpecificParameters));
long *logicalchannelgroup_drb = CALLOC(1, sizeof(long));
*/
DRB_rlc_config = CALLOC(1,sizeof(struct RLC_Config));
DRB_pdcp_config = CALLOC(1,sizeof(struct PDCP_Config));
PDCP_rlc_UM = CALLOC(1,sizeof(struct PDCP_Config__rlc_UM));
......@@ -5696,16 +5687,7 @@ void *rrc_control_socket_thread_fct(void *arg)
memset(send_buf, 0, BUFSIZE);
sl_ctrl_msg_send = calloc(1, sizeof(struct sidelink_ctrl_element));
sl_ctrl_msg_send->type = GROUP_COMMUNICATION_ESTABLISH_RSP;
//in case of TX, assign a new SLRB and prepare for the filter
if (sl_ctrl_msg_recv->sidelinkPrimitive.group_comm_establish_req.type == 1) {
sl_ctrl_msg_send->sidelinkPrimitive.slrb_id = SLRB_ID; //slrb_id
//pthread_mutex_lock(&slrb_mutex);
slrb_id = SLRB_ID;
//pthread_mutex_unlock(&slrb_mutex);
} else{ //RX
sl_ctrl_msg_send->sidelinkPrimitive.slrb_id = SL_DEFAULT_RAB_ID;
}
sl_ctrl_msg_send->sidelinkPrimitive.slrb_id = 3; //slrb_id
memcpy((void *)send_buf, (void *)sl_ctrl_msg_send, sizeof(struct sidelink_ctrl_element));
free(sl_ctrl_msg_send);
......@@ -5961,17 +5943,6 @@ void *rrc_control_socket_thread_fct(void *arg)
#endif
);
} else {//RX
/* rrc_rlc_config_asn1_req(&ctxt,
(SRB_ToAddModList_t*)NULL,
UE->DRB_configList,
(DRB_ToReleaseList_t*)NULL
#ifdef Rel14
,(PMCH_InfoList_r9_t *)NULL
, sourceL2Id, 0
#endif
);
*/
//configure MAC with sourceL2Id/groupL2ID
rrc_mac_config_req_ue(module_id,0,0, //eNB_index =0
(RadioResourceConfigCommonSIB_t *)NULL,
......@@ -6013,102 +5984,13 @@ void *rrc_control_socket_thread_fct(void *arg)
}
/*
//store sourceL2Id, destinationL2Id
if (type > 0) { //TX
UE_rrc_inst[module_id].sourceL2Id = sourceL2Id;
UE_rrc_inst[module_id].destinationL2Id = destinationL2Id;
// configure lower layers PDCP/MAC/PHY
rrc_mac_config_req_ue(module_id,0,0, //eNB_index =0
(RadioResourceConfigCommonSIB_t *)NULL,
(struct PhysicalConfigDedicated *)NULL,
#if defined(Rel10) || defined(Rel14)
(SCellToAddMod_r10_t *)NULL,
//struct PhysicalConfigDedicatedSCell_r10 *physicalConfigDedicatedSCell_r10,
#endif
(MeasObjectToAddMod_t **)NULL,
(MAC_MainConfig_t *)NULL,
0,
(struct LogicalChannelConfig *)NULL,
(MeasGapConfig_t *)NULL,
(TDD_Config_t *)NULL,
(MobilityControlInfo_t *)NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL
#if defined(Rel10) || defined(Rel14)
,0,
(MBSFN_AreaInfoList_r9_t *)NULL,
(PMCH_InfoList_r9_t *)NULL
#endif
#ifdef CBA
,
0,
0
#endif
#if defined(Rel10) || defined(Rel14)
,CONFIG_ACTION_ADD,
&sourceL2Id,
&destinationL2Id
#endif
);
} else {//RX
UE_rrc_inst[module_id].sourceL2Id = sourceL2Id;
// configure lower layers PDCP/MAC/PHY
rrc_mac_config_req_ue(module_id,0,0, //eNB_index =0
(RadioResourceConfigCommonSIB_t *)NULL,
(struct PhysicalConfigDedicated *)NULL,
#if defined(Rel10) || defined(Rel14)
(SCellToAddMod_r10_t *)NULL,
//struct PhysicalConfigDedicatedSCell_r10 *physicalConfigDedicatedSCell_r10,
#endif
(MeasObjectToAddMod_t **)NULL,
(MAC_MainConfig_t *)NULL,
0,
(struct LogicalChannelConfig *)NULL,
(MeasGapConfig_t *)NULL,
(TDD_Config_t *)NULL,
(MobilityControlInfo_t *)NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL
#if defined(Rel10) || defined(Rel14)
,0,
(MBSFN_AreaInfoList_r9_t *)NULL,
(PMCH_InfoList_r9_t *)NULL
#endif
#ifdef CBA
,
0,
0
#endif
#if defined(Rel10) || defined(Rel14)
,CONFIG_ACTION_ADD,
&sourceL2Id,
NULL
#endif
);
}
*/
LOG_I(RRC,"Send PC5EstablishRsp to ProSe App\n");
memset(send_buf, 0, BUFSIZE);
sl_ctrl_msg_send = calloc(1, sizeof(struct sidelink_ctrl_element));
sl_ctrl_msg_send->type = PC5S_ESTABLISH_RSP;
sl_ctrl_msg_send->sidelinkPrimitive.pc5s_establish_rsp.sourceL2Id = sourceL2Id;
sl_ctrl_msg_send->sidelinkPrimitive.pc5s_establish_rsp.destinationL2Id = destinationL2Id;
sl_ctrl_msg_send->sidelinkPrimitive.pc5s_establish_rsp.status = 1;
sl_ctrl_msg_send->sidelinkPrimitive.pc5s_establish_rsp.slrbid_lcid28 = 10;
sl_ctrl_msg_send->sidelinkPrimitive.pc5s_establish_rsp.slrbid_lcid29 = 10;
sl_ctrl_msg_send->sidelinkPrimitive.pc5s_establish_rsp.slrbid_lcid30 = 10;
memcpy((void *)send_buf, (void *)sl_ctrl_msg_send, sizeof(struct sidelink_ctrl_element));
prose_addr_len = sizeof(prose_app_addr);
......
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