VR-Link API Documentation for DIS
List of all members | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes
DtDesignatorPublisher Class Reference
+ Inheritance diagram for DtDesignatorPublisher:
+ Collaboration diagram for DtDesignatorPublisher:

Public Types

typedef DtDesignatorRepository *(* DtStateRepCreator )()
 Function prototype for functions that create DtDesignatorRepositories.

Public Member Functions

 DtDesignatorPublisher (DtDesignatorRepository *stateRepToUse, DtExerciseConn *conn, const DtObjectId &entityId=DtObjectId::defaultId())
 constructor
 DtDesignatorPublisher (DtExerciseConn *conn, const DtObjectId &entityId=DtObjectId::defaultId())
 constructor
virtual ~DtDesignatorPublisher ()
 destructor
virtual void tick ()
 This function should be called once per frame for each designator object.
virtual DtDesignatorRepositorydesignatorStateRep ()
 Returns a pointer to the DesignatorRepository - through which you can set or inspect current state information.
virtual DtDesignatorRepositorydsr ()
 Synonym for designatorStateRep().
virtual DtDesignatorDecoderdecoder ()
 Returns a pointer to the Decoder being used to decode PDUs that we send back into the asSeenByRemote ESR.
virtual DtDesignatorEncoderencoder ()
 Returns a pointer to the Encoder being used to encode current state into an entity state PDU.
virtual const DtObjectIdid () const
 Get the designator's identifier.
virtual const DtObjectIdlocalId () const
 Get the designator's localId - same as id for DIS.
virtual const
DtGlobalObjectDesignator
globalId () const
 Get the global object designator - same as id for DIS.
virtual void sendFinalPduOnDestruction (bool onOff)
 Set flag indicating whether to send a final PDU with the "FinalPdu" appearance bit set, from within the DtDesignatorPublisher destructor.
virtual void forceUpdate ()
 Force a state update to be sent during the next call to tick, even if nothing would normally cause a send.
virtual void setRelPosThreshold (double val)
 Set/Query the value of the "Relative Position" Update Threshold.
virtual double relPosThreshold () const
virtual void setAbsPosThreshold (double val)
 Set/Query the value of the "Relative Position" Update Threshold.
virtual double absPosThreshold () const
virtual void setAccelThreshold (double val)
 Set/Query the value of the "Relative Position" Update Threshold.
virtual double accelThreshold () const
- Public Member Functions inherited from DtObjectPublisher
 DtObjectPublisher (DtExerciseConn *conn, DtStateRepository *stateRep, DtStateRepository *asSeenByRemote, bool okToDeleteStateRep=true)
 Constructor takes an DtExerciseConn which must have a lifetime greater than the ObjectPubliser.
virtual ~DtObjectPublisher ()
 Destructor.
virtual DtStateRepositorystateRep ()
 Returns a pointer to the DtStateRepository - through which you can set or inspect current state information.
virtual DtStateRepositorysr ()
 Returns a pointer to the DtStateRepository - through which you can set or inspect current state information.
virtual DtExerciseConnexerciseConn ()
 Get our exercise connection.
virtual void setTimeThreshold (DtTime time)
 Set the heartbeat rate for this object.
virtual DtTime timeThreshold () const
 The heartbeat rate for this object.
virtual DtStateRepositoryapproximateRemoteStateRep ()
 Returns a pointer to the approximate remote DtStateRepository – This state repository contains the contents of the last sent message.
virtual DtTime lastTimeUpdated () const
 Returns the value of wallclock time at the time an update was last received for the entity.
virtual DtTime lastSimTimeUpdated () const
 Returns the value of sim time at the time an update was last received for the entity.

Static Public Member Functions

static void setDfltRelPosThreshold (double val)
 Get/Set default "Relative Position" threshold.
static double dfltRelPosThreshold ()
static void setDfltAbsPosThreshold (double val)
 Get/Set default "Absolute Position" threshold.
static double dfltAbsPosThreshold ()
static void setDfltAccelThreshold (double val)
 Get/Set default "Acceleration" threshold.
static double dfltAccelThreshold ()
static void setStateRepCreator (DtStateRepCreator creator)
 Give us a function to be used for creating SRs.
static DtStateRepCreator stateRepCreator (void)
static void setClassDfltTimeThreshold (DtTime threshold)
- Static Public Member Functions inherited from DtObjectPublisher
static void setDfltTimeThreshold (DtTime time)
 Set the default heartbeat rate.
static DtTime dfltTimeThreshold ()
 The default heartbeat rate, see setDfltTimeThreshold().

Protected Member Functions

void init (const DtObjectId &)
 Not virtual since called from constructor.
void sendFinalPdu ()
 Not virtual since called from destructor.
 DtDesignatorPublisher (const DtDesignatorPublisher &)
 copy constructor – Not Implemented
DtDesignatorPublisheroperator= (const DtDesignatorPublisher &)
 assignment operator – Not Implemented
- Protected Member Functions inherited from DtObjectPublisher
void send (DtPdu *pdu) const
 Puts the PDU on the network and updates timestamps.

Protected Attributes

DtDesignatorDecodermyDecoder
DtDesignatorEncodermyEncoder
bool mySendFinalInDtor
bool myStateRepPassedFlag
- Protected Attributes inherited from DtObjectPublisher
DtExerciseConnmyExConn
DtStateRepositorymyStateRep
DtStateRepositorymyAsSeenByRemote
bool myOkToDeleteStateRepFlag
DtTime myTimeThreshold
DtTime mySimTimeLastUpdate
 Set in const send() method.
DtTime myRealTimeLastUpdate
 Set in const send() method.

Static Protected Attributes

static double theDfltRelPosThreshold
static double theDfltAbsPosThreshold
static double theDfltAccelThreshold
static DtStateRepCreator theStateRepCreator
static DtTime theClassDfltTimeThreshold
static bool theClassDfltIsSetFlag
- Static Protected Attributes inherited from DtObjectPublisher
static DtTime theDfltTimeThreshold

Member Typedef Documentation

typedef DtDesignatorRepository*(* DtDesignatorPublisher::DtStateRepCreator)()

Function prototype for functions that create DtDesignatorRepositories.

Constructor & Destructor Documentation

DtDesignatorPublisher::DtDesignatorPublisher ( DtDesignatorRepository stateRepToUse,
DtExerciseConn conn,
const DtObjectId entityId = DtObjectId::defaultId() 
)

constructor

DtDesignatorPublisher::DtDesignatorPublisher ( DtExerciseConn conn,
const DtObjectId entityId = DtObjectId::defaultId() 
)

constructor

virtual DtDesignatorPublisher::~DtDesignatorPublisher ( )
virtual

destructor

DtDesignatorPublisher::DtDesignatorPublisher ( const DtDesignatorPublisher )
protected

copy constructor – Not Implemented

Member Function Documentation

virtual double DtDesignatorPublisher::absPosThreshold ( ) const
virtual
virtual double DtDesignatorPublisher::accelThreshold ( ) const
virtual
virtual DtDesignatorDecoder* DtDesignatorPublisher::decoder ( )
inlinevirtual

Returns a pointer to the Decoder being used to decode PDUs that we send back into the asSeenByRemote ESR.

DtDesignatorRepository * DtDesignatorPublisher::designatorStateRep ( )
inlinevirtual

Returns a pointer to the DesignatorRepository - through which you can set or inspect current state information.

References dsr().

double DtDesignatorPublisher::dfltAbsPosThreshold ( )
inlinestatic
double DtDesignatorPublisher::dfltAccelThreshold ( )
inlinestatic

References theDfltAccelThreshold.

double DtDesignatorPublisher::dfltRelPosThreshold ( )
inlinestatic
DtDesignatorRepository * DtDesignatorPublisher::dsr ( )
inlinevirtual
virtual DtDesignatorEncoder* DtDesignatorPublisher::encoder ( )
inlinevirtual

Returns a pointer to the Encoder being used to encode current state into an entity state PDU.

void DtDesignatorPublisher::forceUpdate ( )
inlinevirtual

Force a state update to be sent during the next call to tick, even if nothing would normally cause a send.

Implements DtObjectPublisher.

References myEncoder, and DtStateEncoder::setSendNeeded().

virtual const DtGlobalObjectDesignator& DtDesignatorPublisher::globalId ( ) const
inlinevirtual

Get the global object designator - same as id for DIS.

Implements DtObjectPublisher.

References DtObjectPublisher::id().

virtual const DtObjectId& DtDesignatorPublisher::id ( ) const
virtual

Get the designator's identifier.

Implements DtObjectPublisher.

void DtDesignatorPublisher::init ( const DtObjectId )
protected

Not virtual since called from constructor.

virtual const DtObjectId& DtDesignatorPublisher::localId ( ) const
inlinevirtual

Get the designator's localId - same as id for DIS.

Implements DtObjectPublisher.

References DtObjectPublisher::id().

DtDesignatorPublisher& DtDesignatorPublisher::operator= ( const DtDesignatorPublisher )
protected

assignment operator – Not Implemented

virtual double DtDesignatorPublisher::relPosThreshold ( ) const
virtual
void DtDesignatorPublisher::sendFinalPdu ( )
protected

Not virtual since called from destructor.

void DtDesignatorPublisher::sendFinalPduOnDestruction ( bool  onOff)
inlinevirtual

Set flag indicating whether to send a final PDU with the "FinalPdu" appearance bit set, from within the DtDesignatorPublisher destructor.

References mySendFinalInDtor.

virtual void DtDesignatorPublisher::setAbsPosThreshold ( double  val)
virtual

Set/Query the value of the "Relative Position" Update Threshold.

virtual void DtDesignatorPublisher::setAccelThreshold ( double  val)
virtual

Set/Query the value of the "Relative Position" Update Threshold.

static void DtDesignatorPublisher::setClassDfltTimeThreshold ( DtTime  threshold)
static
void DtDesignatorPublisher::setDfltAbsPosThreshold ( double  val)
inlinestatic

Get/Set default "Absolute Position" threshold.

References theDfltAbsPosThreshold.

void DtDesignatorPublisher::setDfltAccelThreshold ( double  val)
inlinestatic

Get/Set default "Acceleration" threshold.

References theDfltAccelThreshold.

void DtDesignatorPublisher::setDfltRelPosThreshold ( double  val)
inlinestatic

Get/Set default "Relative Position" threshold.

References theDfltRelPosThreshold.

virtual void DtDesignatorPublisher::setRelPosThreshold ( double  val)
virtual

Set/Query the value of the "Relative Position" Update Threshold.

static void DtDesignatorPublisher::setStateRepCreator ( DtStateRepCreator  creator)
static

Give us a function to be used for creating SRs.

static DtStateRepCreator DtDesignatorPublisher::stateRepCreator ( void  )
static
virtual void DtDesignatorPublisher::tick ( )
virtual

This function should be called once per frame for each designator object.

It determines if any data needs to be sent to the other exercise participants, and if so then it sends the data.

Implements DtObjectPublisher.

Member Data Documentation

DtDesignatorDecoder* DtDesignatorPublisher::myDecoder
protected
DtDesignatorEncoder* DtDesignatorPublisher::myEncoder
protected

Referenced by forceUpdate().

bool DtDesignatorPublisher::mySendFinalInDtor
protected
bool DtDesignatorPublisher::myStateRepPassedFlag
protected
bool DtDesignatorPublisher::theClassDfltIsSetFlag
staticprotected
DtTime DtDesignatorPublisher::theClassDfltTimeThreshold
staticprotected
double DtDesignatorPublisher::theDfltAbsPosThreshold
staticprotected
double DtDesignatorPublisher::theDfltAccelThreshold
staticprotected
double DtDesignatorPublisher::theDfltRelPosThreshold
staticprotected
DtStateRepCreator DtDesignatorPublisher::theStateRepCreator
staticprotected

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)