![]() |
VR-Link API Documentation for DIS
|
Instances of DtRelativeLocationPdu are used to convey the fact that one unit is located at a position relative to another unit's world location. More...
Inheritance diagram for DtRelativeLocationPdu:
Collaboration diagram for DtRelativeLocationPdu:Public Member Functions | |
| DtRelativeLocationPdu (DtBufferPtr buffer=DtUSE_INTERNAL_BUFFER) | |
| The blank constructor creates a blank DtRelativeLocationPdu ready to be filled out and sent by application code. | |
| DtRelativeLocationPdu (const DtNetRelativeLocationPdu *initial, DtBufferPtr buffer=DtUSE_INTERNAL_BUFFER) | |
| The from-network-representation constructor makes a PDU from an already filled out buffer containing the exact bytes that represent this type of PDU. | |
| virtual | ~DtRelativeLocationPdu () |
| Destructor. | |
| DtRelativeLocationPdu (const DtRelativeLocationPdu &orig) | |
| Copy Constructor. | |
| DtRelativeLocationPdu & | operator= (const DtRelativeLocationPdu &orig) |
| Assignment operator. | |
| virtual void | printData () const |
| Print data function override prints out readable text representing the PDU instead of the raw hex. | |
| virtual void | printDataToStream (std::ostream &stream) const |
| Print the data to a stream. | |
| virtual DtNetRelativeLocationPdu * | networkRepresentation () |
| To make writing inspector/mutator functions easier these next two functions return a pointer to the PDU's network representation by casting the value returned by the base class' packet() function into a DtNetRelativeLocationPdu. | |
| virtual const DtNetRelativeLocationPdu * | networkRepresentation () const |
| virtual void | setId (const DtEntityIdentifier &id) |
| Set/Get Object Identifier of issuing unit. | |
| virtual const DtEntityIdentifier & | id () const |
| virtual void | setHostId (const DtEntityIdentifier &id) |
| Set/Get Object Identifier of host unit. | |
| virtual const DtEntityIdentifier & | hostId () const |
| virtual void | setRelativeAlgorithm (DtDeadReckonTypes alg) |
| Set/Get dead reckoning algorithm. | |
| virtual DtDeadReckonTypes | relativeAlgorithm () const |
| virtual void | setRelativeLocation (const DtVector &loc) |
| Set/Get the unit's world location. | |
| virtual const DtVector & | relativeLocation () const |
| virtual void | setRelativeVelocity (const DtVector &vel) |
| Set/Get the unit's velocity. | |
| virtual const DtVector & | relativeVelocity () const |
| virtual void | setRelativeAcceleration (const DtVector &accel) |
| Set/Get the unit's acceleration. | |
| virtual const DtVector & | relativeAcceleration () const |
| virtual void | setRelativeOrientation (const DtTaitBryan &orient) |
| Set/Get the unit's orientation. | |
| virtual const DtTaitBryan & | relativeOrientation () const |
| virtual void | setRelativeRotationalVelocity (const DtVector &vel) |
| Set/Get the unit's average acceleration. | |
| virtual const DtVector & | relativeRotationalVelocity () const |
| virtual void | setNature (DtNature value) |
| Set/Get the units nature. | |
| virtual DtNature | nature () const |
| virtual void | setPartPosition (DtPosition value) |
| Set/Get the unit's position. | |
| virtual DtPosition | partPosition () const |
| virtual void | setStationName (DtStationName value) |
| Set/Get the unit's station name. | |
| virtual DtStationName | stationName () const |
| virtual void | setStationNumber (DtU16 value) |
| Set/Get the unit's station number. | |
| virtual DtU16 | stationNumber () const |
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 buiffer=DtUSE_INTERNAL_BUFFER) |
| Create and return a new DtRelativeLocationPdu. | |
| static void | addCallback (DtExerciseConn *conn, DtRelativeLocationPduCb cb, void *usr) |
| Wrappers around DtExerciseConn's add/removeCallback functions. | |
| static void | removeCallback (DtExerciseConn *conn, DtRelativeLocationPduCb cb, void *usr) |
Protected Member Functions | |
| virtual DtPduKind | internalGetPduKind () const |
| Returns the PDU kind associated with the PDU class. | |
| DtRelativeLocationPdu * | self () const |
| Casts the 'this' pointer for changing elements in a const function. | |
Protected Attributes | |
| DtEntityIdentifier | myEntityId |
| These objects are for "reference returns". | |
| DtEntityIdentifier | myHostId |
| DtVector | myRelativeLocation |
| DtVector | myRelativeVelocity |
| DtVector | myRelativeAcceleration |
| DtTaitBryan | myRelativeOrientation |
| DtVector | myRelativeRotationalVelocity |
Instances of DtRelativeLocationPdu are used to convey the fact that one unit is located at a position relative to another unit's world location.
Useful for having units mounted on other units etc.
| DtRelativeLocationPdu::DtRelativeLocationPdu | ( | DtBufferPtr | buffer = DtUSE_INTERNAL_BUFFER | ) |
The blank constructor creates a blank DtRelativeLocationPdu ready to be filled out and sent by application code.
| DtRelativeLocationPdu::DtRelativeLocationPdu | ( | const DtNetRelativeLocationPdu * | initial, |
| DtBufferPtr | buffer = DtUSE_INTERNAL_BUFFER |
||
| ) |
The from-network-representation constructor makes a PDU from an already filled out buffer containing the exact bytes that represent this type of PDU.
This constructor is used by VR-Link to create an instance of this class from PDU data received from the network.
|
virtual |
Destructor.
| DtRelativeLocationPdu::DtRelativeLocationPdu | ( | const DtRelativeLocationPdu & | orig | ) |
Copy Constructor.
|
static |
Wrappers around DtExerciseConn's add/removeCallback functions.
The DtExerciseConn functions could be used instead but this keeps the non-typesafe cast limited to this one place. In addition within addCallback, this class' create function is registered with VR-Link, letting VR-Link know to create one of these to represent the right kind of PDU.
|
static |
Create and return a new DtRelativeLocationPdu.
Basically a wrapper around a constructor. Necessary because pointers to static functions like this can be registered with a DtPduFactory (which tells VR-Link how to construct an instance of a particular kind of PDU) but constructors can not.
|
virtual |
|
virtual |
|
protectedvirtual |
Returns the PDU kind associated with the PDU class.
This value goes in the header of all instances of this PDU class.
Implements DtPdu.
|
virtual |
|
virtual |
To make writing inspector/mutator functions easier these next two functions return a pointer to the PDU's network representation by casting the value returned by the base class' packet() function into a DtNetRelativeLocationPdu.
|
virtual |
| DtRelativeLocationPdu& DtRelativeLocationPdu::operator= | ( | const DtRelativeLocationPdu & | orig | ) |
Assignment operator.
|
virtual |
|
virtual |
Print data function override prints out readable text representing the PDU instead of the raw hex.
Reimplemented from DtPdu.
|
virtual |
Print the data to a stream.
Reimplemented from DtPdu.
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
static |
|
protected |
Casts the 'this' pointer for changing elements in a const function.
Non virtual, since you can't override based on return type.
|
virtual |
Set/Get Object Identifier of host unit.
|
virtual |
Set/Get Object Identifier of issuing unit.
|
virtual |
Set/Get the units nature.
|
virtual |
Set/Get the unit's position.
|
virtual |
Set/Get the unit's acceleration.
|
virtual |
Set/Get dead reckoning algorithm.
|
virtual |
Set/Get the unit's world location.
|
virtual |
Set/Get the unit's orientation.
|
virtual |
Set/Get the unit's average acceleration.
|
virtual |
Set/Get the unit's velocity.
|
virtual |
Set/Get the unit's station name.
|
virtual |
Set/Get the unit's station number.
|
virtual |
|
virtual |
|
protected |
These objects are for "reference returns".
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |