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

  _NM_CHK_MEM(bufSize, 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 an unsigned 16-bit integer from the message buffer.
 *
 * \copydoc doc_params_unpack_std
 * \copydoc doc_return_unpack_std
 */
\brief Unpack an unsigned 16-bit integer from the message buffer.
\ brief Unpack an unsigned 16 - bit integer from the message buffer .
int nmUnpackU16(byte_t buf[],
                size_t bufSize,
                ushort_t *pVal,
                NMEndian_T eEndian)
{
  static size_t fvalLen = NMFVAL_LEN_U16;     
  _NM_CHK_MEM(bufSize, 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 nmUnpackU16 ( byte_t buf [ ] , size_t bufSize , ushort_t * pVal , NMEndian_T eEndian ) { static size_t fvalLen = NMFVAL_LEN_U16 ; _NM_CHK_MEM ( bufSize , 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 an unsigned 16-bit integer from the message buffer.
\ brief Unpack an unsigned 16 - bit integer from the message buffer .
// message field value length