![]() |
VR-Link API Documentation for DIS
|
This class provides a wrapper around the DIS Receiver PDU network structure. More...
Inheritance diagram for DtReceiverPdu:
Collaboration diagram for DtReceiverPdu:Public Types | |
| enum | { PduStaticSize = 36 } |
| The static size of a Receiver PDU. More... | |
Public Member Functions | |
| DtReceiverPdu (DtBufferPtr buffer=DtUSE_INTERNAL_BUFFER) | |
| Default constructor. | |
| DtReceiverPdu (const DtNetReceiverPdu *initial, DtBufferPtr buffer=DtUSE_INTERNAL_BUFFER) | |
| Constructor that takes a Receiver PDU network structure. | |
| ~DtReceiverPdu () | |
| Destructor. | |
| virtual void | printData () const |
| Print the PDU's data to DtInfo. | |
| virtual void | printDataToStream (std::ostream &stream) const |
| Print the PDU's data to the specified stream. | |
| const DtEntityIdentifier & | entityId () const |
| Set/Get the Entity ID of the entity that the receiver is attached to. | |
| void | setEntityId (const DtEntityIdentifier &id) |
| Set/Get the Entity ID of the entity that the receiver is attached to. | |
| unsigned int | radioId () const |
| Set/Get the radio ID. | |
| void | setRadioId (unsigned int id) |
| Set/Get the radio ID. | |
| DtRadioReceiverState | receiverState () const |
| Set/Get the receiver state. | |
| void | setReceiverState (DtRadioReceiverState state) |
| Set/Get the receiver state. | |
| float | receivedPower () const |
| Set/Get the received power. | |
| void | setReceivedPower (float power) |
| Set/Get the received power. | |
| const DtEntityIdentifier & | transmitEntityId () const |
| Set/Get the transmitter's entity ID. | |
| void | setTransmitEntityId (const DtEntityIdentifier &id) |
| Set/Get the transmitter's entity ID. | |
| unsigned int | transmitRadioId () const |
| Set/Get the transmitter's radio ID. | |
| void | setTransmitRadioId (unsigned int id) |
| Set/Get the transmitter's radio ID. | |
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) |
| Static creator function that creates a Receiver PDU from a packet received on the network. | |
| static void | addCallback (DtExerciseConn *conn, DtReceiverPduCb cb, void *usr) |
| Add a callback to be called on Receiver PDU receipt. | |
| static void | removeCallback (DtExerciseConn *conn, DtReceiverPduCb cb, void *usr) |
| Remove the callback that's called on Receiver PDU receipt. | |
Protected Member Functions | |
| DtPduKind | internalGetPduKind () const |
| Returns the PDU kind. | |
Protected Attributes | |
| DtEntityIdentifier | theId |
| DtEntityIdentifier | transId |
This class provides a wrapper around the DIS Receiver PDU network structure.
| DtReceiverPdu::DtReceiverPdu | ( | DtBufferPtr | buffer = DtUSE_INTERNAL_BUFFER | ) |
Default constructor.
| DtReceiverPdu::DtReceiverPdu | ( | const DtNetReceiverPdu * | initial, |
| DtBufferPtr | buffer = DtUSE_INTERNAL_BUFFER |
||
| ) |
Constructor that takes a Receiver PDU network structure.
|
inline |
Destructor.
|
static |
Add a callback to be called on Receiver PDU receipt.
|
static |
Static creator function that creates a Receiver PDU from a packet received on the network.
| const DtEntityIdentifier& DtReceiverPdu::entityId | ( | ) | const |
Set/Get the Entity ID of the entity that the receiver is attached to.
|
inlineprotectedvirtual |
|
virtual |
Print the PDU's data to DtInfo.
Reimplemented from DtPdu.
|
virtual |
Print the PDU's data to the specified stream.
Reimplemented from DtPdu.
| unsigned int DtReceiverPdu::radioId | ( | ) | const |
Set/Get the radio ID.
| float DtReceiverPdu::receivedPower | ( | ) | const |
Set/Get the received power.
| DtRadioReceiverState DtReceiverPdu::receiverState | ( | ) | const |
Set/Get the receiver state.
|
static |
Remove the callback that's called on Receiver PDU receipt.
| void DtReceiverPdu::setEntityId | ( | const DtEntityIdentifier & | id | ) |
Set/Get the Entity ID of the entity that the receiver is attached to.
| void DtReceiverPdu::setRadioId | ( | unsigned int | id | ) |
Set/Get the radio ID.
| void DtReceiverPdu::setReceivedPower | ( | float | power | ) |
Set/Get the received power.
| void DtReceiverPdu::setReceiverState | ( | DtRadioReceiverState | state | ) |
Set/Get the receiver state.
| void DtReceiverPdu::setTransmitEntityId | ( | const DtEntityIdentifier & | id | ) |
Set/Get the transmitter's entity ID.
| void DtReceiverPdu::setTransmitRadioId | ( | unsigned int | id | ) |
Set/Get the transmitter's radio ID.
| const DtEntityIdentifier& DtReceiverPdu::transmitEntityId | ( | ) | const |
Set/Get the transmitter's entity ID.
| unsigned int DtReceiverPdu::transmitRadioId | ( | ) | const |
Set/Get the transmitter's radio ID.
|
protected |
|
protected |