Add utility functions related to ERROR.indication
This commit is contained in:
committed by
Rúben Soares Silva
parent
1d6dc56797
commit
c95c12e874
@@ -71,6 +71,7 @@ bool eq_start_request(const nfapi_nr_start_request_scf_t *unpacked_req, const nf
|
|||||||
bool eq_start_response(const nfapi_nr_start_response_scf_t *unpacked_req, const nfapi_nr_start_response_scf_t *req);
|
bool eq_start_response(const nfapi_nr_start_response_scf_t *unpacked_req, const nfapi_nr_start_response_scf_t *req);
|
||||||
bool eq_stop_request(const nfapi_nr_stop_request_scf_t *unpacked_req, const nfapi_nr_stop_request_scf_t *req);
|
bool eq_stop_request(const nfapi_nr_stop_request_scf_t *unpacked_req, const nfapi_nr_stop_request_scf_t *req);
|
||||||
bool eq_stop_indication(const nfapi_nr_stop_indication_scf_t *unpacked_req, const nfapi_nr_stop_indication_scf_t *req);
|
bool eq_stop_indication(const nfapi_nr_stop_indication_scf_t *unpacked_req, const nfapi_nr_stop_indication_scf_t *req);
|
||||||
|
bool eq_error_indication(const nfapi_nr_error_indication_scf_t *unpacked_req, const nfapi_nr_error_indication_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 free_param_response(nfapi_nr_param_response_scf_t *msg);
|
||||||
@@ -80,6 +81,7 @@ void free_start_request(nfapi_nr_start_request_scf_t *msg);
|
|||||||
void free_start_response(nfapi_nr_start_response_scf_t *msg);
|
void free_start_response(nfapi_nr_start_response_scf_t *msg);
|
||||||
void free_stop_request(nfapi_nr_stop_request_scf_t *msg);
|
void free_stop_request(nfapi_nr_stop_request_scf_t *msg);
|
||||||
void free_stop_indication(nfapi_nr_stop_indication_scf_t *msg);
|
void free_stop_indication(nfapi_nr_stop_indication_scf_t *msg);
|
||||||
|
void free_error_indication(nfapi_nr_error_indication_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);
|
void copy_param_response(const nfapi_nr_param_response_scf_t *src, nfapi_nr_param_response_scf_t *dst);
|
||||||
@@ -89,5 +91,6 @@ void copy_start_request(const nfapi_nr_start_request_scf_t *src, nfapi_nr_start_
|
|||||||
void copy_start_response(const nfapi_nr_start_response_scf_t *src, nfapi_nr_start_response_scf_t *dst);
|
void copy_start_response(const nfapi_nr_start_response_scf_t *src, nfapi_nr_start_response_scf_t *dst);
|
||||||
void copy_stop_request(const nfapi_nr_stop_request_scf_t *src, nfapi_nr_stop_request_scf_t *dst);
|
void copy_stop_request(const nfapi_nr_stop_request_scf_t *src, nfapi_nr_stop_request_scf_t *dst);
|
||||||
void copy_stop_indication(const nfapi_nr_stop_indication_scf_t *src, nfapi_nr_stop_indication_scf_t *dst);
|
void copy_stop_indication(const nfapi_nr_stop_indication_scf_t *src, nfapi_nr_stop_indication_scf_t *dst);
|
||||||
|
void copy_error_indication(const nfapi_nr_error_indication_scf_t *src, nfapi_nr_error_indication_scf_t *dst);
|
||||||
|
|
||||||
#endif // OPENAIRINTERFACE_NR_FAPI_P5_UTILS_H
|
#endif // OPENAIRINTERFACE_NR_FAPI_P5_UTILS_H
|
||||||
|
|||||||
@@ -397,6 +397,17 @@ bool eq_stop_indication(const nfapi_nr_stop_indication_scf_t *unpacked_req, cons
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool eq_error_indication(const nfapi_nr_error_indication_scf_t *unpacked_req, const nfapi_nr_error_indication_scf_t *req)
|
||||||
|
{
|
||||||
|
EQ(unpacked_req->header.message_id, req->header.message_id);
|
||||||
|
EQ(unpacked_req->header.message_length, req->header.message_length);
|
||||||
|
EQ(unpacked_req->sfn, req->sfn);
|
||||||
|
EQ(unpacked_req->slot, req->slot);
|
||||||
|
EQ(unpacked_req->message_id, req->message_id);
|
||||||
|
EQ(unpacked_req->error_code, req->error_code);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
void free_param_request(nfapi_nr_param_request_scf_t *msg)
|
void free_param_request(nfapi_nr_param_request_scf_t *msg)
|
||||||
{
|
{
|
||||||
if (msg->vendor_extension) {
|
if (msg->vendor_extension) {
|
||||||
@@ -494,6 +505,13 @@ void free_stop_indication(nfapi_nr_stop_indication_scf_t *msg)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void free_error_indication(nfapi_nr_error_indication_scf_t *msg)
|
||||||
|
{
|
||||||
|
if (msg->vendor_extension) {
|
||||||
|
free(msg->vendor_extension);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
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)
|
||||||
{
|
{
|
||||||
dst->header.message_id = src->header.message_id;
|
dst->header.message_id = src->header.message_id;
|
||||||
@@ -934,3 +952,20 @@ void copy_stop_indication(const nfapi_nr_stop_indication_scf_t *src, nfapi_nr_st
|
|||||||
copy_vendor_extension_value(&dst->vendor_extension, &src->vendor_extension);
|
copy_vendor_extension_value(&dst->vendor_extension, &src->vendor_extension);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void copy_error_indication(const nfapi_nr_error_indication_scf_t *src, nfapi_nr_error_indication_scf_t *dst)
|
||||||
|
{
|
||||||
|
dst->header.message_id = src->header.message_id;
|
||||||
|
dst->header.message_length = src->header.message_length;
|
||||||
|
if (src->vendor_extension) {
|
||||||
|
dst->vendor_extension = calloc(1, sizeof(nfapi_vendor_extension_tlv_t));
|
||||||
|
dst->vendor_extension->tag = src->vendor_extension->tag;
|
||||||
|
dst->vendor_extension->length = src->vendor_extension->length;
|
||||||
|
copy_vendor_extension_value(&dst->vendor_extension, &src->vendor_extension);
|
||||||
|
}
|
||||||
|
|
||||||
|
dst->sfn = src->sfn;
|
||||||
|
dst->slot = src->slot;
|
||||||
|
dst->message_id = src->message_id;
|
||||||
|
dst->error_code = src->error_code;
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user