![]() |
VR-Link API Documentation for HLA Evolved
|
Because this example adds a concept that did not already exist in VR-Link's DtFireInteraction class, we create this subclass of DtFireInteraction that adds the concept of temperature. More...
Inheritance diagram for MyFireInteraction:
Collaboration diagram for MyFireInteraction:Public Member Functions | |
| virtual void | setTemperature (float temp) |
| Set the temperature. | |
| virtual float | temperature () const |
| The temperature. | |
| virtual void | printData () const |
| Virtual function override: print the interaction's data. | |
Public Member Functions inherited from DtFireInteraction | |
| DtFireInteraction () | |
| default constructor | |
| virtual | ~DtFireInteraction () |
| destructor | |
| DtFireInteraction (const DtFireInteraction &orig) | |
| copy constructor | |
| DtFireInteraction & | operator= (const DtFireInteraction &orig) |
| assignment operator | |
| virtual void | printDataToStream (std::ostream &stream) const |
| Print the interaction's data to the specified stream. | |
| virtual void | printDataToString (DtString &buffer) const |
| Put the interaction's data into the given buffer. | |
| virtual void | setAttackerId (const DtGlobalObjectDesignator &id) |
| Set/Get the attacker identifier. | |
| virtual const DtGlobalObjectDesignator & | attackerId () const |
| virtual void | setTargetId (const DtGlobalObjectDesignator &id) |
| Set/Get the target identifier. | |
| virtual const DtGlobalObjectDesignator & | targetId () const |
| virtual void | setMunitionId (const DtGlobalObjectDesignator &id) |
| Set/Get the munition identifier. | |
| virtual const DtGlobalObjectDesignator & | munitionId () const |
| virtual void | setEventId (const DtEventID &id) |
| Set/Get the event id. | |
| virtual const DtEventID & | eventId () const |
| virtual void | setFireMissionIndex (unsigned long i) |
| Set/Get the fire mission index. | |
| virtual unsigned long | fireMissionIndex () const |
| virtual void | setLocation (const DtVector &location) |
| Set/Get the location in world coordinates. | |
| virtual const DtVector & | location () const |
| virtual void | setVelocity (const DtVector &velocity) |
| Set/Get the velocity. | |
| virtual const DtVector & | velocity () const |
| virtual void | setRange (double range) |
| Set/Get the range. | |
| virtual double | range () const |
| virtual void | setFuseType (DtDetonatorFuze f) |
| Set/Get the detonator fuse type. | |
| virtual DtDetonatorFuze | fuseType () const |
| virtual void | setMunitionType (const DtEntityType &t) |
| Set/Get the munition type. | |
| virtual const DtEntityType & | munitionType () const |
| virtual void | setQuantity (int q) |
| Set/Get the quantity. | |
| virtual int | quantity () const |
| virtual void | setRate (int r) |
| Set/Get the rate. | |
| virtual int | rate () const |
| virtual void | setWarheadType (DtWarheadType t) |
| Set/Get the warhead type. | |
| virtual DtWarheadType | warheadType () const |
| virtual const char * | name () const |
| Name of the interaction. (Not necessarily the ClassName from the FOM.) | |
Public Member Functions inherited from DtInteractionWithEncDec | |
| 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 | 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 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 const DtString & | producingFederate () const |
| virtual void | setProducingFederate (const DtString &fedName) |
| 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. | |
Static Public Member Functions | |
| static DtInteraction * | create () |
| Create a MyFireInteraction. Caller is responsible for deletion. | |
Static Public Member Functions inherited from DtFireInteraction | |
| static void | addCallback (DtExerciseConn *conn, DtFireInteractionCb cb, void *usr, DtDDMRegionSP region=DtDDMRegionSP()) |
| Add (register)/Remove (deregister) function to be called when interaction occurs. | |
| static void | removeCallback (DtExerciseConn *conn, DtFireInteractionCb cb, void *usr, DtDDMRegionSP region=DtDDMRegionSP()) |
Protected Attributes | |
| float | myTemperature |
Protected Attributes inherited from DtFireInteraction | |
| DtGlobalObjectDesignator | myAttackerId |
| DtGlobalObjectDesignator | myTargetId |
| DtGlobalObjectDesignator | myMunitionId |
| DtEventID | myEventId |
| unsigned long | myFireMissionIndex |
| DtVector | myLocation |
| DtVector | myVelocity |
| double | myRange |
| DtDetonatorFuze | myFuseType |
| DtEntityType | myMunitionType |
| int | myQuantity |
| int | myRate |
| DtWarheadType | myWarheadType |
Protected Attributes inherited from DtInteractionWithEncDec | |
| 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 |
Additional Inherited Members | |
Protected Member Functions inherited from DtInteractionWithEncDec | |
| 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. | |
Static Protected Attributes inherited from DtInteraction | |
| static bool | theTagIsAsciiTime |
Because this example adds a concept that did not already exist in VR-Link's DtFireInteraction class, we create this subclass of DtFireInteraction that adds the concept of temperature.
|
inlinestatic |
Create a MyFireInteraction. Caller is responsible for deletion.
Reimplemented from DtFireInteraction.
|
inlinevirtual |
Virtual function override: print the interaction's data.
Reimplemented from DtFireInteraction.
References temperature().
|
inlinevirtual |
Set the temperature.
References myTemperature.
|
inlinevirtual |
|
protected |
Referenced by setTemperature(), and temperature().