54 #include "rnr/rnrconfig.h" 72 byte_t buf[],
size_t bufSize,
NMEndian_T eEndian,
75 size_t uMsgLen,
void *pStruct,
99 if( uCount <= bufSize )
110 "buf_size=%zu < pad_count=%zu", bufSize, uCount);
130 val = *((bool_t *)pVal);
163 n =
nmPackU8(val, buf, bufSize, eEndian);
193 n =
nmPackS8(val, buf, bufSize, eEndian);
223 n =
nmPackU16(val, buf, bufSize, eEndian);
253 n =
nmPackS16(val, buf, bufSize, eEndian);
283 n =
nmPackU32(val, buf, bufSize, eEndian);
313 n =
nmPackS32(val, buf, bufSize, eEndian);
343 n =
nmPackU64(val, buf, bufSize, eEndian);
373 n =
nmPackS64(val, buf, bufSize, eEndian);
404 n =
nmPackF32(val, buf, bufSize, eEndian);
435 n =
nmPackF64(val, buf, bufSize, eEndian);
458 n =
nmPackP32(pVal, buf, bufSize, eEndian);
481 n =
nmPackP64(pVal, buf, bufSize, eEndian);
509 sVal = (
const char *)pVal;
518 uCount = strlen(sVal);
521 if( uCount > uMaxCount )
524 "char_count=%zu > max_count=%zu.", uCount, uMaxCount);
528 else if( uMaxCount > bufSize )
531 "buf_size=%zu < str_max_len=%zu.", bufSize, uMaxCount);
535 memcpy(buf, sVal, uCount);
538 if( uCount < uMaxCount )
540 memset(&buf[uCount], 0, uMaxCount-uCount);
545 return (
int)uMaxCount;
610 pItem = (byte_t *)(pVec) + memberoffset(
NMVec_T, u.
m_buf);
616 "vector_elem_ftype='%c'(0x%02x)",
621 else if( uCount > uMaxCount )
624 "vector_count=%zu > vector_max_count=%zu.", uCount, uMaxCount);
628 pElemDef->
m_eFType, uCount, uMaxCount);
639 for(i=0, n=0; i<uCount; ++i)
641 k = fnPack(pElemDef, pItem, &buf[n], bufSize-(
size_t)n, eEndian, pCtl);
654 if( uCount < uMaxCount )
656 i = (uMaxCount - uCount) * uElemSize;
658 if( i > bufSize-(
size_t)n)
661 "buf_size=%zu < vector_pad_size=%zu", bufSize-(
size_t)n, i);
666 memset(&buf[n], 0, i);
707 for(uFieldNum=0, pFieldDef=pMsgDef->
m_pFields;
708 uFieldNum < pMsgDef->m_uCount;
709 ++uFieldNum, ++pFieldDef)
728 "ftype='%c'(0x%02x).",
732 k = fnPack(pFieldDef, pVal, &buf[n], bufSize-(
size_t)n, eEndian, pCtl);
743 "buf_size=%zu, msgid=%u", bufSize, pMsgDef->
m_eMsgId);
773 if( uCount <= bufSize )
783 "buf_size=%zu < pad_count=%zu", bufSize, uCount);
806 (*((bool_t *)pVal)?
"true":
"false"));
1109 sVal = (
char *)pVal;
1111 if( uMaxCount > bufSize )
1114 "buf_size=%zu, max_count=%zu", bufSize, uMaxCount);
1117 memcpy(sVal, buf, uMaxCount);
1118 sVal[uMaxCount] = 0;
1122 return (
int)uMaxCount;
1188 pItem = (byte_t *)(pVec) + memberoffset(
NMVec_T, u.
m_buf);
1193 if( fnUnpack == NULL )
1196 "vector_elem_ftype='%c'(0x%02x).",
1201 "vector_max_count=%zu, vector_elem_ftype='%c'(0x%02x)",
1207 for(i=0, n=0; i<uMaxCount; ++i)
1209 k = fnUnpack(pElemDef, &buf[n], bufSize-(
size_t)n, pItem, eEndian, pCtl);
1253 for(uFieldNum=0, pFieldDef=pMsgDef->
m_pFields;
1254 uFieldNum < pMsgDef->m_uCount;
1255 ++uFieldNum, ++pFieldDef)
1271 if( fnUnpack == NULL )
1274 "ftype='%c'(0x%02x).",
1278 k = fnUnpack(pFieldDef, &buf[n], uMsgLen-(
size_t)n, pVal, eEndian, pCtl);
1289 "buf_size=%zu, msgid=%u", uMsgLen, pMsgDef->
m_eMsgId);
1343 if( (idx !=
NMHashNoIdx) && (idx < arraysize(NMFlatLookupTbl)) )
1345 if( NMFlatLookupTbl[idx].m_eFType == eFType )
1347 return NMFlatLookupTbl[idx].
m_fnPack;
1352 "hashed eFtype='%c'(0x%02x) != tbl[%d].m_eFType='%c'(0x%02x)",
1355 NMFlatLookupTbl[idx].m_eFType);
1378 if( (idx !=
NMHashNoIdx) && (idx < arraysize(NMFlatLookupTbl)) )
1380 if( NMFlatLookupTbl[idx].m_eFType == eFType )
1387 "hashed eFtype='%c'(0x%02x) != tbl[%d].m_eFType='%c'(0x%02x)",
1390 NMFlatLookupTbl[idx].m_eFType);
1459 fprintf(stderr,
"\n--- Packing Flat Message %s(%u): field_count=%zu\n",
1468 fprintf(stderr,
"Output Buffer (%zu bytes):\n", (
size_t)n);
1469 nmPrintBuf(stderr, NULL, buf, (
size_t)n, 16, 0);
1470 fprintf(stderr,
"\n");
1533 fprintf(stderr,
"\n--- Unpacking Flat Message %s(%u): field_count=%zu\n",
1535 fprintf(stderr,
"Input Buffer (%zu bytes):\n", uMsgLen);
1536 nmPrintBuf(stderr, NULL, buf, uMsgLen, 16, 0);
1537 fprintf(stderr,
"\n");
int nmPackP64(void *val, byte_t buf[], size_t bufSize, NMEndian_T eEndian)
Pack a 64-bit pointer into the message buffer.
byte_t m_bNoHdr
do [not] include field header in byte stream
int nmPackF32(float val, byte_t buf[], size_t bufSize, NMEndian_T eEndian)
Pack a 32-bit float into the message buffer.
static int nmUnpackFlatString(const NMFieldDef_T *pFieldDef, byte_t buf[], size_t bufSize, void *pVal, NMEndian_T eEndian, NMCtl_T *pCtl)
Unpack variable length string Flat field from the message buffer.
int nmUnpackU16(byte_t buf[], size_t bufSize, ushort_t *pVal, NMEndian_T eEndian)
Unpack an unsigned 16-bit integer from the message buffer.
64-bit IEEE 754 FPN double
unsigned 8-bit integer unsigned char
static int nmUnpackFlatF32(const NMFieldDef_T *pFieldDef, byte_t buf[], size_t bufSize, void *pVal, NMEndian_T eEndian, NMCtl_T *pCtl)
Unpack a 32-bit floating-point number Flat field from the message buffer.
static int nmUnpackFlatPad(const NMFieldDef_T *pFieldDef, byte_t buf[], size_t bufSize, void *pVal, NMEndian_T eEndian, NMCtl_T *pCtl)
Unpack pad byte from the message buffer.
static NMLookupTblEntry_T NMFlatLookupTbl[]
32-bit IEEE 754 FPN float
int nmSetU32(const NMFieldDef_T *pFieldDef, void *pValIn, uint_t *pValOut)
Helper function to set an unsigned 32-bit integer.
static int nmPackFlatS8(const NMFieldDef_T *pFieldDef, void *pVal, byte_t buf[], size_t bufSize, NMEndian_T eEndian, NMCtl_T *pCtl)
Pack a signed 8-bit Flat field into the message buffer.
unsigned 64-bit integer unsigned long long
#define NMLIB_ERROR(ecode, fmt,...)
Log libnetmsgs error.
byte_t m_uDepth
structured message depth
size_t m_uMaxCount
maximum number of vector elements
static int nmPackFlatStream(const NMMsgDef_T *pMsgDef, void *pStruct, byte_t buf[], size_t bufSize, NMEndian_T eEndian, NMCtl_T *pCtl)
Pack a Flat message.
static int nmUnpackFlatStruct(const NMFieldDef_T *pFieldDef, byte_t buf[], size_t bufSize, void *pVal, NMEndian_T eEndian, NMCtl_T *pCtl)
Unpack structure Flat field from the message buffer.
NMFieldThisVector_T m_vector
vector field specific info
#define NM_ECODE_FTYPE
unknown field type
int nmUnpackF64(byte_t buf[], size_t bufSize, double *pVal, NMEndian_T eEndian)
Unpack a 64-bit float from the message buffer.
static int nmPackFlatPad(const NMFieldDef_T *pFieldDef, void *pVal, byte_t buf[], size_t bufSize, NMEndian_T eEndian, NMCtl_T *pCtl)
Pack pad bytes into the message buffer.
const int NMHashNoIdx
hash no index value
static int nmPackFlatS16(const NMFieldDef_T *pFieldDef, void *pVal, byte_t buf[], size_t bufSize, NMEndian_T eEndian, NMCtl_T *pCtl)
Pack a signed 16-bit Flat field into the message buffer.
INLINE_IN_H int nmUnpackS32(byte_t buf[], size_t bufSize, int *pVal, NMEndian_T eEndian)
Unpack a signed 32-bit integer from the message buffer.
NMFieldThisString_T m_string
string field specific info
static NMPackFunc_T nmLookupFlatPacker(NMFType_T eFType)
Lookup Flat packer function, given the message field type.
int nmPackU32(uint_t val, byte_t buf[], size_t bufSize, NMEndian_T eEndian)
Pack an unsigned 32-bit integer into the message buffer.
static int nmPackFlatF32(const NMFieldDef_T *pFieldDef, void *pVal, byte_t buf[], size_t bufSize, NMEndian_T eEndian, NMCtl_T *pCtl)
Pack a 32-bit floating-point number Flat field into the message buffer.
int nmUnpackS64(byte_t buf[], size_t bufSize, long long *pVal, NMEndian_T eEndian)
Unpack an signed 64-bit integer from the message buffer.
byte_t m_bTrace
do [not] trace packing/unpacking
signed 32-bit integer int
int nmUnpackF32(byte_t buf[], size_t bufSize, float *pVal, NMEndian_T eEndian)
Unpack a 32-bit float from the message buffer.
static int nmUnpackFlatS16(const NMFieldDef_T *pFieldDef, byte_t buf[], size_t bufSize, void *pVal, NMEndian_T eEndian, NMCtl_T *pCtl)
Unpack a signed 16-bit Flat field from the message buffer.
#define NMLIB_TRACE_FIELD(p, buf, n, ctl, fmt,...)
Trace field.
INLINE_IN_H int nmPackBool(bool_t val, byte_t buf[], size_t bufSize, NMEndian_T eEndian)
Pack a boolean value into the message buffer.
NMFType_T m_eFType
field type
#define NM_OK
not an error, success
static int nmPackFlatString(const NMFieldDef_T *pFieldDef, void *pVal, byte_t buf[], size_t bufSize, NMEndian_T eEndian, NMCtl_T *pCtl)
Pack null-terminated, fixed length string Flat field into the message buffer.
static int nmUnpackFlatP64(const NMFieldDef_T *pFieldDef, byte_t buf[], size_t bufSize, void *pVal, NMEndian_T eEndian, NMCtl_T *pCtl)
Unpack a 64-bit pointer Flat field from the message buffer.
uint_t m_eMsgId
message id (globally unique)
static int nmUnpackFlatBool(const NMFieldDef_T *pFieldDef, byte_t buf[], size_t bufSize, void *pVal, NMEndian_T eEndian, NMCtl_T *pCtl)
Unpack an unsigned 8-bit boolean Flat field from the message buffer.
size_t m_uCount
number of message fields
int(* NMUnpackFunc_T)(const NMFieldDef_T *, byte_t[], size_t, void *, NMEndian_T, NMCtl_T *)
NMFieldThisStruct_T m_struct
struct field specific info
#define NMLIB_RAISE_ERROR(ecode, fmt,...)
Raise libnetmsgs error (i.e. return from calling function).
static int nmUnpackFlatStream(const NMMsgDef_T *pMsgDef, byte_t buf[], size_t uMsgLen, void *pStruct, NMEndian_T eEndian, NMCtl_T *pCtl)
Unpack an Flat byte stream.
#define NMFVAL_PAD
pad field value same as tr id
int nmSetF64(const NMFieldDef_T *pFieldDef, void *pValIn, double *pValOut)
Helper function to set a 64-bit floating point number.
#define NMFTYPE_IS_SIMPLE(ft)
Returns true if field type is a simple type.
#define NMCTL_INIT_DECL
Default Internal control declartion list.
static int nmPackFlatStruct(const NMFieldDef_T *pFieldDef, void *pVal, byte_t buf[], size_t bufSize, NMEndian_T eEndian, NMCtl_T *pCtl)
Pack a structure Flat field into the message buffer.
int nmUnpackFlatMsgDebug(const NMMsgDef_T *pMsgDef, byte_t buf[], size_t uMsgLen, void *pStruct, NMEndian_T eEndian)
Unpack a Flat message, tracing unpacking to stderr.
static int nmPackFlatU8(const NMFieldDef_T *pFieldDef, void *pVal, byte_t buf[], size_t bufSize, NMEndian_T eEndian, NMCtl_T *pCtl)
Pack an unsigned 8-bit Flat field into the message buffer.
static int nmUnpackFlatU64(const NMFieldDef_T *pFieldDef, byte_t buf[], size_t bufSize, void *pVal, NMEndian_T eEndian, NMCtl_T *pCtl)
Unpack an unsigned 64-bit Flat field from the message buffer.
static NMUnpackFunc_T nmLookupFlatUnpacker(NMFType_T eFType)
Lookup Flat unpacker function, given the message field type.
8-bit ASCII characters char
int nmUnpackU64(byte_t buf[], size_t bufSize, ulonglong_t *pVal, NMEndian_T eEndian)
Unpack an unsigned 64-bit integer from the message buffer.
signed 64-bit integer long long
NMFieldThis_T m_this
specific field information
int nmUnpackFlatMsg(const NMMsgDef_T *pMsgDef, byte_t buf[], size_t uMsgLen, void *pStruct, NMEndian_T eEndian)
Unpack a Flat message.
static int nmUnpackFlatU8(const NMFieldDef_T *pFieldDef, byte_t buf[], size_t bufSize, void *pVal, NMEndian_T eEndian, NMCtl_T *pCtl)
Unpack an unsigned 8-bit Flat field from the message buffer.
int nmSetS8(const NMFieldDef_T *pFieldDef, void *pValIn, signed char *pValOut)
Helper function to set a signed 8-bit integer.
int nmPackU8(byte_t val, byte_t buf[], size_t bufSize, NMEndian_T eEndian)
Pack an unsigned 8-bit byte into the message buffer.
INLINE_IN_H int nmUnpackS8(byte_t buf[], size_t bufSize, signed char *pVal, NMEndian_T eEndian)
Unpack a signed 8-bit byte from the message buffer.
int nmSetU8(const NMFieldDef_T *pFieldDef, void *pValIn, byte_t *pValOut)
Helper function to set an unsigned 8-bit integer.
int nmSetF32(const NMFieldDef_T *pFieldDef, void *pValIn, float *pValOut)
Helper function to set a 32-bit floating point number.
32-bit pointer (overloaded) void*
INLINE_IN_H int nmUnpackBool(byte_t buf[], size_t bufSize, bool_t *pVal, NMEndian_T eEndian)
Unpack a boolean value from the message buffer.
static int nmUnpackFlatP32(const NMFieldDef_T *pFieldDef, byte_t buf[], size_t bufSize, void *pVal, NMEndian_T eEndian, NMCtl_T *pCtl)
Unpack a 32-bit pointer Flat field from the message buffer.
static int nmUnpackFlatU16(const NMFieldDef_T *pFieldDef, byte_t buf[], size_t bufSize, void *pVal, NMEndian_T eEndian, NMCtl_T *pCtl)
Unpack an unsigned 16-bit Flat field from the message buffer.
size_t m_uMaxCount
maximum number of characters sans null char
64-bit pointer (overloaded) void*
static int nmPackFlatU16(const NMFieldDef_T *pFieldDef, void *pVal, byte_t buf[], size_t bufSize, NMEndian_T eEndian, NMCtl_T *pCtl)
Pack an unsigned 16-bit Flat field into the message buffer.
static int nmUnpackFlatU32(const NMFieldDef_T *pFieldDef, byte_t buf[], size_t bufSize, void *pVal, NMEndian_T eEndian, NMCtl_T *pCtl)
Unpack an unsigned 32-bit Flat field from the message buffer.
static int nmPackFlatF64(const NMFieldDef_T *pFieldDef, void *pVal, byte_t buf[], size_t bufSize, NMEndian_T eEndian, NMCtl_T *pCtl)
Pack a 64-bit floating-point number Flat field into the message buffer.
int nmSetS16(const NMFieldDef_T *pFieldDef, void *pValIn, short *pValOut)
Helper function to set a signed 16-bit integer.
int nmPackS64(long long val, byte_t buf[], size_t bufSize, NMEndian_T eEndian)
Pack an signed 64-bit integer into the message buffer.
#define NM_ECODE_NOMEM
not enough buffer memory available
size_t m_uCount
number of pad bytes
static int nmUnpackFlatS64(const NMFieldDef_T *pFieldDef, byte_t buf[], size_t bufSize, void *pVal, NMEndian_T eEndian, NMCtl_T *pCtl)
Unpack a signed 64-bit Flat field from the message buffer.
static int nmPackFlatP64(const NMFieldDef_T *pFieldDef, void *pVal, byte_t buf[], size_t bufSize, NMEndian_T eEndian, NMCtl_T *pCtl)
Pack a 64-bit pointer Flat field into the message buffer.
signed 8-bit integer signed char
int(* NMPackFunc_T)(const NMFieldDef_T *, void *, byte_t[], size_t, NMEndian_T, NMCtl_T *)
const char * m_sMsgName
message/struct string name
const char * m_sConst
string constant value (NULL if no const)
int nmPackFlatMsgDebug(const NMMsgDef_T *pMsgDef, void *pStruct, byte_t buf[], size_t bufSize, NMEndian_T eEndian)
Pack an Flat message, tracing message packing to stderr.
int nmPackU16(ushort_t val, byte_t buf[], size_t bufSize, NMEndian_T eEndian)
Pack an unsigned 16-bit integer into the message buffer.
one dimensional array VType[]
INLINE_IN_H int nmPackS32(int val, byte_t buf[], size_t bufSize, NMEndian_T eEndian)
Pack a signed 32-bit integer into the message buffer.
NMFieldDef_P m_pThisElem
vector element specific info
static int nmPackFlatU32(const NMFieldDef_T *pFieldDef, void *pVal, byte_t buf[], size_t bufSize, NMEndian_T eEndian, NMCtl_T *pCtl)
Pack an unsigned 32-bit Flat field into the message buffer.
static int nmUnpackFlatS32(const NMFieldDef_T *pFieldDef, byte_t buf[], size_t bufSize, void *pVal, NMEndian_T eEndian, NMCtl_T *pCtl)
Unpack a signed 32-bit Flat field from the message buffer.
const NMFieldDef_T * m_pFields
pointer to array of msg field definitions
int nmSetS32(const NMFieldDef_T *pFieldDef, void *pValIn, int *pValOut)
Helper function to set a signed 32-bit integer.
static int nmPackFlatP32(const NMFieldDef_T *pFieldDef, void *pVal, byte_t buf[], size_t bufSize, NMEndian_T eEndian, NMCtl_T *pCtl)
Pack a 32-bit pointer Flat field into the message buffer.
int nmPackF64(double val, byte_t buf[], size_t bufSize, NMEndian_T eEndian)
Pack a 64-bit float into the message buffer.
static int nmUnpackFlatS8(const NMFieldDef_T *pFieldDef, byte_t buf[], size_t bufSize, void *pVal, NMEndian_T eEndian, NMCtl_T *pCtl)
Unpack a signed 8-bit Flat field from the message buffer.
size_t m_uElemSize
vector element storage size
#define NM_ECODE_INTERNAL
internal inconsistency or bug
size_t m_uCount
number of items in vector
int nmUnpackU32(byte_t buf[], size_t bufSize, uint_t *pVal, NMEndian_T eEndian)
Unpack an unsigned 32-bit integer from the message buffer.
unsigned 32-bit integer unsigned int
INLINE_IN_H int nmPackS8(signed char val, byte_t buf[], size_t bufSize, NMEndian_T eEndian)
Pack a signed 8-bit byte into the message buffer.
int nmSetS64(const NMFieldDef_T *pFieldDef, void *pValIn, long long *pValOut)
Helper function to set a signed 64-bit integer.
#define NMLIB_RAISE_FIELD_ERROR(ecode, p, fmt,...)
Raise libnetmsgs field error (i.e. return from calling function).
Internal intra-library declarations.
int nmUnpackP64(byte_t buf[], size_t bufSize, void *pVal, NMEndian_T eEndian)
Unpack a 64-bit pointer from the message buffer.
int nmSetU64(const NMFieldDef_T *pFieldDef, void *pValIn, ulonglong_t *pValOut)
Helper function to set an unsigned 64-bit integer.
void nmPrintBuf(FILE *fp, const char *sPreface, byte_t buf[], size_t uCount, size_t uNLFreq, uint_t uCol)
Pretty print buffer to opened file stream.
static int nmPackFlatU64(const NMFieldDef_T *pFieldDef, void *pVal, byte_t buf[], size_t bufSize, NMEndian_T eEndian, NMCtl_T *pCtl)
Pack an unsigned 64-bit Flat field into the message buffer.
static int nmUnpackFlatVector(const NMFieldDef_T *pFieldDef, byte_t buf[], size_t bufSize, void *pVal, NMEndian_T eEndian, NMCtl_T *pCtl)
Unpack variable length vector Flat field from the message buffer.
int nmPackFlatMsg(const NMMsgDef_T *pMsgDef, void *pStruct, byte_t buf[], size_t bufSize, NMEndian_T eEndian)
Pack an Flat message.
INLINE_IN_H int NMHashFType(NMFType_T eFType)
Field Type to Index hash function.
#define NMLIB_ASCII_FTYPE(ftype)
Printable ASCII Field Type.
static int nmPackFlatVector(const NMFieldDef_T *pFieldDef, void *pVal, byte_t buf[], size_t bufSize, NMEndian_T eEndian, NMCtl_T *pCtl)
Pack variable length vector Flat field into the message buffer.
static int nmPackFlatS32(const NMFieldDef_T *pFieldDef, void *pVal, byte_t buf[], size_t bufSize, NMEndian_T eEndian, NMCtl_T *pCtl)
Pack a signed 32-bit Flat field into the message buffer.
Network Messaging declarations.
NMFieldThisPad_T m_pad
pad field specific info
int nmUnpackU8(byte_t buf[], size_t bufSize, byte_t *pVal, NMEndian_T eEndian)
Unpack an unsigned 8-bit byte from the message buffer.
static int nmPackFlatS64(const NMFieldDef_T *pFieldDef, void *pVal, byte_t buf[], size_t bufSize, NMEndian_T eEndian, NMCtl_T *pCtl)
Pack a signed 64-bit Flat field into the message buffer.
static int nmUnpackFlatF64(const NMFieldDef_T *pFieldDef, byte_t buf[], size_t bufSize, void *pVal, NMEndian_T eEndian, NMCtl_T *pCtl)
Unpack a 64-bit floating-point number Flat field from the message buffer.
#define NM_ECODE_RANGE
field size or value out-of-range
INLINE_IN_H int nmUnpackS16(byte_t buf[], size_t bufSize, short *pVal, NMEndian_T eEndian)
Unpack a signed 16-bit integer from the message buffer.
int nmSetU16(const NMFieldDef_T *pFieldDef, void *pValIn, ushort_t *pValOut)
Helper function to set an unsigned 16-bit integer.
size_t m_uOffset
member offset in assoc msg structure
INLINE_IN_H int nmPackS16(short val, byte_t buf[], size_t bufSize, NMEndian_T eEndian)
Pack a signed 16-bit integer into the message buffer.
Internal Control Structure.
static int nmPackFlatBool(const NMFieldDef_T *pFieldDef, void *pVal, byte_t buf[], size_t bufSize, NMEndian_T eEndian, NMCtl_T *pCtl)
Pack a boolean into an 8-bit Flat field into the message buffer.
int nmPackU64(ulonglong_t val, byte_t buf[], size_t bufSize, NMEndian_T eEndian)
Pack an unsigned 64-bit integer into the message buffer.
NMPackFunc_T m_fnPack
packer
unsigned 16-bit integer unsigned short
NMUnpackFunc_T m_fnUnpack
unpacker
signed 16-bit integer short
uint_t m_eFId
filed id (message/struct unique)
int nmUnpackP32(byte_t buf[], size_t bufSize, void *pVal, NMEndian_T eEndian)
Unpack a 32-bit pointer from the message buffer.
int nmPackP32(void *val, byte_t buf[], size_t bufSize, NMEndian_T eEndian)
Pack a 32-bit pointer into the message buffer.