![]() |
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 Types | |
| typedef DtAttributePdu *(* | DtNonCoupledAttributePduCreator )(const DtPduWithAttributeRecordSets *, void *) |
| Function prototype for functions that create DtAggregateStateRepositories. More... | |
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. More... | |
| virtual | ~DtObjectPublisher () |
| Destructor. More... | |
| virtual DtStateRepository * | stateRep () |
| Returns a pointer to the DtStateRepository - through which you can set or inspect current state information. More... | |
| virtual DtStateRepository * | sr () |
| Returns a pointer to the DtStateRepository - through which you can set or inspect current state information. More... | |
| virtual DtExerciseConn * | exerciseConn () |
| Get our exercise connection. More... | |
| virtual const DtObjectId & | localId () const =0 |
| The localId is the same as the globalId, a DtEntityIdentifier unique to this object. More... | |
| virtual const DtObjectId & | id () const =0 |
| The id is the same as the globalId, a DtEntityIdentifier unique to this object. More... | |
| virtual const DtGlobalObjectDesignator & | globalId () const =0 |
| The entityIdentifier unique to this object. More... | |
| virtual void | forceUpdate ()=0 |
| For publisher to send PDU on next tick. More... | |
| virtual bool | tick ()=0 |
| Tick (update) this object. More... | |
| virtual bool | parallelTick () |
| Tick (update) this object in parallel threads. More... | |
| virtual void | setTimeThreshold (DtTime time) |
| Set the heartbeat rate for this object. More... | |
| virtual DtTime | timeThreshold () const |
| The heartbeat rate for this object. More... | |
| virtual void | setRelLocTimeThreshold (DtTime time) |
| Set the heartbeat rate of relative location updates for this object. More... | |
| virtual DtTime | relLocTimeThreshold () const |
| The relative location heartbeat rate for this object. More... | |
| virtual DtStateRepository * | approximateRemoteStateRep () |
| Returns a pointer to the approximate remote DtStateRepository – This state repository contains the contents of the last sent message. More... | |
| virtual DtTime | lastTimeUpdated () const |
| Returns the value of wallclock time at the time an update was last received for the entity. More... | |
| virtual DtTime | lastTimeAttrUpdated () const |
| virtual DtTime | lastSimTimeUpdated () const |
| Returns the value of sim time at the time an update was last received for the entity. More... | |
| virtual void | setUseCustomThreshold (bool useCustom) |
| Sets whether or not this object will use a custom threshold value, or the default. More... | |
| virtual bool | useCustomThreshold () |
| Returns whether or not this object will use a custom threshold value, or the default. More... | |
| virtual void | setAttributePduStrategy (DtAttributePduStrategy strat) |
| Sets/Gets whether to couple the attribute PDU. More... | |
| virtual DtAttributePduStrategy | attributePduStrategy () const |
| virtual void | encodeExtensions (DtStateRepository *stateRep, const DtStateRepository &asSeenByRemote) |
| Encode State Repository Extensions. Extensions should be added to stateRep attributeRecords. More... | |
| virtual void | decodeExtensions (DtPdu *pdu, const DtStateRepository &stateRep) |
| Decode State Repository Extensions. More... | |
| virtual void | setUpdateRateWarningThreshold (unsigned short updatesPerSecond) |
| Overrides the default (static) updates per second for a specific instance Sets/Gets for private member. More... | |
| virtual unsigned short | updateRateWarningThreshold () const |
| virtual void | checkForUpdateRateWarning () const |
| Helper function that determines whether or not to trigger a spam warning. More... | |
| DtNonCoupledAttributePduCreator | setNonCoupledAttributePduCreator (DtNonCoupledAttributePduCreator creator) |
| Give us a function to be used for creating non-coupled Attribute PDUs. More... | |
| DtNonCoupledAttributePduCreator | nonCoupledAttributePduCreator (void) |
Static Public Member Functions | |
| static void | setDfltTimeThreshold (DtTime time) |
| Set the default heartbeat rate. More... | |
| static DtTime | dfltTimeThreshold () |
| The default heartbeat rate, see setDfltTimeThreshold(). More... | |
| static void | setDfltUpdateRateWarningThreshold (unsigned short updatesPerSecond) |
| Sets the default (static) updates per second for any instance. More... | |
| static unsigned short | dfltUpdateRateWarningThreshold () |
| Return the value of theDfltUpdateRateWarningThreshold. More... | |
| static void | setDfltRelLocTimeThreshold (DtTime time) |
| Set the default heartbeat rate for relative location updates. More... | |
| static DtTime | dfltRelLocTimeThreshold () |
| The default heartbeat rate for relative location updates, see setDfltRelLocTimeThreshold() More... | |
| static DtNonCoupledAttributePduCreator | setDefaultNonCoupledAttributePduCreator (DtNonCoupledAttributePduCreator creator) |
| Give us a function to be used for creating non-coupled Attribute PDUs. More... | |
| static DtNonCoupledAttributePduCreator | defaultNonCoupledAttributePduCreator (void) |
Protected Member Functions | |
| virtual void | send (DtPdu *pdu) const |
| Puts the PDU on the network and updates timestamps. More... | |
Static Protected Attributes | |
| static DtNonCoupledAttributePduCreator | theDefaultNonCoupledAttributePduCreator |
| static DtTime | theDfltTimeThreshold |
| static DtTime | theDfltRelLocTimeThreshold |
| static unsigned short | theDfltUpdateRateWarningThreshold |
Private Member Functions | |
| DtObjectPublisher (const DtObjectPublisher &orig) | |
| copy constructor – not implemented More... | |
| DtObjectPublisher & | operator= (const DtObjectPublisher &orig) |
| assignment operator – not implemented More... | |
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.
| typedef DtAttributePdu*(* DtObjectPublisher::DtNonCoupledAttributePduCreator)(const DtPduWithAttributeRecordSets *, void *) |
Function prototype for functions that create DtAggregateStateRepositories.
| 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.
|
virtual |
|
virtual |
Helper function that determines whether or not to trigger a spam warning.
If a negative integer is passed to it, it will use the difference of the max value of an unsigned short and the absolute value of the negative integer
|
virtual |
Decode State Repository Extensions.
Called after sendPdu to update the As Seen By Remote State Repository
|
static |
|
static |
The default heartbeat rate for relative location updates, see setDfltRelLocTimeThreshold()
|
static |
The default heartbeat rate, see setDfltTimeThreshold().
|
static |
Return the value of theDfltUpdateRateWarningThreshold.
|
virtual |
Encode State Repository Extensions. Extensions should be added to stateRep attributeRecords.
|
inlinevirtual |
Get our exercise connection.
References myExConn.
|
pure virtual |
For publisher to send PDU on next tick.
Implemented in DtEntityPublisher, DtIffPublisher, DtRadioTransmitterPublisher, DtEnvironmentProcessPublisher, DtRadioReceiverPublisher, DtGriddedDataPublisher, DtArealObjectPublisher, DtLinearObjectPublisher, DtPointObjectPublisher, DtDesignatorPublisher, DtAerodromePublisher, DtDirectedEnergyFirePublisher, DtLandSurfacePublisher, DtSubsurfaceLayerPublisher, DtTroposphereLayerPublisher, DtWaterSurfacePublisher, DtWindCorridorPublisher, DtTimeAndDatePublisher, DtRunwayPublisher, DtAggregatePublisher, DtEmitterSystemPublisher, DtPropulsionNoisePublisher, DtUnderwaterAcousticsPublisher, DtActiveSonarPublisher, and DtAdditionalPassiveActivitiesPublisher.
|
pure virtual |
The entityIdentifier unique to this object.
Implemented in DtEntityPublisher, DtIffPublisher, DtEnvironmentProcessPublisher, DtRadioTransmitterPublisher, DtAerodromePublisher, DtLandSurfacePublisher, DtSubsurfaceLayerPublisher, DtTroposphereLayerPublisher, DtWaterSurfacePublisher, DtWindCorridorPublisher, DtAggregatePublisher, DtDirectedEnergyFirePublisher, DtTimeAndDatePublisher, DtRadioReceiverPublisher, DtGriddedDataPublisher, DtRunwayPublisher, DtEmitterSystemPublisher, DtArealObjectPublisher, DtLinearObjectPublisher, DtPointObjectPublisher, DtDesignatorPublisher, DtPropulsionNoisePublisher, DtUnderwaterAcousticsPublisher, DtActiveSonarPublisher, and DtAdditionalPassiveActivitiesPublisher.
|
pure virtual |
The id is the same as the globalId, a DtEntityIdentifier unique to this object.
Implemented in DtEntityPublisher, DtIffPublisher, DtDirectedEnergyFirePublisher, DtEnvironmentProcessPublisher, DtRadioTransmitterPublisher, DtAerodromePublisher, DtLandSurfacePublisher, DtSubsurfaceLayerPublisher, DtTroposphereLayerPublisher, DtWaterSurfacePublisher, DtWindCorridorPublisher, DtAggregatePublisher, DtTimeAndDatePublisher, DtRadioReceiverPublisher, DtGriddedDataPublisher, DtRunwayPublisher, DtEmitterSystemPublisher, DtArealObjectPublisher, DtLinearObjectPublisher, DtPointObjectPublisher, DtDesignatorPublisher, DtPropulsionNoisePublisher, DtUnderwaterAcousticsPublisher, DtActiveSonarPublisher, and DtAdditionalPassiveActivitiesPublisher.
Referenced by DtDesignatorPublisher::globalId(), DtArealObjectPublisher::globalId(), DtPointObjectPublisher::globalId(), DtLinearObjectPublisher::globalId(), DtDesignatorPublisher::localId(), DtArealObjectPublisher::localId(), DtLinearObjectPublisher::localId(), and DtPointObjectPublisher::localId().
|
virtual |
Returns the value of sim time at the time an update was last received for the entity.
|
virtual |
|
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, DtAerodromePublisher, DtLandSurfacePublisher, DtSubsurfaceLayerPublisher, DtTroposphereLayerPublisher, DtWaterSurfacePublisher, DtWindCorridorPublisher, DtAggregatePublisher, DtTimeAndDatePublisher, DtDirectedEnergyFirePublisher, DtRadioReceiverPublisher, DtGriddedDataPublisher, DtRunwayPublisher, DtEmitterSystemPublisher, DtArealObjectPublisher, DtLinearObjectPublisher, DtPointObjectPublisher, DtDesignatorPublisher, DtPropulsionNoisePublisher, DtUnderwaterAcousticsPublisher, DtActiveSonarPublisher, and DtAdditionalPassiveActivitiesPublisher.
| DtNonCoupledAttributePduCreator DtObjectPublisher::nonCoupledAttributePduCreator | ( | void | ) |
|
private |
assignment operator – not implemented
|
virtual |
Tick (update) this object in parallel threads.
|
virtual |
The relative location heartbeat rate for this object.
|
protectedvirtual |
Puts the PDU on the network and updates timestamps.
|
virtual |
Sets/Gets whether to couple the attribute PDU.
|
static |
Give us a function to be used for creating non-coupled Attribute PDUs.
|
static |
Set the default heartbeat rate for relative location updates.
|
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.
|
static |
Sets the default (static) updates per second for any instance.
| DtNonCoupledAttributePduCreator DtObjectPublisher::setNonCoupledAttributePduCreator | ( | DtNonCoupledAttributePduCreator | creator | ) |
Give us a function to be used for creating non-coupled Attribute PDUs.
|
virtual |
Set the heartbeat rate of relative location updates for this object.
The default rate of relative location updates for all objects is configured by setDfltRelLocTimeThreshold().
|
virtual |
Set the heartbeat rate for this object.
The default rate for all objects is configured by setDfltTimeThreshold(). If this is set, the customThreshold is also set to true;
|
virtual |
Overrides the default (static) updates per second for a specific instance Sets/Gets for private member.
|
virtual |
Sets whether or not this object will use a custom threshold value, or the default.
|
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.
Will return true if data sent.
Implemented in DtEntityPublisher, DtIffPublisher, DtAerodromePublisher, DtLandSurfacePublisher, DtSubsurfaceLayerPublisher, DtTroposphereLayerPublisher, DtWaterSurfacePublisher, DtWindCorridorPublisher, DtTimeAndDatePublisher, DtRunwayPublisher, DtEmitterSystemPublisher, DtAggregatePublisher, DtEnvironmentProcessPublisher, DtRadioTransmitterPublisher, DtRadioReceiverPublisher, DtGriddedDataPublisher, DtPropulsionNoisePublisher, DtUnderwaterAcousticsPublisher, DtActiveSonarPublisher, DtAdditionalPassiveActivitiesPublisher, DtArealObjectPublisher, DtLinearObjectPublisher, DtPointObjectPublisher, DtDirectedEnergyFirePublisher, and DtDesignatorPublisher.
|
virtual |
The heartbeat rate for this object.
|
virtual |
|
virtual |
Returns whether or not this object will use a custom threshold value, or the default.
|
protected |
Referenced by approximateRemoteStateRep().
|
protected |
|
mutableprotected |
Set in constructor.
|
protected |
Referenced by exerciseConn().
|
mutableprotected |
Set in constructor.
|
protected |
|
mutableprotected |
Set in constructor.
|
protected |
|
mutableprotected |
|
protected |
Time threshold for heartbeat rate of relative location updates (only for embarked/attached entities)
|
protected |
Referenced by DtAerodromePublisher::aerodromeStateRep(), DtArealObjectPublisher::aosr(), DtAdditionalPassiveActivitiesPublisher::asr(), DtActiveSonarPublisher::asr(), DtAerodromePublisher::asr(), DtAggregatePublisher::asr(), DtDirectedEnergyFirePublisher::defr(), DtDesignatorPublisher::dsr(), DtEnvironmentProcessPublisher::epsr(), DtEmitterSystemPublisher::esr(), DtGriddedDataPublisher::gdsr(), DtIffPublisher::isr(), DtLandSurfacePublisher::landSurfaceLayerStateRep(), DtLinearObjectPublisher::losr(), DtLandSurfacePublisher::lsr(), DtPointObjectPublisher::posr(), DtPropulsionNoisePublisher::psr(), DtRadioReceiverPublisher::rsr(), DtRunwayPublisher::rsr(), DtRunwayPublisher::runwayStateRep(), sr(), DtSubsurfaceLayerPublisher::ssr(), stateRep(), DtSubsurfaceLayerPublisher::subsurfaceLayerStateRep(), DtTimeAndDatePublisher::timeAndDateStateRep(), DtTroposphereLayerPublisher::troposphereLayerStateRep(), DtTimeAndDatePublisher::tsr(), DtTroposphereLayerPublisher::tsr(), DtRadioTransmitterPublisher::tsr(), DtUnderwaterAcousticsPublisher::usr(), DtWaterSurfacePublisher::waterSurfaceLayerStateRep(), DtWindCorridorPublisher::windCorridorLayerStateRep(), DtWindCorridorPublisher::wsr(), and DtWaterSurfacePublisher::wsr().
|
protected |
|
protected |
|
protected |
Time threshold for the heartbeat rate.
|
mutableprotected |
Set in constructor.
|
protected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
staticprotected |