VR-Forces 4.3 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DtHlaBufferSerialize Namespace Reference

This namespace contains a set of utility functions for encoding and decoding various data types to/from a byte array in the format expected by an HLA federate. More...

Functions

DT_DLL_vrfutil charencode (const DtRwBoolean &val, char *buffer)
 Serializes the provided value val into buffer.
DT_DLL_vrfutil charencode (const DtRwReal &val, char *buffer)
 Serializes the provided value val into buffer.
DT_DLL_vrfutil charencode (const DtRwInt &val, char *buffer)
 Serializes the provided value val into buffer.
DT_DLL_vrfutil charencode (const DtRwString &val, char *buffer)
 Serializes the provided value val into buffer.
DT_DLL_vrfutil const chardecode (DtRwBoolean &val, const char *buffer)
 Decodes a value from buffer and places the result in val of the type specified by val.
DT_DLL_vrfutil const chardecode (DtRwReal &val, const char *buffer)
 Decodes a value from buffer and places the result in val of the type specified by val.
DT_DLL_vrfutil const chardecode (DtRwInt &val, const char *buffer)
 Decodes a value from buffer and places the result in val of the type specified by val.
DT_DLL_vrfutil const chardecode (DtRwString &val, const char *buffer)
 Decodes a value from buffer and places the result in val of the type specified by val.
DT_DLL_vrfutil int getSize (const DtRwBoolean &v)
 The number of bytes required to encode the value.
DT_DLL_vrfutil int getSize (const DtRwReal &v)
 The number of bytes required to encode the value.
DT_DLL_vrfutil int getSize (const DtRwInt &v)
 The number of bytes required to encode the value.
DT_DLL_vrfutil int getSize (const DtRwString &v)
 The number of bytes required to encode the value.

Detailed Description

This namespace contains a set of utility functions for encoding and decoding various data types to/from a byte array in the format expected by an HLA federate.

In many cases the encoding will be the same as DtBufferSerialize, but in some cases not. Each data type has a encode(), decode(), and getSize() method defined. Use of the templated versions require that any types passed into the template have these same methods defined.

Function Documentation

DT_DLL_vrfutil char* DtHlaBufferSerialize::encode ( const DtRwBoolean val,
char buffer 
)

Serializes the provided value val into buffer.

buffer must have at least the number of bytes returned by getSize() for the same parameter. No length checking is done on buffer.

Returns
The pointer for buffer following the serialization. This value may be passed into the next call to encode().
DT_DLL_vrfutil char* DtHlaBufferSerialize::encode ( const DtRwReal val,
char buffer 
)

Serializes the provided value val into buffer.

buffer must have at least the number of bytes returned by getSize() for the same parameter. No length checking is done on buffer.

Returns
The pointer for buffer following the serialization. This value may be passed into the next call to encode().
DT_DLL_vrfutil char* DtHlaBufferSerialize::encode ( const DtRwInt val,
char buffer 
)

Serializes the provided value val into buffer.

buffer must have at least the number of bytes returned by getSize() for the same parameter. No length checking is done on buffer.

Returns
The pointer for buffer following the serialization. This value may be passed into the next call to encode().
DT_DLL_vrfutil char* DtHlaBufferSerialize::encode ( const DtRwString val,
char buffer 
)

Serializes the provided value val into buffer.

buffer must have at least the number of bytes returned by getSize() for the same parameter. No length checking is done on buffer.

Returns
The pointer for buffer following the serialization. This value may be passed into the next call to encode().
DT_DLL_vrfutil const char* DtHlaBufferSerialize::decode ( DtRwBoolean val,
const char buffer 
)

Decodes a value from buffer and places the result in val of the type specified by val.

Buffer must contain a value created by the corresponding call to encode().

Returns
The pointer to buffer after the decode. This is appropriate to pass into the next call of decode().
DT_DLL_vrfutil const char* DtHlaBufferSerialize::decode ( DtRwReal val,
const char buffer 
)

Decodes a value from buffer and places the result in val of the type specified by val.

Buffer must contain a value created by the corresponding call to encode().

Returns
The pointer to buffer after the decode. This is appropriate to pass into the next call of decode().
DT_DLL_vrfutil const char* DtHlaBufferSerialize::decode ( DtRwInt val,
const char buffer 
)

Decodes a value from buffer and places the result in val of the type specified by val.

Buffer must contain a value created by the corresponding call to encode().

Returns
The pointer to buffer after the decode. This is appropriate to pass into the next call of decode().
DT_DLL_vrfutil const char* DtHlaBufferSerialize::decode ( DtRwString val,
const char buffer 
)

Decodes a value from buffer and places the result in val of the type specified by val.

Buffer must contain a value created by the corresponding call to encode().

Returns
The pointer to buffer after the decode. This is appropriate to pass into the next call of decode().
DT_DLL_vrfutil int DtHlaBufferSerialize::getSize ( const DtRwBoolean v)

The number of bytes required to encode the value.

DT_DLL_vrfutil int DtHlaBufferSerialize::getSize ( const DtRwReal v)

The number of bytes required to encode the value.

DT_DLL_vrfutil int DtHlaBufferSerialize::getSize ( const DtRwInt v)

The number of bytes required to encode the value.

DT_DLL_vrfutil int DtHlaBufferSerialize::getSize ( const DtRwString v)

The number of bytes required to encode the value.


Document ID: Generated on Wed Mar 11 21:20:57 EDT 2015 from SVN revision 150940
Copyright © 2005-2014 VT MÄK. All Rights Reserved (www.mak.com)