Commit d32f43ba authored by Rúben Soares da Silva's avatar Rúben Soares da Silva Committed by Rúben Soares Silva

Fix packing/unpacking procedures for PARAM.response

Add utility functions related to PARAM.response
parent 94ec1daa
...@@ -808,6 +808,20 @@ int unpack_nr_tlv_list(unpack_tlv_t unpack_fns[], ...@@ -808,6 +808,20 @@ int unpack_nr_tlv_list(unpack_tlv_t unpack_fns[],
for (idx = 0; idx < size; ++idx) { for (idx = 0; idx < size; ++idx) {
if (unpack_fns[idx].tag == generic_tl.tag) { // match the extracted tag value with all the tags in unpack_fn list if (unpack_fns[idx].tag == generic_tl.tag) { // match the extracted tag value with all the tags in unpack_fn list
tagMatch = 1; tagMatch = 1;
if (generic_tl.tag == NFAPI_NR_PARAM_TLV_NUM_CONFIG_TLVS_TO_REPORT_TAG) {
//padding and sub tlvs handled already
nfapi_nr_cell_param_t *cellParamTable = (nfapi_nr_cell_param_t* )unpack_fns[idx].tlv;
cellParamTable->num_config_tlvs_to_report.tl.tag = generic_tl.tag;
cellParamTable->num_config_tlvs_to_report.tl.length = generic_tl.length;
int result = (*unpack_fns[idx].unpack_func)(unpack_fns[idx].tlv, ppReadPackedMsg, end);
if (result == 0) {
return 0;
}
continue;
}
nfapi_tl_t *tl = (nfapi_tl_t *)(unpack_fns[idx].tlv); nfapi_tl_t *tl = (nfapi_tl_t *)(unpack_fns[idx].tlv);
tl->tag = generic_tl.tag; tl->tag = generic_tl.tag;
tl->length = generic_tl.length; tl->length = generic_tl.length;
......
...@@ -38,9 +38,12 @@ ...@@ -38,9 +38,12 @@
#define CMP(_a,_b) do{ if((_a) != (_b)){ return -1; } }while(0) #define CMP(_a,_b) do{ if((_a) != (_b)){ return -1; } }while(0)
bool compare_param_request(const nfapi_nr_param_request_scf_t *unpacked_req, const nfapi_nr_param_request_scf_t *req); bool compare_param_request(const nfapi_nr_param_request_scf_t *unpacked_req, const nfapi_nr_param_request_scf_t *req);
bool compare_param_response(const nfapi_nr_param_response_scf_t *unpacked_req, const nfapi_nr_param_response_scf_t *req);
void free_param_request(nfapi_nr_param_request_scf_t *msg); void free_param_request(nfapi_nr_param_request_scf_t *msg);
void free_param_response(nfapi_nr_param_response_scf_t *msg);
void copy_param_request(const nfapi_nr_param_request_scf_t *src, nfapi_nr_param_request_scf_t *dst); void copy_param_request(const nfapi_nr_param_request_scf_t *src, nfapi_nr_param_request_scf_t *dst);
void copy_param_response(const nfapi_nr_param_response_scf_t *src, nfapi_nr_param_response_scf_t *dst);
#endif // OPENAIRINTERFACE_NR_FAPI_P5_UTILS_H #endif // OPENAIRINTERFACE_NR_FAPI_P5_UTILS_H
This diff is collapsed.
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