![]() |
VR-Link API Documentation for DIS
|
Instances of DtObjectPublisher are used for local or source simulations of objects, (i.e. More...
Inheritance diagram for DtObjectPublisher:
Collaboration diagram for DtObjectPublisher:Public Member Functions | |
| 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 DtStateRepository * | stateRep () |
| Returns a pointer to the DtStateRepository - through which you can set or inspect current state information. | |
| virtual DtStateRepository * | sr () |
| Returns a pointer to the DtStateRepository - through which you can set or inspect current state information. | |
| virtual DtExerciseConn * | exerciseConn () |
| Get our exercise connection. | |
| virtual const DtObjectId & | localId () const =0 |
| The localId is the same as the globalId, a DtEntityIdentifier unique to this object. | |
| virtual const DtObjectId & | id () const =0 |
| The id is the same as the globalId, a DtEntityIdentifier unique to this object. | |
| virtual const DtGlobalObjectDesignator & | globalId () const =0 |
| The entityIdentifier unique to this object. | |
| virtual void | forceUpdate ()=0 |
| For publisher to send PDU on next tick. | |
| virtual void | tick ()=0 |
| Tick (update) this object. | |
| virtual void | setTimeThreshold (DtTime time) |
| Set the heartbeat rate for this object. | |
| virtual DtTime | timeThreshold () const |
| The heartbeat rate for this object. | |
| virtual DtStateRepository * | approximateRemoteStateRep () |
| 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 | setDfltTimeThreshold (DtTime time) |
| Set the default heartbeat rate. | |
| static DtTime | dfltTimeThreshold () |
| The default heartbeat rate, see setDfltTimeThreshold(). | |
Protected Member Functions | |
| void | send (DtPdu *pdu) const |
| Puts the PDU on the network and updates timestamps. | |
Protected Attributes | |
| DtExerciseConn * | myExConn |
| DtStateRepository * | myStateRep |
| DtStateRepository * | myAsSeenByRemote |
| bool | myOkToDeleteStateRepFlag |
| DtTime | myTimeThreshold |
| DtTime | mySimTimeLastUpdate |
| Set in const send() method. | |
| DtTime | myRealTimeLastUpdate |
| Set in const send() method. | |
Static Protected Attributes | |
| static DtTime | theDfltTimeThreshold |
Private Member Functions | |
| DtObjectPublisher (const DtObjectPublisher &orig) | |
| copy constructor – not implemented | |
| DtObjectPublisher & | operator= (const DtObjectPublisher &orig) |
| assignment operator – not implemented | |
Instances of DtObjectPublisher are used for local or source simulations of objects, (i.e.
these objects are not dependent on data being produced elsewhere on the network for their existence). These object send data to the network.
| DtObjectPublisher::DtObjectPublisher | ( | DtExerciseConn * | conn, |
| DtStateRepository * | stateRep, | ||
| DtStateRepository * | asSeenByRemote, | ||
| bool | okToDeleteStateRep = true |
||
| ) |
Constructor takes an DtExerciseConn which must have a lifetime greater than the ObjectPubliser.
It also takes two DtStateRepositories, the stateRep which it destroys in the DTOR if the okToDeleteStateRep flag was set to true, and the asSeenByRemote which is destroyed in the dtor every time.
|
virtual |
Destructor.
|
private |
copy constructor – not implemented
|
inlinevirtual |
Returns a pointer to the approximate remote DtStateRepository – This state repository contains the contents of the last sent message.
VR-Link keeps this SR so it can ensure that object updates get sent only when their data have changed.
References myAsSeenByRemote.
|
static |
The default heartbeat rate, see setDfltTimeThreshold().
|
inlinevirtual |
Get our exercise connection.
References myExConn.
|
pure virtual |
For publisher to send PDU on next tick.
Implemented in DtEntityPublisher, DtRadioTransmitterPublisher, DtEnvironmentProcessPublisher, DtRadioReceiverPublisher, DtGriddedDataPublisher, DtIffPublisher, DtDesignatorPublisher, DtDirectedEnergyFirePublisher, DtAggregatePublisher, DtEmitterSystemPublisher, DtActiveSonarPublisher, DtAdditionalPassiveActivitiesPublisher, DtPropulsionNoisePublisher, and DtUnderwaterAcousticsPublisher.
|
pure virtual |
The entityIdentifier unique to this object.
Implemented in DtEntityPublisher, DtIffPublisher, DtEnvironmentProcessPublisher, DtRadioTransmitterPublisher, DtAggregatePublisher, DtDirectedEnergyFirePublisher, DtRadioReceiverPublisher, DtGriddedDataPublisher, DtEmitterSystemPublisher, DtDesignatorPublisher, DtActiveSonarPublisher, DtAdditionalPassiveActivitiesPublisher, DtPropulsionNoisePublisher, and DtUnderwaterAcousticsPublisher.
|
pure virtual |
The id is the same as the globalId, a DtEntityIdentifier unique to this object.
Implemented in DtEntityPublisher, DtIffPublisher, DtDirectedEnergyFirePublisher, DtEnvironmentProcessPublisher, DtRadioTransmitterPublisher, DtAggregatePublisher, DtRadioReceiverPublisher, DtGriddedDataPublisher, DtEmitterSystemPublisher, DtDesignatorPublisher, DtActiveSonarPublisher, DtAdditionalPassiveActivitiesPublisher, DtPropulsionNoisePublisher, and DtUnderwaterAcousticsPublisher.
Referenced by DtDesignatorPublisher::globalId(), and DtDesignatorPublisher::localId().
|
virtual |
Returns the value of sim time at the time an update was last received for the entity.
|
virtual |
Returns the value of wallclock time at the time an update was last received for the entity.
|
pure virtual |
The localId is the same as the globalId, a DtEntityIdentifier unique to this object.
Implemented in DtEntityPublisher, DtIffPublisher, DtEnvironmentProcessPublisher, DtRadioTransmitterPublisher, DtAggregatePublisher, DtDirectedEnergyFirePublisher, DtRadioReceiverPublisher, DtGriddedDataPublisher, DtEmitterSystemPublisher, DtDesignatorPublisher, DtActiveSonarPublisher, DtAdditionalPassiveActivitiesPublisher, DtPropulsionNoisePublisher, and DtUnderwaterAcousticsPublisher.
|
private |
assignment operator – not implemented
|
protected |
Puts the PDU on the network and updates timestamps.
|
static |
Set the default heartbeat rate.
The time passed to this function is the number of seconds between heartbeats in published objects at rest. The default time is 5s.
|
virtual |
Set the heartbeat rate for this object.
The default rate for all objects is configured by setDfltTimeThreshold().
|
inlinevirtual |
Returns a pointer to the DtStateRepository - through which you can set or inspect current state information.
References myStateRep.
|
inlinevirtual |
Returns a pointer to the DtStateRepository - through which you can set or inspect current state information.
References myStateRep.
Referenced by DtEntityPublisher::esr().
|
pure virtual |
Tick (update) this object.
Implemented in DtEntityPublisher, DtIffPublisher, DtEmitterSystemPublisher, DtAggregatePublisher, DtEnvironmentProcessPublisher, DtRadioTransmitterPublisher, DtRadioReceiverPublisher, DtActiveSonarPublisher, DtAdditionalPassiveActivitiesPublisher, DtGriddedDataPublisher, DtPropulsionNoisePublisher, DtUnderwaterAcousticsPublisher, DtDesignatorPublisher, and DtDirectedEnergyFirePublisher.
|
virtual |
The heartbeat rate for this object.
|
protected |
Referenced by approximateRemoteStateRep().
|
protected |
Referenced by exerciseConn().
|
protected |
|
protected |
Referenced by DtActiveSonarPublisher::asr(), DtAdditionalPassiveActivitiesPublisher::asr(), DtAggregatePublisher::asr(), DtDirectedEnergyFirePublisher::defr(), DtDesignatorPublisher::dsr(), DtEnvironmentProcessPublisher::epsr(), DtEmitterSystemPublisher::esr(), DtGriddedDataPublisher::gdsr(), DtIffPublisher::isr(), DtPropulsionNoisePublisher::psr(), DtRadioReceiverPublisher::rsr(), sr(), stateRep(), DtRadioTransmitterPublisher::tsr(), and DtUnderwaterAcousticsPublisher::usr().
|
protected |
|
staticprotected |