VR-Link API Documentation for DIS
List of all members | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes
DtReceiverPdu Class Reference

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 DtEntityIdentifierentityId () 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 DtEntityIdentifiertransmitEntityId () 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
DtStateMsgoperator= (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.
DtPduoperator= (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 DtNetPduHeadernetHeader () 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.
DtBaseMsgoperator= (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 DtPducreate (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

Detailed Description

This class provides a wrapper around the DIS Receiver PDU network structure.

Member Enumeration Documentation

anonymous enum

The static size of a Receiver PDU.

Enumerator:
PduStaticSize 

Constructor & Destructor Documentation

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.

DtReceiverPdu::~DtReceiverPdu ( )
inline

Destructor.

Member Function Documentation

static void DtReceiverPdu::addCallback ( DtExerciseConn conn,
DtReceiverPduCb  cb,
void *  usr 
)
static

Add a callback to be called on Receiver PDU receipt.

static DtPdu* DtReceiverPdu::create ( const DtNetPacket initial,
DtBufferPtr  buffer = DtUSE_INTERNAL_BUFFER 
)
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.

DtPduKind DtReceiverPdu::internalGetPduKind ( ) const
inlineprotectedvirtual

Returns the PDU kind.

Implements DtPdu.

References DtReceiverPduKind.

virtual void DtReceiverPdu::printData ( ) const
virtual

Print the PDU's data to DtInfo.

Reimplemented from DtPdu.

virtual void DtReceiverPdu::printDataToStream ( std::ostream &  stream) const
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 void DtReceiverPdu::removeCallback ( DtExerciseConn conn,
DtReceiverPduCb  cb,
void *  usr 
)
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.

Member Data Documentation

DtEntityIdentifier DtReceiverPdu::theId
protected
DtEntityIdentifier DtReceiverPdu::transId
protected

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

Document ID: Generated on Wed Aug 14 15:35:11 EDT 2013 from SVN revision 130445
Copyright © 2005-2013 VT MÄK. All Rights Reserved (www.mak.com)