netmsgs/libnetmsgs/nmLibPack.c
int nmUnpackF32(byte_t buf[], size_t bufSize, float *pVal, NMEndian_T eEndian)
{
  static size_t fvalLen = NMFVAL_LEN_F32;     // message field value length

  _NM_CHK_MEM(bufSize, fvalLen);
  _NM_CHK_ARCH(*pVal, fvalLen);

  switch( eEndian )
  {
    case NMEndianLittle:
      UNPACKLITTLE(buf, pVal);
      break;
    case NMEndianNative:
      UNPACKNATIVE(buf, pVal);
      break;
    case NMEndianBig:
    default:
      UNPACKBIG(buf, pVal);
      break;
  }


  return (int)fvalLen;
}
/*!
 * \brief Unpack a 32-bit float from the message buffer.
 *
 * The IEEE 754 32-bit format is used with both the big and little endian byte
 * orders.
 *
 * \note
 *  <em>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 <b>network</b>
 *  representation, no standard for transferring floating point values has been
 *  made</em> - Wikipedia.
 *
 *  \todo
 *  Detect non-IEEE 754 formats and convert to IEEE 754 prior to packing.
 *
 * \copydoc doc_params_unpack_std
 * \copydoc doc_return_unpack_std 
 */
\brief Unpack a 32-bit float from the message buffer.
The IEEE 754 32-bit format is used with both the big and little endian byte
orders.

\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.


\ brief Unpack a 32 - bit float from the message buffer . The IEEE 754 32 - bit format is used with both the big and little endian byte orders . \ 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 .
int nmUnpackF32(byte_t buf[], size_t bufSize, float *pVal, NMEndian_T eEndian)
{
  static size_t fvalLen = NMFVAL_LEN_F32;     
  _NM_CHK_MEM(bufSize, fvalLen);
  _NM_CHK_ARCH(*pVal, fvalLen);
  switch( eEndian )
  {
    case NMEndianLittle:
      UNPACKLITTLE(buf, pVal);
      break;
    case NMEndianNative:
      UNPACKNATIVE(buf, pVal);
      break;
    case NMEndianBig:
    default:
      UNPACKBIG(buf, pVal);
      break;
  }
  return (int)fvalLen;
}
int nmUnpackF32 ( byte_t buf [ ] , size_t bufSize , float * pVal , NMEndian_T eEndian ) { static size_t fvalLen = NMFVAL_LEN_F32 ; _NM_CHK_MEM ( bufSize , fvalLen ) ; _NM_CHK_ARCH ( * pVal , fvalLen ) ; switch ( eEndian ) { case NMEndianLittle : UNPACKLITTLE ( buf , pVal ) ; break ; case NMEndianNative : UNPACKNATIVE ( buf , pVal ) ; break ; case NMEndianBig : default : UNPACKBIG ( buf , pVal ) ; break ; } return ( int ) fvalLen ; }
\brief Unpack a 32-bit float from the message buffer.
\ brief Unpack a 32 - bit float from the message buffer .
// message field value length