netmsgs  1.2.2
RoadNarrows Robotics Network Messaging Package

Unpack a byte buffer from the message buffer. More...

Unpack a byte buffer from the message buffer.

Synopsis:
#include "rnr/netmsgs.h"

extern int nmUnpackBuf(byte_t buf[], size_t bufSize, byte_t bufDst[], size_t uCount, NMEndian_T eEndian);

Description:
The source and message buffer memory areas can overlap.

Note
The buffer is always packed in sequential order ignoring the byte order parameter.
Parameters
[in]bufInput message buffer.
bufSizeSize of input buffer.
[out]bufDstDestination output buffer.
uCountNumber of bytes to copy.
eEndianUnpacking order. See NMEndian_T.
Returns
On success, returns the number of bytes unpacked. On error, the appropriate negated netmsgs error code ( < 0) is returned.