![]() |
VR-Link API Documentation for HLA 1516
|
DtInteraction is an abstract base class for representing HLA interactions (or events) (as opposed to HLA objects). More...
Inheritance diagram for DtInteraction:
Collaboration diagram for DtInteraction:Public Member Functions | |
| DtInteraction () | |
| default constructor | |
| virtual | ~DtInteraction () |
| destructor | |
| DtInteraction (const DtInteraction &orig) | |
| copy constructor | |
| DtInteraction & | operator= (const DtInteraction &orig) |
| assignment operator | |
| virtual const RTI::ParameterHandleValueMap & | phvm () const =0 |
| Get the parameter handle value pair set for the interaction. | |
| virtual void | setFromPhvm (const RTI::ParameterHandleValueMap &pvList)=0 |
| Set contents from a parameter handle value pair set. | |
| virtual void | setExConn (DtExerciseConn *exConn, DtInterClassDesc *classDesc=0) |
| Sets the interaction's ExerciseConn and class descriptor. | |
| 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 RTI::VariableLengthData &a_tag) |
| Set the user-defined tag. | |
| virtual void | setTag (const RTI::VariableLengthData &tag) |
| Set the user-defined tag. | |
| virtual const RTI::VariableLengthData & | tag () const |
| Get the user-defined tag. | |
| virtual const RTI::RegionHandleSet * | conveyedRegion () const |
| Get & Set the conveyed region of the reflected state message. | |
| virtual void | setConveyedRegion (const RTI::RegionHandleSet *sentRegionHandleSet) |
| 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::LogicalTime &ft) |
| This is used for TSO interactions. | |
| virtual const RTI::LogicalTime * | fedTime () const |
| When the interaction is received, if the federate sending the interaction had TSO set then the fedTime will be set. | |
| virtual void | setMessageRetractionHandle (const RTI::MessageRetractionHandle &handle) |
| Get/Set the MessageRetractionHandle. | |
| virtual RTI::MessageRetractionHandle | messageRetractionHandle () const |
| Get the message retraction handle. For more info see setMessageRetractionHandle. | |
Static Public Member Functions | |
| 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()) |
Protected Member Functions | |
| virtual char * | interactionClassToUse (DtExerciseConn *exConn) const |
| Returns the FOM interaction class name to use. | |
| virtual RTI::ParameterHandleValueMap & | 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 | |
| DtInterClassDesc * | myClassDesc |
| DtExerciseConn * | myExConn |
| DtTime | myTime |
| DtTimeStampType | myTimeType |
| RTI::LogicalTime * | myFedTime |
| RTI::ParameterHandleValueMap | myPvList |
| RTI::MessageRetractionHandle | myRetractionHandle |
| RTI::VariableLengthData | myTag |
| const RTI::RegionHandleSet * | myConveyedRegion |
| bool | myCustomTagSet |
Static Protected Attributes | |
| static bool | theTagIsAsciiTime |
DtInteraction is an abstract base class for representing HLA interactions (or events) (as opposed to HLA objects).
| DtInteraction::DtInteraction | ( | ) |
default constructor
|
virtual |
destructor
| DtInteraction::DtInteraction | ( | const DtInteraction & | orig | ) |
copy constructor
|
static |
Register/Deregister callback function cb with conn, on all interaction class name (char*) contained in classes.
|
static |
Can be used instead of above for a single class.
|
inlinevirtual |
Get the current class descriptor we're using for this interaction.
References myClassDesc.
|
virtual |
Get & Set the conveyed region of the reflected state message.
The region is only valid during the processing of the interaction callback. If the region information is needed after the callback it must be copied. If the region is NULL, there was not a conveyed region
|
virtual |
Get whether a custom tag has been set on the interaction or not.
|
inlinevirtual |
Get the current exercise connection.
References myExConn.
|
virtual |
When the interaction is received, if the federate sending the interaction had TSO set then the fedTime will be set.
If not you can compute time sent using timeStamp()
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.
|
inlinevirtual |
Get the interaction class handle. Returns 0 if no classDesc.
References DtInterClassDesc::handle(), and myClassDesc.
|
inlinevirtual |
Get the interaction class name. Returns NULL if no classDesc.
References myClassDesc, and DtInterClassDesc::name().
|
protectedvirtual |
Returns the FOM interaction class name to use.
Default implementation is to ask the fomMapper.
Reimplemented in TestSimpleInteraction, DtL16RadioSignalInteraction, TestInteraction, DtJtidsLetRadioSignalInteraction, DtJtidsMessageRadioSignalInteraction, DtVmfRadioSignalInteraction, DtJtidsVoiceCvsdRadioSignalInteraction, DtJtidsVoiceLpc10RadioSignalInteraction, DtJtidsVoiceLpc12RadioSignalInteraction, DtRttabRadioSignalInteraction, and DtRttReplyRadioSignalInteraction.
|
inlinevirtual |
Get the message retraction handle. For more info see setMessageRetractionHandle.
References myRetractionHandle.
|
pure virtual |
Name of the interaction. (Not necessarily the ClassName from the FOM.)
Implemented in DtSignalInteraction, DtDetonationInteraction, DtPointObjectTransaction, DtLinearObjectTransaction, DtFireInteraction, DtAttributeChangeReqInter, DtDataQueryInteraction, DtAttributeChangeResInter, DtRecordRInteraction, DtCreateObjReqInter, DtServiceRequestInteraction, DtTransferControlInteraction, DtResupplyOfferInteraction, DtArealObjectTransaction, DtResupplyRecInteraction, DtStopFreezeInteraction, DtStartResumeInteraction, DtCollisionInteraction, DtUnknownInteraction, DtSetRecordInteraction, TestSimpleInteraction, DtEnvironmentObjectTransaction, DtRemoveObjectRequestInter, DtAcknowledgeInteraction, DtActionRequestToObjInter, DtActionResponseInteraction, DtActionRequestInteraction, DtCommentInteraction, DtDataInteraction, DtEventReportInteraction, DtRepairCompleteInteraction, DtRepairResponseInteraction, DtSetDataInteraction, DtRemoveEntityInteraction, DtCreateEntityInteraction, DtRemoveObjectResultInter, DtResupplyCancelInteraction, DtCreateObjectResultInter, DtActionResponseFromObjInter, TestInteraction, DtJtidsLetRadioSignalInteraction, DtJtidsMessageRadioSignalInteraction, DtJtidsVoiceCvsdRadioSignalInteraction, DtJtidsVoiceLpc10RadioSignalInteraction, DtJtidsVoiceLpc12RadioSignalInteraction, DtL16RadioSignalInteraction, DtRttReplyRadioSignalInteraction, DtVmfRadioSignalInteraction, and DtRttabRadioSignalInteraction.
|
virtual |
Returns true if the interaction class is needed by the federation false otherwise.
Returns false if no classDesc.
|
inlinevirtual |
Get the number of parameters. Returns 0 if no classDesc.
References myClassDesc, and DtInterClassDesc::numParameters().
| DtInteraction& DtInteraction::operator= | ( | const DtInteraction & | orig | ) |
assignment operator
|
pure virtual |
Get the parameter handle value pair set for the interaction.
Implemented in TestSimpleInteraction, DtUnknownInteraction, and DtInteractionWithEncDec.
|
virtual |
Print the interaction's host rep data, including header.
|
inlinevirtual |
Print the interaction's data to DtInfo.
Reimplemented in TestSimpleInteraction, DtUnknownInteraction, DtLinearObjectTransaction, TestInteraction, DtResupplyOfferInteraction, DtDetonationInteraction, DtServiceRequestInteraction, DtSignalInteraction, DtResupplyRecInteraction, DtDataInteraction, DtEventReportInteraction, DtCommentInteraction, DtRemoveObjectRequestInter, DtActionRequestToObjInter, DtActionResponseInteraction, DtAttributeChangeReqInter, DtDataQueryInteraction, DtRemoveObjectResultInter, DtRepairCompleteInteraction, DtRepairResponseInteraction, DtResupplyCancelInteraction, DtSetDataInteraction, DtActionRequestInteraction, DtArealObjectTransaction, DtCreateObjectResultInter, DtPointObjectTransaction, DtRemoveEntityInteraction, DtStartResumeInteraction, DtStopFreezeInteraction, DtAttributeChangeResInter, DtCollisionInteraction, DtCreateEntityInteraction, DtFireInteraction, DtAcknowledgeInteraction, DtActionResponseFromObjInter, DtEnvironmentObjectTransaction, DtRecordRInteraction, DtCreateObjReqInter, DtTransferControlInteraction, DtInteractionWithData, DtSetRecordInteraction, and MyFireInteraction.
|
inlinevirtual |
Print the interaction's data to the stream.
Reimplemented in DtLinearObjectTransaction, DtDetonationInteraction, DtResupplyOfferInteraction, DtServiceRequestInteraction, DtSignalInteraction, DtResupplyRecInteraction, DtDataInteraction, DtEventReportInteraction, DtCommentInteraction, DtRemoveObjectRequestInter, DtActionRequestToObjInter, DtActionResponseInteraction, DtAttributeChangeReqInter, DtDataQueryInteraction, DtRemoveObjectResultInter, DtRepairCompleteInteraction, DtRepairResponseInteraction, DtResupplyCancelInteraction, DtSetDataInteraction, DtActionRequestInteraction, DtArealObjectTransaction, DtCreateObjectResultInter, DtPointObjectTransaction, DtRemoveEntityInteraction, DtStartResumeInteraction, DtStopFreezeInteraction, DtAttributeChangeResInter, DtCollisionInteraction, DtCreateEntityInteraction, DtFireInteraction, DtAcknowledgeInteraction, DtActionResponseFromObjInter, DtEnvironmentObjectTransaction, DtRecordRInteraction, DtCreateObjReqInter, DtTransferControlInteraction, DtInteractionWithData, DtSetRecordInteraction, DtJtidsLetRadioSignalInteraction, DtJtidsMessageRadioSignalInteraction, DtJtidsVoiceCvsdRadioSignalInteraction, DtJtidsVoiceLpc10RadioSignalInteraction, DtJtidsVoiceLpc12RadioSignalInteraction, DtL16RadioSignalInteraction, DtRttReplyRadioSignalInteraction, DtVmfRadioSignalInteraction, and DtRttabRadioSignalInteraction.
|
inlinevirtual |
Print the interaction's data to the string provided.
Reimplemented in DtDetonationInteraction, and DtFireInteraction.
|
virtual |
Print the header info.
|
virtual |
Print the header info to a stream.
|
virtual |
Print the header followed by the interaction's parameters.
|
virtual |
Print the header followed by the interaction's parameters to a stream.
|
virtual |
Print the interaction to a stream.
|
protectedvirtual |
Returns a pointer to a private pvList that can be used as a return value by phvps.
It's guaranteed to be able to fit at least numParameters() parameters.
|
static |
|
static |
|
inlineprotected |
Get rid of const-ness on the "this" pointer in order to access non-const functions from const member functions (such as simple accessors).
This should be used sparingly since it bypasses the const protection. Note: This is essentially like an operator and is non-virtual since can't override based on return type. Allows derived classes to also define this member.
|
virtual |
|
virtual |
Set the user-defined tag.
|
virtual |
Sets the interaction's ExerciseConn and class descriptor.
If classDesc is NULL, derived class's versions choose a reasonable default. 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 in DtUnknownInteraction, and DtInteractionWithEncDec.
|
virtual |
This is used for TSO interactions.
It is set with the value of clock()->simTime() before the interaction is sent. When an interaction is received, If its received with a FedTime this will be set.
|
pure virtual |
Set contents from a parameter handle value pair set.
Implemented in TestSimpleInteraction, DtUnknownInteraction, and DtInteractionWithEncDec.
|
inlinevirtual |
Get/Set the MessageRetractionHandle.
This value is set if the interaction is sent with TSO. If not, this value is undefined.
References myRetractionHandle.
|
virtual |
Set the user-defined tag.
|
static |
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.
|
virtual |
Set the time of validity of the message, and whether this represents relative or absolute time.
Time is in seconds, but only time modulo an hour is stored.
|
virtual |
Get the user-defined tag.
|
static |
|
virtual |
Return the time of validity of the message (in seconds past an hour) as set by setTimeStamp.
|
virtual |
Return the type of the time stamp.
|
protected |
Referenced by classDesc(), interactionClassHandle(), interactionClassName(), and numParameters().
|
protected |
|
protected |
|
protected |
Referenced by exerciseConn().
|
protected |
|
protected |
|
protected |
Referenced by messageRetractionHandle(), and setMessageRetractionHandle().
|
protected |
|
protected |
|
protected |
|
staticprotected |