![]() |
VR-Link API Documentation for HLA 1516
|
Instances of DtInteractionDecoder are used to decode interactions from the network. More...
Inheritance diagram for DtInteractionDecoder:
Collaboration diagram for DtInteractionDecoder:Public Types | |
| typedef void(* | DtParameterDecoder )(DtInteractionRep *inter, const RTI::ParameterHandleValuePairSet &pvlist, int i) |
| Parameter decoder function signature. More... | |
Public Member Functions | |
| DtInteractionDecoder (DtExerciseConn *exConn, DtInterClassDesc *classDesc) | |
| constructor More... | |
| virtual | ~DtInteractionDecoder () |
| destructor More... | |
| DtParameterDecoder | addDecoder (RTI::ParameterHandle handle, DtParameterDecoder proc) |
| Add/Remove a decoding function for the parameter specified by handle. More... | |
| DtParameterDecoder | addDecoder (char *name, DtParameterDecoder proc) |
| Add/Remove a decoding function for the parameter specified by name. More... | |
| virtual DtParameterDecoder | decoder (RTI::ParameterHandle handle) const |
| Get the parameter decoder for the specified handle. More... | |
| virtual void | decode (DtInteractionRep *interaction, const RTI::ParameterHandleValueMap &pvMap) |
| Decode the interaction. More... | |
| virtual RTI::InteractionClassHandle | interactionClassHandle () |
| Get the interaction's class handle. More... | |
| virtual DtInteractionDecoder * | clone () const |
| Returns a new-ed clone of this object. More... | |
| virtual DtInteractionDecoder * | clone (DtInterClassDesc *interDesc) const |
| Returns a new-ed clone of this object which corresponds to the inter description interDesc. More... | |
Static Public Member Functions | |
| 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 * | parameterData (const RTI::ParameterHandleValuePairSet &pvList, int index, RTI::ULong &length) |
| Returns a pointer to a buffer containing the parameter data. More... | |
| static char * | parameterData (const RTI::ParameterHandleValuePairSet &pvList, int index, RTI::ULong &length, unsigned int expectedDataSize, const char *paramName) |
| Gets the parameter data and checks the expected size. More... | |
| static DtNetEventId * | eventIdParameterData (const RTI::ParameterHandleValuePairSet ¶ms, int index) |
| Get the parameter data as a DtNetEventId (adds defensive null terminator) Returns a pointer to the parameter data. More... | |
| static void | decodeGenericParameter (DtInteractionWithEncDec *inter, const RTI::ParameterHandleValuePairSet &pvlist, int i) |
| Generic decoder class. More... | |
Static Public Attributes | |
| static bool | theUseGetValuePointer |
Protected Member Functions | |
| DtInteractionDecoder (const DtInteractionDecoder &orig) | |
| copy constructor - not implemented. More... | |
| DtInteractionDecoder & | operator= (const DtInteractionDecoder &orig) |
| assignment operator - not implemented. More... | |
| virtual void | decodeParameter (DtInteractionRep *inter, const RTI::ParameterHandleValuePairSet &pvList, int index) |
| Process (decode) the specified parameter. More... | |
Protected Attributes | |
| DtExerciseConn * | myExConn |
| DtInterClassDesc * | myClassDesc |
| RTI::InteractionClassHandle | myClassHandle |
| std::map< RTI::ParameterHandle, DtParameterDecoder > | myList |
| myList is an array of classDesc->maxParamHandle() items. More... | |
Instances of DtInteractionDecoder are used to decode interactions from the network.
| typedef void(* DtInteractionDecoder::DtParameterDecoder)(DtInteractionRep *inter, const RTI::ParameterHandleValuePairSet &pvlist, int i) |
Parameter decoder function signature.
| DtInteractionDecoder::DtInteractionDecoder | ( | DtExerciseConn * | exConn, |
| DtInterClassDesc * | classDesc | ||
| ) |
constructor
|
virtual |
destructor
|
protected |
copy constructor - not implemented.
| DtParameterDecoder DtInteractionDecoder::addDecoder | ( | RTI::ParameterHandle | handle, |
| DtParameterDecoder | proc | ||
| ) |
Add/Remove a decoding function for the parameter 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.
| DtParameterDecoder DtInteractionDecoder::addDecoder | ( | char * | name, |
| DtParameterDecoder | proc | ||
| ) |
Add/Remove a decoding function for the parameter specified by name.
Returns the decoding function which is replaced by the add/remove. Note: This is non-virtual, since it is typically called by constructors.
|
virtual |
Returns a new-ed clone of this object.
|
virtual |
Returns a new-ed clone of this object which corresponds to the inter description interDesc.
Use this function if you want a subclass in the FOM to use the same decoder as its parent.
|
virtual |
Decode the interaction.
|
static |
Generic decoder class.
Stores data as a generic attributes in the given state repository.
|
protectedvirtual |
Process (decode) the specified parameter.
|
virtual |
Get the parameter decoder for the specified handle.
|
inlinestatic |
Returns a pointer to a buffer that can be used to copy data obtained from a phvps.
If the buffer isn't large enough to contain the data, more space will be allocated to it.
References DtDecodingBuffer().
Referenced by eventIdParameterData(), and parameterData().
|
inlinestatic |
Get the parameter data as a DtNetEventId (adds defensive null terminator) Returns a pointer to the parameter data.
References decodingBuffer(), rti1516::CompatibleHandleValuePairSet< HandleType, MapType >::getValue(), and rti1516::CompatibleHandleValuePairSet< HandleType, MapType >::getValueLength().
|
inlinevirtual |
Get the interaction's class handle.
References myClassHandle.
|
protected |
assignment operator - not implemented.
|
inlinestatic |
Returns a pointer to a buffer containing the parameter data.
References decodingBuffer(), rti1516::CompatibleHandleValuePairSet< HandleType, MapType >::getValue(), rti1516::CompatibleHandleValuePairSet< HandleType, MapType >::getValueLength(), rti1516::CompatibleHandleValuePairSet< HandleType, MapType >::getValuePointer(), and theUseGetValuePointer.
|
inlinestatic |
Gets the parameter 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 parameter data (or 0 if length < expected size).
References decodingBuffer(), DtNlVerbose, DtNotifyLevel, DtVerbose, DtWarn, rti1516::CompatibleHandleValuePairSet< HandleType, MapType >::getValue(), rti1516::CompatibleHandleValuePairSet< HandleType, MapType >::getValueLength(), rti1516::CompatibleHandleValuePairSet< HandleType, MapType >::getValuePointer(), and theUseGetValuePointer.
|
protected |
|
protected |
Referenced by interactionClassHandle().
|
protected |
|
protected |
myList is an array of classDesc->maxParamHandle() items.
|
static |
Referenced by parameterData().