Move general FAPI P5 message pack procedure from fapi_vnf_p5 into FAPI P5 library.

Implement FAPI P5 message unpack, as well as message length check function procedure in FAPI P5 library.
Update check_nr_unpack_length in nfapi_p5.c to reference FAPI P5 message length check function.
This commit is contained in:
Rúben Soares Silva
2024-06-25 11:53:38 +01:00
parent 350746f4f6
commit da9fe96efc
5 changed files with 316 additions and 92 deletions
+19 -2
View File
@@ -40,8 +40,6 @@
#include "nfapi.h"
#include "assertions.h"
#define DEBUG_FAPI_NFAPI_MSGS 0
typedef struct {
uint8_t num_msg;
uint8_t opaque_handle;
@@ -49,4 +47,23 @@ 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_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