Change PNF to use functions pointers to pack/unpack messages.

Adds 3 new function pointers to the P5 and P7 PNF structures, allowing to configure which function to use to pack/unpack the messages, as well as unpack the message header, being then used seamlessly regardless of using the FAPI or nFAPI functions.

Changes the header unpack and message unpack functions to return true on success and false on failure, instead of an int
This commit is contained in:
Rúben Soares Silva
2025-06-26 16:57:08 +01:00
parent 1ea164468f
commit 00b5eba192
10 changed files with 178 additions and 103 deletions
@@ -119,13 +119,13 @@ int nfapi_nr_p7_message_pack(void *pMessageBuf, void *pPackedBuf, uint32_t packe
{
return 0;
}
int nfapi_nr_p7_message_unpack(void *pMessageBuf,
bool nfapi_nr_p7_message_unpack(void *pMessageBuf,
uint32_t messageBufLen,
void *pUnpackedBuf,
uint32_t unpackedBufLen,
nfapi_p7_codec_config_t *config)
{
return 0;
return false;
}
int nfapi_p7_message_header_unpack(void *pMessageBuf,
uint32_t messageBufLen,