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

Move functions for packing/unpacking CONFIG.request

Add unitary test for CONFIG.request ( test pack/unpack, free, copy and compare )
parent de7c6e5b
...@@ -38,6 +38,9 @@ ...@@ -38,6 +38,9 @@
#include "nfapi_nr_interface.h" #include "nfapi_nr_interface.h"
#include "nfapi_nr_interface_scf.h" #include "nfapi_nr_interface_scf.h"
#include "nfapi.h" #include "nfapi.h"
#include "nfapi/oai_integration/vendor_ext.h"
#include <arpa/inet.h>
#include <netinet/in.h>
#include "assertions.h" #include "assertions.h"
#define DEBUG_FAPI_NFAPI_MSGS 0 #define DEBUG_FAPI_NFAPI_MSGS 0
......
...@@ -38,4 +38,6 @@ uint8_t pack_nr_param_request(void *msg, uint8_t **ppWritePackedMsg, uint8_t *en ...@@ -38,4 +38,6 @@ uint8_t pack_nr_param_request(void *msg, uint8_t **ppWritePackedMsg, uint8_t *en
uint8_t unpack_nr_param_request(uint8_t **ppReadPackedMsg, uint8_t *end, void *msg, 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 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 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);
#endif // OPENAIRINTERFACE_NR_FAPI_P5_H #endif // OPENAIRINTERFACE_NR_FAPI_P5_H
This diff is collapsed.
...@@ -20,7 +20,6 @@ ...@@ -20,7 +20,6 @@
#include "stddef.h" #include "stddef.h"
#include <stdint.h> #include <stdint.h>
#include <stdbool.h>
// Constants - update based on implementation // Constants - update based on implementation
#define NFAPI_MAX_PHY_RF_INSTANCES 2 #define NFAPI_MAX_PHY_RF_INSTANCES 2
...@@ -4119,10 +4118,6 @@ int pack_nr_srs_beamforming_report(void *pMessageBuf, void *pPackedBuf, uint32_t ...@@ -4119,10 +4118,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); int unpack_nr_srs_beamforming_report(void *pMessageBuf, uint32_t messageBufLen, void *pUnpackedBuf, uint32_t unpackedBufLen);
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);
uint8_t pack_nr_config_response(void *msg, uint8_t **ppWritePackedMsg, uint8_t *end, nfapi_p4_p5_codec_config_t *config); uint8_t pack_nr_config_response(void *msg, uint8_t **ppWritePackedMsg, uint8_t *end, nfapi_p4_p5_codec_config_t *config);
uint8_t unpack_nr_config_response(uint8_t **ppReadPackedMsg, uint8_t *end, void *msg, nfapi_p4_p5_codec_config_t *config); uint8_t unpack_nr_config_response(uint8_t **ppReadPackedMsg, uint8_t *end, void *msg, nfapi_p4_p5_codec_config_t *config);
......
This diff is collapsed.
...@@ -22,3 +22,15 @@ add_test(NAME nr_fapi_param_response_test ...@@ -22,3 +22,15 @@ add_test(NAME nr_fapi_param_response_test
COMMAND nr_fapi_param_response_test ${CMAKE_CURRENT_BINARY_DIR} COMMAND nr_fapi_param_response_test ${CMAKE_CURRENT_BINARY_DIR}
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
set_tests_properties(nr_fapi_param_response_test PROPERTIES LABELS "${Test_Labels}") set_tests_properties(nr_fapi_param_response_test PROPERTIES LABELS "${Test_Labels}")
#CONFIG.request test
add_executable(nr_fapi_config_request_test nr_fapi_config_request_test.c)
target_link_libraries(nr_fapi_config_request_test PUBLIC nr_fapi_p5)
target_link_libraries(nr_fapi_config_request_test PRIVATE pthread UTIL ${T_LIB} minimal_lib)
target_compile_definitions(nr_fapi_config_request_test PRIVATE TEST="nr_fapi_test.h")
add_dependencies(tests nr_fapi_config_request_test)
add_test(NAME nr_fapi_config_request_test
COMMAND nr_fapi_config_request_test ${CMAKE_CURRENT_BINARY_DIR}
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
set_tests_properties(nr_fapi_config_request_test PROPERTIES LABELS "${Test_Labels}")
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