diff --git a/nfapi/open-nFAPI/fapi/inc/nr_fapi.h b/nfapi/open-nFAPI/fapi/inc/nr_fapi.h index 322c09b59c..c26756fad0 100644 --- a/nfapi/open-nFAPI/fapi/inc/nr_fapi.h +++ b/nfapi/open-nFAPI/fapi/inc/nr_fapi.h @@ -18,16 +18,6 @@ * For more information about the OpenAirInterface (OAI) Software Alliance: * contact@openairinterface.org */ -/*! \file nfapi/open-nFAPI/fapi/inc/nr_fapi.h - * \brief - * \author Ruben S. Silva - * \date 2024 - * \version 0.1 - * \company OpenAirInterface Software Alliance - * \email: contact@openairinterface.org, rsilva@allbesmart.pt - * \note - * \warning - */ #ifndef OPENAIRINTERFACE_NR_FAPI_H #define OPENAIRINTERFACE_NR_FAPI_H @@ -50,23 +40,10 @@ typedef struct { uint32_t message_length; } fapi_message_header_t; -int fapi_nr_p5_message_header_unpack(uint8_t **pMessageBuf, - uint32_t messageBufLen, - void *pUnpackedBuf, - uint32_t unpackedBufLen, - nfapi_p4_p5_codec_config_t *config); +int fapi_nr_message_header_unpack(uint8_t **pMessageBuf, + uint32_t messageBufLen, + void *pUnpackedBuf, + uint32_t unpackedBufLen, + nfapi_p4_p5_codec_config_t *config); -int fapi_nr_p5_message_pack(void *pMessageBuf, - uint32_t messageBufLen, - void *pPackedBuf, - uint32_t packedBufLen, - nfapi_p4_p5_codec_config_t *config); - -int fapi_nr_p5_message_unpack(void *pMessageBuf, - uint32_t messageBufLen, - void *pUnpackedBuf, - uint32_t unpackedBufLen, - nfapi_p4_p5_codec_config_t *config); - -int check_nr_fapi_unpack_length(nfapi_nr_phy_msg_type_e msgId, uint32_t unpackedBufLen); #endif // OPENAIRINTERFACE_NR_FAPI_H diff --git a/nfapi/open-nFAPI/fapi/inc/nr_fapi_p5.h b/nfapi/open-nFAPI/fapi/inc/nr_fapi_p5.h index feade4015b..f60cd435e4 100644 --- a/nfapi/open-nFAPI/fapi/inc/nr_fapi_p5.h +++ b/nfapi/open-nFAPI/fapi/inc/nr_fapi_p5.h @@ -18,22 +18,26 @@ * For more information about the OpenAirInterface (OAI) Software Alliance: * contact@openairinterface.org */ -/*! \file nfapi/open-nFAPI/fapi/inc/nr_fapi_p5.h - * \brief - * \author Ruben S. Silva - * \date 2024 - * \version 0.1 - * \company OpenAirInterface Software Alliance - * \email: contact@openairinterface.org, rsilva@allbesmart.pt - * \note - * \warning - */ #ifndef OPENAIRINTERFACE_NR_FAPI_P5_H #define OPENAIRINTERFACE_NR_FAPI_P5_H #include "stdint.h" #include "nfapi_interface.h" +int fapi_nr_p5_message_pack(void *pMessageBuf, + uint32_t messageBufLen, + void *pPackedBuf, + uint32_t packedBufLen, + nfapi_p4_p5_codec_config_t *config); + +int fapi_nr_p5_message_unpack(void *pMessageBuf, + uint32_t messageBufLen, + void *pUnpackedBuf, + uint32_t unpackedBufLen, + nfapi_p4_p5_codec_config_t *config); + +int check_nr_fapi_unpack_length(nfapi_nr_phy_msg_type_e msgId, uint32_t unpackedBufLen); + 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); diff --git a/nfapi/open-nFAPI/fapi/inc/nr_fapi_p5_utils.h b/nfapi/open-nFAPI/fapi/inc/nr_fapi_p5_utils.h index 36d327a850..a3ea596449 100644 --- a/nfapi/open-nFAPI/fapi/inc/nr_fapi_p5_utils.h +++ b/nfapi/open-nFAPI/fapi/inc/nr_fapi_p5_utils.h @@ -18,16 +18,6 @@ * For more information about the OpenAirInterface (OAI) Software Alliance: * contact@openairinterface.org */ -/*! \file nfapi/open-nFAPI/fapi/inc/nr_fapi_p5_utils.h - * \brief - * \author Ruben S. Silva - * \date 2024 - * \version 0.1 - * \company OpenAirInterface Software Alliance - * \email: contact@openairinterface.org, rsilva@allbesmart.pt - * \note - * \warning - */ #ifndef OPENAIRINTERFACE_NR_FAPI_P5_UTILS_H #define OPENAIRINTERFACE_NR_FAPI_P5_UTILS_H diff --git a/nfapi/open-nFAPI/fapi/src/nr_fapi_p5.c b/nfapi/open-nFAPI/fapi/src/nr_fapi_p5.c index 6aaedeb854..66bdf35a59 100644 --- a/nfapi/open-nFAPI/fapi/src/nr_fapi_p5.c +++ b/nfapi/open-nFAPI/fapi/src/nr_fapi_p5.c @@ -18,19 +18,8 @@ * For more information about the OpenAirInterface (OAI) Software Alliance: * contact@openairinterface.org */ -/*! \file nfapi/open-nFAPI/fapi/src/nr_fapi_p5.c - * \brief - * \author Ruben S. Silva - * \date 2024 - * \version 0.1 - * \company OpenAirInterface Software Alliance - * \email: contact@openairinterface.org, rsilva@allbesmart.pt - * \note - * \warning - */ #include "nr_fapi.h" #include "nr_fapi_p5.h" -#include "nr_fapi_p5_utils.h" #include "debug.h" bool isFAPIMessageIDValid(uint16_t id) @@ -41,8 +30,8 @@ bool isFAPIMessageIDValid(uint16_t id) || id == NFAPI_NR_PHY_MSG_TYPE_TIMING_INFO; } -int fapi_nr_p5_message_header_unpack(uint8_t **pMessageBuf, - uint32_t messageBufLen, +int fapi_nr_message_header_unpack(uint8_t **pMessageBuf, + uint32_t messageBufLen, void *pUnpackedBuf, uint32_t unpackedBufLen, nfapi_p4_p5_codec_config_t *config) @@ -74,7 +63,7 @@ uint8_t fapi_nr_p5_message_body_pack(nfapi_p4_p5_message_header_t *header, // look for the specific message switch (header->message_id) { case NFAPI_NR_PHY_MSG_TYPE_PARAM_REQUEST: - result = 0; + result = 1; break; case NFAPI_NR_PHY_MSG_TYPE_PARAM_RESPONSE: @@ -110,7 +99,7 @@ uint8_t fapi_nr_p5_message_body_pack(nfapi_p4_p5_message_header_t *header, break; default: { - AssertFatal(header->message_id >= 0x00 && header->message_id <= 0xFF, + AssertFatal(header->message_id <= 0xFF, "FAPI message IDs are defined between 0x00 and 0xFF the message provided 0x%02x, which is not a FAPI message", header->message_id); break; @@ -122,7 +111,7 @@ uint8_t fapi_nr_p5_message_body_pack(nfapi_p4_p5_message_header_t *header, int fapi_nr_p5_message_pack(void *pMessageBuf, uint32_t messageBufLen, void *pPackedBuf, - uint32_t packedBufLen, + const uint32_t packedBufLen, nfapi_p4_p5_codec_config_t *config) { nfapi_p4_p5_message_header_t *pMessageHeader = pMessageBuf; @@ -130,9 +119,6 @@ int fapi_nr_p5_message_pack(void *pMessageBuf, AssertFatal(isFAPIMessageIDValid(pMessageHeader->message_id), "FAPI message IDs are defined between 0x00 and 0xFF the message provided 0x%02x, which is not a FAPI message", pMessageHeader->message_id); - uint32_t packedMsgLen; - uint32_t packedBodyLen; - uint16_t packedMsgLen16; AssertFatal(pMessageBuf != NULL && pPackedBuf != NULL, "P5 Pack supplied pointers are null"); uint8_t *pPackMessageEnd = pPackedBuf + packedBufLen; @@ -140,8 +126,8 @@ int fapi_nr_p5_message_pack(void *pMessageBuf, uint8_t *pPacketBodyField = &pWritePackedMessage[8]; uint8_t *pPacketBodyFieldStart = &pWritePackedMessage[8]; - uint8_t res = fapi_nr_p5_message_body_pack(pMessageHeader, &pPacketBodyField, pPackMessageEnd, config); - AssertFatal(res >= 0, "fapi_nr_p5_message_body_pack error packing message body %d\n", res); + const uint8_t res = fapi_nr_p5_message_body_pack(pMessageHeader, &pPacketBodyField, pPackMessageEnd, config); + AssertFatal(res > 0, "fapi_nr_p5_message_body_pack error packing message body %d\n", res); // PHY API message header push8(1, &pWritePackedMessage, pPackMessageEnd); // Number of messages @@ -151,9 +137,8 @@ int fapi_nr_p5_message_pack(void *pMessageBuf, push16(pMessageHeader->message_id, &pWritePackedMessage, pPackMessageEnd); // Message type ID // check for a valid message length - packedMsgLen = get_packed_msg_len((uintptr_t)pPackedBuf, (uintptr_t)pPacketBodyField); - packedBodyLen = get_packed_msg_len((uintptr_t)pPacketBodyFieldStart, (uintptr_t)pPacketBodyField); - packedMsgLen16 = (uint16_t)packedBodyLen; + const uint32_t packedMsgLen = get_packed_msg_len((uintptr_t)pPackedBuf, (uintptr_t)pPacketBodyField); + uint16_t packedMsgLen16 = get_packed_msg_len((uintptr_t)pPacketBodyFieldStart, (uintptr_t)pPacketBodyField); if (pMessageHeader->message_id == NFAPI_NR_PHY_MSG_TYPE_PARAM_REQUEST || pMessageHeader->message_id == NFAPI_NR_PHY_MSG_TYPE_START_REQUEST || pMessageHeader->message_id == NFAPI_NR_PHY_MSG_TYPE_STOP_REQUEST @@ -171,13 +156,13 @@ int fapi_nr_p5_message_pack(void *pMessageBuf, return -1; // return the packed length - return (int)(packedMsgLen); + return packedMsgLen; } int fapi_nr_p5_message_unpack(void *pMessageBuf, - uint32_t messageBufLen, + const uint32_t messageBufLen, void *pUnpackedBuf, - uint32_t unpackedBufLen, + const uint32_t unpackedBufLen, nfapi_p4_p5_codec_config_t *config) { fapi_message_header_t *pMessageHeader = pUnpackedBuf; @@ -191,7 +176,7 @@ int fapi_nr_p5_message_unpack(void *pMessageBuf, unpackedBufLen); // clean the supplied buffer for - tag value blanking (void)memset(pUnpackedBuf, 0, unpackedBufLen); - if (fapi_nr_p5_message_header_unpack(&pReadPackedMessage, NFAPI_HEADER_LENGTH, pMessageHeader, sizeof(fapi_message_header_t), 0) + if (fapi_nr_message_header_unpack(&pReadPackedMessage, NFAPI_HEADER_LENGTH, pMessageHeader, sizeof(fapi_message_header_t), 0) < 0) { // failed to read the header return -1; @@ -370,12 +355,7 @@ uint8_t pack_nr_param_response(void *msg, uint8_t **ppWritePackedMsg, uint8_t *e &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 &= push16(pNfapiMsg->cell_param.config_tlvs_to_report_list[i].tl.tag, ppWritePackedMsg, end) != 0; 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) @@ -1707,8 +1687,8 @@ uint8_t unpack_nr_stop_indication(uint8_t **ppReadPackedMsg, uint8_t *end, void uint8_t pack_nr_error_indication(void *msg, uint8_t **ppWritePackedMsg, uint8_t *end, nfapi_p4_p5_codec_config_t *config) { nfapi_nr_error_indication_scf_t *pNfapiMsg = (nfapi_nr_error_indication_scf_t *)msg; - uint8_t retval = push16(pNfapiMsg->sfn, ppWritePackedMsg, end); - retval &= push16(pNfapiMsg->slot, ppWritePackedMsg, end); + uint8_t retval = push16(pNfapiMsg->sfn, ppWritePackedMsg, end) != 0; + retval &= push16(pNfapiMsg->slot, ppWritePackedMsg, end) != 0; retval &= push8(pNfapiMsg->message_id, ppWritePackedMsg, end); retval &= push8(pNfapiMsg->error_code, ppWritePackedMsg, end); diff --git a/nfapi/open-nFAPI/fapi/src/nr_fapi_p5_utils.c b/nfapi/open-nFAPI/fapi/src/nr_fapi_p5_utils.c index 0cc2a56808..01f0435c41 100644 --- a/nfapi/open-nFAPI/fapi/src/nr_fapi_p5_utils.c +++ b/nfapi/open-nFAPI/fapi/src/nr_fapi_p5_utils.c @@ -18,16 +18,6 @@ * For more information about the OpenAirInterface (OAI) Software Alliance: * contact@openairinterface.org */ -/*! \file nfapi/open-nFAPI/fapi/src/nr_fapi_p5_utils.c - * \brief - * \author Ruben S. Silva - * \date 2024 - * \version 0.1 - * \company OpenAirInterface Software Alliance - * \email: contact@openairinterface.org, rsilva@allbesmart.pt - * \note - * \warning - */ #include "nr_fapi_p5_utils.h" void copy_vendor_extension_value(nfapi_vendor_extension_tlv_t *dst, const nfapi_vendor_extension_tlv_t *src) diff --git a/nfapi/open-nFAPI/nfapi/src/nfapi_p5.c b/nfapi/open-nFAPI/nfapi/src/nfapi_p5.c index a5a7810f40..882da44796 100644 --- a/nfapi/open-nFAPI/nfapi/src/nfapi_p5.c +++ b/nfapi/open-nFAPI/nfapi/src/nfapi_p5.c @@ -38,7 +38,6 @@ #include "nfapi/oai_integration/vendor_ext.h" #include #include "nr_fapi_p5.h" -#include "nr_fapi.h" // Pack routines //TODO: Add pacl/unpack fns for uint32 and uint64 diff --git a/nfapi/open-nFAPI/vnf/src/vnf.c b/nfapi/open-nFAPI/vnf/src/vnf.c index 631ce2b7e9..f456d57cb0 100644 --- a/nfapi/open-nFAPI/vnf/src/vnf.c +++ b/nfapi/open-nFAPI/vnf/src/vnf.c @@ -30,7 +30,7 @@ #ifdef ENABLE_AERIAL #include "nfapi/oai_integration/aerial/fapi_nvIPC.h" #include "nfapi/oai_integration/aerial/fapi_vnf_p5.h" -#include "nr_fapi.h" +#include "nr_fapi_p5.h" #endif #include "nfapi/oai_integration/vendor_ext.h" diff --git a/nfapi/tests/p5/nr_fapi_config_request_test.c b/nfapi/tests/p5/nr_fapi_config_request_test.c index 21bd543de6..f980b3e61e 100644 --- a/nfapi/tests/p5/nr_fapi_config_request_test.c +++ b/nfapi/tests/p5/nr_fapi_config_request_test.c @@ -18,17 +18,8 @@ * For more information about the OpenAirInterface (OAI) Software Alliance: * contact@openairinterface.org */ -/*! \file nfapi/tests/p5/nr_fapi_config_request_test.c - * \brief - * \author Ruben S. Silva - * \date 2024 - * \version 0.1 - * \company OpenAirInterface Software Alliance - * \email: contact@openairinterface.org, rsilva@allbesmart.pt - * \note - * \warning - */ #include "nfapi/tests/nr_fapi_test.h" +#include "nr_fapi_p5.h" #include "nr_fapi_p5_utils.h" void fill_config_request_tlv(nfapi_nr_config_request_scf_t *nfapi_resp) @@ -259,7 +250,7 @@ void test_pack_unpack(nfapi_nr_config_request_scf_t *req) header_buffer[idx] = msg_buf[idx]; } uint8_t *pReadPackedMessage = header_buffer; - int unpack_header_result = fapi_nr_p5_message_header_unpack(&pReadPackedMessage, NFAPI_HEADER_LENGTH, &header, sizeof(header), 0); + int unpack_header_result = fapi_nr_message_header_unpack(&pReadPackedMessage, NFAPI_HEADER_LENGTH, &header, sizeof(header), 0); DevAssert(unpack_header_result >= 0); DevAssert(header.message_id == req->header.message_id); DevAssert(header.message_length == req->header.message_length); diff --git a/nfapi/tests/p5/nr_fapi_config_response_test.c b/nfapi/tests/p5/nr_fapi_config_response_test.c index ae97b93c2c..bc44b4b6fd 100644 --- a/nfapi/tests/p5/nr_fapi_config_response_test.c +++ b/nfapi/tests/p5/nr_fapi_config_response_test.c @@ -18,22 +18,8 @@ * For more information about the OpenAirInterface (OAI) Software Alliance: * contact@openairinterface.org */ -/*! \file nfapi/tests/p5/nr_fapi_config_response_test.c - * \brief Defines a unitary test for the FAPI CONFIG.response message ( 0x03 ) - * The test consists of filling a message with randomized data, filling each lists as well with random TLVs - * After the message is created, is is packed into a byte buffer - * After packing, the header is unpacked to mimic SCTP PEEK and the values unpacked checked against the original message - * After the header is checked, the whole message is unpacked. - * The test ends by checking all of the unpacked message contents against the original message - * \author Ruben S. Silva - * \date 2024 - * \version 0.1 - * \company OpenAirInterface Software Alliance - * \email: contact@openairinterface.org, rsilva@allbesmart.pt - * \note - * \warning - */ #include "nfapi/tests/nr_fapi_test.h" +#include "nr_fapi_p5.h" #include "nr_fapi_p5_utils.h" void fill_config_response_tlv_list(nfapi_nr_generic_tlv_scf_t *list, uint8_t size) @@ -106,7 +92,7 @@ void test_pack_unpack(nfapi_nr_config_response_scf_t *req) header_buffer[idx] = msg_buf[idx]; } uint8_t *pReadPackedMessage = header_buffer; - int unpack_header_result = fapi_nr_p5_message_header_unpack(&pReadPackedMessage, NFAPI_HEADER_LENGTH, &header, sizeof(header), 0); + int unpack_header_result = fapi_nr_message_header_unpack(&pReadPackedMessage, NFAPI_HEADER_LENGTH, &header, sizeof(header), 0); DevAssert(unpack_header_result >= 0); DevAssert(header.message_id == req->header.message_id); DevAssert(header.message_length == req->header.message_length); diff --git a/nfapi/tests/p5/nr_fapi_error_indication_test.c b/nfapi/tests/p5/nr_fapi_error_indication_test.c index 97431ca9c3..85ef17b536 100644 --- a/nfapi/tests/p5/nr_fapi_error_indication_test.c +++ b/nfapi/tests/p5/nr_fapi_error_indication_test.c @@ -18,17 +18,8 @@ * For more information about the OpenAirInterface (OAI) Software Alliance: * contact@openairinterface.org */ -/*! \file nfapi/tests/p5/nr_fapi_error_indication_test.c - * \brief - * \author Ruben S. Silva - * \date 2024 - * \version 0.1 - * \company OpenAirInterface Software Alliance - * \email: contact@openairinterface.org, rsilva@allbesmart.pt - * \note - * \warning - */ #include "nfapi/tests/nr_fapi_test.h" +#include "nr_fapi_p5.h" #include "nr_fapi_p5_utils.h" void test_pack_unpack(nfapi_nr_error_indication_scf_t *req) @@ -49,7 +40,7 @@ void test_pack_unpack(nfapi_nr_error_indication_scf_t *req) header_buffer[idx] = msg_buf[idx]; } uint8_t *pReadPackedMessage = header_buffer; - int unpack_header_result = fapi_nr_p5_message_header_unpack(&pReadPackedMessage, NFAPI_HEADER_LENGTH, &header, sizeof(header), 0); + int unpack_header_result = fapi_nr_message_header_unpack(&pReadPackedMessage, NFAPI_HEADER_LENGTH, &header, sizeof(header), 0); DevAssert(unpack_header_result >= 0); DevAssert(header.message_id == req->header.message_id); DevAssert(header.message_length == req->header.message_length); diff --git a/nfapi/tests/p5/nr_fapi_param_request_test.c b/nfapi/tests/p5/nr_fapi_param_request_test.c index 5356160ca4..d42717eaeb 100644 --- a/nfapi/tests/p5/nr_fapi_param_request_test.c +++ b/nfapi/tests/p5/nr_fapi_param_request_test.c @@ -18,17 +18,8 @@ * For more information about the OpenAirInterface (OAI) Software Alliance: * contact@openairinterface.org */ -/*! \file nfapi/tests/p5/nr_fapi_param_request_test.c - * \brief - * \author Ruben S. Silva - * \date 2024 - * \version 0.1 - * \company OpenAirInterface Software Alliance - * \email: contact@openairinterface.org, rsilva@allbesmart.pt - * \note - * \warning - */ #include "nfapi/tests/nr_fapi_test.h" +#include "nr_fapi_p5.h" #include "nr_fapi_p5_utils.h" void test_pack_unpack(nfapi_nr_param_request_scf_t *req) @@ -50,7 +41,7 @@ void test_pack_unpack(nfapi_nr_param_request_scf_t *req) header_buffer[idx] = msg_buf[idx]; } uint8_t *pReadPackedMessage = header_buffer; - int unpack_header_result = fapi_nr_p5_message_header_unpack(&pReadPackedMessage, NFAPI_HEADER_LENGTH, &header, sizeof(header), 0); + int unpack_header_result = fapi_nr_message_header_unpack(&pReadPackedMessage, NFAPI_HEADER_LENGTH, &header, sizeof(header), 0); DevAssert(unpack_header_result >= 0); DevAssert(header.message_id == req->header.message_id); DevAssert(header.message_length == req->header.message_length); diff --git a/nfapi/tests/p5/nr_fapi_param_response_test.c b/nfapi/tests/p5/nr_fapi_param_response_test.c index 75ca6d5e31..d1d1b52488 100644 --- a/nfapi/tests/p5/nr_fapi_param_response_test.c +++ b/nfapi/tests/p5/nr_fapi_param_response_test.c @@ -18,17 +18,8 @@ * For more information about the OpenAirInterface (OAI) Software Alliance: * contact@openairinterface.org */ -/*! \file nfapi/tests/p5/nr_fapi_param_response_test.c - * \brief - * \author Ruben S. Silva - * \date 2024 - * \version 0.1 - * \company OpenAirInterface Software Alliance - * \email: contact@openairinterface.org, rsilva@allbesmart.pt - * \note - * \warning - */ #include "nfapi/tests/nr_fapi_test.h" +#include "nr_fapi_p5.h" #include "nr_fapi_p5_utils.h" void fill_param_response_tlv(nfapi_nr_param_response_scf_t *nfapi_resp) @@ -242,7 +233,7 @@ void test_pack_unpack(nfapi_nr_param_response_scf_t *req) header_buffer[idx] = msg_buf[idx]; } uint8_t *pReadPackedMessage = header_buffer; - int unpack_header_result = fapi_nr_p5_message_header_unpack(&pReadPackedMessage, NFAPI_HEADER_LENGTH, &header, sizeof(header), 0); + int unpack_header_result = fapi_nr_message_header_unpack(&pReadPackedMessage, NFAPI_HEADER_LENGTH, &header, sizeof(header), 0); DevAssert(unpack_header_result >= 0); DevAssert(header.message_id == req->header.message_id); DevAssert(header.message_length == req->header.message_length); diff --git a/nfapi/tests/p5/nr_fapi_start_request_test.c b/nfapi/tests/p5/nr_fapi_start_request_test.c index 9384488c46..9a36528db6 100644 --- a/nfapi/tests/p5/nr_fapi_start_request_test.c +++ b/nfapi/tests/p5/nr_fapi_start_request_test.c @@ -18,17 +18,8 @@ * For more information about the OpenAirInterface (OAI) Software Alliance: * contact@openairinterface.org */ -/*! \file nfapi/tests/p5/nr_fapi_start_request_test.c - * \brief - * \author Ruben S. Silva - * \date 2024 - * \version 0.1 - * \company OpenAirInterface Software Alliance - * \email: contact@openairinterface.org, rsilva@allbesmart.pt - * \note - * \warning - */ #include "nfapi/tests/nr_fapi_test.h" +#include "nr_fapi_p5.h" #include "nr_fapi_p5_utils.h" void test_pack_unpack(nfapi_nr_start_request_scf_t *req) @@ -50,7 +41,7 @@ void test_pack_unpack(nfapi_nr_start_request_scf_t *req) header_buffer[idx] = msg_buf[idx]; } uint8_t *pReadPackedMessage = header_buffer; - int unpack_header_result = fapi_nr_p5_message_header_unpack(&pReadPackedMessage, NFAPI_HEADER_LENGTH, &header, sizeof(header), 0); + int unpack_header_result = fapi_nr_message_header_unpack(&pReadPackedMessage, NFAPI_HEADER_LENGTH, &header, sizeof(header), 0); DevAssert(unpack_header_result >= 0); DevAssert(header.message_id == req->header.message_id); DevAssert(header.message_length == req->header.message_length); diff --git a/nfapi/tests/p5/nr_fapi_start_response_test.c b/nfapi/tests/p5/nr_fapi_start_response_test.c index 32ef894981..bb3a096734 100644 --- a/nfapi/tests/p5/nr_fapi_start_response_test.c +++ b/nfapi/tests/p5/nr_fapi_start_response_test.c @@ -18,17 +18,8 @@ * For more information about the OpenAirInterface (OAI) Software Alliance: * contact@openairinterface.org */ -/*! \file nfapi/tests/p5/nr_fapi_start_response_test.c - * \brief - * \author Ruben S. Silva - * \date 2024 - * \version 0.1 - * \company OpenAirInterface Software Alliance - * \email: contact@openairinterface.org, rsilva@allbesmart.pt - * \note - * \warning - */ #include "nfapi/tests/nr_fapi_test.h" +#include "nr_fapi_p5.h" #include "nr_fapi_p5_utils.h" void test_pack_unpack(nfapi_nr_start_response_scf_t *req) @@ -50,7 +41,7 @@ void test_pack_unpack(nfapi_nr_start_response_scf_t *req) header_buffer[idx] = msg_buf[idx]; } uint8_t *pReadPackedMessage = header_buffer; - int unpack_header_result = fapi_nr_p5_message_header_unpack(&pReadPackedMessage, NFAPI_HEADER_LENGTH, &header, sizeof(header), 0); + int unpack_header_result = fapi_nr_message_header_unpack(&pReadPackedMessage, NFAPI_HEADER_LENGTH, &header, sizeof(header), 0); DevAssert(unpack_header_result >= 0); DevAssert(header.message_id == req->header.message_id); DevAssert(header.message_length == req->header.message_length); diff --git a/nfapi/tests/p5/nr_fapi_stop_indication_test.c b/nfapi/tests/p5/nr_fapi_stop_indication_test.c index ee3946c8e4..4b5d9d4319 100644 --- a/nfapi/tests/p5/nr_fapi_stop_indication_test.c +++ b/nfapi/tests/p5/nr_fapi_stop_indication_test.c @@ -18,17 +18,8 @@ * For more information about the OpenAirInterface (OAI) Software Alliance: * contact@openairinterface.org */ -/*! \file nfapi/tests/p5/nr_fapi_stop_indication_test.c - * \brief - * \author Ruben S. Silva - * \date 2024 - * \version 0.1 - * \company OpenAirInterface Software Alliance - * \email: contact@openairinterface.org, rsilva@allbesmart.pt - * \note - * \warning - */ #include "nfapi/tests/nr_fapi_test.h" +#include "nr_fapi_p5.h" #include "nr_fapi_p5_utils.h" void test_pack_unpack(nfapi_nr_stop_indication_scf_t *req) @@ -50,7 +41,7 @@ void test_pack_unpack(nfapi_nr_stop_indication_scf_t *req) header_buffer[idx] = msg_buf[idx]; } uint8_t *pReadPackedMessage = header_buffer; - int unpack_header_result = fapi_nr_p5_message_header_unpack(&pReadPackedMessage, NFAPI_HEADER_LENGTH, &header, sizeof(header), 0); + int unpack_header_result = fapi_nr_message_header_unpack(&pReadPackedMessage, NFAPI_HEADER_LENGTH, &header, sizeof(header), 0); DevAssert(unpack_header_result >= 0); DevAssert(header.message_id == req->header.message_id); DevAssert(header.message_length == req->header.message_length); diff --git a/nfapi/tests/p5/nr_fapi_stop_request_test.c b/nfapi/tests/p5/nr_fapi_stop_request_test.c index 74311cf94e..74e5ea31ff 100644 --- a/nfapi/tests/p5/nr_fapi_stop_request_test.c +++ b/nfapi/tests/p5/nr_fapi_stop_request_test.c @@ -18,17 +18,8 @@ * For more information about the OpenAirInterface (OAI) Software Alliance: * contact@openairinterface.org */ -/*! \file nfapi/tests/p5/nr_fapi_stop_request_test.c - * \brief - * \author Ruben S. Silva - * \date 2024 - * \version 0.1 - * \company OpenAirInterface Software Alliance - * \email: contact@openairinterface.org, rsilva@allbesmart.pt - * \note - * \warning - */ #include "nfapi/tests/nr_fapi_test.h" +#include "nr_fapi_p5.h" #include "nr_fapi_p5_utils.h" void test_pack_unpack(nfapi_nr_stop_request_scf_t *req) @@ -50,7 +41,7 @@ void test_pack_unpack(nfapi_nr_stop_request_scf_t *req) header_buffer[idx] = msg_buf[idx]; } uint8_t *pReadPackedMessage = header_buffer; - int unpack_header_result = fapi_nr_p5_message_header_unpack(&pReadPackedMessage, NFAPI_HEADER_LENGTH, &header, sizeof(header), 0); + int unpack_header_result = fapi_nr_message_header_unpack(&pReadPackedMessage, NFAPI_HEADER_LENGTH, &header, sizeof(header), 0); DevAssert(unpack_header_result >= 0); DevAssert(header.message_id == req->header.message_id); DevAssert(header.message_length == req->header.message_length); diff --git a/nfapi/tests/p7/nr_fapi_dci_inversion_test.c b/nfapi/tests/p7/nr_fapi_dci_inversion_test.c index 22e883b0cd..c0add82c54 100644 --- a/nfapi/tests/p7/nr_fapi_dci_inversion_test.c +++ b/nfapi/tests/p7/nr_fapi_dci_inversion_test.c @@ -18,18 +18,7 @@ * For more information about the OpenAirInterface (OAI) Software Alliance: * contact@openairinterface.org */ -/*! \file nfapi/tests/p5/nr_fapi_param_request_test.c - * \brief - * \author Ruben S. Silva - * \date 2024 - * \version 0.1 - * \company OpenAirInterface Software Alliance - * \email: contact@openairinterface.org, rsilva@allbesmart.pt - * \note - * \warning - */ #include "nfapi/tests/nr_fapi_test.h" -#include "nr_fapi_p5.h" #include "nr_fapi.h" void printbits(uint64_t n, uint8_t numBytesToPrint) {