netmsgs  1.2.2
RoadNarrows Robotics Network Messaging Package

Unpack a Flat message. More...

Unpack a Flat message.

Synopsis:
#include "rnr/netmsgs.h"

extern int nmUnpackFlatMsg(const NMMsgDef_T *pMsgDef, byte_t buf[], size_t uMsgLen, void *pStruct, NMEndian_T eEndian);

Description:

Parameters
pMsgDefPointer to message definition.
[in]bufInput message buffer.
uMsgLenLength of message (bytes) in input buffer.
[out]pStructPointer to the associated message structure to populate.
eEndianUnpacking order. See NMEndian_T.
Returns
On success, returns the number of bytes unpacked. On error, returns < 0.