netmsgs  1.2.2
RoadNarrows Robotics Network Messaging Package

Pack a byte buffer into the message buffer. More...

Pack a byte buffer into the message buffer.

Synopsis:
#include "rnr/netmsgs.h"

extern int nmPackBuf(byte_t bufSrc, size_t uCount, byte_t buf[], size_t bufSize, 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]bufSrcSource buffer.
uCountNumber of bytes to copy.
[out]bufOutput message buffer.
bufSizeSize of output buffer.
eEndianPacking order. See NMEndian_T.
Returns
On success, returns the number of bytes packed. On error, the appropriate negated netmsgs error code ( < 0) is returned.