XBinder  Version 2.6.x
Macros | Functions
rtxIntDecode.h File Reference

General purpose integer decode functions. More...

#include "rtxsrc/rtxContext.h"

Go to the source code of this file.

Macros

#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. More...
 
#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. More...
 

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

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.

Macro Definition Documentation

◆ rtxDecInt8

#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
pctxtPointer to context block structure.
pvaluePointer 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.

◆ rtxDecUInt8

#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
pctxtPointer to context block structure.
pvaluePointer 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

◆ rtxDecInt16()

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
pctxtPointer to context block structure.
pvaluePointer to decoded 16-bit integer value.
nbytesNumber of bytes to decode (2 or less).
Returns
Completion status of operation:
  • 0 (0) = success,
  • negative return value is error.

◆ rtxDecInt32()

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
pctxtPointer to context block structure.
pvaluePointer to decoded 32-bit integer value.
nbytesNumber of bytes to decode (4 or less).
Returns
Completion status of operation:
  • 0 (0) = success,
  • negative return value is error.

◆ rtxDecUInt16()

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
pctxtPointer to context block structure.
pvaluePointer to decoded 16-bit integer value.
nbytesNumber of bytes to decode (2 or less).
Returns
Completion status of operation:
  • 0 (0) = success,
  • negative return value is error.

◆ rtxDecUInt32()

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
pctxtPointer to context block structure.
pvaluePointer to decoded 32-bit integer value.
nbytesNumber of bytes to decode (4 or less).
Returns
Completion status of operation:
  • 0 (0) = success,
  • negative return value is error.