![]() |
VR-Link API Documentation for HLA 1.3
|
class DtInteractionWithEncDec: More...
Inheritance diagram for DtInteractionWithEncDec:
Collaboration diagram for DtInteractionWithEncDec:Public Member Functions | |
| DtInteractionWithEncDec () | |
| default constructor | |
| virtual | ~DtInteractionWithEncDec () |
| destructor | |
| DtInteractionWithEncDec (const DtInteractionWithEncDec &orig) | |
| copy constructor | |
| DtInteractionWithEncDec & | operator= (const DtInteractionWithEncDec &orig) |
| assignment operator | |
| virtual void | setExConn (DtExerciseConn *exConn, DtInterClassDesc *classDesc=NULL) |
| Sets the interaction's ExerciseConn and class descriptor. | |
| virtual const RTI::ParameterHandleValuePairSet & | phvps () const |
| Get the parameter handle value pair set for the interaction. | |
| virtual void | setFromPhvps (const RTI::ParameterHandleValuePairSet &pvList) |
| Set contents from a parameter handle value pair set. | |
| virtual void | useThese (DtInteractionEncoder *enc, DtInteractionDecoder *dec, DtInteractionRep *data) |
| Specify an encoder, decoder, and interaction data repository to use in encoding and decoding. | |
| virtual DtInteractionEncoder * | encoder () const |
| Return the encoder we are using. | |
| virtual DtInteractionDecoder * | decoder () const |
| Return the decoder we are using. | |
Public Member Functions inherited from DtInteraction | |
| DtInteraction () | |
| default constructor | |
| virtual | ~DtInteraction () |
| destructor | |
| DtInteraction (const DtInteraction &orig) | |
| copy constructor | |
| DtInteraction & | operator= (const DtInteraction &orig) |
| assignment operator | |
| virtual RTI::InteractionClassHandle | interactionClassHandle () const |
| Get the interaction class handle. Returns 0 if no classDesc. | |
| virtual char * | interactionClassName () const |
| Get the interaction class name. Returns NULL if no classDesc. | |
| virtual int | numParameters () const |
| Get the number of parameters. Returns 0 if no classDesc. | |
| virtual bool | neededByFederation () const |
| Returns true if the interaction class is needed by the federation false otherwise. | |
| virtual void | print () const |
| Print the interaction's host rep data, including header. | |
| virtual void | printToStream (std::ostream &stream) const |
| Print the interaction to a stream. | |
| virtual void | printHeader () const |
| Print the header info. | |
| virtual void | printHeaderToStream (std::ostream &stream) const |
| Print the header info to a stream. | |
| virtual void | printData () const |
| Print the interaction's data to DtInfo. | |
| virtual void | printDataToString (DtString &buff) const |
| Print the interaction's data to the string provided. | |
| virtual void | printDataToStream (std::ostream &stream) const |
| Print the interaction's data to the stream. | |
| virtual void | printParams (bool withHex) const |
| Print the header followed by the interaction's parameters. | |
| virtual void | printParamsToStream (std::ostream &stream, bool withHex) const |
| Print the header followed by the interaction's parameters to a stream. | |
| virtual const char * | name () const =0 |
| Name of the interaction. (Not necessarily the ClassName from the FOM.) | |
| virtual DtExerciseConn * | exerciseConn () const |
| Get the current exercise connection. | |
| virtual DtInterClassDesc * | classDesc () const |
| Get the current class descriptor we're using for this interaction. | |
| virtual bool | customTagSet () const |
| Get whether a custom tag has been set on the interaction or not. | |
| virtual void | setCustomTag (const DtString &a_tag) |
| Set the user-defined tag. | |
| virtual void | setTag (const DtString &tag) |
| Set the user-defined tag. | |
| virtual const DtString & | tag () const |
| Get the user-defined tag. | |
| virtual const DtDDMRegion * | region () const |
| virtual DtDDMRegion * | region () |
| virtual void | setRegion (const DtDDMRegion ®ion) |
| virtual void | setTimeStamp (DtTime time, DtTimeStampType type=DtTimeStampRelative) |
| Set the time of validity of the message, and whether this represents relative or absolute time. | |
| virtual DtTime | timeStamp () const |
| Return the time of validity of the message (in seconds past an hour) as set by setTimeStamp. | |
| virtual DtTimeStampType | timeStampType () const |
| Return the type of the time stamp. | |
| virtual DtTime | guessTimeValid (DtTime referenceTime) const |
| Since timestamp only represents number of seconds past the hour, guessTimeValid chooses the hour that would make the timestamp closest to reference time, and returns a time that is timestamp seconds past that hour. | |
| virtual void | setFedTime (const RTI::FedTime &ft) |
| This is used for TSO interactions. | |
| virtual const RTI::FedTime * | fedTime () const |
| When the interaction is received, if the federate sending the interaction had TSO set then the fedTime will be set. | |
| virtual void | setEventRetractionHandle (const RTI::EventRetractionHandle &handle) |
| Get/Set the EventRetractionHandle. | |
| virtual RTI::EventRetractionHandle | eventRetractionHandle () const |
| Get the event retraction handle. For more info see setEventRetractionHandle. | |
Protected Member Functions | |
| virtual DtInteractionDecoder * | createDecoder (DtExerciseConn *exConn) const |
| Called by decoderToUse to obtain a new'ed decoder. | |
| virtual DtInteractionEncoder * | createEncoder (DtExerciseConn *exConn) const |
| Called by encoderToUse to obtain a new'ed encoder. | |
| virtual DtInteractionDecoder * | decoderToUse (DtExerciseConn *exConn) const |
| Returns a decoder to use for decoding the interaction. | |
| virtual DtInteractionEncoder * | encoderToUse (DtExerciseConn *exConn) const |
| Returns an encoder to use for encoding the interaction. | |
Protected Member Functions inherited from DtInteraction | |
| virtual char * | interactionClassToUse (DtExerciseConn *exConn) const |
| Returns the FOM interaction class name to use. | |
| virtual RTI::ParameterHandleValuePairSet * | privPvList () const |
| Returns a pointer to a private pvList that can be used as a return value by phvps. | |
| DtInteraction * | self () const |
| Get rid of const-ness on the "this" pointer in order to access non-const functions from const member functions (such as simple accessors). | |
Protected Attributes | |
| DtInteractionDecoder * | myDecoder |
| DtInteractionEncoder * | myEncoder |
| DtInteractionRep * | myData |
Protected Attributes inherited from DtInteraction | |
| DtInterClassDesc * | myClassDesc |
| DtExerciseConn * | myExConn |
| DtTime | myTime |
| DtTimeStampType | myTimeType |
| DtString | myTag |
| RTI::ParameterHandleValuePairSet * | myPvList |
| int | myPvListMaxSize |
| RTI::FedTime * | myFedTime |
| RTI::EventRetractionHandle | myRetractionHandle |
| DtDDMRegion * | myRegion |
| bool | myCustomTagSet |
Private Attributes | |
| DtInteractionDecoder * | myMutableCreatedDecoder |
| These data members are changed in const functions. | |
| DtInteractionEncoder * | myMutableCreatedEncoder |
| RTI::InteractionClassHandle | myMutableEncoderClassHandle |
| RTI::InteractionClassHandle | myMutableDecoderClassHandle |
Additional Inherited Members | |
Static Public Member Functions inherited from DtInteraction | |
| static void | setTagIsAsciiTime (bool val) |
| Set/Get flag that tells us whether we're using the RPR FOM convention that the UserDefinedTag in updates and interactions represents a DIS-style timestamp. | |
| static bool | tagIsAsciiTime () |
| static void | addCallback (DtExerciseConn *conn, const DtList *classes, DtReceiveInteractionCb cb, void *usr, DtDDMRegionSP region=DtDDMRegionSP()) |
| Register/Deregister callback function cb with conn, on all interaction class name (char*) contained in classes. | |
| static void | removeCallback (DtExerciseConn *conn, const DtList *classes, DtReceiveInteractionCb cb, void *usr, DtDDMRegionSP region=DtDDMRegionSP()) |
| static void | addCallback (DtExerciseConn *conn, const char *className, DtReceiveInteractionCb cb, void *usr, DtDDMRegionSP region=DtDDMRegionSP()) |
| Can be used instead of above for a single class. | |
| static void | removeCallback (DtExerciseConn *conn, const char *className, DtReceiveInteractionCb cb, void *usr, DtDDMRegionSP region=DtDDMRegionSP()) |
Static Protected Attributes inherited from DtInteraction | |
| static bool | theTagIsAsciiTime |
class DtInteractionWithEncDec:
DtInteractionWithEncDec is a DtInteraction that uses an encoder and decoder to implement the virtual functions phvps and setFromPhvps.
| DtInteractionWithEncDec::DtInteractionWithEncDec | ( | ) |
default constructor
|
virtual |
destructor
| DtInteractionWithEncDec::DtInteractionWithEncDec | ( | const DtInteractionWithEncDec & | orig | ) |
copy constructor
|
protectedvirtual |
Called by decoderToUse to obtain a new'ed decoder.
Default implementation is to ask the FOM Mapper. The object is automatically deleted in the interaction's destructor.
Reimplemented in DtL16RadioSignalInteraction, TestInteraction, DtJtidsLetRadioSignalInteraction, DtJtidsMessageRadioSignalInteraction, DtVmfRadioSignalInteraction, DtJtidsVoiceCvsdRadioSignalInteraction, DtJtidsVoiceLpc10RadioSignalInteraction, DtJtidsVoiceLpc12RadioSignalInteraction, DtRttabRadioSignalInteraction, and DtRttReplyRadioSignalInteraction.
|
protectedvirtual |
Called by encoderToUse to obtain a new'ed encoder.
Default implementation is to ask the FOM Mapper. The object is automatically deleted in the interaction's destructor.
Reimplemented in DtL16RadioSignalInteraction, TestInteraction, DtJtidsLetRadioSignalInteraction, DtJtidsMessageRadioSignalInteraction, DtVmfRadioSignalInteraction, DtJtidsVoiceCvsdRadioSignalInteraction, DtJtidsVoiceLpc10RadioSignalInteraction, DtJtidsVoiceLpc12RadioSignalInteraction, DtRttabRadioSignalInteraction, and DtRttReplyRadioSignalInteraction.
|
inlinevirtual |
Return the decoder we are using.
References myDecoder.
|
protectedvirtual |
Returns a decoder to use for decoding the interaction.
|
inlinevirtual |
Return the encoder we are using.
References myEncoder.
|
protectedvirtual |
Returns an encoder to use for encoding the interaction.
| DtInteractionWithEncDec& DtInteractionWithEncDec::operator= | ( | const DtInteractionWithEncDec & | orig | ) |
assignment operator
|
virtual |
Get the parameter handle value pair set for the interaction.
This is a slow function as the phvps is regenerated every time its called. Please do not count on the data in the phvps being correct after the function is called the second time.
Implements DtInteraction.
|
virtual |
Sets the interaction's ExerciseConn and class descriptor.
If classDesc is NULL, a default is chosen by calling interactionClassToUse(). Without being told what ExConn or class descriptor to use, many of the HLA-specific functions won't work properly. However, it is usually not necessary for application code to call this function, since it is called by DtExerciseConn::send on the outgoing side, and by the DtInteractionFactory on the incoming side.
Reimplemented from DtInteraction.
|
virtual |
Set contents from a parameter handle value pair set.
Implements DtInteraction.
|
virtual |
Specify an encoder, decoder, and interaction data repository to use in encoding and decoding.
Called by setExConn (using encoder and decoder obtained through encoderToUse() and decoderToUse()) so call AFTER setExConn if you want to override defaults. Caller is responsible for deleting enc, dec and data, but should do so only after they are no longer used by the interaction.
|
protected |
|
protected |
Referenced by decoder().
|
protected |
Referenced by encoder().
|
mutableprivate |
These data members are changed in const functions.
They are computed when we go to send an interaction and are cashed.
|
mutableprivate |
|
mutableprivate |
|
mutableprivate |