![]() |
VR-Vantage 2.3 API Documentation
|
This class will wrap a VR-Link DtEntityPublisher to allow for easier creation of a publisher that is compatible with VR-Forces. More...
Public Member Functions | |
| DtVrfEntityPublisher (const DtEntityType &type, DtExerciseConn *conn, const DtGlobalObjectDesignator &glId=DtGlobalObjectDesignator::nullId(), const DtEntityIdentifier &entId=DtEntityIdentifier::nullId()) | |
| Create a new instance of the VRF entity publisher which will, in turn, create the VR-Link entity publisher, given a object id (DIS) or name (HLA). | |
| virtual | ~DtVrfEntityPublisher () |
| Also destroys publisher. | |
| virtual void | tick () |
| Class method taken from publisher class for entities at VR-Link level. | |
| virtual DtExtEntityStateRepository * | entityProcessStateRep () |
| Returns a pointer to the DtExtEntityStateRepository - through which you can set or inspect current state information. | |
| virtual DtExtEntityStateRepository * | entityStateRep () |
| virtual DtExtEntityStateRepository * | ensr () |
| Synonym for entityProcessStateRep(). | |
| virtual DtEntPublisherDecoder * | decoder () |
| Returns a pointer to the Decoder being used to decode PDUs that we send back into the asSeenByRemote ESR. | |
| virtual DtEntPublisherEncoder * | encoder () |
| Returns a pointer to the Encoder being used to encode current state into an entity state PDU. | |
| virtual void | setPublishesDiGuyInfo (bool has) |
| virtual bool | publishesDiGuyInfo () |
| DtStateRepository * | sr () |
| VRL support for common functions. | |
| const DtString & | name () const |
| virtual const DtObjectId & | id () const |
| Get the entity's identifier. | |
| virtual const DtObjectId & | localId () const |
| Get the entity's localId - same as id for DIS. | |
| virtual const DtGlobalObjectDesignator & | globalId () const |
| Get the global object designator - same as id for DIS. | |
| 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 bool | sendVrfObjectData () |
| Sends vrf object data update from the ensr() to the network. | |
| virtual DtEntityPublisher * | entityPublisher () |
| Returns a pointer to myPublisher (the VR-Link DtEntityPublisher) | |
| virtual void | setSendVrfObjectDataRecord (bool shouldSend) |
| Sets whether a separate VrfObjectData message should be sent to convey additional VRF object information. | |
| virtual void | processDataInteraction (DtDataInteraction *i) |
| Used internally. Should not be directly called. | |
Static Public Member Functions | |
| static void | setVrfDataTimeThreshold (DtTime time) |
| static DtTime | vrfDataTimeThreshold () |
Protected Member Functions | |
| DtVrfEntityPublisher () | |
| Alternate constructor that performs no initialization. | |
| void | initialize (const DtEntityType &type, DtExerciseConn *conn, const DtGlobalObjectDesignator &glId, const DtEntityIdentifier &entId) |
| Called by the constructor to initialize the publisher. | |
| virtual bool | sendVrfDataUpdate () |
| Sends out a vrf data update message if needed. | |
| virtual bool | needsVrfObjectDataUpdate () |
| Return true if the vrf object data message needs to be updated from a heartbeat or if the object data has changed. | |
| virtual bool | sendMessage (const DtSimulationAddress &receiver, DtSimInterfaceContent *message) |
| Methods for sending out the object update Fill out the addressing and bookkeeping data, create interaction, and send (Calls set content and send below) Returns true if content could be set (and message sent); otherwise, false. | |
| virtual bool | setContentForNet (DtDataInteraction *dataInter, DtSimInterfaceContent *content) const |
| Fill out the payload data. | |
| virtual void | sendMessageInteraction (const DtSimulationAddress &receiver, DtDataInteraction &data) |
| Send the message interaction. | |
| virtual void | processSendVrfObjectDataMessage (DtDataInteraction *interaction) |
| Send message if interaction is requesting the entity id we are publishing. | |
Static Protected Member Functions | |
| static void | dataInteractionCallback (DtDataInteraction *i, void *usr) |
| Used internally to see if a request is made of this object to send a vrf object update. | |
Protected Attributes | |
| DtEntityPublisher * | myPublisher |
| DtTime | myTimeLastVrfDataSend |
| bool | myPublishesDIGuyInfo |
Static Protected Attributes | |
| static DtTime | theVrfDataTimeThreshold |
| static bool | myDiGuyEncodersSetup |
Private Member Functions | |
| DtVrfEntityPublisher (const DtVrfEntityPublisher &) | |
| Unimplemented. | |
| DtVrfEntityPublisher & | operator= (const DtVrfEntityPublisher &) |
This class will wrap a VR-Link DtEntityPublisher to allow for easier creation of a publisher that is compatible with VR-Forces.
If you want to create and publish entity objects that can be used by VR-Forces, you can use a publisher of this class to facilitate in that creation.
The way in which entities are considered compliant with VR-Forces is via the publication of the DtIfVrfDataObject message. In addition to publishing the PDU for the entity, every n seconds (default 5), a DtIfVrfDataObject message will also be sent. You can change this by setting the heartbeat values for the data object. Note that a value of < 0 will mean to not send a heartbeat
Additional note: this class is also responsible for setting up extended DI-Guy encoders, which allow the contents of DI-Guy related packets to be controlled from VrfVrlExt, so that modifications don't need to be made to code in VR-Link.
| DtVrfEntityPublisher::DtVrfEntityPublisher | ( | const DtEntityType & | type, |
| DtExerciseConn * | conn, | ||
| const DtGlobalObjectDesignator & | glId = DtGlobalObjectDesignator::nullId(), |
||
| const DtEntityIdentifier & | entId = DtEntityIdentifier::nullId() |
||
| ) |
Create a new instance of the VRF entity publisher which will, in turn, create the VR-Link entity publisher, given a object id (DIS) or name (HLA).
This class will use the default factory as supplied in the DtVrfObjectIdGenerator class
The state repository will initially be set to the DtExtEntityStateRepository class. You can change it in the global DtVrfEntityPublisher class before calling this creator
|
virtual |
Also destroys publisher.
|
private |
Unimplemented.
|
protected |
Alternate constructor that performs no initialization.
Can be used in subclasses to override how initialization is performed. If this constructor is used, the initialize function (or a equivalent replacement) must be called before this class will publish anything.
|
virtual |
Class method taken from publisher class for entities at VR-Link level.
This will simply call down to the publisher to handle the method. This function should be called once per frame for each entity object. It determines if any data needs to be sent to the other exercise participants, and sends that data.
In addition to publishing the entity, if need be, will also send the DtIfVrfObjectData message.
|
virtual |
Returns a pointer to the DtExtEntityStateRepository - through which you can set or inspect current state information.
|
virtual |
|
virtual |
Synonym for entityProcessStateRep().
|
virtual |
Returns a pointer to the Decoder being used to decode PDUs that we send back into the asSeenByRemote ESR.
|
virtual |
Returns a pointer to the Encoder being used to encode current state into an entity state PDU.
|
virtual |
|
inline |
VRL support for common functions.
|
inline |
|
virtual |
Get the entity's identifier.
|
virtual |
Get the entity's localId - same as id for DIS.
|
virtual |
Get the global object designator - same as id for DIS.
|
virtual |
Force a state update to be sent during the next call to tick, even if nothing would normally cause a send.
|
virtual |
Sends vrf object data update from the ensr() to the network.
|
virtual |
Returns a pointer to myPublisher (the VR-Link DtEntityPublisher)
Sets whether a separate VrfObjectData message should be sent to convey additional VRF object information.
|
static |
|
static |
|
private |
|
protected |
Called by the constructor to initialize the publisher.
|
protectedvirtual |
Sends out a vrf data update message if needed.
|
protectedvirtual |
Return true if the vrf object data message needs to be updated from a heartbeat or if the object data has changed.
If it does, then the heartbeat time for the next update will also be updated
|
protectedvirtual |
Methods for sending out the object update Fill out the addressing and bookkeeping data, create interaction, and send (Calls set content and send below) Returns true if content could be set (and message sent); otherwise, false.
|
protectedvirtual |
Fill out the payload data.
|
protectedvirtual |
Send the message interaction.
|
staticprotected |
Used internally to see if a request is made of this object to send a vrf object update.
|
protectedvirtual |
Send message if interaction is requesting the entity id we are publishing.
|
virtual |
Used internally. Should not be directly called.
|
protected |
|
protected |
|
staticprotected |
|
protected |
|
staticprotected |