DtHlaStateDecoder is used to provide decoding of a state message into a state repository in an HLA (as opposed to DIS) environment.
More...
|
| static char * | decodingBuffer (int length) |
| | Returns a pointer to a buffer that can be used to copy data obtained from a phvps. More...
|
| |
| static char * | attributeData (const RTI::AttributeHandleValuePairSet &attrs, int index, RTI::ULong &length) |
| | Returns a pointer to the attribute data. More...
|
| |
| static char * | attributeData (const RTI::AttributeHandleValuePairSet &attrs, int index, RTI::ULong &length, unsigned int expectedDataSize, char *attrName) |
| | Gets the attribute data and checks the expected size. More...
|
| |
| static DtNetEventId * | eventIdAttributeData (const RTI::AttributeHandleValuePairSet &attrs, int index) |
| | Get the attribute data as a DtNetEventId (adds defensive null terminator) Returns a pointer to the attribute data. More...
|
| |
| static std::wstring | wideStringFromHlaUnicodeString (char *buffer, int size, bool *error=nullptr) |
| | Gets data from an incoming buffer as a HlaUnicodeString and decodes it as a wide string. More...
|
| |
| static bool | getVectorFromArrayOfUuid (char *buffer, int size, std::vector< DtVrlUuid > &uuids) |
| | Gets data from an incoming buffer as an ArrayOfUuid and decodes it as a vector of type DtVrlUuid. More...
|
| |
DtHlaStateDecoder is used to provide decoding of a state message into a state repository in an HLA (as opposed to DIS) environment.
| typedef void(* DtHlaStateDecoder::DtAttributeDecoder)(DtStateRepository *stateRep, const RTI::AttributeHandleValuePairSet &avlist, unsigned long pairSetIndex) |
Attribute decoding function declaration.
| virtual DtHlaStateDecoder::~DtHlaStateDecoder |
( |
| ) |
|
|
virtual |
Add/Remove a decoding function for the attribute specified by handle.
Returns the decoding function which is replaced by the add/remove. Note: This is non-virtual, since it is typically called by constructors.
Referenced by DtF18EntityDecoder::DtF18EntityDecoder().
Add/Remove a decoding function for the attribute specified by name.
Complain flag determines whether to print a warning if the attribute does not exist in the FOM. Returns the decoding function which is replaced by the add/remove. Note: This is non-virtual, since it is typically called by constructors.
| char * DtHlaStateDecoder::attributeData |
( |
const RTI::AttributeHandleValuePairSet & |
attrs, |
|
|
int |
index, |
|
|
RTI::ULong & |
length |
|
) |
| |
|
inlinestatic |
| char * DtHlaStateDecoder::attributeData |
( |
const RTI::AttributeHandleValuePairSet & |
attrs, |
|
|
int |
index, |
|
|
RTI::ULong & |
length, |
|
|
unsigned int |
expectedDataSize, |
|
|
char * |
attrName |
|
) |
| |
|
inlinestatic |
Gets the attribute data and checks the expected size.
If the data length is too small, no data is collected (0 returned and length set to 0) and a warning is printed. A message is printed if the data length is too large. Returns a pointer to the attribute data (or 0 if length < expected size).
References decodingBuffer(), DtNlVerbose, DtNotifyLevel, DtVerbose, DtWarn, and theUseGetValuePointer.
Returns a new-ed clone of this object which corresponds to the class description classDesc.
Use this function if you want a subclass in the FOM to use the same decoder as its parent
Reimplemented in DtBaseEntityDecoder.
| virtual void DtHlaStateDecoder::decodeAttribute |
( |
DtStateRepository * |
stateRep, |
|
|
const RTI::AttributeHandleValuePairSet & |
attrs, |
|
|
unsigned long |
pairSetIndex |
|
) |
| const |
|
protectedvirtual |
Decode the attribute at the specified index in the attribute handle pair set.
Get the attribute decoder for the specified handle.
References myDecoderList.
| char * DtHlaStateDecoder::decodingBuffer |
( |
int |
length | ) |
|
|
inlinestatic |
| DtNetEventId * DtHlaStateDecoder::eventIdAttributeData |
( |
const RTI::AttributeHandleValuePairSet & |
attrs, |
|
|
int |
index |
|
) |
| |
|
inlinestatic |
Get the attribute data as a DtNetEventId (adds defensive null terminator) Returns a pointer to the attribute data.
References decodingBuffer().
| static bool DtHlaStateDecoder::getVectorFromArrayOfUuid |
( |
char * |
buffer, |
|
|
int |
size, |
|
|
std::vector< DtVrlUuid > & |
uuids |
|
) |
| |
|
static |
Gets data from an incoming buffer as an ArrayOfUuid and decodes it as a vector of type DtVrlUuid.
If it's a bad decoding, an error is printed and an empty vector is returned, and if provided, the error code is set to true.
| RTI::ObjectClassHandle DtHlaStateDecoder::objectClassHandle |
( |
| ) |
const |
|
inlinevirtual |
Get the object's class handle.
References myHandle.
| static std::wstring DtHlaStateDecoder::wideStringFromHlaUnicodeString |
( |
char * |
buffer, |
|
|
int |
size, |
|
|
bool * |
error = nullptr |
|
) |
| |
|
static |
Gets data from an incoming buffer as a HlaUnicodeString and decodes it as a wide string.
If it's a bad decoding, an error is printed and an empty string is returned, and if provided, the error code is set to true.
myDecoderList is a map of decoders for each attribute registered to this state.
Referenced by decoder().
| RTI::ObjectClassHandle DtHlaStateDecoder::myHandle |
|
protected |
myReportedWarnings is an array for keeping track of which warnings have been already issued.
This variable is set in const functions. The Decoders need to be const, but we would like to warn people only once.
| bool DtHlaStateDecoder::theUseGetValuePointer |
|
static |
The documentation for this class was generated from the following file: