netmsgs  1.2.2
RoadNarrows Robotics Network Messaging Package

Pack a 64-bit float into the message buffer. More...

Pack a 64-bit float into the message buffer.

Synopsis:
#include "rnr/netmsgs.h"

extern int nmPackF64(double val, byte_t buf[], size_t bufSize, NMEndian_T eEndian);

Description:
The IEEE 754 64-bit format is used with both the big and little endian byte orders. If the machine architecture only supports 32-bit doubles, then a conversion to 64-bit representation is performed first.

Note
On some machines, while integers were represented in little-endian form, floating point numbers were represented in big-endian form. Because there are many floating point formats, and a lack of a standard network representation, no standard for transferring floating point values has been made - Wikipedia.
Todo:
Detect non-IEEE 754 formats and convert to IEEE 754 prior to packing.
Parameters
[in]valValue to pack.
[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.