Commit 79f13e91 authored by Andrew Burger's avatar Andrew Burger

Added send standalone msg

parent bfc1e8b7
#!/bin/bash #!/bin/bash
sudo -E ./ran_build/build/lte-softmodem -O ../ci-scripts/conf_files/rcc.band7.tm1.nfapi.conf --nos1 sudo -E ./ran_build/build/lte-softmodem -O ../ci-scripts/conf_files/rcc.band7.tm1.nfapi.conf --noS1
...@@ -243,7 +243,7 @@ void fill_rach_indication_UE_MAC(int Mod_id, ...@@ -243,7 +243,7 @@ void fill_rach_indication_UE_MAC(int Mod_id,
// Andrew - send proxy specific socket instead of oai_nfapi_rach_ind Send the whole UL_INFO struct // Andrew - send proxy specific socket instead of oai_nfapi_rach_ind Send the whole UL_INFO struct
// as soon as numberof preambles // as soon as numberof preambles
if (NFAPI_MODE == NFAPI_MODE_STANDALONE_PNF) { if (NFAPI_MODE == NFAPI_MODE_STANDALONE_PNF) {
send_standalone_rach(&UL_INFO->rach_ind); // dont send_standalone_msg(&UL_INFO, UL_INFO->rach_ind.header.message_id);
} else { } else {
oai_nfapi_rach_ind(&UL_INFO->rach_ind); oai_nfapi_rach_ind(&UL_INFO->rach_ind);
} }
...@@ -1187,10 +1187,31 @@ void *ue_standalone_pnf_task(void *context) ...@@ -1187,10 +1187,31 @@ void *ue_standalone_pnf_task(void *context)
} }
} }
void send_standalone_rach(nfapi_rach_indication_t *ind) void send_standalone_msg(UL_IND_t *UL, nfapi_message_id_e msg_type)
{ {
int encoded_size = -1;
char buffer[1024]; char buffer[1024];
int encoded_size = nfapi_p7_message_pack(ind, buffer, sizeof(buffer), NULL); switch (msg_type)
{
case NFAPI_RACH_INDICATION:
encoded_size = nfapi_p7_message_pack(&UL->rach_ind, buffer, sizeof(buffer), NULL);
break;
case NFAPI_CRC_INDICATION:
encoded_size = nfapi_p7_message_pack(&UL->crc_ind, buffer, sizeof(buffer), NULL);
break;
case NFAPI_RX_ULSCH_INDICATION: // is this the right nfapi message_id? Ask Raymond
encoded_size = nfapi_p7_message_pack(&UL->rx_ind, buffer, sizeof(buffer), NULL);
break;
case NFAPI_RX_CQI_INDICATION: // is this the right nfapi message_id? Ask Raymond
encoded_size = nfapi_p7_message_pack(&UL->cqi_ind, buffer, sizeof(buffer), NULL);
break;
case NFAPI_HARQ_INDICATION:
encoded_size = nfapi_p7_message_pack(&UL->harq_ind, buffer, sizeof(buffer), NULL);
break;
case NFAPI_RX_SR_INDICATION: // is this the right nfapi message_id? Ask Raymond
encoded_size = nfapi_p7_message_pack(&UL->sr_ind, buffer, sizeof(buffer), NULL);
break;
}
if (encoded_size < 0) if (encoded_size < 0)
{ {
LOG_E(MAC, "standalone rach pack failed\n"); LOG_E(MAC, "standalone rach pack failed\n");
......
...@@ -1234,8 +1234,12 @@ static void *UE_phy_stub_single_thread_rxn_txnp4(void *arg) { ...@@ -1234,8 +1234,12 @@ static void *UE_phy_stub_single_thread_rxn_txnp4(void *arg) {
if (UL_INFO->crc_ind.crc_indication_body.number_of_crcs > 0) { if (UL_INFO->crc_ind.crc_indication_body.number_of_crcs > 0) {
//LOG_D(PHY,"UL_info->crc_ind.crc_indication_body.number_of_crcs:%d CRC_IND:SFN/SF:%d\n", UL_info->crc_ind.crc_indication_body.number_of_crcs, NFAPI_SFNSF2DEC(UL_info->crc_ind.sfn_sf)); //LOG_D(PHY,"UL_info->crc_ind.crc_indication_body.number_of_crcs:%d CRC_IND:SFN/SF:%d\n", UL_info->crc_ind.crc_indication_body.number_of_crcs, NFAPI_SFNSF2DEC(UL_info->crc_ind.sfn_sf));
//LOG_I(MAC, "ul_config_req_UE_MAC 2.2, SFN/SF of PNF counter:%d.%d, number_of_crcs: %d \n", timer_frame, timer_subframe, UL_INFO->crc_ind.crc_indication_body.number_of_crcs); //LOG_I(MAC, "ul_config_req_UE_MAC 2.2, SFN/SF of PNF counter:%d.%d, number_of_crcs: %d \n", timer_frame, timer_subframe, UL_INFO->crc_ind.crc_indication_body.number_of_crcs);
oai_nfapi_crc_indication(&UL_INFO->crc_ind); if (NFAPI_MODE == NFAPI_MODE_STANDALONE_PNF) {
send_standalone_msg(&UL_INFO, UL_INFO->crc_ind.header.message_id);
sent_any = true; sent_any = true;
} else {
oai_nfapi_crc_indication(&UL_INFO->crc_ind);
}
//LOG_I(MAC, "ul_config_req_UE_MAC 2.21 \n"); //LOG_I(MAC, "ul_config_req_UE_MAC 2.21 \n");
UL_INFO->crc_ind.crc_indication_body.number_of_crcs = 0; UL_INFO->crc_ind.crc_indication_body.number_of_crcs = 0;
} }
...@@ -1243,8 +1247,12 @@ static void *UE_phy_stub_single_thread_rxn_txnp4(void *arg) { ...@@ -1243,8 +1247,12 @@ static void *UE_phy_stub_single_thread_rxn_txnp4(void *arg) {
if (UL_INFO->rx_ind.rx_indication_body.number_of_pdus > 0) { if (UL_INFO->rx_ind.rx_indication_body.number_of_pdus > 0) {
//LOG_D(PHY,"UL_info->rx_ind.number_of_pdus:%d RX_IND:SFN/SF:%d\n", UL_info->rx_ind.rx_indication_body.number_of_pdus, NFAPI_SFNSF2DEC(UL_info->rx_ind.sfn_sf)); //LOG_D(PHY,"UL_info->rx_ind.number_of_pdus:%d RX_IND:SFN/SF:%d\n", UL_info->rx_ind.rx_indication_body.number_of_pdus, NFAPI_SFNSF2DEC(UL_info->rx_ind.sfn_sf));
//LOG_I(MAC, "ul_config_req_UE_MAC 2.3, SFN/SF of PNF counter:%d.%d, number_of_pdus: %d \n", timer_frame, timer_subframe, UL_INFO->rx_ind.rx_indication_body.number_of_pdus); //LOG_I(MAC, "ul_config_req_UE_MAC 2.3, SFN/SF of PNF counter:%d.%d, number_of_pdus: %d \n", timer_frame, timer_subframe, UL_INFO->rx_ind.rx_indication_body.number_of_pdus);
oai_nfapi_rx_ind(&UL_INFO->rx_ind); if (NFAPI_MODE == NFAPI_MODE_STANDALONE_PNF) {
send_standalone_msg(&UL_INFO, UL_INFO->rx_ind.header.message_id);
sent_any = true; sent_any = true;
} else {
oai_nfapi_rx_ind(&UL_INFO->rx_ind);
}
for (uint8_t num_pdu = 0; num_pdu < UL_INFO->rx_ind.rx_indication_body.number_of_pdus; num_pdu++) { for (uint8_t num_pdu = 0; num_pdu < UL_INFO->rx_ind.rx_indication_body.number_of_pdus; num_pdu++) {
free(UL_INFO->rx_ind.rx_indication_body.rx_pdu_list[num_pdu].data); free(UL_INFO->rx_ind.rx_indication_body.rx_pdu_list[num_pdu].data);
...@@ -1255,23 +1263,35 @@ static void *UE_phy_stub_single_thread_rxn_txnp4(void *arg) { ...@@ -1255,23 +1263,35 @@ static void *UE_phy_stub_single_thread_rxn_txnp4(void *arg) {
} }
if (UL_INFO->cqi_ind.cqi_indication_body.number_of_cqis > 0) { if (UL_INFO->cqi_ind.cqi_indication_body.number_of_cqis > 0) {
oai_nfapi_cqi_indication(&UL_INFO->cqi_ind); if (NFAPI_MODE == NFAPI_MODE_STANDALONE_PNF) {
send_standalone_msg(&UL_INFO, UL_INFO->cqi_ind.header.message_id);
sent_any = true; sent_any = true;
} else {
oai_nfapi_cqi_indication(&UL_INFO->cqi_ind);
}
UL_INFO->cqi_ind.cqi_indication_body.number_of_cqis = 0; UL_INFO->cqi_ind.cqi_indication_body.number_of_cqis = 0;
} }
if (UL_INFO->harq_ind.harq_indication_body.number_of_harqs > 0) { if (UL_INFO->harq_ind.harq_indication_body.number_of_harqs > 0) {
//LOG_D(MAC, "ul_config_req_UE_MAC 2.4, SFN/SF of PNF counter:%d.%d, number_of_harqs: %d \n", timer_frame, timer_subframe, UL_INFO->harq_ind.harq_indication_body.number_of_harqs); //LOG_D(MAC, "ul_config_req_UE_MAC 2.4, SFN/SF of PNF counter:%d.%d, number_of_harqs: %d \n", timer_frame, timer_subframe, UL_INFO->harq_ind.harq_indication_body.number_of_harqs);
oai_nfapi_harq_indication(&UL_INFO->harq_ind); if (NFAPI_MODE == NFAPI_MODE_STANDALONE_PNF) {
send_standalone_msg(&UL_INFO, UL_INFO->harq_ind.header.message_id);
sent_any = true; sent_any = true;
} else {
oai_nfapi_harq_indication(&UL_INFO->harq_ind);
}
//LOG_I(MAC, "ul_config_req_UE_MAC 2.41 \n"); //LOG_I(MAC, "ul_config_req_UE_MAC 2.41 \n");
UL_INFO->harq_ind.harq_indication_body.number_of_harqs = 0; UL_INFO->harq_ind.harq_indication_body.number_of_harqs = 0;
} }
if (UL_INFO->sr_ind.sr_indication_body.number_of_srs > 0) { if (UL_INFO->sr_ind.sr_indication_body.number_of_srs > 0) {
//LOG_I(MAC, "ul_config_req_UE_MAC 2.5, SFN/SF of PNF counter:%d.%d, number_of_srs: %d \n", timer_frame, timer_subframe, UL_INFO->sr_ind.sr_indication_body.number_of_srs); //LOG_I(MAC, "ul_config_req_UE_MAC 2.5, SFN/SF of PNF counter:%d.%d, number_of_srs: %d \n", timer_frame, timer_subframe, UL_INFO->sr_ind.sr_indication_body.number_of_srs);
oai_nfapi_sr_indication(&UL_INFO->sr_ind); if (NFAPI_MODE == NFAPI_MODE_STANDALONE_PNF) {
send_standalone_msg(&UL_INFO, UL_INFO->sr_ind.header.message_id);
sent_any = true; sent_any = true;
} else {
oai_nfapi_sr_indication(&UL_INFO->sr_ind);
}
//LOG_I(MAC, "ul_config_req_UE_MAC 2.51 \n"); //LOG_I(MAC, "ul_config_req_UE_MAC 2.51 \n");
UL_INFO->sr_ind.sr_indication_body.number_of_srs = 0; UL_INFO->sr_ind.sr_indication_body.number_of_srs = 0;
} }
......
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