VR-Link API Documentation for HLA 1516
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Public Member Functions | Static Public Member Functions | Protected Attributes
MyFireInteraction Class Reference

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. More...
 
virtual float temperature () const
 The temperature. More...
 
virtual void printData () const
 Virtual function override: print the interaction's data. More...
 
- Public Member Functions inherited from DtFireInteraction
 DtFireInteraction ()
 default constructor More...
 
virtual ~DtFireInteraction ()
 destructor More...
 
 DtFireInteraction (const DtFireInteraction &orig)
 copy constructor More...
 
DtFireInteractionoperator= (const DtFireInteraction &orig)
 assignment operator More...
 
virtual void printDataToStream (std::ostream &stream) const
 Print the interaction's data to the specified stream. More...
 
virtual void printDataToString (DtString &buffer) const
 Put the interaction's data into the given buffer. More...
 
virtual void setAttackerId (const DtGlobalObjectDesignator &id)
 Set/Get the attacker identifier. More...
 
virtual const
DtGlobalObjectDesignator
attackerId () const
 
virtual void setTargetId (const DtGlobalObjectDesignator &id)
 Set/Get the target identifier. More...
 
virtual const
DtGlobalObjectDesignator
targetId () const
 
virtual void setMunitionId (const DtGlobalObjectDesignator &id)
 Set/Get the munition identifier. More...
 
virtual const
DtGlobalObjectDesignator
munitionId () const
 
virtual void setEventId (const DtEventID &id)
 Set/Get the event id. More...
 
virtual const DtEventIDeventId () const
 
virtual void setFireMissionIndex (unsigned long i)
 Set/Get the fire mission index. More...
 
virtual unsigned long fireMissionIndex () const
 
virtual void setLocation (const DtVector &location)
 Set/Get the location in world coordinates. More...
 
virtual const DtVectorlocation () const
 
virtual void setVelocity (const DtVector32 &velocity)
 Set/Get the velocity. More...
 
virtual const DtVector32velocity () const
 
virtual void setRange (double range)
 Set/Get the range. More...
 
virtual double range () const
 
virtual void setFuseType (DtDetonatorFuze f)
 Set/Get the detonator fuse type. More...
 
virtual DtDetonatorFuze fuseType () const
 
virtual void setMunitionType (const DtEntityType &t)
 Set/Get the munition type. More...
 
virtual const DtEntityTypemunitionType () const
 
virtual void setQuantity (int q)
 Set/Get the quantity. More...
 
virtual int quantity () const
 
virtual void setRate (int r)
 Set/Get the rate. More...
 
virtual int rate () const
 
virtual void setWarheadType (DtWarheadType t)
 Set/Get the warhead type. More...
 
virtual DtWarheadType warheadType () const
 
virtual const char * name () const
 Name of the interaction. (Not necessarily the ClassName from the FOM.) More...
 
- Public Member Functions inherited from DtInteractionWithEncDec
 DtInteractionWithEncDec ()
 default constructor More...
 
virtual ~DtInteractionWithEncDec ()
 destructor More...
 
 DtInteractionWithEncDec (const DtInteractionWithEncDec &orig)
 copy constructor More...
 
DtInteractionWithEncDecoperator= (const DtInteractionWithEncDec &orig)
 assignment operator More...
 
virtual void setExConn (DtExerciseConn *exConn, DtInterClassDesc *classDesc=NULL)
 Sets the interaction's ExerciseConn and class descriptor. More...
 
virtual const
RTI::ParameterHandleValueMap & 
phvm () const
 Get the parameter handle value pair set for the interaction. More...
 
virtual void setFromPhvm (const RTI::ParameterHandleValueMap &pvList)
 Set contents from a parameter handle value pair set. More...
 
virtual void useThese (DtInteractionEncoder *enc, DtInteractionDecoder *dec, DtInteractionRep *data)
 Specify an encoder, decoder, and interaction data repository to use in encoding and decoding. More...
 
virtual DtInteractionEncoderencoder () const
 Return the encoder we are using. More...
 
virtual DtInteractionDecoderdecoder () const
 Return the decoder we are using. More...
 
virtual void setParameterByHandle (const RTI::ParameterHandle &attrHdl, const char *attrValue, unsigned size)
 Set the Parameter with the given handle. More...
 
virtual const char * getParameterByHandle (const RTI::ParameterHandle &attrHdl, unsigned &size) const
 Get a pointer to Parameter value for the Parameter with the given handle. More...
 
virtual void setParameterByName (const DtString &name, const char *attrValue, unsigned size)
 Set the Parameter with the given name. More...
 
virtual const char * getParameterByName (const DtString &name, unsigned &size) const
 Get a pointer to Parameter value for the Parameter with the given name. More...
 
- Public Member Functions inherited from DtInteraction
 DtInteraction ()
 default constructor More...
 
virtual ~DtInteraction ()
 destructor More...
 
 DtInteraction (const DtInteraction &orig)
 copy constructor More...
 
DtInteractionoperator= (const DtInteraction &orig)
 assignment operator More...
 
virtual RTI::InteractionClassHandle interactionClassHandle () const
 Get the interaction class handle. Returns 0 if no classDesc. More...
 
virtual char * interactionClassName () const
 Get the interaction class name. Returns NULL if no classDesc. More...
 
virtual int numParameters () const
 Get the number of parameters. Returns 0 if no classDesc. More...
 
virtual bool neededByFederation () const
 Returns true if the interaction class is needed by the federation false otherwise. More...
 
virtual void print () const
 Print the interaction's host rep data, including header. More...
 
virtual void printToStream (std::ostream &stream) const
 Print the interaction to a stream. More...
 
virtual void printHeader () const
 Print the header info. More...
 
virtual void printHeaderToStream (std::ostream &stream) const
 Print the header info to a stream. More...
 
virtual void printParams (bool withHex) const
 Print the header followed by the interaction's parameters. More...
 
virtual void printParamsToStream (std::ostream &stream, bool withHex) const
 Print the header followed by the interaction's parameters to a stream. More...
 
virtual DtExerciseConnexerciseConn () const
 Get the current exercise connection. More...
 
virtual DtInterClassDescclassDesc () const
 Get the current class descriptor we're using for this interaction. More...
 
virtual bool customTagSet () const
 Get whether a custom tag has been set on the interaction or not. More...
 
virtual void setCustomTag (const RTI::VariableLengthData &a_tag)
 Set the user-defined tag. More...
 
virtual void setTag (const RTI::VariableLengthData &tag)
 Set the user-defined tag. More...
 
virtual const
RTI::VariableLengthData & 
tag () const
 Get the user-defined tag. More...
 
virtual const
RTI::RegionHandleSet * 
conveyedRegion () const
 Get & Set the conveyed region of the reflected state message. More...
 
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. More...
 
virtual DtTime timeStamp () const
 Return the time of validity of the message (in seconds past an hour) as set by setTimeStamp. More...
 
virtual DtTimeStampType timeStampType () const
 Return the type of the time stamp. More...
 
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. More...
 
virtual void setFedTime (const RTI::LogicalTime &ft)
 This is used for TSO interactions. More...
 
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. More...
 
virtual void setMessageRetractionHandle (const RTI::MessageRetractionHandle &handle)
 Get/Set the MessageRetractionHandle. More...
 
virtual
RTI::MessageRetractionHandle 
messageRetractionHandle () const
 Get the message retraction handle. For more info see setMessageRetractionHandle. More...
 

Static Public Member Functions

static DtInteractioncreate ()
 Create a MyFireInteraction. Caller is responsible for deletion. More...
 
- Static Public Member Functions inherited from DtFireInteraction
static DtInteractioncreate ()
 Create a DtFireInteraction. More...
 
static void addCallback (DtExerciseConn *conn, DtFireInteractionCb cb, void *usr, DtDDMRegionSP region=DtDDMRegionSP())
 Add (register)/Remove (deregister) function to be called when interaction occurs. More...
 
static void removeCallback (DtExerciseConn *conn, DtFireInteractionCb cb, void *usr, DtDDMRegionSP region=DtDDMRegionSP())
 
- 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. More...
 
static bool tagIsAsciiTime ()
 
static void addCallback (DtExerciseConn *conn, const std::vector< DtString > *classes, DtReceiveInteractionCb cb, void *usr, DtDDMRegionSP region=DtDDMRegionSP())
 Register/Deregister callback function cb with conn, on all interaction class name (char*) contained in classes. More...
 
static void removeCallback (DtExerciseConn *conn, const std::vector< DtString > *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. More...
 
static void removeCallback (DtExerciseConn *conn, const char *className, DtReceiveInteractionCb 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
 
DtVector32 myVelocity
 
double myRange
 
DtDetonatorFuze myFuseType
 
DtEntityType myMunitionType
 
int myQuantity
 
int myRate
 
DtWarheadType myWarheadType
 
- Protected Attributes inherited from DtInteractionWithEncDec
DtInteractionDecodermyDecoder
 
DtInteractionEncodermyEncoder
 
DtInteractionRep * myData
 
std::map< RTI::ParameterHandle,
DtGenericParameterInfo * > 
myParametersByHandle
 parameters by handle. More...
 
- Protected Attributes inherited from DtInteraction
DtInterClassDescmyClassDesc
 
DtExerciseConnmyExConn
 
DtTime myTime
 
DtTimeStampType myTimeType
 
RTI::LogicalTime * myFedTime
 
RTI::ParameterHandleValueMap myPvList
 
RTI::MessageRetractionHandle myRetractionHandle
 
RTI::VariableLengthData myTag
 
const RTI::RegionHandleSet * myConveyedRegion
 
bool myCustomTagSet
 

Additional Inherited Members

- Protected Member Functions inherited from DtInteractionWithEncDec
virtual DtInteractionDecodercreateDecoder (DtExerciseConn *exConn) const
 Called by decoderToUse to obtain a new'ed decoder. More...
 
virtual DtInteractionEncodercreateEncoder (DtExerciseConn *exConn) const
 Called by encoderToUse to obtain a new'ed encoder. More...
 
virtual DtInteractionDecoderdecoderToUse (DtExerciseConn *exConn) const
 Returns a decoder to use for decoding the interaction. More...
 
virtual DtInteractionEncoderencoderToUse (DtExerciseConn *exConn) const
 Returns an encoder to use for encoding the interaction. More...
 
- Protected Member Functions inherited from DtInteraction
virtual const char * interactionClassToUse (DtExerciseConn *exConn) const
 Returns the FOM interaction class name to use. More...
 
virtual
RTI::ParameterHandleValueMap & 
privPvList () const
 Returns a pointer to a private pvList that can be used as a return value by phvps. More...
 
DtInteractionself () 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). More...
 
- Static Protected Attributes inherited from DtInteraction
static bool theTagIsAsciiTime
 

Detailed Description

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.

Member Function Documentation

DtInteraction * MyFireInteraction::create ( )
inlinestatic

Create a MyFireInteraction. Caller is responsible for deletion.

void MyFireInteraction::printData ( ) const
inlinevirtual

Virtual function override: print the interaction's data.

Reimplemented from DtFireInteraction.

References DtFireInteraction::printData(), and temperature().

void MyFireInteraction::setTemperature ( float  temp)
inlinevirtual

Set the temperature.

References myTemperature.

float MyFireInteraction::temperature ( ) const
inlinevirtual

The temperature.

References myTemperature.

Referenced by printData().

Member Data Documentation

float MyFireInteraction::myTemperature
protected

Referenced by setTemperature(), and temperature().


The documentation for this class was generated from the following file:

Document ID: Generated on Thu Sep 19 02:12:35 EDT 2024 from SVN revision 269601
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)