![]() |
VR-Link API Documentation for DIS
|
Instances of DtDesignatorPduare used to communicate information about designator objects in DIS. More...
Inheritance diagram for DtDesignatorPdu:
Collaboration diagram for DtDesignatorPdu:Public Types | |
| enum | { DtDesignatorStaticSizeVERS5 = 88, DtDesignatorStaticSizeVERS4 = 72 } |
| Enumerator to describe the size of PDU's across DIS versions. More... | |
| enum | { PduStaticSize = DtDesignatorStaticSizeVERS5 } |
| Static size is defaulted to DIS version 5. More... | |
Public Member Functions | |
| DtDesignatorPdu (DtBufferPtr buffer=DtUSE_INTERNAL_BUFFER) | |
| Default constructor. | |
| DtDesignatorPdu (const DtNetDesignatorPdu *initial, DtBufferPtr buffer=DtUSE_INTERNAL_BUFFER) | |
| Constructor that takes a net packet. | |
| virtual void | printData () const |
| Prints the PDU's data to DtInfo. | |
| virtual void | printDataToStream (std::ostream &stream) const |
| Prints the PDU's data to the specified stream. | |
| const DtEntityIdentifier & | designatingEntityId () const |
| Get/Set the entity ID of the entity that the designator is attached to. | |
| void | setDesignatingEntityId (const DtEntityIdentifier &id) |
| Get/Set the entity ID of the entity that the designator is attached to. | |
| DtDesignatorCodeName | codeName () const |
| Get/Set the designator code name. | |
| void | setCodeName (DtDesignatorCodeName name) |
| Get/Set the designator code name. | |
| const DtEntityIdentifier & | designatedEntityId () const |
| Get/Set the designated entity ID. | |
| void | setDesignatedEntityId (const DtEntityIdentifier &id) |
| Get/Set the designated entity ID. | |
| DtDesignatorCode | designatorCode () const |
| Get/Set the designator code. | |
| void | setDesignatorCode (DtDesignatorCode code) |
| Get/Set the designator code. | |
| float | power () const |
| Get/Set the designator power. | |
| void | setPower (float power) |
| Get/Set the designator power. | |
| float | wavelength () const |
| Get/Set the designator wavelength. | |
| void | setWavelength (float wavelength) |
| Get/Set the designator wavelength. | |
| const DtVector & | designatorSpotRelative () const |
| Get/Set the designator spot with respect to the designated entity. | |
| void | setDesignatorSpotRelative (const DtVector &loc) |
| Get/Set the designator spot with respect to the designated entity. | |
| const DtVector & | designatorSpotWorld () const |
| Get/Set the designator spot location. | |
| void | setDesignatorSpotWorld (const DtVector &loc) |
| Get/Set the designator spot location. | |
| DtDeadReckonTypes | deadReckoningAlgorithm () const |
| Get/Set the dead reckoning algorithm. | |
| void | setDeadReckoningAlgorithm (DtDeadReckonTypes alg) |
| Get/Set the dead reckoning algorithm. | |
| const DtVector & | linearAcceleration () const |
| Get/Set the designator spot's linear acceleration. | |
| void | setLinearAcceleration (const DtVector &acc) |
| Get/Set the designator spot's linear acceleration. | |
Public Member Functions inherited from DtStateMsg | |
| DtStateMsg () | |
| default constructor | |
| virtual | ~DtStateMsg () |
| destructor | |
| DtStateMsg (const DtStateMsg &orig) | |
| copy constructor | |
| DtStateMsg & | operator= (const DtStateMsg &orig) |
| assignment operator | |
Public Member Functions inherited from DtPdu | |
| virtual | ~DtPdu () |
| Destructor. | |
| DtPdu (const DtPdu &pdu, DtBufferPtr buffer=DtUSE_INTERNAL_BUFFER) | |
| Copy constructor. | |
| DtPdu & | operator= (const DtPdu &pdu) |
| Assignment operator. | |
| virtual void * | packet () const |
| Older function that returns a pointer to the network representation. | |
| virtual int | status () const |
| Get PDU status. | |
| virtual void | setVersion (int vers) |
| Set/Get protocol version from PDU header. | |
| virtual int | protocolVersion () const |
| virtual void | setExerciseId (int id) |
| Set/Get exerciseID in PDU header. | |
| virtual int | exerciseId () const |
| virtual DtPduKind | kind () const |
| Returns PDU kind from PDU header. | |
| virtual DtProtocolFamily | protocolFamily () const |
| Returns protocol family from PDU header. | |
| virtual void | setTimeStamp (DtTime time, DtTimeStampType type=DtTimeStampRelative) |
| Set the PDU header's time stamp to reflect time and type. | |
| virtual DtTime | timeStamp () const |
| Return the time (in seconds past an hour) encoded in the PDU header's time stamp. | |
| virtual DtTimeStampType | timeStampType () const |
| Return the type of the time stamp, as indicated in PDU header. | |
| 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 DtNetPduHeader * | netHeader () const |
| Returns a pointer to the PDU's header. | |
| virtual void | print () const |
| Print the contents of the PDU by calling printToStream(DtInfo). | |
| virtual void | printToStream (std::ostream &stream) const |
| Print the contents of the PDU by calling printHeaderToStream and printDataToStream. | |
| virtual void | printHeader () const |
| Print the PDU's header. This calls printHeaderToStream(DtInfo). | |
| virtual void | printHeaderToStream (std::ostream &stream) const |
| Print the PDU's header to a stream. | |
| virtual void | printDataToString (DtString &str) const |
Public Member Functions inherited from DtBaseMsg | |
| virtual | ~DtBaseMsg () |
| Destructor. | |
| DtBaseMsg (const DtBaseMsg &msg, DtBufferPtr buffer=DtUSE_INTERNAL_BUFFER) | |
| Copy constructor. | |
| DtBaseMsg & | operator= (const DtBaseMsg &msg) |
| Assignment. | |
| virtual const char * | netRep () const |
| Get network representation. | |
| virtual int | length () const |
| Get size of message. | |
Static Public Member Functions | |
| static DtPdu * | create (const DtNetPacket *initial, DtBufferPtr buffer=DtUSE_INTERNAL_BUFFER) |
| Creator method that takes a net packet and creates a DtDesignatorPdu. | |
| static void | addCallback (DtExerciseConn *conn, DtDesignatorPduCb cb, void *usr) |
| Register a callback on the receipt of a Designator PDU. | |
| static void | removeCallback (DtExerciseConn *conn, DtDesignatorPduCb cb, void *usr) |
| Remove a callback registered using addCallback(). | |
Protected Member Functions | |
| DtPduKind | internalGetPduKind () const |
| Returns the PDU kind associated with the derived PDU class. | |
Protected Attributes | |
| DtEntityIdentifier | theId |
| DtVector | loc |
Instances of DtDesignatorPduare used to communicate information about designator objects in DIS.
| anonymous enum |
| DtDesignatorPdu::DtDesignatorPdu | ( | DtBufferPtr | buffer = DtUSE_INTERNAL_BUFFER | ) |
Default constructor.
| DtDesignatorPdu::DtDesignatorPdu | ( | const DtNetDesignatorPdu * | initial, |
| DtBufferPtr | buffer = DtUSE_INTERNAL_BUFFER |
||
| ) |
Constructor that takes a net packet.
|
static |
Register a callback on the receipt of a Designator PDU.
| DtDesignatorCodeName DtDesignatorPdu::codeName | ( | ) | const |
Get/Set the designator code name.
|
static |
Creator method that takes a net packet and creates a DtDesignatorPdu.
| DtDeadReckonTypes DtDesignatorPdu::deadReckoningAlgorithm | ( | ) | const |
Get/Set the dead reckoning algorithm.
| const DtEntityIdentifier& DtDesignatorPdu::designatedEntityId | ( | ) | const |
Get/Set the designated entity ID.
| const DtEntityIdentifier& DtDesignatorPdu::designatingEntityId | ( | ) | const |
Get/Set the entity ID of the entity that the designator is attached to.
| DtDesignatorCode DtDesignatorPdu::designatorCode | ( | ) | const |
Get/Set the designator code.
| const DtVector& DtDesignatorPdu::designatorSpotRelative | ( | ) | const |
Get/Set the designator spot with respect to the designated entity.
| const DtVector& DtDesignatorPdu::designatorSpotWorld | ( | ) | const |
Get/Set the designator spot location.
This takes a world coordinate location.
|
inlineprotectedvirtual |
Returns the PDU kind associated with the derived PDU class.
Implements DtPdu.
References DtDesignatorPduKind.
| const DtVector& DtDesignatorPdu::linearAcceleration | ( | ) | const |
Get/Set the designator spot's linear acceleration.
| float DtDesignatorPdu::power | ( | ) | const |
Get/Set the designator power.
|
virtual |
Prints the PDU's data to DtInfo.
Reimplemented from DtPdu.
|
virtual |
Prints the PDU's data to the specified stream.
Reimplemented from DtPdu.
|
static |
Remove a callback registered using addCallback().
| void DtDesignatorPdu::setCodeName | ( | DtDesignatorCodeName | name | ) |
Get/Set the designator code name.
| void DtDesignatorPdu::setDeadReckoningAlgorithm | ( | DtDeadReckonTypes | alg | ) |
Get/Set the dead reckoning algorithm.
| void DtDesignatorPdu::setDesignatedEntityId | ( | const DtEntityIdentifier & | id | ) |
Get/Set the designated entity ID.
| void DtDesignatorPdu::setDesignatingEntityId | ( | const DtEntityIdentifier & | id | ) |
Get/Set the entity ID of the entity that the designator is attached to.
| void DtDesignatorPdu::setDesignatorCode | ( | DtDesignatorCode | code | ) |
Get/Set the designator code.
| void DtDesignatorPdu::setDesignatorSpotRelative | ( | const DtVector & | loc | ) |
Get/Set the designator spot with respect to the designated entity.
| void DtDesignatorPdu::setDesignatorSpotWorld | ( | const DtVector & | loc | ) |
Get/Set the designator spot location.
This takes a world coordinate location.
| void DtDesignatorPdu::setLinearAcceleration | ( | const DtVector & | acc | ) |
Get/Set the designator spot's linear acceleration.
| void DtDesignatorPdu::setPower | ( | float | power | ) |
Get/Set the designator power.
| void DtDesignatorPdu::setWavelength | ( | float | wavelength | ) |
Get/Set the designator wavelength.
| float DtDesignatorPdu::wavelength | ( | ) | const |
Get/Set the designator wavelength.
|
protected |
|
protected |