rtxIntDecode.h File Reference

General purpose integer decode functions. More...

#include "rtxsrc/rtxContext.h"

Go to the source code of this file.

Defines

#define rtxDecInt8(pctxt, pvalue)   rtxReadBytes(pctxt,pvalue,1)
 This macro decodes an 8-bit signed integer at the current message buffer/stream location and advances the pointer to the next field.
#define rtxDecUInt8(pctxt, pvalue)   rtxReadBytes(pctxt,pvalue,1)
 This macro decodes an 8-bit unsigned integer at the current message buffer/stream location and advances the pointer to the next field.

Functions

EXTERNRT int rtxDecInt16 (OSCTXT *pctxt, OSINT16 *pvalue, OSSIZE nbytes)
 This function decodes an 16-bit signed integer at the current message buffer/stream location and advances the pointer to the next field.
EXTERNRT int rtxDecInt32 (OSCTXT *pctxt, OSINT32 *pvalue, OSSIZE nbytes)
 This function decodes an 32-bit signed integer at the current message buffer/stream location and advances the pointer to the next field.
EXTERNRT int rtxDecUInt16 (OSCTXT *pctxt, OSUINT16 *pvalue, OSSIZE nbytes)
 This function decodes an 16-bit unsigned integer at the current message buffer/stream location and advances the pointer to the next field.
EXTERNRT int rtxDecUInt32 (OSCTXT *pctxt, OSUINT32 *pvalue, OSSIZE nbytes)
 This function decodes an 32-bit unsigned integer at the current message buffer/stream location and advances the pointer to the next field.

Detailed Description

General purpose integer decode functions.

These decode integer value contents that are encoded in big-endian form. This is a common format for a number of different encoding rules.

Definition in file rtxIntDecode.h.


Define Documentation

#define rtxDecInt8 ( pctxt,
pvalue   )     rtxReadBytes(pctxt,pvalue,1)

This macro decodes an 8-bit signed integer at the current message buffer/stream location and advances the pointer to the next field.

Parameters:
pctxt Pointer to context block structure.
pvalue Pointer to decoded 8-bit integer value.
Returns:
Completion status of operation:
  • 0 (0) = success,
  • negative return value is error.

Definition at line 49 of file rtxIntDecode.h.

#define rtxDecUInt8 ( pctxt,
pvalue   )     rtxReadBytes(pctxt,pvalue,1)

This macro decodes an 8-bit unsigned integer at the current message buffer/stream location and advances the pointer to the next field.

Parameters:
pctxt Pointer to context block structure.
pvalue Pointer to decoded 8-bit integer value.
Returns:
Completion status of operation:
  • 0 (0) = success,
  • negative return value is error.

Definition at line 87 of file rtxIntDecode.h.


Function Documentation

EXTERNRT int rtxDecInt16 ( OSCTXT pctxt,
OSINT16 *  pvalue,
OSSIZE  nbytes 
)

This function decodes an 16-bit signed integer at the current message buffer/stream location and advances the pointer to the next field.

Parameters:
pctxt Pointer to context block structure.
pvalue Pointer to decoded 16-bit integer value.
nbytes Number of bytes to decode (2 or less).
Returns:
Completion status of operation:
  • 0 (0) = success,
  • negative return value is error.
EXTERNRT int rtxDecInt32 ( OSCTXT pctxt,
OSINT32 *  pvalue,
OSSIZE  nbytes 
)

This function decodes an 32-bit signed integer at the current message buffer/stream location and advances the pointer to the next field.

Parameters:
pctxt Pointer to context block structure.
pvalue Pointer to decoded 32-bit integer value.
nbytes Number of bytes to decode (4 or less).
Returns:
Completion status of operation:
  • 0 (0) = success,
  • negative return value is error.
EXTERNRT int rtxDecUInt16 ( OSCTXT pctxt,
OSUINT16 *  pvalue,
OSSIZE  nbytes 
)

This function decodes an 16-bit unsigned integer at the current message buffer/stream location and advances the pointer to the next field.

Parameters:
pctxt Pointer to context block structure.
pvalue Pointer to decoded 16-bit integer value.
nbytes Number of bytes to decode (2 or less).
Returns:
Completion status of operation:
  • 0 (0) = success,
  • negative return value is error.
EXTERNRT int rtxDecUInt32 ( OSCTXT pctxt,
OSUINT32 *  pvalue,
OSSIZE  nbytes 
)

This function decodes an 32-bit unsigned integer at the current message buffer/stream location and advances the pointer to the next field.

Parameters:
pctxt Pointer to context block structure.
pvalue Pointer to decoded 32-bit integer value.
nbytes Number of bytes to decode (4 or less).
Returns:
Completion status of operation:
  • 0 (0) = success,
  • negative return value is error.