![]() |
netmsgs
1.2.2
RoadNarrows Robotics Network Messaging Package
|
Flat message packing/unpacking definitions. More...
#include <stdio.h>#include <stdlib.h>#include <libgen.h>#include <string.h>#include "rnr/rnrconfig.h"#include "rnr/log.h"#include "rnr/netmsgs.h"#include "nmLibInternal.h"Go to the source code of this file.
Functions | |
| static NMPackFunc_T | nmLookupFlatPacker (NMFType_T eFType) |
| Lookup Flat packer function, given the message field type. More... | |
| static NMUnpackFunc_T | nmLookupFlatUnpacker (NMFType_T eFType) |
| Lookup Flat unpacker function, given the message field type. More... | |
| 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. More... | |
| 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. More... | |
| 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. More... | |
| 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. More... | |
| 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. More... | |
| 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. More... | |
| 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. More... | |
| 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. More... | |
| 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. More... | |
| 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. More... | |
| 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. More... | |
| 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. More... | |
| 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. More... | |
| 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. More... | |
| 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. More... | |
| 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. More... | |
| 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. More... | |
| 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. More... | |
| 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. More... | |
| 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. More... | |
| 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. More... | |
| 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. More... | |
| 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. More... | |
| 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. More... | |
| 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. More... | |
| 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. More... | |
| 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. More... | |
| 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. More... | |
| 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. More... | |
| 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. More... | |
| 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. More... | |
| 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. More... | |
| 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. More... | |
| 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. More... | |
| 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. More... | |
| 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. More... | |
| int | nmPackFlatMsg (const NMMsgDef_T *pMsgDef, void *pStruct, byte_t buf[], size_t bufSize, NMEndian_T eEndian) |
| Pack an Flat message. More... | |
| 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. More... | |
| int | nmUnpackFlatMsg (const NMMsgDef_T *pMsgDef, byte_t buf[], size_t uMsgLen, void *pStruct, NMEndian_T eEndian) |
| Unpack a Flat message. More... | |
| 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. More... | |
Variables | |
| static NMLookupTblEntry_T | NMFlatLookupTbl [] |
Flat message packing/unpacking definitions.
Definition in file nmLibPackFlat.c.
|
static |
Lookup Flat packer function, given the message field type.
| eFType | Message field type. |
Definition at line 1337 of file nmLibPackFlat.c.
References NMLookupTblEntry_T::m_fnPack, NM_ECODE_INTERNAL, NMHashFType(), NMHashNoIdx, NMLIB_ASCII_FTYPE, and NMLIB_ERROR.
Referenced by nmPackFlatStream(), and nmPackFlatVector().
|
static |
Lookup Flat unpacker function, given the message field type.
| eFType | Message field type. |
Definition at line 1372 of file nmLibPackFlat.c.
References NMLookupTblEntry_T::m_fnUnpack, NM_ECODE_INTERNAL, NMHashFType(), NMHashNoIdx, NMLIB_ASCII_FTYPE, and NMLIB_ERROR.
Referenced by nmUnpackFlatStream(), and nmUnpackFlatVector().
|
static |
Pack a boolean into an 8-bit Flat field into the message buffer.
| pFieldDef | Pointer to message field definition. | |
| [in] | pVal | Pointer to (typecasted) value to pack. |
| [out] | buf | Output message buffer. |
| bufSize | Size of output buffer. | |
| eEndian | Packing order. See NMEndian_T. | |
| pCtl | Internal control. |
Definition at line 120 of file nmLibPackFlat.c.
References NMLIB_TRACE_FIELD, and nmPackBool().
|
static |
Pack a 32-bit floating-point number Flat field into the message buffer.
| pFieldDef | Pointer to message field definition. | |
| [in] | pVal | Pointer to (typecasted) value to pack. |
| [out] | buf | Output message buffer. |
| bufSize | Size of output buffer. | |
| eEndian | Packing order. See NMEndian_T. | |
| pCtl | Internal control. |
Definition at line 387 of file nmLibPackFlat.c.
References NM_OK, NMLIB_TRACE_FIELD, nmPackF32(), and nmSetF32().
|
static |
Pack a 64-bit floating-point number Flat field into the message buffer.
| pFieldDef | Pointer to message field definition. | |
| [in] | pVal | Pointer to (typecasted) value to pack. |
| [out] | buf | Output message buffer. |
| bufSize | Size of output buffer. | |
| eEndian | Packing order. See NMEndian_T. | |
| pCtl | Internal control. |
Definition at line 418 of file nmLibPackFlat.c.
References NM_OK, NMLIB_TRACE_FIELD, nmPackF64(), and nmSetF64().
| int nmPackFlatMsg | ( | const NMMsgDef_T * | pMsgDef, |
| void * | pStruct, | ||
| byte_t | buf[], | ||
| size_t | bufSize, | ||
| NMEndian_T | eEndian | ||
| ) |
Pack an Flat message.
| pMsgDef | Pointer to message definition. | |
| [in] | pStruct | Pointer to the associated, populated message structure. |
| [out] | buf | Output message buffer. |
| bufSize | Size of output buffer. | |
| eEndian | Packing order. See NMEndian_T. |
Definition at line 1417 of file nmLibPackFlat.c.
References NMCtl_T::m_bNoHdr, NMCTL_INIT_DECL, and nmPackFlatStream().
Referenced by nmUnpackPointer().
| 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.
| pMsgDef | Pointer to message definition. | |
| [in] | pStruct | Pointer to the associated, populated message structure. |
| [out] | buf | Output message buffer. |
| bufSize | Size of output buffer. | |
| eEndian | Packing order. See NMEndian_T. |
Definition at line 1446 of file nmLibPackFlat.c.
References NMCtl_T::m_bNoHdr, NMCtl_T::m_bTrace, _nm_msg_def_struct::m_eMsgId, _nm_msg_def_struct::m_sMsgName, _nm_msg_def_struct::m_uCount, NMCTL_INIT_DECL, nmPackFlatStream(), and nmPrintBuf().
Referenced by nmUnpackPointer().
|
static |
Pack a 32-bit pointer Flat field into the message buffer.
| pFieldDef | Pointer to message field definition. | |
| [in] | pVal | Pointer to (typecasted) value to pack. |
| [out] | buf | Output message buffer. |
| bufSize | Size of output buffer. | |
| eEndian | Packing order. See NMEndian_T. | |
| pCtl | Internal control. |
Definition at line 448 of file nmLibPackFlat.c.
References NMLIB_TRACE_FIELD, and nmPackP32().
|
static |
Pack a 64-bit pointer Flat field into the message buffer.
| pFieldDef | Pointer to message field definition. | |
| [in] | pVal | Pointer to (typecasted) value to pack. |
| [out] | buf | Output message buffer. |
| bufSize | Size of output buffer. | |
| eEndian | Packing order. See NMEndian_T. | |
| pCtl | Internal control. |
Definition at line 471 of file nmLibPackFlat.c.
References NMLIB_TRACE_FIELD, and nmPackP64().
|
static |
Pack pad bytes into the message buffer.
| pFieldDef | Pointer to message field definition. | |
| [in] | pVal | Pointer to (typecasted) value to pack. |
| [out] | buf | Output message buffer. |
| bufSize | Size of output buffer. | |
| eEndian | Packing order. See NMEndian_T. | |
| pCtl | Internal control. |
Definition at line 89 of file nmLibPackFlat.c.
References _nm_field_def_struct::m_eFId, NMFieldThis_T::m_pad, _nm_field_def_struct::m_this, NMFieldThisPad_T::m_uCount, NM_ECODE_NOMEM, NMFVAL_PAD, NMLIB_RAISE_FIELD_ERROR, and NMLIB_TRACE_FIELD.
|
static |
Pack a signed 16-bit Flat field into the message buffer.
| pFieldDef | Pointer to message field definition. | |
| [in] | pVal | Pointer to (typecasted) value to pack. |
| [out] | buf | Output message buffer. |
| bufSize | Size of output buffer. | |
| eEndian | Packing order. See NMEndian_T. | |
| pCtl | Internal control. |
Definition at line 236 of file nmLibPackFlat.c.
References NM_OK, NMLIB_TRACE_FIELD, nmPackS16(), and nmSetS16().
|
static |
Pack a signed 32-bit Flat field into the message buffer.
| pFieldDef | Pointer to message field definition. | |
| [in] | pVal | Pointer to (typecasted) value to pack. |
| [out] | buf | Output message buffer. |
| bufSize | Size of output buffer. | |
| eEndian | Packing order. See NMEndian_T. | |
| pCtl | Internal control. |
Definition at line 296 of file nmLibPackFlat.c.
References NM_OK, NMLIB_TRACE_FIELD, nmPackS32(), and nmSetS32().
|
static |
Pack a signed 64-bit Flat field into the message buffer.
| pFieldDef | Pointer to message field definition. | |
| [in] | pVal | Pointer to (typecasted) value to pack. |
| [out] | buf | Output message buffer. |
| bufSize | Size of output buffer. | |
| eEndian | Packing order. See NMEndian_T. | |
| pCtl | Internal control. |
Definition at line 356 of file nmLibPackFlat.c.
References NM_OK, NMLIB_TRACE_FIELD, nmPackS64(), and nmSetS64().
|
static |
Pack a signed 8-bit Flat field into the message buffer.
| pFieldDef | Pointer to message field definition. | |
| [in] | pVal | Pointer to (typecasted) value to pack. |
| [out] | buf | Output message buffer. |
| bufSize | Size of output buffer. | |
| eEndian | Packing order. See NMEndian_T. | |
| pCtl | Internal control. |
Definition at line 176 of file nmLibPackFlat.c.
References NM_OK, NMLIB_TRACE_FIELD, nmPackS8(), and nmSetS8().
|
static |
Pack a Flat message.
| pMsgDef | Pointer to message definition. | |
| [in] | pStruct | Pointer to the associated, populated message structure. |
| [out] | buf | Output message buffer. |
| bufSize | Size of output buffer. | |
| eEndian | Packing order. See NMEndian_T. | |
| pCtl | Pointer to Internal control. |
Definition at line 690 of file nmLibPackFlat.c.
References _nm_field_def_struct::m_eFType, _nm_msg_def_struct::m_eMsgId, _nm_msg_def_struct::m_pFields, _nm_field_def_struct::m_uOffset, NM_ECODE_FTYPE, NM_ECODE_NOMEM, NMFTypePad, NMLIB_ASCII_FTYPE, NMLIB_RAISE_ERROR, NMLIB_RAISE_FIELD_ERROR, and nmLookupFlatPacker().
Referenced by nmPackFlatMsg(), nmPackFlatMsgDebug(), and nmPackFlatStruct().
|
static |
Pack null-terminated, fixed length string Flat field into the message buffer.
| pFieldDef | Pointer to message field definition. | |
| [in] | pVal | Pointer to (typecasted) value to pack. |
| [out] | buf | Output message buffer. |
| bufSize | Size of output buffer. | |
| eEndian | Packing order. See NMEndian_T. | |
| pCtl | Internal control. |
Definition at line 497 of file nmLibPackFlat.c.
References NMFieldThisString_T::m_sConst, NMFieldThis_T::m_string, _nm_field_def_struct::m_this, NMFieldThisString_T::m_uMaxCount, NM_ECODE_NOMEM, NM_ECODE_RANGE, NMLIB_RAISE_FIELD_ERROR, and NMLIB_TRACE_FIELD.
|
static |
Pack a structure Flat field into the message buffer.
| pFieldDef | Pointer to message field definition. | |
| [in] | pVal | Pointer to (typecasted) value to pack. |
| [out] | buf | Output message buffer. |
| bufSize | Size of output buffer. | |
| eEndian | Packing order. See NMEndian_T. | |
| pCtl | Internal control. |
Definition at line 554 of file nmLibPackFlat.c.
References _nm_msg_def_struct::m_sMsgName, NMFieldThis_T::m_struct, _nm_field_def_struct::m_this, _nm_msg_def_struct::m_uCount, NMCtl_T::m_uDepth, NMLIB_TRACE_FIELD, and nmPackFlatStream().
|
static |
Pack an unsigned 16-bit Flat field into the message buffer.
| pFieldDef | Pointer to message field definition. | |
| [in] | pVal | Pointer to (typecasted) value to pack. |
| [out] | buf | Output message buffer. |
| bufSize | Size of output buffer. | |
| eEndian | Packing order. See NMEndian_T. | |
| pCtl | Internal control. |
Definition at line 206 of file nmLibPackFlat.c.
References NM_OK, NMLIB_TRACE_FIELD, nmPackU16(), and nmSetU16().
|
static |
Pack an unsigned 32-bit Flat field into the message buffer.
| pFieldDef | Pointer to message field definition. | |
| [in] | pVal | Pointer to (typecasted) value to pack. |
| [out] | buf | Output message buffer. |
| bufSize | Size of output buffer. | |
| eEndian | Packing order. See NMEndian_T. | |
| pCtl | Internal control. |
Definition at line 266 of file nmLibPackFlat.c.
References NM_OK, NMLIB_TRACE_FIELD, nmPackU32(), and nmSetU32().
|
static |
Pack an unsigned 64-bit Flat field into the message buffer.
| pFieldDef | Pointer to message field definition. | |
| [in] | pVal | Pointer to (typecasted) value to pack. |
| [out] | buf | Output message buffer. |
| bufSize | Size of output buffer. | |
| eEndian | Packing order. See NMEndian_T. | |
| pCtl | Internal control. |
Definition at line 326 of file nmLibPackFlat.c.
References NM_OK, NMLIB_TRACE_FIELD, nmPackU64(), and nmSetU64().
|
static |
Pack an unsigned 8-bit Flat field into the message buffer.
| pFieldDef | Pointer to message field definition. | |
| [in] | pVal | Pointer to (typecasted) value to pack. |
| [out] | buf | Output message buffer. |
| bufSize | Size of output buffer. | |
| eEndian | Packing order. See NMEndian_T. | |
| pCtl | Internal control. |
Definition at line 146 of file nmLibPackFlat.c.
References NM_OK, NMLIB_TRACE_FIELD, nmPackU8(), and nmSetU8().
|
static |
Pack variable length vector Flat field into the message buffer.
A vector is a one-dimension array of the given type.
| pFieldDef | Pointer to message field definition. | |
| [in] | pVal | Pointer to (typecasted) value to pack. |
| [out] | buf | Output message buffer. |
| bufSize | Size of output buffer. | |
| eEndian | Packing order. See NMEndian_T. | |
| pCtl | Internal control. |
Definition at line 587 of file nmLibPackFlat.c.
References NMCtl_T::m_bNoHdr, NMVec_T::m_buf, _nm_field_def_struct::m_eFType, NMFieldThisVector_T::m_pThisElem, _nm_field_def_struct::m_this, NMVec_T::m_uCount, NMCtl_T::m_uDepth, NMFieldThisVector_T::m_uElemSize, NMFieldThisVector_T::m_uMaxCount, NMFieldThis_T::m_vector, NM_ECODE_FTYPE, NM_ECODE_NOMEM, NM_ECODE_RANGE, NMFTYPE_IS_SIMPLE, NMLIB_ASCII_FTYPE, NMLIB_RAISE_FIELD_ERROR, NMLIB_TRACE_FIELD, and nmLookupFlatPacker().
|
static |
Unpack an unsigned 8-bit boolean Flat field from the message buffer.
| pFieldDef | Pointer to message field definition. | |
| [in] | buf | Input message buffer. |
| bufSize | Size of input buffer. | |
| [out] | pVal | Pointer to value to unpack (set). |
| eEndian | Unpacking order. See NMEndian_T. | |
| pCtl | Internal control. |
Definition at line 793 of file nmLibPackFlat.c.
References NMLIB_TRACE_FIELD, and nmUnpackBool().
|
static |
Unpack a 32-bit floating-point number Flat field from the message buffer.
| pFieldDef | Pointer to message field definition. | |
| [in] | buf | Input message buffer. |
| bufSize | Size of input buffer. | |
| [out] | pVal | Pointer to value to unpack (set). |
| eEndian | Unpacking order. See NMEndian_T. | |
| pCtl | Internal control. |
Definition at line 1002 of file nmLibPackFlat.c.
References NMLIB_TRACE_FIELD, and nmUnpackF32().
|
static |
Unpack a 64-bit floating-point number Flat field from the message buffer.
| pFieldDef | Pointer to message field definition. | |
| [in] | buf | Input message buffer. |
| bufSize | Size of input buffer. | |
| [out] | pVal | Pointer to value to unpack (set). |
| eEndian | Unpacking order. See NMEndian_T. | |
| pCtl | Internal control. |
Definition at line 1026 of file nmLibPackFlat.c.
References NMLIB_TRACE_FIELD, and nmUnpackF64().
| int nmUnpackFlatMsg | ( | const NMMsgDef_T * | pMsgDef, |
| byte_t | buf[], | ||
| size_t | uMsgLen, | ||
| void * | pStruct, | ||
| NMEndian_T | eEndian | ||
| ) |
Unpack a Flat message.
| pMsgDef | Pointer to message definition. | |
| [in] | buf | Input message buffer. |
| uMsgLen | Length of message (bytes) in input buffer. | |
| [out] | pStruct | Pointer to the associated message structure to populate. |
| eEndian | Unpacking order. See NMEndian_T. |
Definition at line 1490 of file nmLibPackFlat.c.
References NMCtl_T::m_bNoHdr, NMCTL_INIT_DECL, and nmUnpackFlatStream().
Referenced by nmUnpackPointer().
| 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.
| pMsgDef | Pointer to message definition. | |
| [in] | buf | Input message buffer. |
| uMsgLen | Length of message (bytes) in input buffer. | |
| [out] | pStruct | Pointer to the associated message structure to populate. |
| eEndian | Unpacking order. See NMEndian_T. |
Definition at line 1520 of file nmLibPackFlat.c.
References NMCtl_T::m_bNoHdr, NMCtl_T::m_bTrace, _nm_msg_def_struct::m_eMsgId, _nm_msg_def_struct::m_sMsgName, _nm_msg_def_struct::m_uCount, NMCTL_INIT_DECL, nmPrintBuf(), and nmUnpackFlatStream().
Referenced by nmUnpackPointer().
|
static |
Unpack a 32-bit pointer Flat field from the message buffer.
| pFieldDef | Pointer to message field definition. | |
| [in] | buf | Input message buffer. |
| bufSize | Size of input buffer. | |
| [out] | pVal | Pointer to value to unpack (set). |
| eEndian | Unpacking order. See NMEndian_T. | |
| pCtl | Internal control. |
Definition at line 1049 of file nmLibPackFlat.c.
References NMLIB_TRACE_FIELD, and nmUnpackP32().
|
static |
Unpack a 64-bit pointer Flat field from the message buffer.
| pFieldDef | Pointer to message field definition. | |
| [in] | buf | Input message buffer. |
| bufSize | Size of input buffer. | |
| [out] | pVal | Pointer to value to unpack (set). |
| eEndian | Unpacking order. See NMEndian_T. | |
| pCtl | Internal control. |
Definition at line 1072 of file nmLibPackFlat.c.
References NMLIB_TRACE_FIELD, and nmUnpackP64().
|
static |
Unpack pad byte from the message buffer.
| pFieldDef | Pointer to message field definition. | |
| [in] | buf | Input message buffer. |
| bufSize | Size of input buffer. | |
| [out] | pVal | Pointer to value to unpack (set). |
| eEndian | Unpacking order. See NMEndian_T. | |
| pCtl | Internal control. |
Definition at line 763 of file nmLibPackFlat.c.
References _nm_field_def_struct::m_eFId, NMFieldThis_T::m_pad, _nm_field_def_struct::m_this, NMFieldThisPad_T::m_uCount, NM_ECODE_NOMEM, NMLIB_RAISE_FIELD_ERROR, and NMLIB_TRACE_FIELD.
|
static |
Unpack a signed 16-bit Flat field from the message buffer.
| pFieldDef | Pointer to message field definition. | |
| [in] | buf | Input message buffer. |
| bufSize | Size of input buffer. | |
| [out] | pVal | Pointer to value to unpack (set). |
| eEndian | Unpacking order. See NMEndian_T. | |
| pCtl | Internal control. |
Definition at line 886 of file nmLibPackFlat.c.
References NMLIB_TRACE_FIELD, and nmUnpackS16().
|
static |
Unpack a signed 32-bit Flat field from the message buffer.
| pFieldDef | Pointer to message field definition. | |
| [in] | buf | Input message buffer. |
| bufSize | Size of input buffer. | |
| [out] | pVal | Pointer to value to unpack (set). |
| eEndian | Unpacking order. See NMEndian_T. | |
| pCtl | Internal control. |
Definition at line 932 of file nmLibPackFlat.c.
References NMLIB_TRACE_FIELD, and nmUnpackS32().
|
static |
Unpack a signed 64-bit Flat field from the message buffer.
| pFieldDef | Pointer to message field definition. | |
| [in] | buf | Input message buffer. |
| bufSize | Size of input buffer. | |
| [out] | pVal | Pointer to value to unpack (set). |
| eEndian | Unpacking order. See NMEndian_T. | |
| pCtl | Internal control. |
Definition at line 978 of file nmLibPackFlat.c.
References NMLIB_TRACE_FIELD, and nmUnpackS64().
|
static |
Unpack a signed 8-bit Flat field from the message buffer.
| pFieldDef | Pointer to message field definition. | |
| [in] | buf | Input message buffer. |
| bufSize | Size of input buffer. | |
| [out] | pVal | Pointer to value to unpack (set). |
| eEndian | Unpacking order. See NMEndian_T. | |
| pCtl | Internal control. |
Definition at line 840 of file nmLibPackFlat.c.
References NMLIB_TRACE_FIELD, and nmUnpackS8().
|
static |
Unpack an Flat byte stream.
| pMsgDef | Pointer to message definition. | |
| [in] | buf | Input message buffer. |
| uMsgLen | Length of message (bytes) in input buffer. | |
| [out] | pStruct | Pointer to the associated message structure to populate. |
| eEndian | Unpacking order. See NMEndian_T. | |
| pCtl | Pointer to Internal control. |
Definition at line 1239 of file nmLibPackFlat.c.
References _nm_field_def_struct::m_eFType, _nm_msg_def_struct::m_eMsgId, _nm_msg_def_struct::m_pFields, _nm_field_def_struct::m_uOffset, NM_ECODE_FTYPE, NM_ECODE_NOMEM, NMFTypePad, NMLIB_ASCII_FTYPE, NMLIB_RAISE_ERROR, NMLIB_RAISE_FIELD_ERROR, and nmLookupFlatUnpacker().
Referenced by nmUnpackFlatMsg(), nmUnpackFlatMsgDebug(), and nmUnpackFlatStruct().
|
static |
Unpack variable length string Flat field from the message buffer.
| pFieldDef | Pointer to message field definition. | |
| [in] | buf | Input message buffer. |
| bufSize | Size of input buffer. | |
| [out] | pVal | Pointer to value to unpack (set). |
| eEndian | Unpacking order. See NMEndian_T. | |
| pCtl | Internal control. |
Definition at line 1097 of file nmLibPackFlat.c.
References NMFieldThis_T::m_string, _nm_field_def_struct::m_this, NMFieldThisString_T::m_uMaxCount, NM_ECODE_NOMEM, NMLIB_RAISE_FIELD_ERROR, and NMLIB_TRACE_FIELD.
|
static |
Unpack structure Flat field from the message buffer.
| pFieldDef | Pointer to message field definition. | |
| [in] | buf | Input message buffer. |
| bufSize | Size of input buffer. | |
| [out] | pVal | Pointer to value to unpack (set). |
| eEndian | Unpacking order. See NMEndian_T. | |
| pCtl | Internal control. |
Definition at line 1132 of file nmLibPackFlat.c.
References _nm_msg_def_struct::m_sMsgName, NMFieldThis_T::m_struct, _nm_field_def_struct::m_this, _nm_msg_def_struct::m_uCount, NMCtl_T::m_uDepth, NMLIB_TRACE_FIELD, and nmUnpackFlatStream().
|
static |
Unpack an unsigned 16-bit Flat field from the message buffer.
| pFieldDef | Pointer to message field definition. | |
| [in] | buf | Input message buffer. |
| bufSize | Size of input buffer. | |
| [out] | pVal | Pointer to value to unpack (set). |
| eEndian | Unpacking order. See NMEndian_T. | |
| pCtl | Internal control. |
Definition at line 863 of file nmLibPackFlat.c.
References NMLIB_TRACE_FIELD, and nmUnpackU16().
|
static |
Unpack an unsigned 32-bit Flat field from the message buffer.
| pFieldDef | Pointer to message field definition. | |
| [in] | buf | Input message buffer. |
| bufSize | Size of input buffer. | |
| [out] | pVal | Pointer to value to unpack (set). |
| eEndian | Unpacking order. See NMEndian_T. | |
| pCtl | Internal control. |
Definition at line 909 of file nmLibPackFlat.c.
References NMLIB_TRACE_FIELD, and nmUnpackU32().
|
static |
Unpack an unsigned 64-bit Flat field from the message buffer.
| pFieldDef | Pointer to message field definition. | |
| [in] | buf | Input message buffer. |
| bufSize | Size of input buffer. | |
| [out] | pVal | Pointer to value to unpack (set). |
| eEndian | Unpacking order. See NMEndian_T. | |
| pCtl | Internal control. |
Definition at line 955 of file nmLibPackFlat.c.
References NMLIB_TRACE_FIELD, and nmUnpackU64().
|
static |
Unpack an unsigned 8-bit Flat field from the message buffer.
| pFieldDef | Pointer to message field definition. | |
| [in] | buf | Input message buffer. |
| bufSize | Size of input buffer. | |
| [out] | pVal | Pointer to value to unpack (set). |
| eEndian | Unpacking order. See NMEndian_T. | |
| pCtl | Internal control. |
Definition at line 817 of file nmLibPackFlat.c.
References NMLIB_TRACE_FIELD, and nmUnpackU8().
|
static |
Unpack variable length vector Flat field from the message buffer.
A vector is a one-dimension array of the given type.
| pFieldDef | Pointer to message field definition. | |
| [in] | buf | Input message buffer. |
| bufSize | Size of input buffer. | |
| [out] | pVal | Pointer to value to unpack (set). |
| eEndian | Unpacking order. See NMEndian_T. | |
| pCtl | Internal control. |
Definition at line 1165 of file nmLibPackFlat.c.
References NMVec_T::m_buf, _nm_field_def_struct::m_eFType, NMFieldThisVector_T::m_pThisElem, _nm_field_def_struct::m_this, NMCtl_T::m_uDepth, NMFieldThisVector_T::m_uElemSize, NMFieldThisVector_T::m_uMaxCount, NMFieldThis_T::m_vector, NM_ECODE_FTYPE, NMLIB_ASCII_FTYPE, NMLIB_RAISE_FIELD_ERROR, NMLIB_TRACE_FIELD, and nmLookupFlatUnpacker().
|
static |
Flat Info Lookup Table
Definition at line 1308 of file nmLibPackFlat.c.