![]() |
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 |
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.
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 DtRelativeLocationPdu::~DtRelativeLocationPdu | ( | ) | [virtual] |
Destructor.
| DtRelativeLocationPdu::DtRelativeLocationPdu | ( | const DtRelativeLocationPdu & | orig | ) |
Copy Constructor.
| static void DtRelativeLocationPdu::addCallback | ( | DtExerciseConn * | conn, |
| DtRelativeLocationPduCb | cb, | ||
| void * | usr | ||
| ) | [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 DtPdu* DtRelativeLocationPdu::create | ( | const DtNetPacket * | initial, |
| DtBufferPtr | buiffer = DtUSE_INTERNAL_BUFFER |
||
| ) | [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 const DtEntityIdentifier& DtRelativeLocationPdu::hostId | ( | ) | const [virtual] |
| virtual const DtEntityIdentifier& DtRelativeLocationPdu::id | ( | ) | const [virtual] |
| virtual DtPduKind DtRelativeLocationPdu::internalGetPduKind | ( | ) | const [protected, virtual] |
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 DtNature DtRelativeLocationPdu::nature | ( | ) | const [virtual] |
| virtual DtNetRelativeLocationPdu* DtRelativeLocationPdu::networkRepresentation | ( | ) | [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 const DtNetRelativeLocationPdu* DtRelativeLocationPdu::networkRepresentation | ( | ) | const [virtual] |
| DtRelativeLocationPdu& DtRelativeLocationPdu::operator= | ( | const DtRelativeLocationPdu & | orig | ) |
Assignment operator.
| virtual DtPosition DtRelativeLocationPdu::partPosition | ( | ) | const [virtual] |
| virtual void DtRelativeLocationPdu::printData | ( | ) | const [virtual] |
Print data function override prints out readable text representing the PDU instead of the raw hex.
Reimplemented from DtPdu.
| virtual void DtRelativeLocationPdu::printDataToStream | ( | std::ostream & | stream | ) | const [virtual] |
Print the data to a stream.
Reimplemented from DtPdu.
| virtual const DtVector& DtRelativeLocationPdu::relativeAcceleration | ( | ) | const [virtual] |
| virtual DtDeadReckonTypes DtRelativeLocationPdu::relativeAlgorithm | ( | ) | const [virtual] |
| virtual const DtVector& DtRelativeLocationPdu::relativeLocation | ( | ) | const [virtual] |
| virtual const DtTaitBryan& DtRelativeLocationPdu::relativeOrientation | ( | ) | const [virtual] |
| virtual const DtVector& DtRelativeLocationPdu::relativeRotationalVelocity | ( | ) | const [virtual] |
| virtual const DtVector& DtRelativeLocationPdu::relativeVelocity | ( | ) | const [virtual] |
| static void DtRelativeLocationPdu::removeCallback | ( | DtExerciseConn * | conn, |
| DtRelativeLocationPduCb | cb, | ||
| void * | usr | ||
| ) | [static] |
| DtRelativeLocationPdu* DtRelativeLocationPdu::self | ( | ) | const [protected] |
Casts the 'this' pointer for changing elements in a const function.
Non virtual, since you can't override based on return type.
| virtual void DtRelativeLocationPdu::setHostId | ( | const DtEntityIdentifier & | id | ) | [virtual] |
Set/Get Object Identifier of host unit.
| virtual void DtRelativeLocationPdu::setId | ( | const DtEntityIdentifier & | id | ) | [virtual] |
Set/Get Object Identifier of issuing unit.
| virtual void DtRelativeLocationPdu::setNature | ( | DtNature | value | ) | [virtual] |
Set/Get the units nature.
| virtual void DtRelativeLocationPdu::setPartPosition | ( | DtPosition | value | ) | [virtual] |
Set/Get the unit's position.
| virtual void DtRelativeLocationPdu::setRelativeAcceleration | ( | const DtVector & | accel | ) | [virtual] |
Set/Get the unit's acceleration.
| virtual void DtRelativeLocationPdu::setRelativeAlgorithm | ( | DtDeadReckonTypes | alg | ) | [virtual] |
Set/Get dead reckoning algorithm.
| virtual void DtRelativeLocationPdu::setRelativeLocation | ( | const DtVector & | loc | ) | [virtual] |
Set/Get the unit's world location.
| virtual void DtRelativeLocationPdu::setRelativeOrientation | ( | const DtTaitBryan & | orient | ) | [virtual] |
Set/Get the unit's orientation.
| virtual void DtRelativeLocationPdu::setRelativeRotationalVelocity | ( | const DtVector & | vel | ) | [virtual] |
Set/Get the unit's average acceleration.
| virtual void DtRelativeLocationPdu::setRelativeVelocity | ( | const DtVector & | vel | ) | [virtual] |
Set/Get the unit's velocity.
| virtual void DtRelativeLocationPdu::setStationName | ( | DtStationName | value | ) | [virtual] |
Set/Get the unit's station name.
| virtual void DtRelativeLocationPdu::setStationNumber | ( | DtU16 | value | ) | [virtual] |
Set/Get the unit's station number.
| virtual DtStationName DtRelativeLocationPdu::stationName | ( | ) | const [virtual] |
| virtual DtU16 DtRelativeLocationPdu::stationNumber | ( | ) | const [virtual] |
DtEntityIdentifier DtRelativeLocationPdu::myEntityId [protected] |
These objects are for "reference returns".
DtEntityIdentifier DtRelativeLocationPdu::myHostId [protected] |
DtVector DtRelativeLocationPdu::myRelativeLocation [protected] |
DtVector DtRelativeLocationPdu::myRelativeVelocity [protected] |