Commit 9a0926bd authored by Michael Cook's avatar Michael Cook

Sync nfapi_p[57].c with multi-ue-proxy.git

These are all superficial, low-risk changes
parent 46488432
...@@ -241,17 +241,7 @@ static uint8_t pack_pnf_phy_rel13_nb_iot_value(void* tlv, uint8_t **ppWritePacke ...@@ -241,17 +241,7 @@ static uint8_t pack_pnf_phy_rel13_nb_iot_value(void* tlv, uint8_t **ppWritePacke
return (push16(value->number_of_phys, ppWritePackedMsg, end) && return (push16(value->number_of_phys, ppWritePackedMsg, end) &&
packarray(value->phy, sizeof(nfapi_pnf_phy_rel13_nb_iot_info_t), NFAPI_MAX_PNF_PHY, value->number_of_phys, ppWritePackedMsg, end, &pack_pnf_phy_rel13_nb_iot_info)); packarray(value->phy, sizeof(nfapi_pnf_phy_rel13_nb_iot_info_t), NFAPI_MAX_PNF_PHY, value->number_of_phys, ppWritePackedMsg, end, &pack_pnf_phy_rel13_nb_iot_info));
} }
/*
static uint8_t pack_nr_pnf_param_response(void *msg, uint8_t **ppWritePackedMsg, uint8_t *end, nfapi_p4_p5_codec_config_t* config)
{
nfapi_nr_pnf_param_response_t *pNfapiMsg = (nfapi_nr_pnf_param_response_t*)msg;
return (push32(pNfapiMsg->error_code, ppWritePackedMsg, end) &&
pack_tlv(NFAPI_PNF_PARAM_GENERAL_TAG, &pNfapiMsg->pnf_param_general, ppWritePackedMsg, end, &pack_pnf_param_general_value) &&
pack_tlv(NFAPI_PNF_PHY_TAG, &pNfapiMsg->pnf_phy, ppWritePackedMsg, end, &pack_pnf_phy_value) &&
pack_vendor_extension_tlv(pNfapiMsg->vendor_extension, ppWritePackedMsg, end, config));
}
*/
static uint8_t pack_nr_pnf_param_response(void *msg, uint8_t **ppWritePackedMsg, uint8_t *end, nfapi_p4_p5_codec_config_t* config) static uint8_t pack_nr_pnf_param_response(void *msg, uint8_t **ppWritePackedMsg, uint8_t *end, nfapi_p4_p5_codec_config_t* config)
{ {
nfapi_nr_pnf_param_response_t *pNfapiMsg = (nfapi_nr_pnf_param_response_t*)msg; nfapi_nr_pnf_param_response_t *pNfapiMsg = (nfapi_nr_pnf_param_response_t*)msg;
...@@ -279,7 +269,6 @@ static uint8_t pack_pnf_param_response(void *msg, uint8_t **ppWritePackedMsg, ui ...@@ -279,7 +269,6 @@ static uint8_t pack_pnf_param_response(void *msg, uint8_t **ppWritePackedMsg, ui
pack_vendor_extension_tlv(pNfapiMsg->vendor_extension, ppWritePackedMsg, end, config)); pack_vendor_extension_tlv(pNfapiMsg->vendor_extension, ppWritePackedMsg, end, config));
} }
static uint8_t pack_phy_rf_config_info(void* elem, uint8_t **ppWritePackedMsg, uint8_t *end) static uint8_t pack_phy_rf_config_info(void* elem, uint8_t **ppWritePackedMsg, uint8_t *end)
{ {
nfapi_phy_rf_config_info_t* rf = (nfapi_phy_rf_config_info_t*)elem; nfapi_phy_rf_config_info_t* rf = (nfapi_phy_rf_config_info_t*)elem;
...@@ -354,7 +343,6 @@ static uint8_t pack_nr_pnf_start_response(void *msg, uint8_t **ppWritePackedMsg, ...@@ -354,7 +343,6 @@ static uint8_t pack_nr_pnf_start_response(void *msg, uint8_t **ppWritePackedMsg,
pack_vendor_extension_tlv(pNfapiMsg->vendor_extension, ppWritePackedMsg, end, config)); pack_vendor_extension_tlv(pNfapiMsg->vendor_extension, ppWritePackedMsg, end, config));
} }
static uint8_t pack_pnf_start_response(void *msg, uint8_t **ppWritePackedMsg, uint8_t* end, nfapi_p4_p5_codec_config_t* config) static uint8_t pack_pnf_start_response(void *msg, uint8_t **ppWritePackedMsg, uint8_t* end, nfapi_p4_p5_codec_config_t* config)
{ {
nfapi_pnf_start_response_t *pNfapiMsg = (nfapi_pnf_start_response_t*)msg; nfapi_pnf_start_response_t *pNfapiMsg = (nfapi_pnf_start_response_t*)msg;
...@@ -363,7 +351,6 @@ static uint8_t pack_pnf_start_response(void *msg, uint8_t **ppWritePackedMsg, ui ...@@ -363,7 +351,6 @@ static uint8_t pack_pnf_start_response(void *msg, uint8_t **ppWritePackedMsg, ui
pack_vendor_extension_tlv(pNfapiMsg->vendor_extension, ppWritePackedMsg, end, config)); pack_vendor_extension_tlv(pNfapiMsg->vendor_extension, ppWritePackedMsg, end, config));
} }
static uint8_t pack_nr_pnf_stop_request(void *msg, uint8_t **ppWritePackedMsg, uint8_t* end, nfapi_p4_p5_codec_config_t* config) static uint8_t pack_nr_pnf_stop_request(void *msg, uint8_t **ppWritePackedMsg, uint8_t* end, nfapi_p4_p5_codec_config_t* config)
{ {
nfapi_nr_pnf_stop_request_t *pNfapiMsg = (nfapi_nr_pnf_stop_request_t*)msg; nfapi_nr_pnf_stop_request_t *pNfapiMsg = (nfapi_nr_pnf_stop_request_t*)msg;
...@@ -371,14 +358,12 @@ static uint8_t pack_nr_pnf_stop_request(void *msg, uint8_t **ppWritePackedMsg, u ...@@ -371,14 +358,12 @@ static uint8_t pack_nr_pnf_stop_request(void *msg, uint8_t **ppWritePackedMsg, u
} }
static uint8_t pack_pnf_stop_request(void *msg, uint8_t **ppWritePackedMsg, uint8_t* end, nfapi_p4_p5_codec_config_t* config) static uint8_t pack_pnf_stop_request(void *msg, uint8_t **ppWritePackedMsg, uint8_t* end, nfapi_p4_p5_codec_config_t* config)
{ {
nfapi_pnf_stop_request_t *pNfapiMsg = (nfapi_pnf_stop_request_t*)msg; nfapi_pnf_stop_request_t *pNfapiMsg = (nfapi_pnf_stop_request_t*)msg;
return ( pack_vendor_extension_tlv(pNfapiMsg->vendor_extension, ppWritePackedMsg, end, config) ); return ( pack_vendor_extension_tlv(pNfapiMsg->vendor_extension, ppWritePackedMsg, end, config) );
} }
static uint8_t pack_nr_pnf_stop_response(void *msg, uint8_t **ppWritePackedMsg, uint8_t* end, nfapi_p4_p5_codec_config_t* config) static uint8_t pack_nr_pnf_stop_response(void *msg, uint8_t **ppWritePackedMsg, uint8_t* end, nfapi_p4_p5_codec_config_t* config)
{ {
nfapi_nr_pnf_stop_response_t *pNfapiMsg = (nfapi_nr_pnf_stop_response_t*)msg; nfapi_nr_pnf_stop_response_t *pNfapiMsg = (nfapi_nr_pnf_stop_response_t*)msg;
...@@ -387,7 +372,6 @@ static uint8_t pack_nr_pnf_stop_response(void *msg, uint8_t **ppWritePackedMsg, ...@@ -387,7 +372,6 @@ static uint8_t pack_nr_pnf_stop_response(void *msg, uint8_t **ppWritePackedMsg,
pack_vendor_extension_tlv(pNfapiMsg->vendor_extension, ppWritePackedMsg, end, config)); pack_vendor_extension_tlv(pNfapiMsg->vendor_extension, ppWritePackedMsg, end, config));
} }
static uint8_t pack_pnf_stop_response(void *msg, uint8_t **ppWritePackedMsg, uint8_t* end, nfapi_p4_p5_codec_config_t* config) static uint8_t pack_pnf_stop_response(void *msg, uint8_t **ppWritePackedMsg, uint8_t* end, nfapi_p4_p5_codec_config_t* config)
{ {
nfapi_pnf_stop_response_t *pNfapiMsg = (nfapi_pnf_stop_response_t*)msg; nfapi_pnf_stop_response_t *pNfapiMsg = (nfapi_pnf_stop_response_t*)msg;
...@@ -516,18 +500,8 @@ static uint8_t pack_embms_mbsfn_config_value(void* tlv, uint8_t **ppWritePackedM ...@@ -516,18 +500,8 @@ static uint8_t pack_embms_mbsfn_config_value(void* tlv, uint8_t **ppWritePackedM
pusharray8(value->fourframes_flag, 8,value->num_mbsfn_config,ppWritePackedMsg, end) && pusharray8(value->fourframes_flag, 8,value->num_mbsfn_config,ppWritePackedMsg, end) &&
pusharrays32(value->mbsfn_subframeconfig, 8, value->num_mbsfn_config, ppWritePackedMsg, end)); pusharrays32(value->mbsfn_subframeconfig, 8, value->num_mbsfn_config, ppWritePackedMsg, end));
} }
// static uint8_t unpack_embms_mbsfn_config_value(void* tlv, uint8_t **ppReadPackedMsg, uint8_t* end)
// {
// nfapi_embms_mbsfn_config_t* value = (nfapi_embms_mbsfn_config_t*)tlv;
// return ( pull16(ppReadPackedMsg, &value->num_mbsfn_config, end) && static uint8_t pack_param_response(void *msg, uint8_t **ppWritePackedMsg, uint8_t *end, nfapi_p4_p5_codec_config_t* config)
// pull16(ppReadPackedMsg, &value->radioframe_allocation_period, end) &&
// pull16(ppReadPackedMsg, &value->radioframe_allocation_offset, end) &&
// pull8(ppReadPackedMsg, &value->fourframes_flag, end) &&
// pullarrays32(ppReadPackedMsg, value->mbsfn_subframeconfig, 8, value->num_mbsfn_config, end));
// }
static uint8_t pack_param_response(void *msg, uint8_t **ppWritePackedMsg, uint8_t* end, nfapi_p4_p5_codec_config_t* config)
{ {
nfapi_param_response_t *pNfapiMsg = (nfapi_param_response_t*)msg; nfapi_param_response_t *pNfapiMsg = (nfapi_param_response_t*)msg;
...@@ -967,7 +941,6 @@ static uint8_t pack_start_response(void *msg, uint8_t **ppWritePackedMsg, uint8_ ...@@ -967,7 +941,6 @@ static uint8_t pack_start_response(void *msg, uint8_t **ppWritePackedMsg, uint8_
pack_vendor_extension_tlv(pNfapiMsg->vendor_extension, ppWritePackedMsg, end, config) ); pack_vendor_extension_tlv(pNfapiMsg->vendor_extension, ppWritePackedMsg, end, config) );
} }
static uint8_t pack_stop_request(void *msg, uint8_t **ppWritePackedMsg, uint8_t *end, nfapi_p4_p5_codec_config_t* config) static uint8_t pack_stop_request(void *msg, uint8_t **ppWritePackedMsg, uint8_t *end, nfapi_p4_p5_codec_config_t* config)
{ {
nfapi_stop_request_t *pNfapiMsg = (nfapi_stop_request_t*)msg; nfapi_stop_request_t *pNfapiMsg = (nfapi_stop_request_t*)msg;
...@@ -1574,14 +1547,12 @@ static uint8_t unpack_pnf_param_response(uint8_t **ppReadPackedMsg, uint8_t *end ...@@ -1574,14 +1547,12 @@ static uint8_t unpack_pnf_param_response(uint8_t **ppReadPackedMsg, uint8_t *end
{ NFAPI_PNF_PHY_REL12_TAG, &pNfapiMsg->pnf_phy_rel12, &unpack_pnf_phy_rel12_value}, { NFAPI_PNF_PHY_REL12_TAG, &pNfapiMsg->pnf_phy_rel12, &unpack_pnf_phy_rel12_value},
{ NFAPI_PNF_PHY_REL13_TAG, &pNfapiMsg->pnf_phy_rel13, &unpack_pnf_phy_rel13_value}, { NFAPI_PNF_PHY_REL13_TAG, &pNfapiMsg->pnf_phy_rel13, &unpack_pnf_phy_rel13_value},
{ NFAPI_PNF_PHY_REL13_NB_IOT_TAG, &pNfapiMsg->pnf_phy_rel13_nb_iot, &unpack_pnf_phy_rel13_nb_iot_value}, { NFAPI_PNF_PHY_REL13_NB_IOT_TAG, &pNfapiMsg->pnf_phy_rel13_nb_iot, &unpack_pnf_phy_rel13_nb_iot_value},
}; };
return ( pull32(ppReadPackedMsg, &pNfapiMsg->error_code, end) && return ( pull32(ppReadPackedMsg, &pNfapiMsg->error_code, end) &&
unpack_tlv_list(unpack_fns, sizeof(unpack_fns)/sizeof(unpack_tlv_t), ppReadPackedMsg, end, config, &pNfapiMsg->vendor_extension)); unpack_tlv_list(unpack_fns, sizeof(unpack_fns)/sizeof(unpack_tlv_t), ppReadPackedMsg, end, config, &pNfapiMsg->vendor_extension));
} }
static uint8_t unpack_phy_rf_config_info(void* elem, uint8_t **ppReadPackedMsg, uint8_t *end) static uint8_t unpack_phy_rf_config_info(void* elem, uint8_t **ppReadPackedMsg, uint8_t *end)
{ {
nfapi_phy_rf_config_info_t* rf = (nfapi_phy_rf_config_info_t*)elem; nfapi_phy_rf_config_info_t* rf = (nfapi_phy_rf_config_info_t*)elem;
...@@ -1612,8 +1583,6 @@ static uint8_t unpack_nr_pnf_config_request(uint8_t **ppReadPackedMsg, uint8_t * ...@@ -1612,8 +1583,6 @@ static uint8_t unpack_nr_pnf_config_request(uint8_t **ppReadPackedMsg, uint8_t *
return unpack_tlv_list(unpack_fns, sizeof(unpack_fns)/sizeof(unpack_tlv_t), ppReadPackedMsg, end, config, &pNfapiMsg->vendor_extension); return unpack_tlv_list(unpack_fns, sizeof(unpack_fns)/sizeof(unpack_tlv_t), ppReadPackedMsg, end, config, &pNfapiMsg->vendor_extension);
} }
static uint8_t unpack_pnf_config_request(uint8_t **ppReadPackedMsg, uint8_t *end, void *msg, nfapi_p4_p5_codec_config_t* config) static uint8_t unpack_pnf_config_request(uint8_t **ppReadPackedMsg, uint8_t *end, void *msg, nfapi_p4_p5_codec_config_t* config)
{ {
nfapi_pnf_config_request_t *pNfapiMsg = (nfapi_pnf_config_request_t*)msg; nfapi_pnf_config_request_t *pNfapiMsg = (nfapi_pnf_config_request_t*)msg;
...@@ -1626,7 +1595,6 @@ static uint8_t unpack_pnf_config_request(uint8_t **ppReadPackedMsg, uint8_t *end ...@@ -1626,7 +1595,6 @@ static uint8_t unpack_pnf_config_request(uint8_t **ppReadPackedMsg, uint8_t *end
return unpack_tlv_list(unpack_fns, sizeof(unpack_fns)/sizeof(unpack_tlv_t), ppReadPackedMsg, end, config, &pNfapiMsg->vendor_extension); return unpack_tlv_list(unpack_fns, sizeof(unpack_fns)/sizeof(unpack_tlv_t), ppReadPackedMsg, end, config, &pNfapiMsg->vendor_extension);
} }
static uint8_t unpack_nr_pnf_config_response(uint8_t **ppReadPackedMsg, uint8_t *end, void *msg, nfapi_p4_p5_codec_config_t* config) static uint8_t unpack_nr_pnf_config_response(uint8_t **ppReadPackedMsg, uint8_t *end, void *msg, nfapi_p4_p5_codec_config_t* config)
{ {
nfapi_nr_pnf_config_response_t *pNfapiMsg = (nfapi_nr_pnf_config_response_t*)msg; nfapi_nr_pnf_config_response_t *pNfapiMsg = (nfapi_nr_pnf_config_response_t*)msg;
...@@ -1664,7 +1632,6 @@ static uint8_t unpack_nr_pnf_start_request(uint8_t **ppReadPackedMsg, uint8_t *e ...@@ -1664,7 +1632,6 @@ static uint8_t unpack_nr_pnf_start_request(uint8_t **ppReadPackedMsg, uint8_t *e
return unpack_tlv_list(unpack_fns, sizeof(unpack_fns)/sizeof(unpack_tlv_t), ppReadPackedMsg, end, config, &(pNfapiMsg->vendor_extension)); return unpack_tlv_list(unpack_fns, sizeof(unpack_fns)/sizeof(unpack_tlv_t), ppReadPackedMsg, end, config, &(pNfapiMsg->vendor_extension));
} }
static uint8_t unpack_pnf_start_request(uint8_t **ppReadPackedMsg, uint8_t *end, void *msg, nfapi_p4_p5_codec_config_t* config) static uint8_t unpack_pnf_start_request(uint8_t **ppReadPackedMsg, uint8_t *end, void *msg, nfapi_p4_p5_codec_config_t* config)
{ {
nfapi_pnf_start_request_t *pNfapiMsg = (nfapi_pnf_start_request_t*)msg; nfapi_pnf_start_request_t *pNfapiMsg = (nfapi_pnf_start_request_t*)msg;
...@@ -1676,7 +1643,6 @@ static uint8_t unpack_pnf_start_request(uint8_t **ppReadPackedMsg, uint8_t *end, ...@@ -1676,7 +1643,6 @@ static uint8_t unpack_pnf_start_request(uint8_t **ppReadPackedMsg, uint8_t *end,
return unpack_tlv_list(unpack_fns, sizeof(unpack_fns)/sizeof(unpack_tlv_t), ppReadPackedMsg, end, config, &(pNfapiMsg->vendor_extension)); return unpack_tlv_list(unpack_fns, sizeof(unpack_fns)/sizeof(unpack_tlv_t), ppReadPackedMsg, end, config, &(pNfapiMsg->vendor_extension));
} }
static uint8_t unpack_pnf_start_response(uint8_t **ppReadPackedMsg, uint8_t *end, void *msg, nfapi_p4_p5_codec_config_t* config) static uint8_t unpack_pnf_start_response(uint8_t **ppReadPackedMsg, uint8_t *end, void *msg, nfapi_p4_p5_codec_config_t* config)
{ {
nfapi_pnf_start_response_t *pNfapiMsg = (nfapi_pnf_start_response_t*)msg; nfapi_pnf_start_response_t *pNfapiMsg = (nfapi_pnf_start_response_t*)msg;
...@@ -1701,7 +1667,6 @@ static uint8_t unpack_nr_pnf_start_response(uint8_t **ppReadPackedMsg, uint8_t * ...@@ -1701,7 +1667,6 @@ static uint8_t unpack_nr_pnf_start_response(uint8_t **ppReadPackedMsg, uint8_t *
unpack_tlv_list(unpack_fns, sizeof(unpack_fns)/sizeof(unpack_tlv_t), ppReadPackedMsg, end, config, &(pNfapiMsg->vendor_extension))); unpack_tlv_list(unpack_fns, sizeof(unpack_fns)/sizeof(unpack_tlv_t), ppReadPackedMsg, end, config, &(pNfapiMsg->vendor_extension)));
} }
static uint8_t unpack_pnf_stop_request(uint8_t **ppReadPackedMsg, uint8_t *end, void *msg, nfapi_p4_p5_codec_config_t* config) static uint8_t unpack_pnf_stop_request(uint8_t **ppReadPackedMsg, uint8_t *end, void *msg, nfapi_p4_p5_codec_config_t* config)
{ {
nfapi_pnf_stop_request_t *pNfapiMsg = (nfapi_pnf_stop_request_t*)msg; nfapi_pnf_stop_request_t *pNfapiMsg = (nfapi_pnf_stop_request_t*)msg;
...@@ -1924,15 +1889,6 @@ static uint8_t unpack_nr_param_response(uint8_t **ppReadPackedMsg, uint8_t *end, ...@@ -1924,15 +1889,6 @@ static uint8_t unpack_nr_param_response(uint8_t **ppReadPackedMsg, uint8_t *end,
{ NFAPI_NR_NFAPI_TIMING_INFO_MODE_TAG, &pNfapiMsg->nfapi_config.timing_info_mode, &unpack_uint8_tlv_value}, { NFAPI_NR_NFAPI_TIMING_INFO_MODE_TAG, &pNfapiMsg->nfapi_config.timing_info_mode, &unpack_uint8_tlv_value},
{ NFAPI_NR_NFAPI_TIMING_INFO_PERIOD_TAG, &pNfapiMsg->nfapi_config.timing_info_period, &unpack_uint8_tlv_value}, { NFAPI_NR_NFAPI_TIMING_INFO_PERIOD_TAG, &pNfapiMsg->nfapi_config.timing_info_period, &unpack_uint8_tlv_value},
}; };
// print ppReadPackedMsg
uint8_t *ptr = *ppReadPackedMsg;
printf("\n Read message unpack_param_response: ");
while(ptr < end){
printf(" %d ", *ptr);
ptr++;
}
printf("\n");
return ( pull8(ppReadPackedMsg, &pNfapiMsg->error_code, end) && return ( pull8(ppReadPackedMsg, &pNfapiMsg->error_code, end) &&
pull8(ppReadPackedMsg, &pNfapiMsg->num_tlv, end) && pull8(ppReadPackedMsg, &pNfapiMsg->num_tlv, end) &&
...@@ -2066,6 +2022,7 @@ static uint8_t unpack_config_request(uint8_t **ppReadPackedMsg, uint8_t *end, vo ...@@ -2066,6 +2022,7 @@ static uint8_t unpack_config_request(uint8_t **ppReadPackedMsg, uint8_t *end, vo
unpack_tlv_list(unpack_fns, sizeof(unpack_fns)/sizeof(unpack_tlv_t), ppReadPackedMsg, end, config, &pNfapiMsg->vendor_extension)); unpack_tlv_list(unpack_fns, sizeof(unpack_fns)/sizeof(unpack_tlv_t), ppReadPackedMsg, end, config, &pNfapiMsg->vendor_extension));
} }
static uint8_t unpack_nr_config_request(uint8_t **ppReadPackedMsg, uint8_t *end, void *msg, nfapi_p4_p5_codec_config_t* config) static uint8_t unpack_nr_config_request(uint8_t **ppReadPackedMsg, uint8_t *end, void *msg, nfapi_p4_p5_codec_config_t* config)
{ {
nfapi_nr_config_request_scf_t *pNfapiMsg = (nfapi_nr_config_request_scf_t*)msg; nfapi_nr_config_request_scf_t *pNfapiMsg = (nfapi_nr_config_request_scf_t*)msg;
...@@ -2164,7 +2121,7 @@ static uint8_t unpack_nr_start_request(uint8_t **ppReadPackedMsg, uint8_t *end, ...@@ -2164,7 +2121,7 @@ static uint8_t unpack_nr_start_request(uint8_t **ppReadPackedMsg, uint8_t *end,
static uint8_t unpack_start_request(uint8_t **ppReadPackedMsg, uint8_t *end, void *msg, nfapi_p4_p5_codec_config_t* config) static uint8_t unpack_start_request(uint8_t **ppReadPackedMsg, uint8_t *end, void *msg, nfapi_p4_p5_codec_config_t* config)
{ {
nfapi_start_request_t *pNfapiMsg = ( nfapi_start_request_t*)msg; nfapi_start_request_t *pNfapiMsg = (nfapi_start_request_t*)msg;
unpack_tlv_t unpack_fns[] = unpack_tlv_t unpack_fns[] =
{ {
...@@ -2425,8 +2382,8 @@ static int check_unpack_length(nfapi_message_id_e msgId, uint32_t unpackedBufLen ...@@ -2425,8 +2382,8 @@ static int check_unpack_length(nfapi_message_id_e msgId, uint32_t unpackedBufLen
break; break;
case NFAPI_START_REQUEST: case NFAPI_START_REQUEST:
if (unpackedBufLen >= sizeof( nfapi_start_request_t)) if (unpackedBufLen >= sizeof(nfapi_start_request_t))
retLen = sizeof( nfapi_start_request_t); retLen = sizeof(nfapi_start_request_t);
break; break;
case NFAPI_START_RESPONSE: case NFAPI_START_RESPONSE:
...@@ -2509,14 +2466,6 @@ int nfapi_nr_p5_message_unpack(void *pMessageBuf, uint32_t messageBufLen, void * ...@@ -2509,14 +2466,6 @@ int nfapi_nr_p5_message_unpack(void *pMessageBuf, uint32_t messageBufLen, void *
return -1; return -1;
} }
uint8_t *ptr = pReadPackedMessage;
printf("\n Read message unpack: ");
while(ptr < end){
printf(" %d ", *ptr);
ptr++;
}
printf("\n");
// clean the supplied buffer for - tag value blanking // clean the supplied buffer for - tag value blanking
(void)memset(pUnpackedBuf, 0, unpackedBufLen); (void)memset(pUnpackedBuf, 0, unpackedBufLen);
...@@ -2655,14 +2604,6 @@ int nfapi_p5_message_unpack(void *pMessageBuf, uint32_t messageBufLen, void *pUn ...@@ -2655,14 +2604,6 @@ int nfapi_p5_message_unpack(void *pMessageBuf, uint32_t messageBufLen, void *pUn
return -1; return -1;
} }
uint8_t *ptr = pReadPackedMessage;
printf("\n Read message unpack: ");
while(ptr < end){
printf(" %d ", *ptr);
ptr++;
}
printf("\n");
// clean the supplied buffer for - tag value blanking // clean the supplied buffer for - tag value blanking
(void)memset(pUnpackedBuf, 0, unpackedBufLen); (void)memset(pUnpackedBuf, 0, unpackedBufLen);
......
...@@ -227,7 +227,6 @@ static uint8_t pack_tpm_value(nfapi_dl_config_dci_dl_tpm_t* value, uint8_t **ppW ...@@ -227,7 +227,6 @@ static uint8_t pack_tpm_value(nfapi_dl_config_dci_dl_tpm_t* value, uint8_t **ppW
} }
static uint8_t pack_dl_tti_csi_rs_pdu_rel15_value(void* tlv, uint8_t **ppWritePackedMsg, uint8_t *end) static uint8_t pack_dl_tti_csi_rs_pdu_rel15_value(void* tlv, uint8_t **ppWritePackedMsg, uint8_t *end)
{ {
nfapi_nr_dl_tti_csi_rs_pdu_rel15_t* value = (nfapi_nr_dl_tti_csi_rs_pdu_rel15_t*)tlv; nfapi_nr_dl_tti_csi_rs_pdu_rel15_t* value = (nfapi_nr_dl_tti_csi_rs_pdu_rel15_t*)tlv;
...@@ -307,7 +306,7 @@ static uint8_t pack_dl_tti_pdcch_pdu_rel15_value(void* tlv, uint8_t **ppWritePac ...@@ -307,7 +306,7 @@ static uint8_t pack_dl_tti_pdcch_pdu_rel15_value(void* tlv, uint8_t **ppWritePac
static uint8_t pack_dl_tti_pdsch_pdu_rel15_value(void* tlv, uint8_t **ppWritePackedMsg, uint8_t *end) static uint8_t pack_dl_tti_pdsch_pdu_rel15_value(void* tlv, uint8_t **ppWritePackedMsg, uint8_t *end)
{ {
printf("packing pdsch pdu. \n"); NFAPI_TRACE(NFAPI_TRACE_DEBUG, "packing pdsch pdu. \n");
nfapi_nr_dl_tti_pdsch_pdu_rel15_t* value = (nfapi_nr_dl_tti_pdsch_pdu_rel15_t*)tlv; nfapi_nr_dl_tti_pdsch_pdu_rel15_t* value = (nfapi_nr_dl_tti_pdsch_pdu_rel15_t*)tlv;
// TODO: resolve the packaging of array (currently sending a single element) // TODO: resolve the packaging of array (currently sending a single element)
...@@ -361,7 +360,7 @@ static uint8_t pack_dl_tti_pdsch_pdu_rel15_value(void* tlv, uint8_t **ppWritePac ...@@ -361,7 +360,7 @@ static uint8_t pack_dl_tti_pdsch_pdu_rel15_value(void* tlv, uint8_t **ppWritePac
static uint8_t pack_dl_tti_ssb_pdu_rel15_value(void* tlv, uint8_t **ppWritePackedMsg, uint8_t *end) static uint8_t pack_dl_tti_ssb_pdu_rel15_value(void* tlv, uint8_t **ppWritePackedMsg, uint8_t *end)
{ {
printf("Packing ssb. \n"); NFAPI_TRACE(NFAPI_TRACE_DEBUG, "Packing ssb. \n");
nfapi_nr_dl_tti_ssb_pdu_rel15_t* value = (nfapi_nr_dl_tti_ssb_pdu_rel15_t*)tlv; nfapi_nr_dl_tti_ssb_pdu_rel15_t* value = (nfapi_nr_dl_tti_ssb_pdu_rel15_t*)tlv;
return( return(
...@@ -378,7 +377,6 @@ static uint8_t pack_dl_tti_ssb_pdu_rel15_value(void* tlv, uint8_t **ppWritePacke ...@@ -378,7 +377,6 @@ static uint8_t pack_dl_tti_ssb_pdu_rel15_value(void* tlv, uint8_t **ppWritePacke
} }
static uint8_t pack_dl_config_dci_dl_pdu_rel13_value(void* tlv, uint8_t **ppWritePackedMsg, uint8_t *end) static uint8_t pack_dl_config_dci_dl_pdu_rel13_value(void* tlv, uint8_t **ppWritePackedMsg, uint8_t *end)
{ {
nfapi_dl_config_dci_dl_pdu_rel13_t* value = (nfapi_dl_config_dci_dl_pdu_rel13_t*)tlv; nfapi_dl_config_dci_dl_pdu_rel13_t* value = (nfapi_dl_config_dci_dl_pdu_rel13_t*)tlv;
...@@ -705,7 +703,6 @@ static uint8_t pack_dl_config_ndlsch_pdu_rel13_value(void* tlv, uint8_t **ppWrit ...@@ -705,7 +703,6 @@ static uint8_t pack_dl_config_ndlsch_pdu_rel13_value(void* tlv, uint8_t **ppWrit
push8(value->nrs_antenna_ports_assumed_by_the_ue, ppWritePackedMsg, end)); push8(value->nrs_antenna_ports_assumed_by_the_ue, ppWritePackedMsg, end));
} }
static uint8_t pack_dl_tti_request_body_value(void* tlv, uint8_t **ppWritePackedMsg, uint8_t *end) static uint8_t pack_dl_tti_request_body_value(void* tlv, uint8_t **ppWritePackedMsg, uint8_t *end)
{ {
nfapi_nr_dl_tti_request_pdu_t* value = (nfapi_nr_dl_tti_request_pdu_t*)tlv; nfapi_nr_dl_tti_request_pdu_t* value = (nfapi_nr_dl_tti_request_pdu_t*)tlv;
...@@ -899,7 +896,6 @@ static uint8_t pack_dl_config_request_body_value(void* tlv, uint8_t **ppWritePac ...@@ -899,7 +896,6 @@ static uint8_t pack_dl_config_request_body_value(void* tlv, uint8_t **ppWritePac
return 1; return 1;
} }
static uint8_t pack_dl_tti_request(void *msg, uint8_t **ppWritePackedMsg, uint8_t *end, nfapi_p7_codec_config_t* config) static uint8_t pack_dl_tti_request(void *msg, uint8_t **ppWritePackedMsg, uint8_t *end, nfapi_p7_codec_config_t* config)
{ {
nfapi_nr_dl_tti_request_t *pNfapiMsg = (nfapi_nr_dl_tti_request_t*)msg; nfapi_nr_dl_tti_request_t *pNfapiMsg = (nfapi_nr_dl_tti_request_t*)msg;
...@@ -933,7 +929,6 @@ static uint8_t pack_dl_tti_request(void *msg, uint8_t **ppWritePackedMsg, uint8_ ...@@ -933,7 +929,6 @@ static uint8_t pack_dl_tti_request(void *msg, uint8_t **ppWritePackedMsg, uint8_
return 1; return 1;
} }
static uint8_t pack_dl_config_request(void *msg, uint8_t **ppWritePackedMsg, uint8_t *end, nfapi_p7_codec_config_t* config) static uint8_t pack_dl_config_request(void *msg, uint8_t **ppWritePackedMsg, uint8_t *end, nfapi_p7_codec_config_t* config)
{ {
nfapi_dl_config_request_t *pNfapiMsg = (nfapi_dl_config_request_t*)msg; nfapi_dl_config_request_t *pNfapiMsg = (nfapi_dl_config_request_t*)msg;
...@@ -955,9 +950,6 @@ static uint8_t pack_dl_config_request(void *msg, uint8_t **ppWritePackedMsg, uin ...@@ -955,9 +950,6 @@ static uint8_t pack_dl_config_request(void *msg, uint8_t **ppWritePackedMsg, uin
} }
} }
static uint8_t pack_ul_config_request_ulsch_rel8_value(void *tlv, uint8_t **ppWritePackedMsg, uint8_t * end) static uint8_t pack_ul_config_request_ulsch_rel8_value(void *tlv, uint8_t **ppWritePackedMsg, uint8_t * end)
{ {
nfapi_ul_config_ulsch_pdu_rel8_t* ulsch_pdu_rel8 = (nfapi_ul_config_ulsch_pdu_rel8_t*)tlv; nfapi_ul_config_ulsch_pdu_rel8_t* ulsch_pdu_rel8 = (nfapi_ul_config_ulsch_pdu_rel8_t*)tlv;
...@@ -1554,8 +1546,6 @@ static uint8_t pack_ul_config_request_nrach_pdu_rel13_value(void *tlv, uint8_t * ...@@ -1554,8 +1546,6 @@ static uint8_t pack_ul_config_request_nrach_pdu_rel13_value(void *tlv, uint8_t *
} }
static uint8_t pack_ul_tti_pdu_list_value(void* tlv, uint8_t **ppWritePackedMsg, uint8_t *end) static uint8_t pack_ul_tti_pdu_list_value(void* tlv, uint8_t **ppWritePackedMsg, uint8_t *end)
{ {
nfapi_nr_ul_tti_request_number_of_pdus_t* value = (nfapi_nr_ul_tti_request_number_of_pdus_t*)tlv; nfapi_nr_ul_tti_request_number_of_pdus_t* value = (nfapi_nr_ul_tti_request_number_of_pdus_t*)tlv;
...@@ -1792,7 +1782,6 @@ static uint8_t pack_ul_config_request_body_value(void* tlv, uint8_t **ppWritePac ...@@ -1792,7 +1782,6 @@ static uint8_t pack_ul_config_request_body_value(void* tlv, uint8_t **ppWritePac
return 1; return 1;
} }
static uint8_t pack_ul_tti_request(void *msg, uint8_t **ppWritePackedMsg, uint8_t *end, nfapi_p7_codec_config_t* config) static uint8_t pack_ul_tti_request(void *msg, uint8_t **ppWritePackedMsg, uint8_t *end, nfapi_p7_codec_config_t* config)
{ {
nfapi_nr_ul_tti_request_t *pNfapiMsg = (nfapi_nr_ul_tti_request_t*)msg; nfapi_nr_ul_tti_request_t *pNfapiMsg = (nfapi_nr_ul_tti_request_t*)msg;
...@@ -1822,7 +1811,6 @@ static uint8_t pack_ul_tti_request(void *msg, uint8_t **ppWritePackedMsg, uint8_ ...@@ -1822,7 +1811,6 @@ static uint8_t pack_ul_tti_request(void *msg, uint8_t **ppWritePackedMsg, uint8_
return 1; return 1;
} }
static uint8_t pack_ul_config_request(void *msg, uint8_t **ppWritePackedMsg, uint8_t *end, nfapi_p7_codec_config_t* config) static uint8_t pack_ul_config_request(void *msg, uint8_t **ppWritePackedMsg, uint8_t *end, nfapi_p7_codec_config_t* config)
{ {
nfapi_ul_config_request_t *pNfapiMsg = (nfapi_ul_config_request_t*)msg; nfapi_ul_config_request_t *pNfapiMsg = (nfapi_ul_config_request_t*)msg;
...@@ -2105,8 +2093,6 @@ static uint8_t pack_ul_dci_request(void *msg, uint8_t **ppWritePackedMsg, uint8_ ...@@ -2105,8 +2093,6 @@ static uint8_t pack_ul_dci_request(void *msg, uint8_t **ppWritePackedMsg, uint8_
} }
static uint8_t pack_hi_dci0_request(void *msg, uint8_t **ppWritePackedMsg, uint8_t *end, nfapi_p7_codec_config_t* config) static uint8_t pack_hi_dci0_request(void *msg, uint8_t **ppWritePackedMsg, uint8_t *end, nfapi_p7_codec_config_t* config)
{ {
nfapi_hi_dci0_request_t *pNfapiMsg = (nfapi_hi_dci0_request_t*)msg; nfapi_hi_dci0_request_t *pNfapiMsg = (nfapi_hi_dci0_request_t*)msg;
...@@ -2588,7 +2574,7 @@ static uint8_t pack_rx_ulsch_indication_body_value(void *tlv, uint8_t **ppWriteP ...@@ -2588,7 +2574,7 @@ static uint8_t pack_rx_ulsch_indication_body_value(void *tlv, uint8_t **ppWriteP
{ {
nfapi_rx_indication_body_t* value = (nfapi_rx_indication_body_t*)tlv; nfapi_rx_indication_body_t* value = (nfapi_rx_indication_body_t*)tlv;
//printf("RX ULSCH BODY\n"); //NFAPI_TRACE(NFAPI_TRACE_DEBUG, "RX ULSCH BODY\n");
if( push16(value->number_of_pdus, ppWritePackedMsg, end) == 0) if( push16(value->number_of_pdus, ppWritePackedMsg, end) == 0)
return 0; return 0;
...@@ -2597,7 +2583,7 @@ static uint8_t pack_rx_ulsch_indication_body_value(void *tlv, uint8_t **ppWriteP ...@@ -2597,7 +2583,7 @@ static uint8_t pack_rx_ulsch_indication_body_value(void *tlv, uint8_t **ppWriteP
uint16_t i = 0; uint16_t i = 0;
uint16_t offset = 2; // taking into account the number_of_pdus uint16_t offset = 2; // taking into account the number_of_pdus
uint16_t total_number_of_pdus = value->number_of_pdus; uint16_t total_number_of_pdus = value->number_of_pdus;
//printf("ULSCH:pdus:%d\n", total_number_of_pdus); //NFAPI_TRACE(NFAPI_TRACE_DEBUG, "ULSCH:pdus:%d\n", total_number_of_pdus);
assert(total_number_of_pdus <= NFAPI_RX_IND_MAX_PDU); assert(total_number_of_pdus <= NFAPI_RX_IND_MAX_PDU);
for(i = 0; i < total_number_of_pdus; ++i) for(i = 0; i < total_number_of_pdus; ++i)
...@@ -2605,19 +2591,19 @@ static uint8_t pack_rx_ulsch_indication_body_value(void *tlv, uint8_t **ppWriteP ...@@ -2605,19 +2591,19 @@ static uint8_t pack_rx_ulsch_indication_body_value(void *tlv, uint8_t **ppWriteP
nfapi_rx_indication_pdu_t* pdu = &(value->rx_pdu_list[i]); nfapi_rx_indication_pdu_t* pdu = &(value->rx_pdu_list[i]);
if(pdu->rx_ue_information.tl.tag == NFAPI_RX_UE_INFORMATION_TAG) if(pdu->rx_ue_information.tl.tag == NFAPI_RX_UE_INFORMATION_TAG)
{ {
//printf("NFAPI_RX_UE_INFORMATION_TAG\n"); //NFAPI_TRACE(NFAPI_TRACE_DEBUG, "NFAPI_RX_UE_INFORMATION_TAG\n");
offset += 4 + 6; offset += 4 + 6;
} }
if(pdu->rx_indication_rel8.tl.tag == NFAPI_RX_INDICATION_REL8_TAG) if(pdu->rx_indication_rel8.tl.tag == NFAPI_RX_INDICATION_REL8_TAG)
{ {
//printf("NFAPI_RX_INDICATION_REL8_TAG\n"); //NFAPI_TRACE(NFAPI_TRACE_DEBUG, "NFAPI_RX_INDICATION_REL8_TAG\n");
offset += 4 + 7; offset += 4 + 7;
} }
if(pdu->rx_indication_rel9.tl.tag == NFAPI_RX_INDICATION_REL9_TAG) if(pdu->rx_indication_rel9.tl.tag == NFAPI_RX_INDICATION_REL9_TAG)
{ {
//printf("NFAPI_RX_INDICATION_REL9_TAG\n"); //NFAPI_TRACE(NFAPI_TRACE_DEBUG, "NFAPI_RX_INDICATION_REL9_TAG\n");
offset += 4 + 2; offset += 4 + 2;
} }
} }
...@@ -3633,7 +3619,7 @@ static uint8_t pack_nr_uci_indication_body(void* tlv, uint8_t **ppWritePackedMsg ...@@ -3633,7 +3619,7 @@ static uint8_t pack_nr_uci_indication_body(void* tlv, uint8_t **ppWritePackedMsg
switch (value->pdu_type) { switch (value->pdu_type) {
case NFAPI_NR_UCI_PUSCH_PDU_TYPE: case NFAPI_NR_UCI_PUSCH_PDU_TYPE:
printf("Unhandled NFAPI_NR_UCI_PUSCH_PDU_TYPE \n"); NFAPI_TRACE(NFAPI_TRACE_WARN, "Unhandled NFAPI_NR_UCI_PUSCH_PDU_TYPE \n");
break; break;
case NFAPI_NR_UCI_FORMAT_0_1_PDU_TYPE: { case NFAPI_NR_UCI_FORMAT_0_1_PDU_TYPE: {
...@@ -3684,13 +3670,6 @@ int nfapi_nr_p7_message_pack(void *pMessageBuf, void *pPackedBuf, uint32_t packe ...@@ -3684,13 +3670,6 @@ int nfapi_nr_p7_message_pack(void *pMessageBuf, void *pPackedBuf, uint32_t packe
NFAPI_TRACE(NFAPI_TRACE_ERROR, "P7 Pack supplied pointers are null\n"); NFAPI_TRACE(NFAPI_TRACE_ERROR, "P7 Pack supplied pointers are null\n");
return -1; return -1;
} }
/*
printf("\n P7 MESSAGE SENT: \n");
for(int i=0; i< packedBufLen; i++){
printf("%d", *(uint8_t *)(pMessageBuf + i));
}
printf("\n");
*/
// process the header // process the header
if(!(push16(pMessageHeader->phy_id, &pWritePackedMessage, end) && if(!(push16(pMessageHeader->phy_id, &pWritePackedMessage, end) &&
push16(pMessageHeader->message_id, &pWritePackedMessage, end) && push16(pMessageHeader->message_id, &pWritePackedMessage, end) &&
...@@ -3713,7 +3692,7 @@ int nfapi_nr_p7_message_pack(void *pMessageBuf, void *pPackedBuf, uint32_t packe ...@@ -3713,7 +3692,7 @@ int nfapi_nr_p7_message_pack(void *pMessageBuf, void *pPackedBuf, uint32_t packe
{ {
case NFAPI_NR_PHY_MSG_TYPE_DL_TTI_REQUEST: case NFAPI_NR_PHY_MSG_TYPE_DL_TTI_REQUEST:
result = pack_dl_tti_request(pMessageHeader, &pWritePackedMessage, end, config); result = pack_dl_tti_request(pMessageHeader, &pWritePackedMessage, end, config);
NFAPI_TRACE(NFAPI_TRACE_INFO, "result of pack dl_tti_req is %d. \n", result); NFAPI_TRACE(NFAPI_TRACE_DEBUG, "result of pack dl_tti_req is %d. \n",result);
break; break;
case NFAPI_NR_PHY_MSG_TYPE_UL_TTI_REQUEST: case NFAPI_NR_PHY_MSG_TYPE_UL_TTI_REQUEST:
...@@ -3839,13 +3818,6 @@ int nfapi_p7_message_pack(void *pMessageBuf, void *pPackedBuf, uint32_t packedBu ...@@ -3839,13 +3818,6 @@ int nfapi_p7_message_pack(void *pMessageBuf, void *pPackedBuf, uint32_t packedBu
NFAPI_TRACE(NFAPI_TRACE_ERROR, "P7 Pack supplied pointers are null\n"); NFAPI_TRACE(NFAPI_TRACE_ERROR, "P7 Pack supplied pointers are null\n");
return -1; return -1;
} }
/*
printf("\n P7 MESSAGE SENT: \n");
for(int i=0; i< packedBufLen; i++){
printf("%d", *(uint8_t *)(pMessageBuf + i));
}
printf("\n");
*/
// process the header // process the header
if(!(push16(pMessageHeader->phy_id, &pWritePackedMessage, end) && if(!(push16(pMessageHeader->phy_id, &pWritePackedMessage, end) &&
push16(pMessageHeader->message_id, &pWritePackedMessage, end) && push16(pMessageHeader->message_id, &pWritePackedMessage, end) &&
...@@ -4140,7 +4112,7 @@ static uint8_t unpack_dl_tti_pdsch_pdu_rel15_value(void* tlv, uint8_t **ppReadPa ...@@ -4140,7 +4112,7 @@ static uint8_t unpack_dl_tti_pdsch_pdu_rel15_value(void* tlv, uint8_t **ppReadPa
static uint8_t unpack_dl_tti_ssb_pdu_rel15_value(void* tlv, uint8_t **ppReadPackedMsg, uint8_t *end) static uint8_t unpack_dl_tti_ssb_pdu_rel15_value(void* tlv, uint8_t **ppReadPackedMsg, uint8_t *end)
{ {
printf("ssb received and unpacked. \n"); NFAPI_TRACE(NFAPI_TRACE_DEBUG, "ssb received and unpacked. \n");
nfapi_nr_dl_tti_ssb_pdu_rel15_t* value = (nfapi_nr_dl_tti_ssb_pdu_rel15_t*)tlv; nfapi_nr_dl_tti_ssb_pdu_rel15_t* value = (nfapi_nr_dl_tti_ssb_pdu_rel15_t*)tlv;
return( return(
...@@ -5181,8 +5153,6 @@ static uint8_t unpack_ul_tti_request(uint8_t **ppReadPackedMsg, uint8_t *end, vo ...@@ -5181,8 +5153,6 @@ static uint8_t unpack_ul_tti_request(uint8_t **ppReadPackedMsg, uint8_t *end, vo
return 1; return 1;
} }
static uint8_t unpack_dl_config_request(uint8_t **ppReadPackedMsg, uint8_t *end, void *msg, nfapi_p7_codec_config_t* config) static uint8_t unpack_dl_config_request(uint8_t **ppReadPackedMsg, uint8_t *end, void *msg, nfapi_p7_codec_config_t* config)
{ {
nfapi_dl_config_request_t *pNfapiMsg = (nfapi_dl_config_request_t*)msg; nfapi_dl_config_request_t *pNfapiMsg = (nfapi_dl_config_request_t*)msg;
...@@ -5198,9 +5168,6 @@ static uint8_t unpack_dl_config_request(uint8_t **ppReadPackedMsg, uint8_t *end, ...@@ -5198,9 +5168,6 @@ static uint8_t unpack_dl_config_request(uint8_t **ppReadPackedMsg, uint8_t *end,
static uint8_t unpack_ul_config_ulsch_pdu_rel8_value(void *tlv, uint8_t **ppReadPackedMsg, uint8_t *end) static uint8_t unpack_ul_config_ulsch_pdu_rel8_value(void *tlv, uint8_t **ppReadPackedMsg, uint8_t *end)
{ {
nfapi_ul_config_ulsch_pdu_rel8_t* ulsch_pdu_rel8 = (nfapi_ul_config_ulsch_pdu_rel8_t*)tlv; nfapi_ul_config_ulsch_pdu_rel8_t* ulsch_pdu_rel8 = (nfapi_ul_config_ulsch_pdu_rel8_t*)tlv;
return (pull32(ppReadPackedMsg, &ulsch_pdu_rel8->handle, end) && return (pull32(ppReadPackedMsg, &ulsch_pdu_rel8->handle, end) &&
...@@ -6048,7 +6015,7 @@ static uint8_t unpack_hi_dci0_request_body_value(void *tlv, uint8_t **ppReadPack ...@@ -6048,7 +6015,7 @@ static uint8_t unpack_hi_dci0_request_body_value(void *tlv, uint8_t **ppReadPack
if(packedPduEnd > end) if(packedPduEnd > end)
{ {
// pdu end if past buffer end // pdu end if past buffer end
NFAPI_TRACE(NFAPI_TRACE_ERROR, "%s pdu size too big %s %s\n", __FUNCTION__, packedPduEnd, end); NFAPI_TRACE(NFAPI_TRACE_ERROR, "%s pdu size too big %p %p\n", __FUNCTION__, packedPduEnd, end);
return 0; return 0;
} }
...@@ -6119,6 +6086,7 @@ static uint8_t unpack_hi_dci0_request_body_value(void *tlv, uint8_t **ppReadPack ...@@ -6119,6 +6086,7 @@ static uint8_t unpack_hi_dci0_request_body_value(void *tlv, uint8_t **ppReadPack
return 1; return 1;
} }
//unpack_ul_dci_pdu_list_value //unpack_ul_dci_pdu_list_value
static uint8_t unpack_ul_dci_pdu_list_value(uint8_t **ppReadPackedMsg, uint8_t *end, void *msg) static uint8_t unpack_ul_dci_pdu_list_value(uint8_t **ppReadPackedMsg, uint8_t *end, void *msg)
...@@ -6397,7 +6365,6 @@ static uint8_t unpack_nr_rx_data_indication_body(nfapi_nr_rx_data_pdu_t* value, ...@@ -6397,7 +6365,6 @@ static uint8_t unpack_nr_rx_data_indication_body(nfapi_nr_rx_data_pdu_t* value,
static uint8_t unpack_nr_rx_data_indication(uint8_t **ppReadPackedMsg, uint8_t *end, void *msg, nfapi_p7_codec_config_t* config) static uint8_t unpack_nr_rx_data_indication(uint8_t **ppReadPackedMsg, uint8_t *end, void *msg, nfapi_p7_codec_config_t* config)
{ {
nfapi_nr_rx_data_indication_t *pNfapiMsg = (nfapi_nr_rx_data_indication_t*)msg; nfapi_nr_rx_data_indication_t *pNfapiMsg = (nfapi_nr_rx_data_indication_t*)msg;
if (!(pull16(ppReadPackedMsg, &pNfapiMsg->sfn , end) && if (!(pull16(ppReadPackedMsg, &pNfapiMsg->sfn , end) &&
pull16(ppReadPackedMsg, &pNfapiMsg->slot , end) && pull16(ppReadPackedMsg, &pNfapiMsg->slot , end) &&
pull16(ppReadPackedMsg, &pNfapiMsg->number_of_pdus, end) pull16(ppReadPackedMsg, &pNfapiMsg->number_of_pdus, end)
...@@ -6560,14 +6527,6 @@ static uint8_t unpack_nr_rach_indication(uint8_t **ppReadPackedMsg, uint8_t *end ...@@ -6560,14 +6527,6 @@ static uint8_t unpack_nr_rach_indication(uint8_t **ppReadPackedMsg, uint8_t *end
static uint8_t unpack_nr_uci_pucch_0_1(void* tlv, uint8_t **ppReadPackedMsg, uint8_t *end) { static uint8_t unpack_nr_uci_pucch_0_1(void* tlv, uint8_t **ppReadPackedMsg, uint8_t *end) {
nfapi_nr_uci_pucch_pdu_format_0_1_t* value = (nfapi_nr_uci_pucch_pdu_format_0_1_t*)tlv; nfapi_nr_uci_pucch_pdu_format_0_1_t* value = (nfapi_nr_uci_pucch_pdu_format_0_1_t*)tlv;
uint8_t *ptr = *ppReadPackedMsg;
printf("\n Read P7 message uci_0_1 indication unpack: ");
while(ptr < end){
printf(" %d ", *ptr);
ptr++;
}
printf("\n");
if(!(pull8(ppReadPackedMsg, &value->pduBitmap, end) && if(!(pull8(ppReadPackedMsg, &value->pduBitmap, end) &&
pull32(ppReadPackedMsg, &value->handle, end) && pull32(ppReadPackedMsg, &value->handle, end) &&
pull16(ppReadPackedMsg, &value->rnti, end) && pull16(ppReadPackedMsg, &value->rnti, end) &&
...@@ -6662,7 +6621,7 @@ static uint8_t unpack_nr_uci_indication_body(void* tlv, uint8_t **ppReadPackedMs ...@@ -6662,7 +6621,7 @@ static uint8_t unpack_nr_uci_indication_body(void* tlv, uint8_t **ppReadPackedMs
switch (value->pdu_type) { switch (value->pdu_type) {
case NFAPI_NR_UCI_PUSCH_PDU_TYPE: case NFAPI_NR_UCI_PUSCH_PDU_TYPE:
printf("Unhandled NFAPI_NR_UCI_PUSCH_PDU_TYPE \n"); NFAPI_TRACE(NFAPI_TRACE_WARN, "Unhandled NFAPI_NR_UCI_PUSCH_PDU_TYPE \n");
break; break;
case NFAPI_NR_UCI_FORMAT_0_1_PDU_TYPE: { case NFAPI_NR_UCI_FORMAT_0_1_PDU_TYPE: {
...@@ -7048,10 +7007,8 @@ static uint8_t unpack_crc_indication_body_value(void *tlv, uint8_t **ppReadPacke ...@@ -7048,10 +7007,8 @@ static uint8_t unpack_crc_indication_body_value(void *tlv, uint8_t **ppReadPacke
value->crc_pdu_list = 0; value->crc_pdu_list = 0;
} }
uint8_t i = 0;
assert(value->number_of_crcs <= NFAPI_CRC_IND_MAX_PDU); assert(value->number_of_crcs <= NFAPI_CRC_IND_MAX_PDU);
for(i = 0; i < value->number_of_crcs; ++i) for (size_t i = 0; i < value->number_of_crcs; ++i)
{ {
nfapi_crc_indication_pdu_t* pdu = &(value->crc_pdu_list[i]); nfapi_crc_indication_pdu_t* pdu = &(value->crc_pdu_list[i]);
...@@ -7104,13 +7061,13 @@ static uint8_t unpack_rx_indication_rel9_value(void *tlv, uint8_t **ppReadPacked ...@@ -7104,13 +7061,13 @@ static uint8_t unpack_rx_indication_rel9_value(void *tlv, uint8_t **ppReadPacked
static uint8_t unpack_rx_indication_body_value(void *tlv, uint8_t **ppReadPackedMsg, uint8_t *end, nfapi_p7_codec_config_t *config) static uint8_t unpack_rx_indication_body_value(void *tlv, uint8_t **ppReadPackedMsg, uint8_t *end, nfapi_p7_codec_config_t *config)
{ {
nfapi_rx_indication_body_t *value = (nfapi_rx_indication_body_t *)tlv; nfapi_rx_indication_body_t *value = (nfapi_rx_indication_body_t*)tlv;
NFAPI_TRACE(NFAPI_TRACE_INFO, "%s value->tl.length in unpack: %u \n", __FUNCTION__, NFAPI_TRACE(NFAPI_TRACE_DEBUG, "%s value->tl.length in unpack: %u \n", __FUNCTION__,
value->tl.length); value->tl.length);
uint8_t *rxBodyEnd = *ppReadPackedMsg + value->tl.length; uint8_t *rxBodyEnd = *ppReadPackedMsg + value->tl.length;
NFAPI_TRACE(NFAPI_TRACE_INFO, "%s rxBodyEnd: %p end: %p\n", __FUNCTION__, NFAPI_TRACE(NFAPI_TRACE_DEBUG, "%s rxBodyEnd: %p end: %p\n", __FUNCTION__,
rxBodyEnd, end); rxBodyEnd, end);
if (rxBodyEnd > end) if (rxBodyEnd > end)
{ {
...@@ -7187,6 +7144,7 @@ static uint8_t unpack_rx_indication_body_value(void *tlv, uint8_t **ppReadPacked ...@@ -7187,6 +7144,7 @@ static uint8_t unpack_rx_indication_body_value(void *tlv, uint8_t **ppReadPacked
NFAPI_TRACE(NFAPI_TRACE_ERROR, "%s generic_tl.tag wrong\n", __FUNCTION__); NFAPI_TRACE(NFAPI_TRACE_ERROR, "%s generic_tl.tag wrong\n", __FUNCTION__);
return 0; return 0;
} }
pdu->rx_indication_rel8.tl = generic_tl; pdu->rx_indication_rel8.tl = generic_tl;
if (unpack_rx_indication_rel8_value(&pdu->rx_indication_rel8, ppReadPackedMsg, end) == 0) if (unpack_rx_indication_rel8_value(&pdu->rx_indication_rel8, ppReadPackedMsg, end) == 0)
{ {
...@@ -7211,6 +7169,7 @@ static uint8_t unpack_rx_indication_body_value(void *tlv, uint8_t **ppReadPacked ...@@ -7211,6 +7169,7 @@ static uint8_t unpack_rx_indication_body_value(void *tlv, uint8_t **ppReadPacked
NFAPI_TRACE(NFAPI_TRACE_ERROR, "%s generic_tl.tag wrong\n", __FUNCTION__); NFAPI_TRACE(NFAPI_TRACE_ERROR, "%s generic_tl.tag wrong\n", __FUNCTION__);
return 0; return 0;
} }
pdu->rx_indication_rel9.tl = generic_tl; pdu->rx_indication_rel9.tl = generic_tl;
if (unpack_rx_indication_rel9_value(&pdu->rx_indication_rel9, ppReadPackedMsg, end) == 0) if (unpack_rx_indication_rel9_value(&pdu->rx_indication_rel9, ppReadPackedMsg, end) == 0)
{ {
...@@ -7233,7 +7192,6 @@ static uint8_t unpack_rx_indication_body_value(void *tlv, uint8_t **ppReadPacked ...@@ -7233,7 +7192,6 @@ static uint8_t unpack_rx_indication_body_value(void *tlv, uint8_t **ppReadPacked
NFAPI_TRACE(NFAPI_TRACE_ERROR, "%s pullarray8 failure\n", __FUNCTION__); NFAPI_TRACE(NFAPI_TRACE_ERROR, "%s pullarray8 failure\n", __FUNCTION__);
return 0; return 0;
} }
} }
} }
...@@ -8458,15 +8416,7 @@ int nfapi_p7_message_unpack(void *pMessageBuf, uint32_t messageBufLen, void *pUn ...@@ -8458,15 +8416,7 @@ int nfapi_p7_message_unpack(void *pMessageBuf, uint32_t messageBufLen, void *pUn
NFAPI_TRACE(NFAPI_TRACE_ERROR, "P7 unpack supplied message buffer is too small %d, %d\n", messageBufLen, unpackedBufLen); NFAPI_TRACE(NFAPI_TRACE_ERROR, "P7 unpack supplied message buffer is too small %d, %d\n", messageBufLen, unpackedBufLen);
return -1; return -1;
} }
/*
uint8_t *ptr = pMessageBuf;
printf("\n Read P7 message unpack: ");
while(ptr < end){
printf(" %d ", *ptr);
ptr++;
}
printf("\n");
*/
// clean the supplied buffer for - tag value blanking // clean the supplied buffer for - tag value blanking
(void)memset(pUnpackedBuf, 0, unpackedBufLen); (void)memset(pUnpackedBuf, 0, unpackedBufLen);
...@@ -8518,6 +8468,7 @@ int nfapi_p7_message_unpack(void *pMessageBuf, uint32_t messageBufLen, void *pUn ...@@ -8518,6 +8468,7 @@ int nfapi_p7_message_unpack(void *pMessageBuf, uint32_t messageBufLen, void *pUn
else else
return -1; return -1;
break; break;
case NFAPI_HI_DCI0_REQUEST: case NFAPI_HI_DCI0_REQUEST:
if (check_unpack_length(NFAPI_HI_DCI0_REQUEST, unpackedBufLen)) if (check_unpack_length(NFAPI_HI_DCI0_REQUEST, unpackedBufLen))
result = unpack_hi_dci0_request(&pReadPackedMessage, end, pMessageHeader, config); result = unpack_hi_dci0_request(&pReadPackedMessage, end, pMessageHeader, config);
...@@ -8683,14 +8634,6 @@ int nfapi_nr_p7_message_unpack(void *pMessageBuf, uint32_t messageBufLen, void * ...@@ -8683,14 +8634,6 @@ int nfapi_nr_p7_message_unpack(void *pMessageBuf, uint32_t messageBufLen, void *
return -1; return -1;
} }
// uint8_t *ptr = pMessageBuf;
// printf("\n Read P7 message unpack: ");
// while(ptr < end){
// printf(" %d ", *ptr);
// ptr++;
// }
// printf("\n");
// clean the supplied buffer for - tag value blanking // clean the supplied buffer for - tag value blanking
(void)memset(pUnpackedBuf, 0, unpackedBufLen); (void)memset(pUnpackedBuf, 0, unpackedBufLen);
...@@ -8846,4 +8789,3 @@ int nfapi_nr_p7_message_unpack(void *pMessageBuf, uint32_t messageBufLen, void * ...@@ -8846,4 +8789,3 @@ int nfapi_nr_p7_message_unpack(void *pMessageBuf, uint32_t messageBufLen, void *
return 0; return 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