![]() |
VR-Link API Documentation for DIS
|
Instances of DtEntityPublisher are used for local or source simulations of entities, (i.e. More...
Inheritance diagram for DtEntityPublisher:
Collaboration diagram for DtEntityPublisher:Public Types | |
| typedef DtEntityStateRepository *(* | DtStateRepCreator )() |
| Function prototype for functions that create DtEntityStateRepositories. More... | |
Public Types inherited from DtObjectPublisher | |
| typedef DtAttributePdu *(* | DtNonCoupledAttributePduCreator )(const DtPduWithAttributeRecordSets *, void *) |
| Function prototype for functions that create DtAggregateStateRepositories. More... | |
Public Member Functions | |
| DtEntityPublisher (DtEntityStateRepository *stateRepToUse, DtExerciseConn *conn, const DtObjectId &id=DtObjectId::defaultId()) | |
| Constructor. More... | |
| DtEntityPublisher (DtExerciseConn *conn, const DtObjectId &id=DtObjectId::defaultId()) | |
| Constructor. More... | |
| DtEntityPublisher (const DtEntityType &type, DtExerciseConn *conn, const DtObjectId &id=DtObjectId::defaultId()) | |
| Constructor. More... | |
| DtEntityPublisher (const DtEntityType &type, DtExerciseConn *conn, DtDeadReckonTypes algorithm, DtForceType forceId, const DtEntityType &guise=guiseSameAsType(), const DtObjectId &id=DtObjectId::defaultId()) | |
| Constructor. More... | |
| virtual | ~DtEntityPublisher () |
| Destructors. More... | |
| virtual void | tick () |
| This function should be called once per frame for each entity. More... | |
| virtual DtEntityStateRepository * | entityStateRep () |
| Returns a pointer to the EntityStateRepository - through which you can set or inspect current state information. More... | |
| virtual DtEntityStateRepository * | esr () |
| Synonym for entityStateRep(). More... | |
| virtual DtEntityStateDecoder * | decoder () |
| Returns a pointer to the Decoder being used to decode PDUs that we send back into the asSeenByRemote ESR. More... | |
| virtual DtEntityStateEncoder * | encoder () |
| Returns a pointer to the Encoder being used to encode current state into an entity state PDU. More... | |
| virtual DtOwnershipHandler * | setOwnershipHandler (DtOwnershipHandler *handler) |
| Sets the current ownership handler to handler. More... | |
| virtual const DtObjectId & | id () const |
| Get the entity's identifier. More... | |
| virtual const DtObjectId & | localId () const |
| Get the entity's localId - same as id for DIS. More... | |
| virtual const DtGlobalObjectDesignator & | globalId () const |
| Get the global object designator - same as id for DIS. More... | |
| virtual void | sendFinalPduOnDestruction (bool on) |
| Set flag indicating whether to send a final PDU with the "FinalPdu" appearance bit set, from within the DtEntityPublisher destructor. More... | |
| virtual void | forceUpdate () |
| Force a state update to be sent during the next call to tick, even if nothing would normally cause a send. More... | |
| virtual void | enableDiGuyInformation (DtDiGuyDataSendMode sendMode=DtDiGuySendPdu) |
| Tell the publisher to send DI Guy Data as either PDU's or attributes. More... | |
| virtual void | setSendDiGuyAttributes (bool enableAttributes) |
| Tell the publisher to send DI Guy Attributes. More... | |
| virtual bool | sendDiGuyAttributes () const |
| Determine whether this publisher will send DI Guy Attributes. More... | |
| virtual void | setSendDiGuyPdus (bool enablePdu) |
| Tell the publisher to send DI Guy PDU's. More... | |
| virtual bool | sendDiGuyPdus () const |
| Determine whether this publisher will send DI Guy PDU's. More... | |
| virtual void | setSendSeesPdus (bool yesNo) |
| Tell the publisher to send SEES PDU's. More... | |
| virtual bool | sendSeesPdus () const |
| Determine whether this publisher will send SEES PDU's. More... | |
| virtual void | setSeesTimeThreshold (DtTime time) |
| Set the SEES time threshold for sending a PDU. More... | |
| virtual DtTime | seesTimeThreshold () const |
| Return the SEES time threshold. More... | |
| virtual void | setDiGuyTypeTimeThreshold (DtTime time) |
| Set the DIGuy Type time threshold for sending a PDU. More... | |
| virtual DtTime | diGuyTypeTimeThreshold () const |
| Return the DIGuy Type time threshold. More... | |
| virtual void | setDiGuyAppearanceTimeThreshold (DtTime time) |
| Set the DIGuy Appearance time threshold for sending a PDU. More... | |
| virtual DtTime | diGuyAppearanceTimeThreshold () const |
| Return the DIGuy Appearance time threshold. More... | |
| virtual void | setDiGuyActionTimeThreshold (DtTime time) |
| Set the DIGuy Action time threshold for sending a PDU. More... | |
| virtual DtTime | diGuyActionTimeThreshold () const |
| Return the DIGuy Action time threshold. More... | |
| DtTime | entityTypeHeartbeat (int type, int domain) |
| Return the heartbeat based on entity Type. More... | |
| virtual void | divestObject (DtU16 siteTarget, DtU16 applicationTarget) |
| Begin a DIS 7 push request for this object. More... | |
| virtual void | createAndSendDiGuy () |
| Send DI Guy as Attributes or PDU's (if needed or if threshold has been exceeded). More... | |
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. 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 void | 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... | |
| 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 const DtEntityType & | guiseSameAsType () |
| static void | setStateRepCreator (DtStateRepCreator creator) |
| Give us a function to be used for creating SRs. More... | |
| static DtStateRepCreator | stateRepCreator (void) |
| static void | setClassDfltTimeThreshold (DtTime threshold) |
| static void | setStationaryDfltTimeThreshold (DtTime threshold) |
| static void | setEntityTypeDfltTimeThreshold (int type, int domain, DtTime threshold) |
| static void | setDfltRotationThreshold (double r) |
| static double | dfltRotationThreshold () |
| static void | setDfltTranslationThreshold (double t) |
| static double | dfltTranslationThreshold () |
Static Public Member Functions inherited from DtObjectPublisher | |
| static void | setDfltTimeThreshold (DtTime time) |
| Set the default heartbeat rate. More... | |
| static DtTime | dfltTimeThreshold () |
| The default heartbeat rate, see setDfltTimeThreshold(). 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 | |
| void | sendFinalPdu () |
| Not virtual since called from destructor. More... | |
| virtual void | createAndSendSeesPdu () |
| Send SEES PDU. More... | |
| virtual bool | sendSeesNeeded () const |
| void | init (const DtObjectId &vehId) |
| Not virtual since called from constructor. More... | |
Protected Member Functions inherited from DtObjectPublisher | |
| virtual void | send (DtPdu *pdu) const |
| Puts the PDU on the network and updates timestamps. More... | |
Static Protected Attributes | |
| static DtStateRepCreator | theStateRepCreator |
| static DtTime | theClassDfltTimeThreshold |
| static bool | theClassDfltIsSetFlag |
| static DtTime | theStationaryDfltTimeThreshold |
| static bool | theStationaryDfltIsSetFlag |
| static std::map< std::pair < int, int >, DtTime > | theEntityTypeHeartbeat |
Static Protected Attributes inherited from DtObjectPublisher | |
| static DtNonCoupledAttributePduCreator | theDefaultNonCoupledAttributePduCreator |
| static DtTime | theDfltTimeThreshold |
| static DtTime | theDfltRelLocTimeThreshold |
Private Member Functions | |
| DtEntityPublisher (const DtEntityPublisher &orig) | |
| copy constructor - Not Implemented More... | |
| DtEntityPublisher & | operator= (const DtEntityPublisher &orig) |
| assignment operator - Not Implemented More... | |
Instances of DtEntityPublisher are used for local or source simulations of entities, (i.e.
these entities are not dependent on data being produced elsewhere on the network for their existence). These entities send data to the network.
| typedef DtEntityStateRepository*(* DtEntityPublisher::DtStateRepCreator)() |
Function prototype for functions that create DtEntityStateRepositories.
| DtEntityPublisher::DtEntityPublisher | ( | DtEntityStateRepository * | stateRepToUse, |
| DtExerciseConn * | conn, | ||
| const DtObjectId & | id = DtObjectId::defaultId() |
||
| ) |
Constructor.
DtObjectId::defaultId() returns a special DtObjectId that is a signal to the DtEntityPublisher constructor that it should obtain its own ObjectId.
DtEntityType::defaultType() returns a special DtEntityType that indicates to the DtEntityPublisher constructor that the entity type should also be used as the guise.
| DtEntityPublisher::DtEntityPublisher | ( | DtExerciseConn * | conn, |
| const DtObjectId & | id = DtObjectId::defaultId() |
||
| ) |
Constructor.
DtObjectId::defaultId() returns a special DtObjectId that is a signal to the DtEntityPublisher constructor that it should obtain its own ObjectId.
DtEntityType::defaultType() returns a special DtEntityType that indicates to the DtEntityPublisher constructor that the entity type should also be used as the guise.
| DtEntityPublisher::DtEntityPublisher | ( | const DtEntityType & | type, |
| DtExerciseConn * | conn, | ||
| const DtObjectId & | id = DtObjectId::defaultId() |
||
| ) |
Constructor.
DtObjectId::defaultId() returns a special DtObjectId that is a signal to the DtEntityPublisher constructor that it should obtain its own ObjectId.
DtEntityType::defaultType() returns a special DtEntityType that indicates to the DtEntityPublisher constructor that the entity type should also be used as the guise.
| DtEntityPublisher::DtEntityPublisher | ( | const DtEntityType & | type, |
| DtExerciseConn * | conn, | ||
| DtDeadReckonTypes | algorithm, | ||
| DtForceType | forceId, | ||
| const DtEntityType & | guise = guiseSameAsType(), |
||
| const DtObjectId & | id = DtObjectId::defaultId() |
||
| ) |
Constructor.
DtObjectId::defaultId() returns a special DtObjectId that is a signal to the DtEntityPublisher constructor that it should obtain its own ObjectId.
DtEntityType::defaultType() returns a special DtEntityType that indicates to the DtEntityPublisher constructor that the entity type should also be used as the guise.
|
virtual |
Destructors.
|
private |
copy constructor - Not Implemented
|
virtual |
Send DI Guy as Attributes or PDU's (if needed or if threshold has been exceeded).
|
protectedvirtual |
Send SEES PDU.
|
inlinevirtual |
Returns a pointer to the Decoder being used to decode PDUs that we send back into the asSeenByRemote ESR.
References myEntityDecoder.
|
inlinestatic |
References DtThresholder::dfltRotationThreshold().
|
inlinestatic |
References DtThresholder::dfltTranslationThreshold().
|
virtual |
Return the DIGuy Action time threshold.
|
virtual |
Return the DIGuy Appearance time threshold.
|
virtual |
Return the DIGuy Type time threshold.
Begin a DIS 7 push request for this object.
This just passes through to the OwnershipHandler The entire process will by default be automated from here.
| siteTarget | the destination site where you want the object to go |
| appicationTarget | the destination application where you want the object to go. |
|
virtual |
Tell the publisher to send DI Guy Data as either PDU's or attributes.
Sending is disabled for both if disabled mode is used.
|
inlinevirtual |
Returns a pointer to the Encoder being used to encode current state into an entity state PDU.
References myEntityEncoder.
|
inlinevirtual |
Returns a pointer to the EntityStateRepository - through which you can set or inspect current state information.
References esr().
| DtTime DtEntityPublisher::entityTypeHeartbeat | ( | int | type, |
| int | domain | ||
| ) |
Return the heartbeat based on entity Type.
|
inlinevirtual |
Synonym for entityStateRep().
References DtObjectPublisher::stateRep().
Referenced by entityStateRep().
|
virtual |
Force a state update to be sent during the next call to tick, even if nothing would normally cause a send.
Implements DtObjectPublisher.
|
virtual |
Get the global object designator - same as id for DIS.
Implements DtObjectPublisher.
|
static |
|
inlinevirtual |
Get the entity's identifier.
Implements DtObjectPublisher.
References myId.
Referenced by localId().
|
protected |
Not virtual since called from constructor.
|
inlinevirtual |
|
private |
assignment operator - Not Implemented
|
virtual |
Return the SEES time threshold.
|
virtual |
Determine whether this publisher will send DI Guy Attributes.
|
virtual |
Determine whether this publisher will send DI Guy PDU's.
|
protected |
Not virtual since called from destructor.
|
inlinevirtual |
Set flag indicating whether to send a final PDU with the "FinalPdu" appearance bit set, from within the DtEntityPublisher destructor.
References mySendFinalInDtor.
|
protectedvirtual |
|
virtual |
Determine whether this publisher will send SEES PDU's.
|
static |
|
inlinestatic |
References DtThresholder::setDfltRotationThreshold().
|
inlinestatic |
References DtThresholder::setDfltTranslationThreshold().
|
virtual |
Set the DIGuy Action time threshold for sending a PDU.
|
virtual |
Set the DIGuy Appearance time threshold for sending a PDU.
|
virtual |
Set the DIGuy Type time threshold for sending a PDU.
|
static |
|
virtual |
Sets the current ownership handler to handler.
A DtOwnershipHandler is an object that encapsulates callback function for a variety of ownership-management-related functions. Returns previous handler.
|
virtual |
Set the SEES time threshold for sending a PDU.
|
virtual |
Tell the publisher to send DI Guy Attributes.
|
virtual |
Tell the publisher to send DI Guy PDU's.
|
virtual |
Tell the publisher to send SEES PDU's.
|
static |
Give us a function to be used for creating SRs.
|
static |
|
static |
|
virtual |
This function should be called once per frame for each entity.
It determines if any data needs to be sent to the other exercise participants, and sends that data.
Implements DtObjectPublisher.
|
protected |
|
protected |
Referenced by decoder().
|
protected |
Referenced by encoder().
|
protected |
Referenced by id().
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Referenced by sendFinalPduOnDestruction().
|
protected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
staticprotected |