Move functions for packing/unpacking PARAM.response
Add unitary test for PARAM.response ( test pack/unpack, free, copy and compare )
This commit is contained in:
committed by
Rúben Soares Silva
parent
34ea6c7a90
commit
79bde47b57
@@ -36,4 +36,6 @@
|
||||
|
||||
uint8_t pack_nr_param_request(void *msg, uint8_t **ppWritePackedMsg, uint8_t *end, nfapi_p4_p5_codec_config_t *config);
|
||||
uint8_t unpack_nr_param_request(uint8_t **ppReadPackedMsg, uint8_t *end, void *msg, nfapi_p4_p5_codec_config_t *config);
|
||||
uint8_t pack_nr_param_response(void *msg, uint8_t **ppWritePackedMsg, uint8_t *end, nfapi_p4_p5_codec_config_t *config);
|
||||
uint8_t unpack_nr_param_response(uint8_t **ppReadPackedMsg, uint8_t *end, void *msg, nfapi_p4_p5_codec_config_t *config);
|
||||
#endif // OPENAIRINTERFACE_NR_FAPI_P5_H
|
||||
|
||||
@@ -337,3 +337,516 @@ uint8_t unpack_nr_param_request(uint8_t **ppReadPackedMsg, uint8_t *end, void *m
|
||||
nfapi_nr_param_request_scf_t *pNfapiMsg = (nfapi_nr_param_request_scf_t *)msg;
|
||||
return unpack_nr_tlv_list(NULL, 0, ppReadPackedMsg, end, config, &(pNfapiMsg->vendor_extension));
|
||||
}
|
||||
|
||||
uint8_t pack_nr_param_response(void *msg, uint8_t **ppWritePackedMsg, uint8_t *end, nfapi_p4_p5_codec_config_t *config)
|
||||
{
|
||||
printf("\nRUNNING pack_param_response\n");
|
||||
nfapi_nr_param_response_scf_t *pNfapiMsg = (nfapi_nr_param_response_scf_t *)msg;
|
||||
uint8_t retval = push8(pNfapiMsg->error_code, ppWritePackedMsg, end) && push8(pNfapiMsg->num_tlv, ppWritePackedMsg, end);
|
||||
retval &= pack_nr_tlv(NFAPI_NR_PARAM_TLV_RELEASE_CAPABILITY_TAG,
|
||||
&(pNfapiMsg->cell_param.release_capability),
|
||||
ppWritePackedMsg,
|
||||
end,
|
||||
&pack_uint16_tlv_value)
|
||||
&& pack_nr_tlv(NFAPI_NR_PARAM_TLV_PHY_STATE_TAG,
|
||||
&(pNfapiMsg->cell_param.phy_state),
|
||||
ppWritePackedMsg,
|
||||
end,
|
||||
&pack_uint16_tlv_value)
|
||||
&& pack_nr_tlv(NFAPI_NR_PARAM_TLV_SKIP_BLANK_DL_CONFIG_TAG,
|
||||
&(pNfapiMsg->cell_param.skip_blank_dl_config),
|
||||
ppWritePackedMsg,
|
||||
end,
|
||||
&pack_uint8_tlv_value)
|
||||
&& pack_nr_tlv(NFAPI_NR_PARAM_TLV_SKIP_BLANK_UL_CONFIG_TAG,
|
||||
&(pNfapiMsg->cell_param.skip_blank_ul_config),
|
||||
ppWritePackedMsg,
|
||||
end,
|
||||
&pack_uint8_tlv_value)
|
||||
&& pack_nr_tlv(NFAPI_NR_PARAM_TLV_NUM_CONFIG_TLVS_TO_REPORT_TAG,
|
||||
&(pNfapiMsg->cell_param.num_config_tlvs_to_report),
|
||||
ppWritePackedMsg,
|
||||
end,
|
||||
&pack_uint16_tlv_value);
|
||||
|
||||
for (int i = 0; i < pNfapiMsg->cell_param.num_config_tlvs_to_report.value; ++i) {
|
||||
/*retval &= pack_nr_tlv(pNfapiMsg->cell_param.config_tlvs_to_report_list[i].tl.tag,
|
||||
&(pNfapiMsg->cell_param.config_tlvs_to_report_list[i]),
|
||||
ppWritePackedMsg,
|
||||
end,
|
||||
&pack_uint8_tlv_value);*/
|
||||
retval &= push16(pNfapiMsg->cell_param.config_tlvs_to_report_list[i].tl.tag, ppWritePackedMsg, end);
|
||||
retval &= push8(pNfapiMsg->cell_param.config_tlvs_to_report_list[i].tl.length, ppWritePackedMsg, end);
|
||||
retval &= push8(pNfapiMsg->cell_param.config_tlvs_to_report_list[i].value, ppWritePackedMsg, end);
|
||||
// Add padding that ensures multiple of 4 bytes (SCF 225 Section 2.3.2.1)
|
||||
int padding = get_tlv_padding(pNfapiMsg->cell_param.config_tlvs_to_report_list[i].tl.length);
|
||||
NFAPI_TRACE(NFAPI_TRACE_DEBUG,
|
||||
"TLV 0x%x with padding of %d bytes\n",
|
||||
pNfapiMsg->cell_param.config_tlvs_to_report_list[i].tl.tag,
|
||||
padding);
|
||||
if (padding != 0) {
|
||||
memset(*ppWritePackedMsg, 0, padding);
|
||||
(*ppWritePackedMsg) += padding;
|
||||
}
|
||||
}
|
||||
|
||||
retval &= pack_nr_tlv(NFAPI_NR_PARAM_TLV_CYCLIC_PREFIX_TAG,
|
||||
&(pNfapiMsg->carrier_param.cyclic_prefix),
|
||||
ppWritePackedMsg,
|
||||
end,
|
||||
&pack_uint8_tlv_value)
|
||||
&& pack_nr_tlv(NFAPI_NR_PARAM_TLV_SUPPORTED_SUBCARRIER_SPACINGS_DL_TAG,
|
||||
&(pNfapiMsg->carrier_param.supported_subcarrier_spacings_dl),
|
||||
ppWritePackedMsg,
|
||||
end,
|
||||
&pack_uint16_tlv_value)
|
||||
&& pack_nr_tlv(NFAPI_NR_PARAM_TLV_SUPPORTED_BANDWIDTH_DL_TAG,
|
||||
&(pNfapiMsg->carrier_param.supported_bandwidth_dl),
|
||||
ppWritePackedMsg,
|
||||
end,
|
||||
&pack_uint16_tlv_value)
|
||||
&& pack_nr_tlv(NFAPI_NR_PARAM_TLV_SUPPORTED_SUBCARRIER_SPACINGS_UL_TAG,
|
||||
&(pNfapiMsg->carrier_param.supported_subcarrier_spacings_ul),
|
||||
ppWritePackedMsg,
|
||||
end,
|
||||
&pack_uint8_tlv_value)
|
||||
&& pack_nr_tlv(NFAPI_NR_PARAM_TLV_SUPPORTED_BANDWIDTH_UL_TAG,
|
||||
&(pNfapiMsg->carrier_param.supported_bandwidth_ul),
|
||||
ppWritePackedMsg,
|
||||
end,
|
||||
&pack_uint16_tlv_value)
|
||||
&& pack_nr_tlv(NFAPI_NR_PARAM_TLV_CCE_MAPPING_TYPE_TAG,
|
||||
&(pNfapiMsg->pdcch_param.cce_mapping_type),
|
||||
ppWritePackedMsg,
|
||||
end,
|
||||
&pack_uint8_tlv_value)
|
||||
&& pack_nr_tlv(NFAPI_NR_PARAM_TLV_CORESET_OUTSIDE_FIRST_3_OFDM_SYMS_OF_SLOT_TAG,
|
||||
&(pNfapiMsg->pdcch_param.coreset_outside_first_3_of_ofdm_syms_of_slot),
|
||||
ppWritePackedMsg,
|
||||
end,
|
||||
&pack_uint8_tlv_value)
|
||||
&& pack_nr_tlv(NFAPI_NR_PARAM_TLV_PRECODER_GRANULARITY_CORESET_TAG,
|
||||
&(pNfapiMsg->pdcch_param.coreset_precoder_granularity_coreset),
|
||||
ppWritePackedMsg,
|
||||
end,
|
||||
&pack_uint8_tlv_value)
|
||||
&& pack_nr_tlv(NFAPI_NR_PARAM_TLV_PDCCH_MU_MIMO_TAG,
|
||||
&(pNfapiMsg->pdcch_param.pdcch_mu_mimo),
|
||||
ppWritePackedMsg,
|
||||
end,
|
||||
&pack_uint8_tlv_value)
|
||||
&& pack_nr_tlv(NFAPI_NR_PARAM_TLV_PDCCH_PRECODER_CYCLING_TAG,
|
||||
&(pNfapiMsg->pdcch_param.pdcch_precoder_cycling),
|
||||
ppWritePackedMsg,
|
||||
end,
|
||||
&pack_uint8_tlv_value)
|
||||
&& pack_nr_tlv(NFAPI_NR_PARAM_TLV_MAX_PDCCHS_PER_SLOT_TAG,
|
||||
&(pNfapiMsg->pdcch_param.max_pdcch_per_slot),
|
||||
ppWritePackedMsg,
|
||||
end,
|
||||
&pack_uint8_tlv_value)
|
||||
&& pack_nr_tlv(NFAPI_NR_PARAM_TLV_PUCCH_FORMATS_TAG,
|
||||
&(pNfapiMsg->pucch_param.pucch_formats),
|
||||
ppWritePackedMsg,
|
||||
end,
|
||||
&pack_uint8_tlv_value)
|
||||
&& pack_nr_tlv(NFAPI_NR_PARAM_TLV_MAX_PUCCHS_PER_SLOT_TAG,
|
||||
&(pNfapiMsg->pucch_param.max_pucchs_per_slot),
|
||||
ppWritePackedMsg,
|
||||
end,
|
||||
&pack_uint8_tlv_value)
|
||||
&& pack_nr_tlv(NFAPI_NR_PARAM_TLV_PDSCH_MAPPING_TYPE_TAG,
|
||||
&(pNfapiMsg->pdsch_param.pdsch_mapping_type),
|
||||
ppWritePackedMsg,
|
||||
end,
|
||||
&pack_uint8_tlv_value)
|
||||
&& pack_nr_tlv(NFAPI_NR_PARAM_TLV_PDSCH_ALLOCATION_TYPES_TAG,
|
||||
&(pNfapiMsg->pdsch_param.pdsch_allocation_types),
|
||||
ppWritePackedMsg,
|
||||
end,
|
||||
&pack_uint8_tlv_value)
|
||||
&& pack_nr_tlv(NFAPI_NR_PARAM_TLV_PDSCH_VRB_TO_PRB_MAPPING_TAG,
|
||||
&(pNfapiMsg->pdsch_param.pdsch_vrb_to_prb_mapping),
|
||||
ppWritePackedMsg,
|
||||
end,
|
||||
&pack_uint8_tlv_value)
|
||||
&& pack_nr_tlv(NFAPI_NR_PARAM_TLV_PDSCH_CBG_TAG,
|
||||
&(pNfapiMsg->pdsch_param.pdsch_cbg),
|
||||
ppWritePackedMsg,
|
||||
end,
|
||||
&pack_uint8_tlv_value)
|
||||
&& pack_nr_tlv(NFAPI_NR_PARAM_TLV_PDSCH_DMRS_CONFIG_TYPES_TAG,
|
||||
&(pNfapiMsg->pdsch_param.pdsch_dmrs_config_types),
|
||||
ppWritePackedMsg,
|
||||
end,
|
||||
&pack_uint8_tlv_value)
|
||||
&& pack_nr_tlv(NFAPI_NR_PARAM_TLV_PDSCH_DMRS_MAX_LENGTH_TAG,
|
||||
&(pNfapiMsg->pdsch_param.pdsch_dmrs_max_length),
|
||||
ppWritePackedMsg,
|
||||
end,
|
||||
&pack_uint8_tlv_value)
|
||||
&& pack_nr_tlv(NFAPI_NR_PARAM_TLV_PDSCH_DMRS_ADDITIONAL_POS_TAG,
|
||||
&(pNfapiMsg->pdsch_param.pdsch_dmrs_additional_pos),
|
||||
ppWritePackedMsg,
|
||||
end,
|
||||
&pack_uint8_tlv_value)
|
||||
&& pack_nr_tlv(NFAPI_NR_PARAM_TLV_MAX_PDSCH_S_TBS_PER_SLOT_TAG,
|
||||
&(pNfapiMsg->pdsch_param.max_pdsch_tbs_per_slot),
|
||||
ppWritePackedMsg,
|
||||
end,
|
||||
&pack_uint8_tlv_value)
|
||||
&& pack_nr_tlv(NFAPI_NR_PARAM_TLV_MAX_NUMBER_MIMO_LAYERS_PDSCH_TAG,
|
||||
&(pNfapiMsg->pdsch_param.max_number_mimo_layers_pdsch),
|
||||
ppWritePackedMsg,
|
||||
end,
|
||||
&pack_uint8_tlv_value)
|
||||
&& pack_nr_tlv(NFAPI_NR_PARAM_TLV_SUPPORTED_MAX_MODULATION_ORDER_DL_TAG,
|
||||
&(pNfapiMsg->pdsch_param.supported_max_modulation_order_dl),
|
||||
ppWritePackedMsg,
|
||||
end,
|
||||
&pack_uint8_tlv_value)
|
||||
&& pack_nr_tlv(NFAPI_NR_PARAM_TLV_MAX_MU_MIMO_USERS_DL_TAG,
|
||||
&(pNfapiMsg->pdsch_param.max_mu_mimo_users_dl),
|
||||
ppWritePackedMsg,
|
||||
end,
|
||||
&pack_uint8_tlv_value)
|
||||
&& pack_nr_tlv(NFAPI_NR_PARAM_TLV_PDSCH_DATA_IN_DMRS_SYMBOLS_TAG,
|
||||
&(pNfapiMsg->pdsch_param.pdsch_data_in_dmrs_symbols),
|
||||
ppWritePackedMsg,
|
||||
end,
|
||||
&pack_uint8_tlv_value)
|
||||
&& pack_nr_tlv(NFAPI_NR_PARAM_TLV_PREMPTION_SUPPORT_TAG,
|
||||
&(pNfapiMsg->pdsch_param.premption_support),
|
||||
ppWritePackedMsg,
|
||||
end,
|
||||
&pack_uint8_tlv_value)
|
||||
&& pack_nr_tlv(NFAPI_NR_PARAM_TLV_PDSCH_NON_SLOT_SUPPORT_TAG,
|
||||
&(pNfapiMsg->pdsch_param.pdsch_non_slot_support),
|
||||
ppWritePackedMsg,
|
||||
end,
|
||||
&pack_uint8_tlv_value)
|
||||
&& pack_nr_tlv(NFAPI_NR_PARAM_TLV_UCI_MUX_ULSCH_IN_PUSCH_TAG,
|
||||
&(pNfapiMsg->pusch_param.uci_mux_ulsch_in_pusch),
|
||||
ppWritePackedMsg,
|
||||
end,
|
||||
&pack_uint8_tlv_value)
|
||||
&& pack_nr_tlv(NFAPI_NR_PARAM_TLV_UCI_ONLY_PUSCH_TAG,
|
||||
&(pNfapiMsg->pusch_param.uci_only_pusch),
|
||||
ppWritePackedMsg,
|
||||
end,
|
||||
&pack_uint8_tlv_value)
|
||||
&& pack_nr_tlv(NFAPI_NR_PARAM_TLV_PUSCH_FREQUENCY_HOPPING_TAG,
|
||||
&(pNfapiMsg->pusch_param.pusch_frequency_hopping),
|
||||
ppWritePackedMsg,
|
||||
end,
|
||||
&pack_uint8_tlv_value)
|
||||
&& pack_nr_tlv(NFAPI_NR_PARAM_TLV_PUSCH_DMRS_CONFIG_TYPES_TAG,
|
||||
&(pNfapiMsg->pusch_param.pusch_dmrs_config_types),
|
||||
ppWritePackedMsg,
|
||||
end,
|
||||
&pack_uint8_tlv_value)
|
||||
&& pack_nr_tlv(NFAPI_NR_PARAM_TLV_PUSCH_DMRS_MAX_LEN_TAG,
|
||||
&(pNfapiMsg->pusch_param.pusch_dmrs_max_len),
|
||||
ppWritePackedMsg,
|
||||
end,
|
||||
&pack_uint8_tlv_value)
|
||||
&& pack_nr_tlv(NFAPI_NR_PARAM_TLV_PUSCH_DMRS_ADDITIONAL_POS_TAG,
|
||||
&(pNfapiMsg->pusch_param.pusch_dmrs_additional_pos),
|
||||
ppWritePackedMsg,
|
||||
end,
|
||||
&pack_uint8_tlv_value)
|
||||
&& pack_nr_tlv(NFAPI_NR_PARAM_TLV_PUSCH_CBG_TAG,
|
||||
&(pNfapiMsg->pusch_param.pusch_cbg),
|
||||
ppWritePackedMsg,
|
||||
end,
|
||||
&pack_uint8_tlv_value)
|
||||
&& pack_nr_tlv(NFAPI_NR_PARAM_TLV_PUSCH_MAPPING_TYPE_TAG,
|
||||
&(pNfapiMsg->pusch_param.pusch_mapping_type),
|
||||
ppWritePackedMsg,
|
||||
end,
|
||||
&pack_uint8_tlv_value)
|
||||
&& pack_nr_tlv(NFAPI_NR_PARAM_TLV_PUSCH_ALLOCATION_TYPES_TAG,
|
||||
&(pNfapiMsg->pusch_param.pusch_allocation_types),
|
||||
ppWritePackedMsg,
|
||||
end,
|
||||
&pack_uint8_tlv_value)
|
||||
&& pack_nr_tlv(NFAPI_NR_PARAM_TLV_PUSCH_VRB_TO_PRB_MAPPING_TAG,
|
||||
&(pNfapiMsg->pusch_param.pusch_vrb_to_prb_mapping),
|
||||
ppWritePackedMsg,
|
||||
end,
|
||||
&pack_uint8_tlv_value)
|
||||
&& pack_nr_tlv(NFAPI_NR_PARAM_TLV_PUSCH_MAX_PTRS_PORTS_TAG,
|
||||
&(pNfapiMsg->pusch_param.pusch_max_ptrs_ports),
|
||||
ppWritePackedMsg,
|
||||
end,
|
||||
&pack_uint8_tlv_value)
|
||||
&& pack_nr_tlv(NFAPI_NR_PARAM_TLV_MAX_PDUSCHS_TBS_PER_SLOT_TAG,
|
||||
&(pNfapiMsg->pusch_param.max_pduschs_tbs_per_slot),
|
||||
ppWritePackedMsg,
|
||||
end,
|
||||
&pack_uint8_tlv_value)
|
||||
&& pack_nr_tlv(NFAPI_NR_PARAM_TLV_MAX_NUMBER_MIMO_LAYERS_NON_CB_PUSCH_TAG,
|
||||
&(pNfapiMsg->pusch_param.max_number_mimo_layers_non_cb_pusch),
|
||||
ppWritePackedMsg,
|
||||
end,
|
||||
&pack_uint8_tlv_value)
|
||||
&& pack_nr_tlv(NFAPI_NR_PARAM_TLV_SUPPORTED_MODULATION_ORDER_UL_TAG,
|
||||
&(pNfapiMsg->pusch_param.supported_modulation_order_ul),
|
||||
ppWritePackedMsg,
|
||||
end,
|
||||
&pack_uint8_tlv_value)
|
||||
&& pack_nr_tlv(NFAPI_NR_PARAM_TLV_MAX_MU_MIMO_USERS_UL_TAG,
|
||||
&(pNfapiMsg->pusch_param.max_mu_mimo_users_ul),
|
||||
ppWritePackedMsg,
|
||||
end,
|
||||
&pack_uint8_tlv_value)
|
||||
&& pack_nr_tlv(NFAPI_NR_PARAM_TLV_DFTS_OFDM_SUPPORT_TAG,
|
||||
&(pNfapiMsg->pusch_param.dfts_ofdm_support),
|
||||
ppWritePackedMsg,
|
||||
end,
|
||||
&pack_uint8_tlv_value)
|
||||
&& pack_nr_tlv(NFAPI_NR_PARAM_TLV_PUSCH_AGGREGATION_FACTOR_TAG,
|
||||
&(pNfapiMsg->pusch_param.pusch_aggregation_factor),
|
||||
ppWritePackedMsg,
|
||||
end,
|
||||
&pack_uint8_tlv_value)
|
||||
&& pack_nr_tlv(NFAPI_NR_PARAM_TLV_PRACH_LONG_FORMATS_TAG,
|
||||
&(pNfapiMsg->prach_param.prach_long_formats),
|
||||
ppWritePackedMsg,
|
||||
end,
|
||||
&pack_uint8_tlv_value)
|
||||
&& pack_nr_tlv(NFAPI_NR_PARAM_TLV_PRACH_SHORT_FORMATS_TAG,
|
||||
&(pNfapiMsg->prach_param.prach_short_formats),
|
||||
ppWritePackedMsg,
|
||||
end,
|
||||
&pack_uint16_tlv_value)
|
||||
&& pack_nr_tlv(NFAPI_NR_PARAM_TLV_PRACH_RESTRICTED_SETS_TAG,
|
||||
&(pNfapiMsg->prach_param.prach_restricted_sets),
|
||||
ppWritePackedMsg,
|
||||
end,
|
||||
&pack_uint8_tlv_value)
|
||||
&& pack_nr_tlv(NFAPI_NR_PARAM_TLV_MAX_PRACH_FD_OCCASIONS_IN_A_SLOT_TAG,
|
||||
&(pNfapiMsg->prach_param.max_prach_fd_occasions_in_a_slot),
|
||||
ppWritePackedMsg,
|
||||
end,
|
||||
&pack_uint8_tlv_value)
|
||||
&& pack_nr_tlv(NFAPI_NR_PARAM_TLV_RSSI_MEASUREMENT_SUPPORT_TAG,
|
||||
&(pNfapiMsg->measurement_param.rssi_measurement_support),
|
||||
ppWritePackedMsg,
|
||||
end,
|
||||
&pack_uint8_tlv_value)
|
||||
&&
|
||||
// config:
|
||||
pack_nr_tlv(NFAPI_NR_NFAPI_P7_VNF_ADDRESS_IPV4_TAG,
|
||||
&(pNfapiMsg->nfapi_config.p7_vnf_address_ipv4),
|
||||
ppWritePackedMsg,
|
||||
end,
|
||||
&pack_ipv4_address_value)
|
||||
&& pack_nr_tlv(NFAPI_NR_NFAPI_P7_VNF_ADDRESS_IPV6_TAG,
|
||||
&(pNfapiMsg->nfapi_config.p7_vnf_address_ipv6),
|
||||
ppWritePackedMsg,
|
||||
end,
|
||||
&pack_ipv6_address_value)
|
||||
&& pack_nr_tlv(NFAPI_NR_NFAPI_P7_VNF_PORT_TAG,
|
||||
&(pNfapiMsg->nfapi_config.p7_vnf_port),
|
||||
ppWritePackedMsg,
|
||||
end,
|
||||
&pack_uint16_tlv_value)
|
||||
&& pack_nr_tlv(NFAPI_NR_NFAPI_P7_PNF_ADDRESS_IPV4_TAG,
|
||||
&(pNfapiMsg->nfapi_config.p7_pnf_address_ipv4),
|
||||
ppWritePackedMsg,
|
||||
end,
|
||||
&pack_ipv4_address_value)
|
||||
&& pack_nr_tlv(NFAPI_NR_NFAPI_P7_PNF_ADDRESS_IPV6_TAG,
|
||||
&(pNfapiMsg->nfapi_config.p7_pnf_address_ipv6),
|
||||
ppWritePackedMsg,
|
||||
end,
|
||||
&pack_ipv6_address_value)
|
||||
&& pack_nr_tlv(NFAPI_NR_NFAPI_P7_PNF_PORT_TAG,
|
||||
&(pNfapiMsg->nfapi_config.p7_pnf_port),
|
||||
ppWritePackedMsg,
|
||||
end,
|
||||
&pack_uint16_tlv_value)
|
||||
&& pack_nr_tlv(NFAPI_NR_NFAPI_TIMING_WINDOW_TAG,
|
||||
&(pNfapiMsg->nfapi_config.timing_window),
|
||||
ppWritePackedMsg,
|
||||
end,
|
||||
&pack_uint8_tlv_value)
|
||||
&& pack_nr_tlv(NFAPI_NR_NFAPI_TIMING_INFO_MODE_TAG,
|
||||
&(pNfapiMsg->nfapi_config.timing_info_mode),
|
||||
ppWritePackedMsg,
|
||||
end,
|
||||
&pack_uint8_tlv_value)
|
||||
&& pack_nr_tlv(NFAPI_NR_NFAPI_TIMING_INFO_PERIOD_TAG,
|
||||
&(pNfapiMsg->nfapi_config.timing_info_period),
|
||||
ppWritePackedMsg,
|
||||
end,
|
||||
&pack_uint8_tlv_value)
|
||||
&& pack_vendor_extension_tlv(pNfapiMsg->vendor_extension, ppWritePackedMsg, end, config);
|
||||
return retval;
|
||||
}
|
||||
|
||||
static uint8_t unpack_config_tlvs_to_report(void *tlv, uint8_t **ppReadPackedMsg, uint8_t *end)
|
||||
{
|
||||
uint8_t *pStartOfValue = *ppReadPackedMsg;
|
||||
nfapi_nr_cell_param_t *cellParamTable = (nfapi_nr_cell_param_t *)tlv;
|
||||
uint8_t retval = pull16(ppReadPackedMsg, &cellParamTable->num_config_tlvs_to_report.value, end);
|
||||
|
||||
// check if the length was right;
|
||||
if (cellParamTable->num_config_tlvs_to_report.tl.length != (*ppReadPackedMsg - pStartOfValue)) {
|
||||
NFAPI_TRACE(NFAPI_TRACE_ERROR,
|
||||
"Warning tlv tag 0x%x length %d not equal to unpack %ld\n",
|
||||
cellParamTable->num_config_tlvs_to_report.tl.tag,
|
||||
cellParamTable->num_config_tlvs_to_report.tl.length,
|
||||
(*ppReadPackedMsg - pStartOfValue));
|
||||
}
|
||||
// Remove padding that ensures multiple of 4 bytes (SCF 225 Section 2.3.2.1)
|
||||
int padding = get_tlv_padding(cellParamTable->num_config_tlvs_to_report.tl.length);
|
||||
if (padding != 0) {
|
||||
(*ppReadPackedMsg) += padding;
|
||||
}
|
||||
|
||||
// after this value, get the tlv list
|
||||
cellParamTable->config_tlvs_to_report_list = calloc(cellParamTable->num_config_tlvs_to_report.value, sizeof(nfapi_uint8_tlv_t *));
|
||||
|
||||
for (int i = 0; i < cellParamTable->num_config_tlvs_to_report.value; ++i) {
|
||||
pull16(ppReadPackedMsg, &cellParamTable->config_tlvs_to_report_list[i].tl.tag, end);
|
||||
pull8(ppReadPackedMsg, (uint8_t *)&cellParamTable->config_tlvs_to_report_list[i].tl.length, end);
|
||||
pull8(ppReadPackedMsg, &cellParamTable->config_tlvs_to_report_list[i].value, end);
|
||||
// Remove padding that ensures multiple of 4 bytes (SCF 225 Section 2.3.2.1)
|
||||
padding = get_tlv_padding(cellParamTable->config_tlvs_to_report_list[i].tl.length);
|
||||
if (padding != 0) {
|
||||
(*ppReadPackedMsg) += padding;
|
||||
}
|
||||
}
|
||||
return retval;
|
||||
}
|
||||
|
||||
uint8_t unpack_nr_param_response(uint8_t **ppReadPackedMsg, uint8_t *end, void *msg, nfapi_p4_p5_codec_config_t *config)
|
||||
{
|
||||
nfapi_nr_param_response_scf_t *pNfapiMsg = (nfapi_nr_param_response_scf_t *)msg;
|
||||
unpack_tlv_t unpack_fns[] = {
|
||||
{NFAPI_NR_PARAM_TLV_RELEASE_CAPABILITY_TAG, &(pNfapiMsg->cell_param.release_capability), &unpack_uint16_tlv_value},
|
||||
{NFAPI_NR_PARAM_TLV_PHY_STATE_TAG, &(pNfapiMsg->cell_param.phy_state), &unpack_uint16_tlv_value},
|
||||
{NFAPI_NR_PARAM_TLV_SKIP_BLANK_DL_CONFIG_TAG, &(pNfapiMsg->cell_param.skip_blank_dl_config), &unpack_uint8_tlv_value},
|
||||
{NFAPI_NR_PARAM_TLV_SKIP_BLANK_UL_CONFIG_TAG, &(pNfapiMsg->cell_param.skip_blank_ul_config), &unpack_uint8_tlv_value},
|
||||
{NFAPI_NR_PARAM_TLV_NUM_CONFIG_TLVS_TO_REPORT_TAG, &(pNfapiMsg->cell_param), &unpack_config_tlvs_to_report},
|
||||
|
||||
{NFAPI_NR_PARAM_TLV_CYCLIC_PREFIX_TAG, &(pNfapiMsg->carrier_param.cyclic_prefix), &unpack_uint8_tlv_value},
|
||||
{NFAPI_NR_PARAM_TLV_SUPPORTED_SUBCARRIER_SPACINGS_DL_TAG,
|
||||
&(pNfapiMsg->carrier_param.supported_subcarrier_spacings_dl),
|
||||
&unpack_uint16_tlv_value},
|
||||
{NFAPI_NR_PARAM_TLV_SUPPORTED_BANDWIDTH_DL_TAG, &(pNfapiMsg->carrier_param.supported_bandwidth_dl), &unpack_uint16_tlv_value},
|
||||
{NFAPI_NR_PARAM_TLV_SUPPORTED_SUBCARRIER_SPACINGS_UL_TAG,
|
||||
&(pNfapiMsg->carrier_param.supported_subcarrier_spacings_ul),
|
||||
&unpack_uint8_tlv_value},
|
||||
{NFAPI_NR_PARAM_TLV_SUPPORTED_BANDWIDTH_UL_TAG, &(pNfapiMsg->carrier_param.supported_bandwidth_ul), &unpack_uint16_tlv_value},
|
||||
|
||||
{NFAPI_NR_PARAM_TLV_CCE_MAPPING_TYPE_TAG, &(pNfapiMsg->pdcch_param.cce_mapping_type), &unpack_uint8_tlv_value},
|
||||
{NFAPI_NR_PARAM_TLV_CORESET_OUTSIDE_FIRST_3_OFDM_SYMS_OF_SLOT_TAG,
|
||||
&(pNfapiMsg->pdcch_param.coreset_outside_first_3_of_ofdm_syms_of_slot),
|
||||
&unpack_uint8_tlv_value},
|
||||
{NFAPI_NR_PARAM_TLV_PRECODER_GRANULARITY_CORESET_TAG,
|
||||
&(pNfapiMsg->pdcch_param.coreset_precoder_granularity_coreset),
|
||||
&unpack_uint8_tlv_value},
|
||||
{NFAPI_NR_PARAM_TLV_PDCCH_MU_MIMO_TAG, &(pNfapiMsg->pdcch_param.pdcch_mu_mimo), &unpack_uint8_tlv_value},
|
||||
{NFAPI_NR_PARAM_TLV_PDCCH_PRECODER_CYCLING_TAG, &(pNfapiMsg->pdcch_param.pdcch_precoder_cycling), &unpack_uint8_tlv_value},
|
||||
{NFAPI_NR_PARAM_TLV_MAX_PDCCHS_PER_SLOT_TAG, &(pNfapiMsg->pdcch_param.max_pdcch_per_slot), &unpack_uint8_tlv_value},
|
||||
|
||||
{NFAPI_NR_PARAM_TLV_PUCCH_FORMATS_TAG, &(pNfapiMsg->pucch_param.pucch_formats), &unpack_uint8_tlv_value},
|
||||
{NFAPI_NR_PARAM_TLV_MAX_PUCCHS_PER_SLOT_TAG, &(pNfapiMsg->pucch_param.max_pucchs_per_slot), &unpack_uint8_tlv_value},
|
||||
|
||||
{NFAPI_NR_PARAM_TLV_PDSCH_MAPPING_TYPE_TAG, &(pNfapiMsg->pdsch_param.pdsch_mapping_type), &unpack_uint8_tlv_value},
|
||||
{NFAPI_NR_PARAM_TLV_PDSCH_ALLOCATION_TYPES_TAG, &(pNfapiMsg->pdsch_param.pdsch_allocation_types), &unpack_uint8_tlv_value},
|
||||
{NFAPI_NR_PARAM_TLV_PDSCH_VRB_TO_PRB_MAPPING_TAG,
|
||||
&(pNfapiMsg->pdsch_param.pdsch_vrb_to_prb_mapping),
|
||||
&unpack_uint8_tlv_value},
|
||||
{NFAPI_NR_PARAM_TLV_PDSCH_CBG_TAG, &(pNfapiMsg->pdsch_param.pdsch_cbg), &unpack_uint8_tlv_value},
|
||||
{NFAPI_NR_PARAM_TLV_PDSCH_DMRS_CONFIG_TYPES_TAG, &(pNfapiMsg->pdsch_param.pdsch_dmrs_config_types), &unpack_uint8_tlv_value},
|
||||
{NFAPI_NR_PARAM_TLV_PDSCH_DMRS_MAX_LENGTH_TAG, &(pNfapiMsg->pdsch_param.pdsch_dmrs_max_length), &unpack_uint8_tlv_value},
|
||||
{NFAPI_NR_PARAM_TLV_PDSCH_DMRS_ADDITIONAL_POS_TAG,
|
||||
&(pNfapiMsg->pdsch_param.pdsch_dmrs_additional_pos),
|
||||
&unpack_uint8_tlv_value},
|
||||
{NFAPI_NR_PARAM_TLV_MAX_PDSCH_S_TBS_PER_SLOT_TAG, &(pNfapiMsg->pdsch_param.max_pdsch_tbs_per_slot), &unpack_uint8_tlv_value},
|
||||
{NFAPI_NR_PARAM_TLV_MAX_NUMBER_MIMO_LAYERS_PDSCH_TAG,
|
||||
&(pNfapiMsg->pdsch_param.max_number_mimo_layers_pdsch),
|
||||
&unpack_uint8_tlv_value},
|
||||
{NFAPI_NR_PARAM_TLV_SUPPORTED_MAX_MODULATION_ORDER_DL_TAG,
|
||||
&(pNfapiMsg->pdsch_param.supported_max_modulation_order_dl),
|
||||
&unpack_uint8_tlv_value},
|
||||
{NFAPI_NR_PARAM_TLV_MAX_MU_MIMO_USERS_DL_TAG, &(pNfapiMsg->pdsch_param.max_mu_mimo_users_dl), &unpack_uint8_tlv_value},
|
||||
{NFAPI_NR_PARAM_TLV_PDSCH_DATA_IN_DMRS_SYMBOLS_TAG,
|
||||
&(pNfapiMsg->pdsch_param.pdsch_data_in_dmrs_symbols),
|
||||
&unpack_uint8_tlv_value},
|
||||
{NFAPI_NR_PARAM_TLV_PREMPTION_SUPPORT_TAG, &(pNfapiMsg->pdsch_param.premption_support), &unpack_uint8_tlv_value},
|
||||
{NFAPI_NR_PARAM_TLV_PDSCH_NON_SLOT_SUPPORT_TAG, &(pNfapiMsg->pdsch_param.pdsch_non_slot_support), &unpack_uint8_tlv_value},
|
||||
|
||||
{NFAPI_NR_PARAM_TLV_UCI_MUX_ULSCH_IN_PUSCH_TAG, &(pNfapiMsg->pusch_param.uci_mux_ulsch_in_pusch), &unpack_uint8_tlv_value},
|
||||
{NFAPI_NR_PARAM_TLV_UCI_ONLY_PUSCH_TAG, &(pNfapiMsg->pusch_param.uci_only_pusch), &unpack_uint8_tlv_value},
|
||||
{NFAPI_NR_PARAM_TLV_PUSCH_FREQUENCY_HOPPING_TAG, &(pNfapiMsg->pusch_param.pusch_frequency_hopping), &unpack_uint8_tlv_value},
|
||||
{NFAPI_NR_PARAM_TLV_PUSCH_DMRS_CONFIG_TYPES_TAG, &(pNfapiMsg->pusch_param.pusch_dmrs_config_types), &unpack_uint8_tlv_value},
|
||||
{NFAPI_NR_PARAM_TLV_PUSCH_DMRS_MAX_LEN_TAG, &(pNfapiMsg->pusch_param.pusch_dmrs_max_len), &unpack_uint8_tlv_value},
|
||||
{NFAPI_NR_PARAM_TLV_PUSCH_DMRS_ADDITIONAL_POS_TAG,
|
||||
&(pNfapiMsg->pusch_param.pusch_dmrs_additional_pos),
|
||||
&unpack_uint8_tlv_value},
|
||||
{NFAPI_NR_PARAM_TLV_PUSCH_CBG_TAG, &(pNfapiMsg->pusch_param.pusch_cbg), &unpack_uint8_tlv_value},
|
||||
{NFAPI_NR_PARAM_TLV_PUSCH_MAPPING_TYPE_TAG, &(pNfapiMsg->pusch_param.pusch_mapping_type), &unpack_uint8_tlv_value},
|
||||
{NFAPI_NR_PARAM_TLV_PUSCH_ALLOCATION_TYPES_TAG, &(pNfapiMsg->pusch_param.pusch_allocation_types), &unpack_uint8_tlv_value},
|
||||
{NFAPI_NR_PARAM_TLV_PUSCH_VRB_TO_PRB_MAPPING_TAG,
|
||||
&(pNfapiMsg->pusch_param.pusch_vrb_to_prb_mapping),
|
||||
&unpack_uint8_tlv_value},
|
||||
{NFAPI_NR_PARAM_TLV_PUSCH_MAX_PTRS_PORTS_TAG, &(pNfapiMsg->pusch_param.pusch_max_ptrs_ports), &unpack_uint8_tlv_value},
|
||||
{NFAPI_NR_PARAM_TLV_MAX_PDUSCHS_TBS_PER_SLOT_TAG,
|
||||
&(pNfapiMsg->pusch_param.max_pduschs_tbs_per_slot),
|
||||
&unpack_uint8_tlv_value},
|
||||
{NFAPI_NR_PARAM_TLV_MAX_NUMBER_MIMO_LAYERS_NON_CB_PUSCH_TAG,
|
||||
&(pNfapiMsg->pusch_param.max_number_mimo_layers_non_cb_pusch),
|
||||
&unpack_uint8_tlv_value},
|
||||
{NFAPI_NR_PARAM_TLV_SUPPORTED_MODULATION_ORDER_UL_TAG,
|
||||
&(pNfapiMsg->pusch_param.supported_modulation_order_ul),
|
||||
&unpack_uint8_tlv_value},
|
||||
{NFAPI_NR_PARAM_TLV_MAX_MU_MIMO_USERS_UL_TAG, &(pNfapiMsg->pusch_param.max_mu_mimo_users_ul), &unpack_uint8_tlv_value},
|
||||
{NFAPI_NR_PARAM_TLV_DFTS_OFDM_SUPPORT_TAG, &(pNfapiMsg->pusch_param.dfts_ofdm_support), &unpack_uint8_tlv_value},
|
||||
{NFAPI_NR_PARAM_TLV_PUSCH_AGGREGATION_FACTOR_TAG,
|
||||
&(pNfapiMsg->pusch_param.pusch_aggregation_factor),
|
||||
&unpack_uint8_tlv_value},
|
||||
|
||||
{NFAPI_NR_PARAM_TLV_PRACH_LONG_FORMATS_TAG, &(pNfapiMsg->prach_param.prach_long_formats), &unpack_uint8_tlv_value},
|
||||
{NFAPI_NR_PARAM_TLV_PRACH_SHORT_FORMATS_TAG, &(pNfapiMsg->prach_param.prach_short_formats), &unpack_uint16_tlv_value},
|
||||
{NFAPI_NR_PARAM_TLV_PRACH_RESTRICTED_SETS_TAG, &(pNfapiMsg->prach_param.prach_restricted_sets), &unpack_uint8_tlv_value},
|
||||
{NFAPI_NR_PARAM_TLV_MAX_PRACH_FD_OCCASIONS_IN_A_SLOT_TAG,
|
||||
&(pNfapiMsg->prach_param.max_prach_fd_occasions_in_a_slot),
|
||||
&unpack_uint8_tlv_value},
|
||||
|
||||
{NFAPI_NR_PARAM_TLV_RSSI_MEASUREMENT_SUPPORT_TAG,
|
||||
&(pNfapiMsg->measurement_param.rssi_measurement_support),
|
||||
&unpack_uint8_tlv_value},
|
||||
// config
|
||||
{NFAPI_NR_NFAPI_P7_VNF_ADDRESS_IPV4_TAG, &pNfapiMsg->nfapi_config.p7_vnf_address_ipv4, &unpack_ipv4_address_value},
|
||||
{NFAPI_NR_NFAPI_P7_VNF_ADDRESS_IPV6_TAG, &pNfapiMsg->nfapi_config.p7_vnf_address_ipv6, &unpack_ipv6_address_value},
|
||||
{NFAPI_NR_NFAPI_P7_VNF_PORT_TAG, &pNfapiMsg->nfapi_config.p7_vnf_port, &unpack_uint16_tlv_value},
|
||||
{NFAPI_NR_NFAPI_P7_PNF_ADDRESS_IPV4_TAG, &pNfapiMsg->nfapi_config.p7_pnf_address_ipv4, &unpack_ipv4_address_value},
|
||||
{NFAPI_NR_NFAPI_P7_PNF_ADDRESS_IPV6_TAG, &pNfapiMsg->nfapi_config.p7_pnf_address_ipv6, &unpack_ipv6_address_value},
|
||||
{NFAPI_NR_NFAPI_P7_PNF_PORT_TAG, &pNfapiMsg->nfapi_config.p7_pnf_port, &unpack_uint16_tlv_value},
|
||||
{NFAPI_NR_NFAPI_TIMING_WINDOW_TAG, &pNfapiMsg->nfapi_config.timing_window, &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},
|
||||
};
|
||||
// print ppReadPackedMsg
|
||||
uint8_t *ptr = *ppReadPackedMsg;
|
||||
printf("\n Read message unpack_param_response: ");
|
||||
|
||||
while (ptr < end) {
|
||||
printf(" 0x%02x", *ptr);
|
||||
ptr++;
|
||||
}
|
||||
|
||||
printf("\n");
|
||||
return (pull8(ppReadPackedMsg, &pNfapiMsg->error_code, end) && pull8(ppReadPackedMsg, &pNfapiMsg->num_tlv, end)
|
||||
&& unpack_nr_tlv_list(unpack_fns,
|
||||
sizeof(unpack_fns) / sizeof(unpack_tlv_t),
|
||||
ppReadPackedMsg,
|
||||
end,
|
||||
config,
|
||||
&pNfapiMsg->vendor_extension));
|
||||
}
|
||||
|
||||
@@ -4121,10 +4121,6 @@ int pack_nr_srs_beamforming_report(void *pMessageBuf, void *pPackedBuf, uint32_t
|
||||
*/
|
||||
int unpack_nr_srs_beamforming_report(void *pMessageBuf, uint32_t messageBufLen, void *pUnpackedBuf, uint32_t unpackedBufLen);
|
||||
|
||||
uint8_t pack_nr_param_response(void *msg, uint8_t **ppWritePackedMsg, uint8_t *end, nfapi_p4_p5_codec_config_t *config);
|
||||
|
||||
uint8_t unpack_nr_param_response(uint8_t **ppReadPackedMsg, uint8_t *end, void *msg, nfapi_p4_p5_codec_config_t *config);
|
||||
|
||||
uint8_t pack_nr_config_request(void *msg, uint8_t **ppWritePackedMsg, uint8_t *end, nfapi_p4_p5_codec_config_t *config);
|
||||
|
||||
uint8_t unpack_nr_config_request(uint8_t **ppReadPackedMsg, uint8_t *end, void *msg, nfapi_p4_p5_codec_config_t *config);
|
||||
|
||||
@@ -661,354 +661,6 @@ static uint8_t pack_param_response(void *msg, uint8_t **ppWritePackedMsg, uint8_
|
||||
&& pack_vendor_extension_tlv(pNfapiMsg->vendor_extension, ppWritePackedMsg, end, config));
|
||||
}
|
||||
|
||||
uint8_t pack_nr_param_response(void *msg, uint8_t **ppWritePackedMsg, uint8_t *end, nfapi_p4_p5_codec_config_t *config)
|
||||
{
|
||||
printf("\nRUNNING pack_param_response\n");
|
||||
nfapi_nr_param_response_scf_t *pNfapiMsg = (nfapi_nr_param_response_scf_t *)msg;
|
||||
uint8_t retval = push8(pNfapiMsg->error_code, ppWritePackedMsg, end) && push8(pNfapiMsg->num_tlv, ppWritePackedMsg, end)
|
||||
&& pack_nr_tlv(NFAPI_NR_PARAM_TLV_RELEASE_CAPABILITY_TAG,
|
||||
&(pNfapiMsg->cell_param.release_capability),
|
||||
ppWritePackedMsg,
|
||||
end,
|
||||
&pack_uint16_tlv_value)
|
||||
&& pack_nr_tlv(NFAPI_NR_PARAM_TLV_PHY_STATE_TAG,
|
||||
&(pNfapiMsg->cell_param.phy_state),
|
||||
ppWritePackedMsg,
|
||||
end,
|
||||
&pack_uint16_tlv_value)
|
||||
&& pack_nr_tlv(NFAPI_NR_PARAM_TLV_SKIP_BLANK_DL_CONFIG_TAG,
|
||||
&(pNfapiMsg->cell_param.skip_blank_dl_config),
|
||||
ppWritePackedMsg,
|
||||
end,
|
||||
&pack_uint8_tlv_value)
|
||||
&& pack_nr_tlv(NFAPI_NR_PARAM_TLV_SKIP_BLANK_UL_CONFIG_TAG,
|
||||
&(pNfapiMsg->cell_param.skip_blank_ul_config),
|
||||
ppWritePackedMsg,
|
||||
end,
|
||||
&pack_uint8_tlv_value)
|
||||
&& pack_nr_tlv(NFAPI_NR_PARAM_TLV_NUM_CONFIG_TLVS_TO_REPORT_TAG,
|
||||
&(pNfapiMsg->cell_param.num_config_tlvs_to_report),
|
||||
ppWritePackedMsg,
|
||||
end,
|
||||
&pack_uint16_tlv_value);
|
||||
|
||||
for (int i = 0; i < pNfapiMsg->cell_param.num_config_tlvs_to_report.value; ++i) {
|
||||
/*retval &= pack_nr_tlv(pNfapiMsg->cell_param.config_tlvs_to_report_list[i].tl.tag,
|
||||
&(pNfapiMsg->cell_param.config_tlvs_to_report_list[i]),
|
||||
ppWritePackedMsg,
|
||||
end,
|
||||
&pack_uint8_tlv_value);*/
|
||||
retval &= push16(pNfapiMsg->cell_param.config_tlvs_to_report_list[i].tl.tag, ppWritePackedMsg, end);
|
||||
retval &= push8(pNfapiMsg->cell_param.config_tlvs_to_report_list[i].tl.length, ppWritePackedMsg, end);
|
||||
retval &= push8(pNfapiMsg->cell_param.config_tlvs_to_report_list[i].value, ppWritePackedMsg, end);
|
||||
// Add padding that ensures multiple of 4 bytes (SCF 225 Section 2.3.2.1)
|
||||
int padding = get_tlv_padding(pNfapiMsg->cell_param.config_tlvs_to_report_list[i].tl.length);
|
||||
NFAPI_TRACE(NFAPI_TRACE_DEBUG,
|
||||
"TLV 0x%x with padding of %d bytes\n",
|
||||
pNfapiMsg->cell_param.config_tlvs_to_report_list[i].tl.tag,
|
||||
padding);
|
||||
if (padding != 0) {
|
||||
memset(*ppWritePackedMsg, 0, padding);
|
||||
(*ppWritePackedMsg) += padding;
|
||||
}
|
||||
}
|
||||
|
||||
retval &= pack_nr_tlv(NFAPI_NR_PARAM_TLV_CYCLIC_PREFIX_TAG,
|
||||
&(pNfapiMsg->carrier_param.cyclic_prefix),
|
||||
ppWritePackedMsg,
|
||||
end,
|
||||
&pack_uint8_tlv_value)
|
||||
&& pack_nr_tlv(NFAPI_NR_PARAM_TLV_SUPPORTED_SUBCARRIER_SPACINGS_DL_TAG,
|
||||
&(pNfapiMsg->carrier_param.supported_subcarrier_spacings_dl),
|
||||
ppWritePackedMsg,
|
||||
end,
|
||||
&pack_uint16_tlv_value)
|
||||
&& pack_nr_tlv(NFAPI_NR_PARAM_TLV_SUPPORTED_BANDWIDTH_DL_TAG,
|
||||
&(pNfapiMsg->carrier_param.supported_bandwidth_dl),
|
||||
ppWritePackedMsg,
|
||||
end,
|
||||
&pack_uint16_tlv_value)
|
||||
&& pack_nr_tlv(NFAPI_NR_PARAM_TLV_SUPPORTED_SUBCARRIER_SPACINGS_UL_TAG,
|
||||
&(pNfapiMsg->carrier_param.supported_subcarrier_spacings_ul),
|
||||
ppWritePackedMsg,
|
||||
end,
|
||||
&pack_uint8_tlv_value)
|
||||
&& pack_nr_tlv(NFAPI_NR_PARAM_TLV_SUPPORTED_BANDWIDTH_UL_TAG,
|
||||
&(pNfapiMsg->carrier_param.supported_bandwidth_ul),
|
||||
ppWritePackedMsg,
|
||||
end,
|
||||
&pack_uint16_tlv_value)
|
||||
&& pack_nr_tlv(NFAPI_NR_PARAM_TLV_CCE_MAPPING_TYPE_TAG,
|
||||
&(pNfapiMsg->pdcch_param.cce_mapping_type),
|
||||
ppWritePackedMsg,
|
||||
end,
|
||||
&pack_uint8_tlv_value)
|
||||
&& pack_nr_tlv(NFAPI_NR_PARAM_TLV_CORESET_OUTSIDE_FIRST_3_OFDM_SYMS_OF_SLOT_TAG,
|
||||
&(pNfapiMsg->pdcch_param.coreset_outside_first_3_of_ofdm_syms_of_slot),
|
||||
ppWritePackedMsg,
|
||||
end,
|
||||
&pack_uint8_tlv_value)
|
||||
&& pack_nr_tlv(NFAPI_NR_PARAM_TLV_PRECODER_GRANULARITY_CORESET_TAG,
|
||||
&(pNfapiMsg->pdcch_param.coreset_precoder_granularity_coreset),
|
||||
ppWritePackedMsg,
|
||||
end,
|
||||
&pack_uint8_tlv_value)
|
||||
&& pack_nr_tlv(NFAPI_NR_PARAM_TLV_PDCCH_MU_MIMO_TAG,
|
||||
&(pNfapiMsg->pdcch_param.pdcch_mu_mimo),
|
||||
ppWritePackedMsg,
|
||||
end,
|
||||
&pack_uint8_tlv_value)
|
||||
&& pack_nr_tlv(NFAPI_NR_PARAM_TLV_PDCCH_PRECODER_CYCLING_TAG,
|
||||
&(pNfapiMsg->pdcch_param.pdcch_precoder_cycling),
|
||||
ppWritePackedMsg,
|
||||
end,
|
||||
&pack_uint8_tlv_value)
|
||||
&& pack_nr_tlv(NFAPI_NR_PARAM_TLV_MAX_PDCCHS_PER_SLOT_TAG,
|
||||
&(pNfapiMsg->pdcch_param.max_pdcch_per_slot),
|
||||
ppWritePackedMsg,
|
||||
end,
|
||||
&pack_uint8_tlv_value)
|
||||
&& pack_nr_tlv(NFAPI_NR_PARAM_TLV_PUCCH_FORMATS_TAG,
|
||||
&(pNfapiMsg->pucch_param.pucch_formats),
|
||||
ppWritePackedMsg,
|
||||
end,
|
||||
&pack_uint8_tlv_value)
|
||||
&& pack_nr_tlv(NFAPI_NR_PARAM_TLV_MAX_PUCCHS_PER_SLOT_TAG,
|
||||
&(pNfapiMsg->pucch_param.max_pucchs_per_slot),
|
||||
ppWritePackedMsg,
|
||||
end,
|
||||
&pack_uint8_tlv_value)
|
||||
&& pack_nr_tlv(NFAPI_NR_PARAM_TLV_PDSCH_MAPPING_TYPE_TAG,
|
||||
&(pNfapiMsg->pdsch_param.pdsch_mapping_type),
|
||||
ppWritePackedMsg,
|
||||
end,
|
||||
&pack_uint8_tlv_value)
|
||||
&& pack_nr_tlv(NFAPI_NR_PARAM_TLV_PDSCH_ALLOCATION_TYPES_TAG,
|
||||
&(pNfapiMsg->pdsch_param.pdsch_allocation_types),
|
||||
ppWritePackedMsg,
|
||||
end,
|
||||
&pack_uint8_tlv_value)
|
||||
&& pack_nr_tlv(NFAPI_NR_PARAM_TLV_PDSCH_VRB_TO_PRB_MAPPING_TAG,
|
||||
&(pNfapiMsg->pdsch_param.pdsch_vrb_to_prb_mapping),
|
||||
ppWritePackedMsg,
|
||||
end,
|
||||
&pack_uint8_tlv_value)
|
||||
&& pack_nr_tlv(NFAPI_NR_PARAM_TLV_PDSCH_CBG_TAG,
|
||||
&(pNfapiMsg->pdsch_param.pdsch_cbg),
|
||||
ppWritePackedMsg,
|
||||
end,
|
||||
&pack_uint8_tlv_value)
|
||||
&& pack_nr_tlv(NFAPI_NR_PARAM_TLV_PDSCH_DMRS_CONFIG_TYPES_TAG,
|
||||
&(pNfapiMsg->pdsch_param.pdsch_dmrs_config_types),
|
||||
ppWritePackedMsg,
|
||||
end,
|
||||
&pack_uint8_tlv_value)
|
||||
&& pack_nr_tlv(NFAPI_NR_PARAM_TLV_PDSCH_DMRS_MAX_LENGTH_TAG,
|
||||
&(pNfapiMsg->pdsch_param.pdsch_dmrs_max_length),
|
||||
ppWritePackedMsg,
|
||||
end,
|
||||
&pack_uint8_tlv_value)
|
||||
&& pack_nr_tlv(NFAPI_NR_PARAM_TLV_PDSCH_DMRS_ADDITIONAL_POS_TAG,
|
||||
&(pNfapiMsg->pdsch_param.pdsch_dmrs_additional_pos),
|
||||
ppWritePackedMsg,
|
||||
end,
|
||||
&pack_uint8_tlv_value)
|
||||
&& pack_nr_tlv(NFAPI_NR_PARAM_TLV_MAX_PDSCH_S_TBS_PER_SLOT_TAG,
|
||||
&(pNfapiMsg->pdsch_param.max_pdsch_tbs_per_slot),
|
||||
ppWritePackedMsg,
|
||||
end,
|
||||
&pack_uint8_tlv_value)
|
||||
&& pack_nr_tlv(NFAPI_NR_PARAM_TLV_MAX_NUMBER_MIMO_LAYERS_PDSCH_TAG,
|
||||
&(pNfapiMsg->pdsch_param.max_number_mimo_layers_pdsch),
|
||||
ppWritePackedMsg,
|
||||
end,
|
||||
&pack_uint8_tlv_value)
|
||||
&& pack_nr_tlv(NFAPI_NR_PARAM_TLV_SUPPORTED_MAX_MODULATION_ORDER_DL_TAG,
|
||||
&(pNfapiMsg->pdsch_param.supported_max_modulation_order_dl),
|
||||
ppWritePackedMsg,
|
||||
end,
|
||||
&pack_uint8_tlv_value)
|
||||
&& pack_nr_tlv(NFAPI_NR_PARAM_TLV_MAX_MU_MIMO_USERS_DL_TAG,
|
||||
&(pNfapiMsg->pdsch_param.max_mu_mimo_users_dl),
|
||||
ppWritePackedMsg,
|
||||
end,
|
||||
&pack_uint8_tlv_value)
|
||||
&& pack_nr_tlv(NFAPI_NR_PARAM_TLV_PDSCH_DATA_IN_DMRS_SYMBOLS_TAG,
|
||||
&(pNfapiMsg->pdsch_param.pdsch_data_in_dmrs_symbols),
|
||||
ppWritePackedMsg,
|
||||
end,
|
||||
&pack_uint8_tlv_value)
|
||||
&& pack_nr_tlv(NFAPI_NR_PARAM_TLV_PREMPTION_SUPPORT_TAG,
|
||||
&(pNfapiMsg->pdsch_param.premption_support),
|
||||
ppWritePackedMsg,
|
||||
end,
|
||||
&pack_uint8_tlv_value)
|
||||
&& pack_nr_tlv(NFAPI_NR_PARAM_TLV_PDSCH_NON_SLOT_SUPPORT_TAG,
|
||||
&(pNfapiMsg->pdsch_param.pdsch_non_slot_support),
|
||||
ppWritePackedMsg,
|
||||
end,
|
||||
&pack_uint8_tlv_value)
|
||||
&& pack_nr_tlv(NFAPI_NR_PARAM_TLV_UCI_MUX_ULSCH_IN_PUSCH_TAG,
|
||||
&(pNfapiMsg->pusch_param.uci_mux_ulsch_in_pusch),
|
||||
ppWritePackedMsg,
|
||||
end,
|
||||
&pack_uint8_tlv_value)
|
||||
&& pack_nr_tlv(NFAPI_NR_PARAM_TLV_UCI_ONLY_PUSCH_TAG,
|
||||
&(pNfapiMsg->pusch_param.uci_only_pusch),
|
||||
ppWritePackedMsg,
|
||||
end,
|
||||
&pack_uint8_tlv_value)
|
||||
&& pack_nr_tlv(NFAPI_NR_PARAM_TLV_PUSCH_FREQUENCY_HOPPING_TAG,
|
||||
&(pNfapiMsg->pusch_param.pusch_frequency_hopping),
|
||||
ppWritePackedMsg,
|
||||
end,
|
||||
&pack_uint8_tlv_value)
|
||||
&& pack_nr_tlv(NFAPI_NR_PARAM_TLV_PUSCH_DMRS_CONFIG_TYPES_TAG,
|
||||
&(pNfapiMsg->pusch_param.pusch_dmrs_config_types),
|
||||
ppWritePackedMsg,
|
||||
end,
|
||||
&pack_uint8_tlv_value)
|
||||
&& pack_nr_tlv(NFAPI_NR_PARAM_TLV_PUSCH_DMRS_MAX_LEN_TAG,
|
||||
&(pNfapiMsg->pusch_param.pusch_dmrs_max_len),
|
||||
ppWritePackedMsg,
|
||||
end,
|
||||
&pack_uint8_tlv_value)
|
||||
&& pack_nr_tlv(NFAPI_NR_PARAM_TLV_PUSCH_DMRS_ADDITIONAL_POS_TAG,
|
||||
&(pNfapiMsg->pusch_param.pusch_dmrs_additional_pos),
|
||||
ppWritePackedMsg,
|
||||
end,
|
||||
&pack_uint8_tlv_value)
|
||||
&& pack_nr_tlv(NFAPI_NR_PARAM_TLV_PUSCH_CBG_TAG,
|
||||
&(pNfapiMsg->pusch_param.pusch_cbg),
|
||||
ppWritePackedMsg,
|
||||
end,
|
||||
&pack_uint8_tlv_value)
|
||||
&& pack_nr_tlv(NFAPI_NR_PARAM_TLV_PUSCH_MAPPING_TYPE_TAG,
|
||||
&(pNfapiMsg->pusch_param.pusch_mapping_type),
|
||||
ppWritePackedMsg,
|
||||
end,
|
||||
&pack_uint8_tlv_value)
|
||||
&& pack_nr_tlv(NFAPI_NR_PARAM_TLV_PUSCH_ALLOCATION_TYPES_TAG,
|
||||
&(pNfapiMsg->pusch_param.pusch_allocation_types),
|
||||
ppWritePackedMsg,
|
||||
end,
|
||||
&pack_uint8_tlv_value)
|
||||
&& pack_nr_tlv(NFAPI_NR_PARAM_TLV_PUSCH_VRB_TO_PRB_MAPPING_TAG,
|
||||
&(pNfapiMsg->pusch_param.pusch_vrb_to_prb_mapping),
|
||||
ppWritePackedMsg,
|
||||
end,
|
||||
&pack_uint8_tlv_value)
|
||||
&& pack_nr_tlv(NFAPI_NR_PARAM_TLV_PUSCH_MAX_PTRS_PORTS_TAG,
|
||||
&(pNfapiMsg->pusch_param.pusch_max_ptrs_ports),
|
||||
ppWritePackedMsg,
|
||||
end,
|
||||
&pack_uint8_tlv_value)
|
||||
&& pack_nr_tlv(NFAPI_NR_PARAM_TLV_MAX_PDUSCHS_TBS_PER_SLOT_TAG,
|
||||
&(pNfapiMsg->pusch_param.max_pduschs_tbs_per_slot),
|
||||
ppWritePackedMsg,
|
||||
end,
|
||||
&pack_uint8_tlv_value)
|
||||
&& pack_nr_tlv(NFAPI_NR_PARAM_TLV_MAX_NUMBER_MIMO_LAYERS_NON_CB_PUSCH_TAG,
|
||||
&(pNfapiMsg->pusch_param.max_number_mimo_layers_non_cb_pusch),
|
||||
ppWritePackedMsg,
|
||||
end,
|
||||
&pack_uint8_tlv_value)
|
||||
&& pack_nr_tlv(NFAPI_NR_PARAM_TLV_SUPPORTED_MODULATION_ORDER_UL_TAG,
|
||||
&(pNfapiMsg->pusch_param.supported_modulation_order_ul),
|
||||
ppWritePackedMsg,
|
||||
end,
|
||||
&pack_uint8_tlv_value)
|
||||
&& pack_nr_tlv(NFAPI_NR_PARAM_TLV_MAX_MU_MIMO_USERS_UL_TAG,
|
||||
&(pNfapiMsg->pusch_param.max_mu_mimo_users_ul),
|
||||
ppWritePackedMsg,
|
||||
end,
|
||||
&pack_uint8_tlv_value)
|
||||
&& pack_nr_tlv(NFAPI_NR_PARAM_TLV_DFTS_OFDM_SUPPORT_TAG,
|
||||
&(pNfapiMsg->pusch_param.dfts_ofdm_support),
|
||||
ppWritePackedMsg,
|
||||
end,
|
||||
&pack_uint8_tlv_value)
|
||||
&& pack_nr_tlv(NFAPI_NR_PARAM_TLV_PUSCH_AGGREGATION_FACTOR_TAG,
|
||||
&(pNfapiMsg->pusch_param.pusch_aggregation_factor),
|
||||
ppWritePackedMsg,
|
||||
end,
|
||||
&pack_uint8_tlv_value)
|
||||
&& pack_nr_tlv(NFAPI_NR_PARAM_TLV_PRACH_LONG_FORMATS_TAG,
|
||||
&(pNfapiMsg->prach_param.prach_long_formats),
|
||||
ppWritePackedMsg,
|
||||
end,
|
||||
&pack_uint8_tlv_value)
|
||||
&& pack_nr_tlv(NFAPI_NR_PARAM_TLV_PRACH_SHORT_FORMATS_TAG,
|
||||
&(pNfapiMsg->prach_param.prach_short_formats),
|
||||
ppWritePackedMsg,
|
||||
end,
|
||||
&pack_uint16_tlv_value)
|
||||
&& pack_nr_tlv(NFAPI_NR_PARAM_TLV_PRACH_RESTRICTED_SETS_TAG,
|
||||
&(pNfapiMsg->prach_param.prach_restricted_sets),
|
||||
ppWritePackedMsg,
|
||||
end,
|
||||
&pack_uint8_tlv_value)
|
||||
&& pack_nr_tlv(NFAPI_NR_PARAM_TLV_MAX_PRACH_FD_OCCASIONS_IN_A_SLOT_TAG,
|
||||
&(pNfapiMsg->prach_param.max_prach_fd_occasions_in_a_slot),
|
||||
ppWritePackedMsg,
|
||||
end,
|
||||
&pack_uint8_tlv_value)
|
||||
&& pack_nr_tlv(NFAPI_NR_PARAM_TLV_RSSI_MEASUREMENT_SUPPORT_TAG,
|
||||
&(pNfapiMsg->measurement_param.rssi_measurement_support),
|
||||
ppWritePackedMsg,
|
||||
end,
|
||||
&pack_uint8_tlv_value)
|
||||
&&
|
||||
// config:
|
||||
pack_nr_tlv(NFAPI_NR_NFAPI_P7_VNF_ADDRESS_IPV4_TAG,
|
||||
&(pNfapiMsg->nfapi_config.p7_vnf_address_ipv4),
|
||||
ppWritePackedMsg,
|
||||
end,
|
||||
&pack_ipv4_address_value)
|
||||
&& pack_nr_tlv(NFAPI_NR_NFAPI_P7_VNF_ADDRESS_IPV6_TAG,
|
||||
&(pNfapiMsg->nfapi_config.p7_vnf_address_ipv6),
|
||||
ppWritePackedMsg,
|
||||
end,
|
||||
&pack_ipv6_address_value)
|
||||
&& pack_nr_tlv(NFAPI_NR_NFAPI_P7_VNF_PORT_TAG,
|
||||
&(pNfapiMsg->nfapi_config.p7_vnf_port),
|
||||
ppWritePackedMsg,
|
||||
end,
|
||||
&pack_uint16_tlv_value)
|
||||
&& pack_nr_tlv(NFAPI_NR_NFAPI_P7_PNF_ADDRESS_IPV4_TAG,
|
||||
&(pNfapiMsg->nfapi_config.p7_pnf_address_ipv4),
|
||||
ppWritePackedMsg,
|
||||
end,
|
||||
&pack_ipv4_address_value)
|
||||
&& pack_nr_tlv(NFAPI_NR_NFAPI_P7_PNF_ADDRESS_IPV6_TAG,
|
||||
&(pNfapiMsg->nfapi_config.p7_pnf_address_ipv6),
|
||||
ppWritePackedMsg,
|
||||
end,
|
||||
&pack_ipv6_address_value)
|
||||
&& pack_nr_tlv(NFAPI_NR_NFAPI_P7_PNF_PORT_TAG,
|
||||
&(pNfapiMsg->nfapi_config.p7_pnf_port),
|
||||
ppWritePackedMsg,
|
||||
end,
|
||||
&pack_uint16_tlv_value)
|
||||
&& pack_nr_tlv(NFAPI_NR_NFAPI_TIMING_WINDOW_TAG,
|
||||
&(pNfapiMsg->nfapi_config.timing_window),
|
||||
ppWritePackedMsg,
|
||||
end,
|
||||
&pack_uint8_tlv_value)
|
||||
&& pack_nr_tlv(NFAPI_NR_NFAPI_TIMING_INFO_MODE_TAG,
|
||||
&(pNfapiMsg->nfapi_config.timing_info_mode),
|
||||
ppWritePackedMsg,
|
||||
end,
|
||||
&pack_uint8_tlv_value)
|
||||
&& pack_nr_tlv(NFAPI_NR_NFAPI_TIMING_INFO_PERIOD_TAG,
|
||||
&(pNfapiMsg->nfapi_config.timing_info_period),
|
||||
ppWritePackedMsg,
|
||||
end,
|
||||
&pack_uint8_tlv_value)
|
||||
&& pack_vendor_extension_tlv(pNfapiMsg->vendor_extension, ppWritePackedMsg, end, config);
|
||||
return retval;
|
||||
}
|
||||
|
||||
static uint8_t pack_config_request(void *msg, uint8_t **ppWritePackedMsg, uint8_t *end, nfapi_p4_p5_codec_config_t *config)
|
||||
{
|
||||
nfapi_config_request_t *pNfapiMsg = (nfapi_config_request_t *)msg;
|
||||
@@ -2614,170 +2266,6 @@ static uint8_t unpack_param_response(uint8_t **ppReadPackedMsg, uint8_t *end, vo
|
||||
config,
|
||||
&pNfapiMsg->vendor_extension));
|
||||
}
|
||||
static uint8_t unpack_config_tlvs_to_report(void *tlv, uint8_t **ppReadPackedMsg, uint8_t *end)
|
||||
{
|
||||
uint8_t *pStartOfValue = *ppReadPackedMsg;
|
||||
nfapi_nr_cell_param_t *cellParamTable = (nfapi_nr_cell_param_t *)tlv;
|
||||
uint8_t retval = pull16(ppReadPackedMsg, &cellParamTable->num_config_tlvs_to_report.value, end);
|
||||
|
||||
// check if the length was right;
|
||||
if (cellParamTable->num_config_tlvs_to_report.tl.length != (*ppReadPackedMsg - pStartOfValue)) {
|
||||
NFAPI_TRACE(NFAPI_TRACE_ERROR,
|
||||
"Warning tlv tag 0x%x length %d not equal to unpack %ld\n",
|
||||
cellParamTable->num_config_tlvs_to_report.tl.tag,
|
||||
cellParamTable->num_config_tlvs_to_report.tl.length,
|
||||
(*ppReadPackedMsg - pStartOfValue));
|
||||
}
|
||||
// Remove padding that ensures multiple of 4 bytes (SCF 225 Section 2.3.2.1)
|
||||
int padding = get_tlv_padding(cellParamTable->num_config_tlvs_to_report.tl.length);
|
||||
if (padding != 0) {
|
||||
(*ppReadPackedMsg) += padding;
|
||||
}
|
||||
|
||||
// after this value, get the tlv list
|
||||
cellParamTable->config_tlvs_to_report_list = calloc(cellParamTable->num_config_tlvs_to_report.value, sizeof(nfapi_uint8_tlv_t *));
|
||||
|
||||
for (int i = 0; i < cellParamTable->num_config_tlvs_to_report.value; ++i) {
|
||||
pull16(ppReadPackedMsg, &cellParamTable->config_tlvs_to_report_list[i].tl.tag, end);
|
||||
pull8(ppReadPackedMsg, (uint8_t *)&cellParamTable->config_tlvs_to_report_list[i].tl.length, end);
|
||||
pull8(ppReadPackedMsg, &cellParamTable->config_tlvs_to_report_list[i].value, end);
|
||||
// Remove padding that ensures multiple of 4 bytes (SCF 225 Section 2.3.2.1)
|
||||
padding = get_tlv_padding(cellParamTable->config_tlvs_to_report_list[i].tl.length);
|
||||
if (padding != 0) {
|
||||
(*ppReadPackedMsg) += padding;
|
||||
}
|
||||
}
|
||||
return retval;
|
||||
}
|
||||
|
||||
uint8_t unpack_nr_param_response(uint8_t **ppReadPackedMsg, uint8_t *end, void *msg, nfapi_p4_p5_codec_config_t *config)
|
||||
{
|
||||
nfapi_nr_param_response_scf_t *pNfapiMsg = (nfapi_nr_param_response_scf_t *)msg;
|
||||
unpack_tlv_t unpack_fns[] = {
|
||||
{NFAPI_NR_PARAM_TLV_RELEASE_CAPABILITY_TAG, &(pNfapiMsg->cell_param.release_capability), &unpack_uint16_tlv_value},
|
||||
{NFAPI_NR_PARAM_TLV_PHY_STATE_TAG, &(pNfapiMsg->cell_param.phy_state), &unpack_uint16_tlv_value},
|
||||
{NFAPI_NR_PARAM_TLV_SKIP_BLANK_DL_CONFIG_TAG, &(pNfapiMsg->cell_param.skip_blank_dl_config), &unpack_uint8_tlv_value},
|
||||
{NFAPI_NR_PARAM_TLV_SKIP_BLANK_UL_CONFIG_TAG, &(pNfapiMsg->cell_param.skip_blank_ul_config), &unpack_uint8_tlv_value},
|
||||
{NFAPI_NR_PARAM_TLV_NUM_CONFIG_TLVS_TO_REPORT_TAG, &(pNfapiMsg->cell_param), &unpack_config_tlvs_to_report},
|
||||
|
||||
{NFAPI_NR_PARAM_TLV_CYCLIC_PREFIX_TAG, &(pNfapiMsg->carrier_param.cyclic_prefix), &unpack_uint8_tlv_value},
|
||||
{NFAPI_NR_PARAM_TLV_SUPPORTED_SUBCARRIER_SPACINGS_DL_TAG,
|
||||
&(pNfapiMsg->carrier_param.supported_subcarrier_spacings_dl),
|
||||
&unpack_uint16_tlv_value},
|
||||
{NFAPI_NR_PARAM_TLV_SUPPORTED_BANDWIDTH_DL_TAG, &(pNfapiMsg->carrier_param.supported_bandwidth_dl), &unpack_uint16_tlv_value},
|
||||
{NFAPI_NR_PARAM_TLV_SUPPORTED_SUBCARRIER_SPACINGS_UL_TAG,
|
||||
&(pNfapiMsg->carrier_param.supported_subcarrier_spacings_ul),
|
||||
&unpack_uint8_tlv_value},
|
||||
{NFAPI_NR_PARAM_TLV_SUPPORTED_BANDWIDTH_UL_TAG, &(pNfapiMsg->carrier_param.supported_bandwidth_ul), &unpack_uint16_tlv_value},
|
||||
|
||||
{NFAPI_NR_PARAM_TLV_CCE_MAPPING_TYPE_TAG, &(pNfapiMsg->pdcch_param.cce_mapping_type), &unpack_uint8_tlv_value},
|
||||
{NFAPI_NR_PARAM_TLV_CORESET_OUTSIDE_FIRST_3_OFDM_SYMS_OF_SLOT_TAG,
|
||||
&(pNfapiMsg->pdcch_param.coreset_outside_first_3_of_ofdm_syms_of_slot),
|
||||
&unpack_uint8_tlv_value},
|
||||
{NFAPI_NR_PARAM_TLV_PRECODER_GRANULARITY_CORESET_TAG,
|
||||
&(pNfapiMsg->pdcch_param.coreset_precoder_granularity_coreset),
|
||||
&unpack_uint8_tlv_value},
|
||||
{NFAPI_NR_PARAM_TLV_PDCCH_MU_MIMO_TAG, &(pNfapiMsg->pdcch_param.pdcch_mu_mimo), &unpack_uint8_tlv_value},
|
||||
{NFAPI_NR_PARAM_TLV_PDCCH_PRECODER_CYCLING_TAG, &(pNfapiMsg->pdcch_param.pdcch_precoder_cycling), &unpack_uint8_tlv_value},
|
||||
{NFAPI_NR_PARAM_TLV_MAX_PDCCHS_PER_SLOT_TAG, &(pNfapiMsg->pdcch_param.max_pdcch_per_slot), &unpack_uint8_tlv_value},
|
||||
|
||||
{NFAPI_NR_PARAM_TLV_PUCCH_FORMATS_TAG, &(pNfapiMsg->pucch_param.pucch_formats), &unpack_uint8_tlv_value},
|
||||
{NFAPI_NR_PARAM_TLV_MAX_PUCCHS_PER_SLOT_TAG, &(pNfapiMsg->pucch_param.max_pucchs_per_slot), &unpack_uint8_tlv_value},
|
||||
|
||||
{NFAPI_NR_PARAM_TLV_PDSCH_MAPPING_TYPE_TAG, &(pNfapiMsg->pdsch_param.pdsch_mapping_type), &unpack_uint8_tlv_value},
|
||||
{NFAPI_NR_PARAM_TLV_PDSCH_ALLOCATION_TYPES_TAG, &(pNfapiMsg->pdsch_param.pdsch_allocation_types), &unpack_uint8_tlv_value},
|
||||
{NFAPI_NR_PARAM_TLV_PDSCH_VRB_TO_PRB_MAPPING_TAG,
|
||||
&(pNfapiMsg->pdsch_param.pdsch_vrb_to_prb_mapping),
|
||||
&unpack_uint8_tlv_value},
|
||||
{NFAPI_NR_PARAM_TLV_PDSCH_CBG_TAG, &(pNfapiMsg->pdsch_param.pdsch_cbg), &unpack_uint8_tlv_value},
|
||||
{NFAPI_NR_PARAM_TLV_PDSCH_DMRS_CONFIG_TYPES_TAG, &(pNfapiMsg->pdsch_param.pdsch_dmrs_config_types), &unpack_uint8_tlv_value},
|
||||
{NFAPI_NR_PARAM_TLV_PDSCH_DMRS_MAX_LENGTH_TAG, &(pNfapiMsg->pdsch_param.pdsch_dmrs_max_length), &unpack_uint8_tlv_value},
|
||||
{NFAPI_NR_PARAM_TLV_PDSCH_DMRS_ADDITIONAL_POS_TAG,
|
||||
&(pNfapiMsg->pdsch_param.pdsch_dmrs_additional_pos),
|
||||
&unpack_uint8_tlv_value},
|
||||
{NFAPI_NR_PARAM_TLV_MAX_PDSCH_S_TBS_PER_SLOT_TAG, &(pNfapiMsg->pdsch_param.max_pdsch_tbs_per_slot), &unpack_uint8_tlv_value},
|
||||
{NFAPI_NR_PARAM_TLV_MAX_NUMBER_MIMO_LAYERS_PDSCH_TAG,
|
||||
&(pNfapiMsg->pdsch_param.max_number_mimo_layers_pdsch),
|
||||
&unpack_uint8_tlv_value},
|
||||
{NFAPI_NR_PARAM_TLV_SUPPORTED_MAX_MODULATION_ORDER_DL_TAG,
|
||||
&(pNfapiMsg->pdsch_param.supported_max_modulation_order_dl),
|
||||
&unpack_uint8_tlv_value},
|
||||
{NFAPI_NR_PARAM_TLV_MAX_MU_MIMO_USERS_DL_TAG, &(pNfapiMsg->pdsch_param.max_mu_mimo_users_dl), &unpack_uint8_tlv_value},
|
||||
{NFAPI_NR_PARAM_TLV_PDSCH_DATA_IN_DMRS_SYMBOLS_TAG,
|
||||
&(pNfapiMsg->pdsch_param.pdsch_data_in_dmrs_symbols),
|
||||
&unpack_uint8_tlv_value},
|
||||
{NFAPI_NR_PARAM_TLV_PREMPTION_SUPPORT_TAG, &(pNfapiMsg->pdsch_param.premption_support), &unpack_uint8_tlv_value},
|
||||
{NFAPI_NR_PARAM_TLV_PDSCH_NON_SLOT_SUPPORT_TAG, &(pNfapiMsg->pdsch_param.pdsch_non_slot_support), &unpack_uint8_tlv_value},
|
||||
|
||||
{NFAPI_NR_PARAM_TLV_UCI_MUX_ULSCH_IN_PUSCH_TAG, &(pNfapiMsg->pusch_param.uci_mux_ulsch_in_pusch), &unpack_uint8_tlv_value},
|
||||
{NFAPI_NR_PARAM_TLV_UCI_ONLY_PUSCH_TAG, &(pNfapiMsg->pusch_param.uci_only_pusch), &unpack_uint8_tlv_value},
|
||||
{NFAPI_NR_PARAM_TLV_PUSCH_FREQUENCY_HOPPING_TAG, &(pNfapiMsg->pusch_param.pusch_frequency_hopping), &unpack_uint8_tlv_value},
|
||||
{NFAPI_NR_PARAM_TLV_PUSCH_DMRS_CONFIG_TYPES_TAG, &(pNfapiMsg->pusch_param.pusch_dmrs_config_types), &unpack_uint8_tlv_value},
|
||||
{NFAPI_NR_PARAM_TLV_PUSCH_DMRS_MAX_LEN_TAG, &(pNfapiMsg->pusch_param.pusch_dmrs_max_len), &unpack_uint8_tlv_value},
|
||||
{NFAPI_NR_PARAM_TLV_PUSCH_DMRS_ADDITIONAL_POS_TAG,
|
||||
&(pNfapiMsg->pusch_param.pusch_dmrs_additional_pos),
|
||||
&unpack_uint8_tlv_value},
|
||||
{NFAPI_NR_PARAM_TLV_PUSCH_CBG_TAG, &(pNfapiMsg->pusch_param.pusch_cbg), &unpack_uint8_tlv_value},
|
||||
{NFAPI_NR_PARAM_TLV_PUSCH_MAPPING_TYPE_TAG, &(pNfapiMsg->pusch_param.pusch_mapping_type), &unpack_uint8_tlv_value},
|
||||
{NFAPI_NR_PARAM_TLV_PUSCH_ALLOCATION_TYPES_TAG, &(pNfapiMsg->pusch_param.pusch_allocation_types), &unpack_uint8_tlv_value},
|
||||
{NFAPI_NR_PARAM_TLV_PUSCH_VRB_TO_PRB_MAPPING_TAG,
|
||||
&(pNfapiMsg->pusch_param.pusch_vrb_to_prb_mapping),
|
||||
&unpack_uint8_tlv_value},
|
||||
{NFAPI_NR_PARAM_TLV_PUSCH_MAX_PTRS_PORTS_TAG, &(pNfapiMsg->pusch_param.pusch_max_ptrs_ports), &unpack_uint8_tlv_value},
|
||||
{NFAPI_NR_PARAM_TLV_MAX_PDUSCHS_TBS_PER_SLOT_TAG,
|
||||
&(pNfapiMsg->pusch_param.max_pduschs_tbs_per_slot),
|
||||
&unpack_uint8_tlv_value},
|
||||
{NFAPI_NR_PARAM_TLV_MAX_NUMBER_MIMO_LAYERS_NON_CB_PUSCH_TAG,
|
||||
&(pNfapiMsg->pusch_param.max_number_mimo_layers_non_cb_pusch),
|
||||
&unpack_uint8_tlv_value},
|
||||
{NFAPI_NR_PARAM_TLV_SUPPORTED_MODULATION_ORDER_UL_TAG,
|
||||
&(pNfapiMsg->pusch_param.supported_modulation_order_ul),
|
||||
&unpack_uint8_tlv_value},
|
||||
{NFAPI_NR_PARAM_TLV_MAX_MU_MIMO_USERS_UL_TAG, &(pNfapiMsg->pusch_param.max_mu_mimo_users_ul), &unpack_uint8_tlv_value},
|
||||
{NFAPI_NR_PARAM_TLV_DFTS_OFDM_SUPPORT_TAG, &(pNfapiMsg->pusch_param.dfts_ofdm_support), &unpack_uint8_tlv_value},
|
||||
{NFAPI_NR_PARAM_TLV_PUSCH_AGGREGATION_FACTOR_TAG,
|
||||
&(pNfapiMsg->pusch_param.pusch_aggregation_factor),
|
||||
&unpack_uint8_tlv_value},
|
||||
|
||||
{NFAPI_NR_PARAM_TLV_PRACH_LONG_FORMATS_TAG, &(pNfapiMsg->prach_param.prach_long_formats), &unpack_uint8_tlv_value},
|
||||
{NFAPI_NR_PARAM_TLV_PRACH_SHORT_FORMATS_TAG, &(pNfapiMsg->prach_param.prach_short_formats), &unpack_uint16_tlv_value},
|
||||
{NFAPI_NR_PARAM_TLV_PRACH_RESTRICTED_SETS_TAG, &(pNfapiMsg->prach_param.prach_restricted_sets), &unpack_uint8_tlv_value},
|
||||
{NFAPI_NR_PARAM_TLV_MAX_PRACH_FD_OCCASIONS_IN_A_SLOT_TAG,
|
||||
&(pNfapiMsg->prach_param.max_prach_fd_occasions_in_a_slot),
|
||||
&unpack_uint8_tlv_value},
|
||||
|
||||
{NFAPI_NR_PARAM_TLV_RSSI_MEASUREMENT_SUPPORT_TAG,
|
||||
&(pNfapiMsg->measurement_param.rssi_measurement_support),
|
||||
&unpack_uint8_tlv_value},
|
||||
// config
|
||||
{NFAPI_NR_NFAPI_P7_VNF_ADDRESS_IPV4_TAG, &pNfapiMsg->nfapi_config.p7_vnf_address_ipv4, &unpack_ipv4_address_value},
|
||||
{NFAPI_NR_NFAPI_P7_VNF_ADDRESS_IPV6_TAG, &pNfapiMsg->nfapi_config.p7_vnf_address_ipv6, &unpack_ipv6_address_value},
|
||||
{NFAPI_NR_NFAPI_P7_VNF_PORT_TAG, &pNfapiMsg->nfapi_config.p7_vnf_port, &unpack_uint16_tlv_value},
|
||||
{NFAPI_NR_NFAPI_P7_PNF_ADDRESS_IPV4_TAG, &pNfapiMsg->nfapi_config.p7_pnf_address_ipv4, &unpack_ipv4_address_value},
|
||||
{NFAPI_NR_NFAPI_P7_PNF_ADDRESS_IPV6_TAG, &pNfapiMsg->nfapi_config.p7_pnf_address_ipv6, &unpack_ipv6_address_value},
|
||||
{NFAPI_NR_NFAPI_P7_PNF_PORT_TAG, &pNfapiMsg->nfapi_config.p7_pnf_port, &unpack_uint16_tlv_value},
|
||||
{NFAPI_NR_NFAPI_TIMING_WINDOW_TAG, &pNfapiMsg->nfapi_config.timing_window, &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},
|
||||
};
|
||||
// print ppReadPackedMsg
|
||||
uint8_t *ptr = *ppReadPackedMsg;
|
||||
printf("\n Read message unpack_param_response: ");
|
||||
|
||||
while (ptr < end) {
|
||||
printf(" 0x%02x", *ptr);
|
||||
ptr++;
|
||||
}
|
||||
|
||||
printf("\n");
|
||||
return (pull8(ppReadPackedMsg, &pNfapiMsg->error_code, end) && pull8(ppReadPackedMsg, &pNfapiMsg->num_tlv, end)
|
||||
&& unpack_nr_tlv_list(unpack_fns,
|
||||
sizeof(unpack_fns) / sizeof(unpack_tlv_t),
|
||||
ppReadPackedMsg,
|
||||
end,
|
||||
config,
|
||||
&pNfapiMsg->vendor_extension));
|
||||
}
|
||||
|
||||
static uint8_t unpack_config_request(uint8_t **ppReadPackedMsg, uint8_t *end, void *msg, nfapi_p4_p5_codec_config_t *config)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user