![]() |
VR-Link API Documentation for HLA 1.3
|
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, const DtDDMRegionSet *regionSet=0) | |
| Constructor. More... | |
| virtual | ~DtObjectPublisher () |
| Destructor. More... | |
| virtual void | setHlaObject (const char *className, DtHlaStateEncoder *encoder=0, DtHlaStateDecoder *decoder=0, const char *objectName=0, const DtDDMRegionSet *regionSet=0) |
| A DtObjectPublisher is not capable of communicating data through the RTI until setHlaObject is called. More... | |
| virtual void | setHlaObject (RTI::ObjectClassHandle hand, DtHlaStateEncoder *encoder=0, DtHlaStateDecoder *decoder=0, const char *objectName=0, const DtDDMRegionSet *regionSet=0) |
| This version takes a classHandle and optional object name, and creates the DtHlaObject for you. More... | |
| virtual void | setHlaObject (DtHlaObjectWithStateRep *obj, DtHlaStateEncoder *encoder=0, DtHlaStateDecoder *decoder=0) |
| This version takes an existing DtHlaObject, and uses it. More... | |
| virtual void | detachHlaObject () |
| Detach HLA object - bringing the DtObjectPublisher back to the state it was in before setHlaObject was called. More... | |
| virtual DtStateRepository * | stateRep () |
| Returns a pointer to the DtStateRepository - through which you can set or inspect current state information. More... | |
| virtual DtStateRepository * | sr () |
| Synonym for stateRep(). 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 DtHlaStateDecoder * | decoder () |
| Returns a pointer to the Decoder being used to decode state messages that we send back into the asSeenByRemote SR. More... | |
| virtual DtHlaStateEncoder * | encoder () |
| Returns a pointer to the Encoder being used to encode current state into an outgoing message. More... | |
| virtual DtHlaObjectWithStateRep * | hlaObject () |
| Get the object's hlaObject. More... | |
| virtual DtExerciseConn * | exerciseConn () |
| Get our exercise connection. More... | |
| virtual const DtObjectId & | id () const |
| Get the object's local identifier. More... | |
| virtual const DtObjectId & | objectId () const |
| Get the object's local identifier. More... | |
| virtual const DtObjectId & | localId () const |
| Get the object's local identifier. More... | |
| virtual const DtString & | name () const |
| Get the object's name. More... | |
| virtual const DtGlobalObjectDesignator & | globalId () const |
| Get the HLA object's global object designator - the object name in RTI1.3.3, but the objectId in RTI1.0.3. More... | |
| virtual void | forceUpdate () |
| Specify a set of attributes that should be included in the ahvps the next time tick is called, even if they would not otherwise need to be sent. More... | |
| virtual void | forceUpdate (const RTI::AttributeHandleSet &set) |
| virtual void | tick () |
| Tick (update) this object. More... | |
| virtual void | parallelTick () |
| Tick (update) this object in parallel threads. More... | |
| virtual void | setDeleteObjInDtorFlag (bool onOff) |
| Set/Get a flag that determines whether to try to delete the HLA object that we represent, upon destruction of this DtObjectPublisher. More... | |
| virtual bool | deleteObjInDtorFlag () const |
| virtual const DtDDMRegionSet & | publishingRegions () const |
| virtual void | addRegion (DtDDMRegionSP regionToAdd) |
| Adds the specified region to the set of publishing regions, and calls associateRegionForUpdates on the RTI Ambassador. More... | |
| virtual void | removeRegion (DtDDMRegionSP regionToRemove) |
| Removes the specified region from the set of publishing regions, and calls unassociateRegionForUpdates on the RTI Ambassador. More... | |
| DtObjectPublisher (DtExerciseConn *conn, const char *name=0) | |
| These constructors and init functions are obsolete, but are here for backwards compatibility with pre-3.4 releases. More... | |
| void | init (RTI::ObjectClassHandle hand, DtStateRepository *stateRep, DtStateRepository *asSeenByRemote, DtHlaStateEncoder *encoder=0, DtHlaStateDecoder *decoder=0) |
| void | init (const char *className, DtStateRepository *stateRep, DtStateRepository *asSeenByRemote, DtHlaStateEncoder *encoder=0, DtHlaStateDecoder *decoder=0) |
Static Public Member Functions | |
| static void | removeObjectCb (DtHlaObject *obj, void *pub) |
| Callback to be called when our underlying DtHlaObject goes away. More... | |
Protected Member Functions | |
| DtObjectPublisher (DtStateRepository *stateRep, DtStateRepository *asSeenByRemote, bool okToDeleteStateRep=true, const DtDDMRegionSet *regionSet=0) | |
| Constructor which does not include the DtExerciseConn. More... | |
| virtual void | setExerciseConn (DtExerciseConn *conn) |
| Allows the DtExerciseConn to be set after initial publisher creation. More... | |
| virtual void | processRemoveObject (DtHlaObject *obj) |
| Called by removeObjectCb to detachHlaObject when our underlying DtHlaObject goes away. More... | |
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.
| DtObjectPublisher::DtObjectPublisher | ( | DtExerciseConn * | conn, |
| DtStateRepository * | stateRep, | ||
| DtStateRepository * | asSeenByRemote, | ||
| bool | okToDeleteStateRep = true, |
||
| const DtDDMRegionSet * | regionSet = 0 |
||
| ) |
Constructor.
Object is not fully constructed until setHlaObject is called - typically by subclass constructor.
|
virtual |
Destructor.
If we own the privilege to delete, and the deleteObjInDtor flag is true, this will cause the HLA object we are publishing to be deleted.
|
private |
copy constructor – not implemented
|
protected |
Constructor which does not include the DtExerciseConn.
This is typically not desired, but may be useful in certain cases when a derived publisher wants to better control how the object is published.
| DtObjectPublisher::DtObjectPublisher | ( | DtExerciseConn * | conn, |
| const char * | name = 0 |
||
| ) |
These constructors and init functions are obsolete, but are here for backwards compatibility with pre-3.4 releases.
Please use the constructor and setHlaObject functions described at the top of this class definition instead.
|
virtual |
Adds the specified region to the set of publishing regions, and calls associateRegionForUpdates on the RTI Ambassador.
|
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 |
Returns a pointer to the Decoder being used to decode state messages that we send back into the asSeenByRemote SR.
|
virtual |
|
virtual |
Detach HLA object - bringing the DtObjectPublisher back to the state it was in before setHlaObject was called.
Typically called only by destructor.
|
virtual |
Returns a pointer to the Encoder being used to encode current state into an outgoing message.
|
inlinevirtual |
Get our exercise connection.
References myExConn.
|
virtual |
Specify a set of attributes that should be included in the ahvps the next time tick is called, even if they would not otherwise need to be sent.
The call with no arguments, indicates the set of all of the object's attributes. Multiple calls are cumulative, until the set is cleared with clearForcedAttributes, which should happen within tick.
Reimplemented in DtEmitterSystemPublisher, DtActiveSonarPublisher, and DtUnderwaterAcousticsPublisher.
|
virtual |
Reimplemented in DtEmitterSystemPublisher, DtActiveSonarPublisher, and DtUnderwaterAcousticsPublisher.
|
virtual |
Get the HLA object's global object designator - the object name in RTI1.3.3, but the objectId in RTI1.0.3.
|
inlinevirtual |
Get the object's hlaObject.
References myHlaObj.
|
virtual |
Get the object's local identifier.
Referenced by localId().
| void DtObjectPublisher::init | ( | RTI::ObjectClassHandle | hand, |
| DtStateRepository * | stateRep, | ||
| DtStateRepository * | asSeenByRemote, | ||
| DtHlaStateEncoder * | encoder = 0, |
||
| DtHlaStateDecoder * | decoder = 0 |
||
| ) |
| void DtObjectPublisher::init | ( | const char * | className, |
| DtStateRepository * | stateRep, | ||
| DtStateRepository * | asSeenByRemote, | ||
| DtHlaStateEncoder * | encoder = 0, |
||
| DtHlaStateDecoder * | decoder = 0 |
||
| ) |
|
inlinevirtual |
Get the object's local identifier.
References id().
|
virtual |
Get the object's name.
|
virtual |
Get the object's local identifier.
|
private |
assignment operator – not implemented
|
virtual |
Tick (update) this object in parallel threads.
|
protectedvirtual |
Called by removeObjectCb to detachHlaObject when our underlying DtHlaObject goes away.
|
virtual |
|
static |
Callback to be called when our underlying DtHlaObject goes away.
|
virtual |
Removes the specified region from the set of publishing regions, and calls unassociateRegionForUpdates on the RTI Ambassador.
Must be the same shared pointer that was in the set passed in through the constructor, or the same shared pointer as that passed into addRegion().
|
virtual |
Set/Get a flag that determines whether to try to delete the HLA object that we represent, upon destruction of this DtObjectPublisher.
Default is true.
|
protectedvirtual |
Allows the DtExerciseConn to be set after initial publisher creation.
This should only be used when using the constructor which does not take an exercise connection.
|
virtual |
A DtObjectPublisher is not capable of communicating data through the RTI until setHlaObject is called.
It is typically called by subclass constructors. If encoder or decoder are 0, the FOM Mapper is consulted. This class assumes ownership of the encoder/decoder objects passed to setHlaObject, and will delete them on destruction, or if this function fails. If objectName is 0, a name is obtained from the RTI. This version takes a className and optional object name, and creates the DtHlaObject.
|
virtual |
This version takes a classHandle and optional object name, and creates the DtHlaObject for you.
|
virtual |
This version takes an existing DtHlaObject, and uses it.
Called by the other versions of setHlaObject.
|
inlinevirtual |
Synonym for stateRep().
References myStateRep.
|
inlinevirtual |
Returns a pointer to the DtStateRepository - through which you can set or inspect current state information.
References myStateRep.
|
virtual |
Tick (update) this object.
Reimplemented in DtEntityPublisher, DtEmitterSystemPublisher, DtAggregatePublisher, DtActiveSonarPublisher, DtIffPublisher, and DtUnderwaterAcousticsPublisher.
|
protected |
Referenced by approximateRemoteStateRep().
|
protected |
|
protected |
|
protected |
|
protected |
Referenced by exerciseConn().
|
protected |
Referenced by hlaObject().
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Referenced by DtActiveSonarBeamPublisher::activeSonarBeamStateRep(), DtActiveSonarPublisher::activeSonarStateRep(), DtAdditionalPassiveActivitiesPublisher::additionalPassiveActivitiesStateRep(), DtAggregatePublisher::aggregateStateRep(), DtArealObjectPublisher::aosr(), DtArealObjectPublisher::arealObjectStateRep(), DtActiveSonarPublisher::asr(), DtActiveSonarBeamPublisher::asr(), DtAdditionalPassiveActivitiesPublisher::asr(), DtAggregatePublisher::asr(), DtEmitterBeamPublisher::bsr(), DtDesignatorPublisher::designatorStateRep(), DtDIGuyObjectPublisher::dIGuyObjectStateRep(), DtDesignatorPublisher::dsr(), DtDIGuyObjectPublisher::dsr(), DtEmitterBeamPublisher::emitrBeamRep(), DtEmitterSystemPublisher::emitterSystemRep(), DtEntityPublisher::entityStateRep(), DtEnvironmentProcessPublisher::environmentProcessStateRep(), DtEnvironmentProcessPublisher::epsr(), DtEmitterSystemPublisher::esr(), DtEntityPublisher::esr(), DtGriddedDataPublisher::gdsr(), DtGriddedDataPublisher::gridDataStateRep(), DtIFFDataPublisher::IFFDataStateRep(), DtIffPublisher::iffStateRep(), DtIffPublisher::isr(), DtIFFDataPublisher::Isr(), DtLinearObjectPublisher::linearObjectStateRep(), DtLinearObjectPublisher::losr(), DtMode1InterrogatorPublisher::mode1InterrogatorStateRep(), DtMode1Publisher::mode1StateRep(), DtMode1TransponderPublisher::mode1TransponderStateRep(), DtMode2InterrogatorPublisher::mode2InterrogatorStateRep(), DtMode2Publisher::mode2StateRep(), DtMode2TransponderPublisher::mode2TransponderStateRep(), DtMode3AInterrogatorPublisher::mode3AInterrogatorStateRep(), DtMode3APublisher::mode3AStateRep(), DtMode3ATransponderPublisher::mode3ATransponderStateRep(), DtMode4InterrogatorPublisher::mode4InterrogatorStateRep(), DtMode4Publisher::mode4StateRep(), DtMode4TransponderPublisher::mode4TransponderStateRep(), DtMode5InterrogatorPublisher::mode5InterrogatorStateRep(), DtMode5Publisher::mode5StateRep(), DtMode5TransponderPublisher::mode5TransponderStateRep(), DtModeCInterrogatorPublisher::modeCInterrogatorStateRep(), DtModeCPublisher::modeCStateRep(), DtModeCTransponderPublisher::modeCTransponderStateRep(), DtModeSInterrogatorPublisher::modeSInterrogatorStateRep(), DtModeSPublisher::modeSStateRep(), DtModeSTransponderPublisher::modeSTransponderStateRep(), DtMode1Publisher::msr(), DtMode1InterrogatorPublisher::msr(), DtMode1TransponderPublisher::msr(), DtMode2Publisher::msr(), DtMode2InterrogatorPublisher::msr(), DtMode2TransponderPublisher::msr(), DtMode3APublisher::msr(), DtMode3AInterrogatorPublisher::msr(), DtMode3ATransponderPublisher::msr(), DtMode4Publisher::msr(), DtMode4InterrogatorPublisher::msr(), DtMode4TransponderPublisher::msr(), DtMode5Publisher::msr(), DtMode5InterrogatorPublisher::msr(), DtMode5TransponderPublisher::msr(), DtModeCPublisher::msr(), DtModeCInterrogatorPublisher::msr(), DtModeCTransponderPublisher::msr(), DtModeSPublisher::msr(), DtModeSInterrogatorPublisher::msr(), DtModeSTransponderPublisher::msr(), DtPointObjectPublisher::pointObjectStateRep(), DtPointObjectPublisher::posr(), DtPropulsionNoisePublisher::propulsionNoiseStateRep(), DtPropulsionNoisePublisher::psr(), DtRadioTransmitterPublisher::radioXmitRep(), DtRadioReceiverPublisher::receiverRep(), DtRadioReceiverPublisher::rsr(), DtSovietInterrogatorPublisher::sovietInterrogatorStateRep(), DtSovietPublisher::sovietStateRep(), DtSovietTransponderPublisher::sovietTransponderStateRep(), sr(), DtSovietPublisher::ssr(), DtSovietInterrogatorPublisher::ssr(), DtSovietTransponderPublisher::ssr(), stateRep(), DtTCASDataPublisher::TCASDataStateRep(), DtRadioTransmitterPublisher::tsr(), DtTCASDataPublisher::Tsr(), DtUnderwaterAcousticsPublisher::underwaterAcousticsStateRep(), and DtUnderwaterAcousticsPublisher::usr().