![]() |
VR-Link API Documentation for HLA Evolved
|
Instances of DtHlaObject are used to represent HLA objects which are communicated across the network. More...
Inheritance diagram for DtHlaObject:
Collaboration diagram for DtHlaObject:Public Member Functions | |
| DtHlaObject (DtExerciseConn *conn, RTI::ObjectHandle id, const char *name, DtObjClassDesc &classDesc, bool reflecting=false) | |
| Constructor - used to construct a DtHlaObject to represent an object that we discover through an RTI callback. | |
| DtHlaObject (DtExerciseConn *conn, const char *name, DtObjClassDesc &classDesc, bool reflecting=false) | |
| Constructor - used to construct a DtHlaObject to represent an object that will be registered locally. | |
| virtual | ~DtHlaObject () |
| Destructor. | |
| virtual const RTI::ObjectHandle & | objectId () const |
| Get the object's handle. | |
| virtual const RTI::AttributeHandleSet & | attrHandleSet () |
| Get the set of attributes associated with this object's FOM class. | |
| virtual const RTI::AttributeHandleSet & | requestedAttributes () |
| Returns the union of all sets of attributes requested since the last call to clearRequestedAttributes. | |
| virtual RTI::ObjectClassHandle | objectClassHandle () const |
| Get the object's class handle. | |
| virtual const char * | name () const |
| Get the object's name. | |
| int | numAttributes () const |
| Get the number of attributes associated with this object's FOM class. | |
| virtual DtExerciseConn * | exerciseConn () const |
| Get the exercise connection for this object. | |
| virtual DtObjClassDesc & | classDesc () const |
| Get the class descriptor for the object's class. | |
| virtual void | setupUpdating () |
| Local Object specific functions. | |
| virtual void | update () |
| Generate and send any necessary attribute updates through the RTI. | |
| virtual void | generateUpdate (const RTI::AttributeHandleSet &eligibileAttrs, const RTI::AttributeHandleSet &requiredAttrs, DtStateMsg *msg) |
| Called by update to actually generate an outgoing message. | |
| virtual void | cleanupFromUpdating () |
| Do the deinitialization required to stop updating attributes of this object. | |
| virtual void | processProvideUpdate (const RTI::AttributeHandleSet &set) |
| Set yourself up so that on the next tick, you send an update for the appropriate attributes. | |
| virtual void | clearRequestedAttributes () |
| Clears the set of requested attributes. | |
| virtual const RTI::AttributeHandleSet & | ownedAttributes () |
| Returns the set of attributes of this object that are owned by the local federate. | |
| virtual void | forceUpdate () |
| Specify a set of attributes that should be included in the ahvps the next time update is called, even if they would not otherwise need to be sent. | |
| virtual void | forceUpdate (const RTI::AttributeHandleSet &set) |
| virtual void | clearForcedAttributes () |
| Clear (empty) the set of forced attributes. | |
| virtual const RTI::AttributeHandleSet & | attributesNeededByFederation () |
| Returns the set of attributes that are currently needed by the federation, i.e. | |
| virtual const RTI::AttributeHandleSet & | eligibleAttributes () |
| Returns the set of attributes that eligible for sending. | |
| virtual const RTI::AttributeHandleSet & | requiredAttributes () |
| Returns the set of attributes that should be included in the next update regardless of whether their update conditions have been met. | |
| bool | classNeededByFederation () |
| Returns true if the class is needed by the federation, i.e. | |
| void | setupClassForUpdating () |
| If the class has never been published, publish it with all attributes using DtObjClassDesc::publish. | |
| virtual void | setupReflecting () |
| Remote Object specific functions. | |
| virtual void | callReflect (const DtStateMsg &msg) |
| Calls reflect, and any postReflect callbacks. | |
| virtual void | callReflectLocal (const DtStateMsg &msg) |
| Calls reflectLocal, and any postReflect callbacks. | |
| virtual void | reflectLocal (const DtStateMsg &msg)=0 |
| Called by callReflectLocal to handle the reflection of updates that we are sending locally. | |
| virtual void | cleanupFromReflecting () |
| Do the deinitialization required to stop handling reflection of object. | |
| virtual void | requestUpdate (RTI::AttributeHandleSet *attrs=0) |
| Request an update for the object for the set of attributes indicated by attrs (or all subscribed attributes if attrs is NULL). | |
| virtual void | addRemoveObjectCb (DtRemoveObjectCb cb, void *usr) |
| Add (register) function to be called when object is about to be removed. | |
| virtual void | removeRemoveObjectCb (DtRemoveObjectCb cb, void *usr) |
| Remove (deregister) function to be called when object is about to be removed. | |
| virtual void | addPostReflectCb (DtObjectReflectAttributeValuesCb cb, void *usr) |
| Add (register) function to be called after each reflectAttrValues. | |
| virtual void | removePostReflectCb (DtObjectReflectAttributeValuesCb cb, void *usr) |
| Remove (deregister) function to be called after each reflectAttrValues. | |
| virtual void | processRemoveObject () |
| Process notification of removal of the object from the network. | |
| virtual DtOwnershipHandler * | setOwnershipHandler (DtOwnershipHandler *handler) |
| Ownership-Management-related functions. | |
| virtual void | unconditionalDivest (const RTI::AttributeHandleSet &attrs) |
| Unconditionally divest ownership of attrs. | |
| virtual void | negotiatedDivest (const RTI::AttributeHandleSet &attrs) |
| Try to divest ownership of attrs. | |
| virtual void | cancelNegotiatedDivest (const RTI::AttributeHandleSet &attrs) |
| Cancel a negotiated divestiture of attributes. | |
| virtual void | acquireAttributes (const RTI::AttributeHandleSet &attrs, bool ifAvailable=false) |
| Attempt to acquire ownership of attributes. | |
| virtual void | cancelAcquireAttributes (const RTI::AttributeHandleSet &attrs) |
| Cancel the request to acquire ownership of attrs. | |
| virtual DtTime | lastSimTimeUpdateReceived () const |
| Returns the value of VR-Link simulation time at the time the last attribute update was received for this object. | |
| virtual DtTime | lastReceivedTimeStamp () const |
| virtual void | printMsg (const DtStateMsg &msg, bool fullReport=false) const |
| Prints contents of a state msg. | |
| virtual void | localSubscriptionChanged () |
| Called when local object class subscriptions change. | |
| virtual void | publicationChanged () |
| Called when there is a change in the publication status of this object's object class. | |
| virtual const DtString & | lastProducingFederate () const |
| Obtain the Federate Handle of the last federate to produce a reflect attribute update. | |
Static Public Member Functions | |
| static void | ownerAcquisitionIfAvailableCb (void *usr) |
| The following four static fns are for use within ownership msg callbacks. | |
| static void | ownerAcquisitionCb (void *usr) |
| static void | negotiatedDivestitureCb (void *usr) |
| static void | unconditionalDivestitureCb (void *usr) |
Protected Member Functions | |
| DtHlaObject () | |
| Default constructor: not implemented; do not call. | |
| DtHlaObject (const DtHlaObject &src) | |
| Copy constructor: not implemented; do not call. | |
| DtHlaObject & | operator= (const DtHlaObject &src) |
| Assignment operator: not implemented; do not call. | |
| virtual void | setLastSimTimeUpdateReceived (DtTime tm) |
| Set the time an update was last received or sent. | |
| virtual void | setLastReceivedTimeStamp (DtTime tm) |
| virtual void | reflect (const DtStateMsg &msg)=0 |
| Handle reflection of object (receipt of state message) from the network. | |
| void | wipeRemoveList () |
| Remove all callbacks from the remove callback list. | |
| virtual void | clearRemoveList () |
| Virtual version of above. | |
| void | wipeReflectList () |
| Remove all callbacks from the reflect callback list. | |
| virtual void | applyPostReflectCallbacks (const DtStateMsg &msg) |
| Apply callbacks after a state msg is reflected. | |
| virtual void | loseOwnership (const RTI::AttributeHandleSet &attrs) |
| Gets called whenever we lose ownership of a set of attributes. | |
| virtual void | gainOwnership (const RTI::AttributeHandleSet &attrs) |
| Gets called whenever we gain ownership of a set of attributes. | |
| virtual void | processUpdatesOff (const RTI::AttributeHandleSet &set) |
| Callback for handling turnUpdatesOffForObjectInstance RTI call. | |
| void | processUpdatesOn (const RTI::AttributeHandleSet &set) |
| Callback for handling turnUpdatesOnForObjectInstance RTI call. | |
| virtual bool | known () const |
| Returns true if the object has been registered with, or discovered via the RTI. | |
| virtual void | processRequestAssumption (const RTI::AttributeHandleSet &attrs, const char *tag) |
| Process RTI's requestAttributeOwnershipAssumption service. | |
| virtual void | processRequestRelease (const RTI::AttributeHandleSet &attrs, const char *tag) |
| Process RTI's requestAttributeOwnershipRelease service. | |
| void | dumpRtiException (const char *functionName, const RTI::Exception *exc) const |
| Print message to explain the RTI Exception. | |
| virtual void | processAttributeAcquisition (const RTI::AttributeHandleSet &attrs) |
| Handle an invocation of the attributeOwnershipAcquisitionNotification service. | |
| virtual void | processAttributeDivestiture (const RTI::AttributeHandleSet &attrs) |
| Handle an invocation of the attributeOwnershipDivestitureNotification service. | |
| virtual void | processConfirmAcquisitionCancellation (const RTI::AttributeHandleSet &attrs) |
| Process RTI's conformAttributeOwnershipAcquisitionCancellation service. | |
| virtual void | computeEligible () |
| Recomputes the set of attrs that are eligible for sending. | |
| virtual void | justRegistered () |
| Called by DtHlaObjectManager right after a DtHlaObject is created, if it was created to represent a newly registered object. | |
| virtual void | setLastProducingFederate (const DtString &fedName) |
| Set the Federate Handle of the last federate to produce a reflect attribute update. | |
Static Protected Member Functions | |
| static void | reflectAttributeValuesCb (const DtStateMsg &stateMsg, void *hlaObj) |
| Callback for handling state messages for the HLA object. | |
| static void | updatesOnCb (RTI::ObjectHandle handle, const RTI::AttributeHandleSet &attributeSet, void *usr) |
| Callback for handling turnUpdatesOnForObjectInstance RTI call. | |
| static void | updatesOffCb (RTI::ObjectHandle handle, const RTI::AttributeHandleSet &attributeSet, void *usr) |
| Callback for handling turnUpdatesOffForObjectInstance RTI call. | |
Protected Attributes | |
| char * | myName |
| DtExerciseConn * | myExConn |
| bool | myReflecting |
| bool | myUpdating |
| DtList | myRemoveCbList |
| DtList | myReflectCbList |
| DtListItem * | myRemoveCbListNextPtr |
| DtListItem * | myReflectCbListNextPtr |
| DtTime | myLastSimTimeUpdateReceived |
| DtTime | myLastReceivedTimeStamp |
| DtObjClassDesc & | myClassDesc |
| DtString | myLastProducingFederate |
| RTI::ObjectHandle | myObjectId |
| RTI::AttributeHandleSet * | myEligibleAttrs |
| Attributes that are eligible to be sent from within update() - passed to generateUpdate. | |
| RTI::AttributeHandleSet * | myNeededAttrs |
| Set of owned attributes for which we have received a turnUpdatesOn more recently than a turnUpdatesOff. | |
| RTI::AttributeHandleSet * | myOwnedAttributes |
| Set of attributes owned by the local federate. | |
| RTI::AttributeHandleSet * | myRequestedAttributes |
| Requested by other federates. | |
| RTI::AttributeHandleSet * | myForcedAttributes |
| Requested by a call to setForcedUpdate. | |
| RTI::AttributeHandleSet * | myRequiredAttributes |
| Union of forced and requested - not computed until needed. | |
| DtOwnershipHandler * | myOwnershipHandler |
Friends | |
| class | DtHlaObjectManager |
Instances of DtHlaObject are used to represent HLA objects which are communicated across the network.
There should be one DtHlaObject instance for each "known" object in the federation execution. To enforce this restriction, only the DtHlaObjectManager can create DtHlaObjects. DtHlaObject keeps track of which attributes are locally owned. It also defines the interface for the virtual functions reflect, and generateUpdate which are using when receiving or sending updates through the RTI respectively. DtHlaObject is used by DtObjectPublisher and DtReflectedObject, so many applications will not need to deal directly with DtHlaObjects.
| DtHlaObject::DtHlaObject | ( | DtExerciseConn * | conn, |
| RTI::ObjectHandle | id, | ||
| const char * | name, | ||
| DtObjClassDesc & | classDesc, | ||
| bool | reflecting = false |
||
| ) |
Constructor - used to construct a DtHlaObject to represent an object that we discover through an RTI callback.
The RTI provides us with the handle, name and class. Object is not ready to use until setupReflecting is called.
| DtHlaObject::DtHlaObject | ( | DtExerciseConn * | conn, |
| const char * | name, | ||
| DtObjClassDesc & | classDesc, | ||
| bool | reflecting = false |
||
| ) |
Constructor - used to construct a DtHlaObject to represent an object that will be registered locally.
We provide a name and class, and the RTI chooses a handle after the register call. Object is not ready to use until setupUpdating is called.
| virtual DtHlaObject::~DtHlaObject | ( | ) | [virtual] |
Destructor.
Make sure to call cleanupFromUpdating and/or cleanupFromReflecting before deleting the object.
| DtHlaObject::DtHlaObject | ( | ) | [protected] |
Default constructor: not implemented; do not call.
| DtHlaObject::DtHlaObject | ( | const DtHlaObject & | src | ) | [protected] |
Copy constructor: not implemented; do not call.
| virtual void DtHlaObject::acquireAttributes | ( | const RTI::AttributeHandleSet & | attrs, |
| bool | ifAvailable = false |
||
| ) | [virtual] |
Attempt to acquire ownership of attributes.
If ifAvailable is true, use the RTI's "IfAvailable" version of attributeOwnershipAcquisition. You have not actually gained ownership of the attributes until you receive an attributeOwnershipAcquisitionNotification callback from the RTI. Caller needs to handle RTI-generated exceptions.
| virtual void DtHlaObject::addPostReflectCb | ( | DtObjectReflectAttributeValuesCb | cb, |
| void * | usr | ||
| ) | [virtual] |
Add (register) function to be called after each reflectAttrValues.
| virtual void DtHlaObject::addRemoveObjectCb | ( | DtRemoveObjectCb | cb, |
| void * | usr | ||
| ) | [virtual] |
Add (register) function to be called when object is about to be removed.
| virtual void DtHlaObject::applyPostReflectCallbacks | ( | const DtStateMsg & | msg | ) | [protected, virtual] |
Apply callbacks after a state msg is reflected.
| const RTI::AttributeHandleSet & DtHlaObject::attrHandleSet | ( | ) | [inline, virtual] |
Get the set of attributes associated with this object's FOM class.
References DtObjClassDesc::attrHandleSet(), and myClassDesc.
| virtual const RTI::AttributeHandleSet& DtHlaObject::attributesNeededByFederation | ( | ) | [virtual] |
Returns the set of attributes that are currently needed by the federation, i.e.
those that have been specified in startUpdates calls more recently than in stopUpdates calls. This set may contain attributes that are not locally owned.
| virtual void DtHlaObject::callReflect | ( | const DtStateMsg & | msg | ) | [virtual] |
Calls reflect, and any postReflect callbacks.
Override reflect rather than this function to change the way an HLA object reflects a stateMsg. This function is called when we receive an update from the RTI.
| virtual void DtHlaObject::callReflectLocal | ( | const DtStateMsg & | msg | ) | [virtual] |
Calls reflectLocal, and any postReflect callbacks.
Override reflectLocal rather than this function to change the way an HLA object reflects a stateMsg that we generate locally. This function is called from within update() when the exercise connection's reflecting flag is set.
| virtual void DtHlaObject::cancelAcquireAttributes | ( | const RTI::AttributeHandleSet & | attrs | ) | [virtual] |
Cancel the request to acquire ownership of attrs.
If the cancel goes through, you will receive a confirmAttributeOwnershipAcquisitionCancellation RTI callback. Caller must handle RTI-generated exceptions.
| virtual void DtHlaObject::cancelNegotiatedDivest | ( | const RTI::AttributeHandleSet & | attrs | ) | [virtual] |
Cancel a negotiated divestiture of attributes.
Caller needs to handle RTI-generated exceptions.
| DtObjClassDesc & DtHlaObject::classDesc | ( | ) | const [inline, virtual] |
Get the class descriptor for the object's class.
References myClassDesc.
| bool DtHlaObject::classNeededByFederation | ( | ) |
Returns true if the class is needed by the federation, i.e.
we've received a startRegistration or startUpdates service call from the RTI for the object's class.
| virtual void DtHlaObject::cleanupFromReflecting | ( | ) | [virtual] |
Do the deinitialization required to stop handling reflection of object.
Call before deleting a DtHlaObject.
| virtual void DtHlaObject::cleanupFromUpdating | ( | ) | [virtual] |
Do the deinitialization required to stop updating attributes of this object.
| virtual void DtHlaObject::clearForcedAttributes | ( | ) | [virtual] |
Clear (empty) the set of forced attributes.
| virtual void DtHlaObject::clearRemoveList | ( | ) | [protected, virtual] |
Virtual version of above.
| virtual void DtHlaObject::clearRequestedAttributes | ( | ) | [virtual] |
Clears the set of requested attributes.
Should be called after request has been serviced.
| virtual void DtHlaObject::computeEligible | ( | ) | [protected, virtual] |
Recomputes the set of attrs that are eligible for sending.
Called any time we lose or gain ownership of attributes, when we get update on/off advisories, and when local subscription changes.
| void DtHlaObject::dumpRtiException | ( | const char * | functionName, |
| const RTI::Exception * | exc | ||
| ) | const [protected] |
Print message to explain the RTI Exception.
Both functionName and the exception can be Null.
| virtual const RTI::AttributeHandleSet& DtHlaObject::eligibleAttributes | ( | ) | [virtual] |
Returns the set of attributes that eligible for sending.
That is, the intersection of owned attributes and attributes needed by federation.
| DtExerciseConn * DtHlaObject::exerciseConn | ( | ) | const [inline, virtual] |
Get the exercise connection for this object.
References myExConn.
| virtual void DtHlaObject::forceUpdate | ( | ) | [virtual] |
Specify a set of attributes that should be included in the ahvps the next time update 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 published attributes. Multiple calls are cumulative, until the set is cleared with clearForcedAttributes, which should happen within update.
| virtual void DtHlaObject::forceUpdate | ( | const RTI::AttributeHandleSet & | set | ) | [virtual] |
| virtual void DtHlaObject::gainOwnership | ( | const RTI::AttributeHandleSet & | attrs | ) | [protected, virtual] |
Gets called whenever we gain ownership of a set of attributes.
| virtual void DtHlaObject::generateUpdate | ( | const RTI::AttributeHandleSet & | eligibileAttrs, |
| const RTI::AttributeHandleSet & | requiredAttrs, | ||
| DtStateMsg * | msg | ||
| ) | [virtual] |
Called by update to actually generate an outgoing message.
Derived class implementations should keep track of which attributes are updated when, should check update conditions, and add values to stateMsg for only those attributes that currently need to be sent. eligibleAttrs is the set of owned attributes to which remote federates have subscribed. requiredAttrs is the set of attributes that have been requested or forced by application code since the attribute was last sent. stateMsg is the message to fill out. Default implementation is null, but the function is not pure virtual since some subclasses might want to override update rather than overriding generateUpdate.
Reimplemented in DtHlaObjectWithStateRep.
| virtual void DtHlaObject::justRegistered | ( | ) | [protected, virtual] |
Called by DtHlaObjectManager right after a DtHlaObject is created, if it was created to represent a newly registered object.
Implementation gains ownership of all published attributes.
| virtual bool DtHlaObject::known | ( | ) | const [protected, virtual] |
Returns true if the object has been registered with, or discovered via the RTI.
Should always return true once the DtHlaObject has been set up for receiving or updating.
| virtual const DtString& DtHlaObject::lastProducingFederate | ( | ) | const [virtual] |
Obtain the Federate Handle of the last federate to produce a reflect attribute update.
| DtTime DtHlaObject::lastReceivedTimeStamp | ( | ) | const [inline, virtual] |
References myLastReceivedTimeStamp.
| DtTime DtHlaObject::lastSimTimeUpdateReceived | ( | ) | const [inline, virtual] |
Returns the value of VR-Link simulation time at the time the last attribute update was received for this object.
References myLastSimTimeUpdateReceived.
| virtual void DtHlaObject::localSubscriptionChanged | ( | ) | [virtual] |
Called when local object class subscriptions change.
As a result, we update the set of eligible attributes to include remotely subscribed attributes, plus locally subscribed attributes.
| virtual void DtHlaObject::loseOwnership | ( | const RTI::AttributeHandleSet & | attrs | ) | [protected, virtual] |
Gets called whenever we lose ownership of a set of attributes.
| const char * DtHlaObject::name | ( | ) | const [inline, virtual] |
Get the object's name.
References myName.
| virtual void DtHlaObject::negotiatedDivest | ( | const RTI::AttributeHandleSet & | attrs | ) | [virtual] |
Try to divest ownership of attrs.
Divesting is not complete (i.e. you still own the attributes) until you receive an attributeOwnershipDivestitureNotification callback from the RTI. Elements of attrs that are not currently owned are ignored. Caller needs to handle other RTI-generated exceptions.
| static void DtHlaObject::negotiatedDivestitureCb | ( | void * | usr | ) | [static] |
| int DtHlaObject::numAttributes | ( | ) | const [inline] |
Get the number of attributes associated with this object's FOM class.
Non Virtual -- called from Ctor
References myClassDesc, and DtObjClassDesc::numAttributes().
| RTI::ObjectClassHandle DtHlaObject::objectClassHandle | ( | ) | const [inline, virtual] |
Get the object's class handle.
References DtObjClassDesc::handle(), and myClassDesc.
| const RTI::ObjectHandle & DtHlaObject::objectId | ( | ) | const [inline, virtual] |
Get the object's handle.
| DtHlaObject& DtHlaObject::operator= | ( | const DtHlaObject & | src | ) | [protected] |
Assignment operator: not implemented; do not call.
| const RTI::AttributeHandleSet & DtHlaObject::ownedAttributes | ( | ) | [inline, virtual] |
Returns the set of attributes of this object that are owned by the local federate.
References myOwnedAttributes.
| static void DtHlaObject::ownerAcquisitionCb | ( | void * | usr | ) | [static] |
| static void DtHlaObject::ownerAcquisitionIfAvailableCb | ( | void * | usr | ) | [static] |
The following four static fns are for use within ownership msg callbacks.
| virtual void DtHlaObject::printMsg | ( | const DtStateMsg & | msg, |
| bool | fullReport = false |
||
| ) | const [virtual] |
Prints contents of a state msg.
Base class prints only header info. If fullReport set to true, printMsg requests a full status print out for objects with a state repository.
Reimplemented in DtHlaObjectWithStateRep.
| virtual void DtHlaObject::processAttributeAcquisition | ( | const RTI::AttributeHandleSet & | attrs | ) | [protected, virtual] |
Handle an invocation of the attributeOwnershipAcquisitionNotification service.
| virtual void DtHlaObject::processAttributeDivestiture | ( | const RTI::AttributeHandleSet & | attrs | ) | [protected, virtual] |
Handle an invocation of the attributeOwnershipDivestitureNotification service.
| virtual void DtHlaObject::processConfirmAcquisitionCancellation | ( | const RTI::AttributeHandleSet & | attrs | ) | [protected, virtual] |
Process RTI's conformAttributeOwnershipAcquisitionCancellation service.
| virtual void DtHlaObject::processProvideUpdate | ( | const RTI::AttributeHandleSet & | set | ) | [virtual] |
Set yourself up so that on the next tick, you send an update for the appropriate attributes.
(Can't send them within this function since this is called from within an RTI service).
| virtual void DtHlaObject::processRemoveObject | ( | ) | [virtual] |
Process notification of removal of the object from the network.
Call back all the remove object callbacks.
| virtual void DtHlaObject::processRequestAssumption | ( | const RTI::AttributeHandleSet & | attrs, |
| const char * | tag | ||
| ) | [protected, virtual] |
Process RTI's requestAttributeOwnershipAssumption service.
| virtual void DtHlaObject::processRequestRelease | ( | const RTI::AttributeHandleSet & | attrs, |
| const char * | tag | ||
| ) | [protected, virtual] |
Process RTI's requestAttributeOwnershipRelease service.
| virtual void DtHlaObject::processUpdatesOff | ( | const RTI::AttributeHandleSet & | set | ) | [protected, virtual] |
Callback for handling turnUpdatesOffForObjectInstance RTI call.
| void DtHlaObject::processUpdatesOn | ( | const RTI::AttributeHandleSet & | set | ) | [protected] |
Callback for handling turnUpdatesOnForObjectInstance RTI call.
Non Virtual --called from CTOR
| virtual void DtHlaObject::publicationChanged | ( | ) | [virtual] |
Called when there is a change in the publication status of this object's object class.
| virtual void DtHlaObject::reflect | ( | const DtStateMsg & | msg | ) | [protected, pure virtual] |
Handle reflection of object (receipt of state message) from the network.
called by callReflect. Override this function rather than callReflect to change the way an HLA object reflects a stateMsg.
Implemented in DtHlaObjectWithStateRep, and DtUnknownHlaObject.
| static void DtHlaObject::reflectAttributeValuesCb | ( | const DtStateMsg & | stateMsg, |
| void * | hlaObj | ||
| ) | [static, protected] |
Callback for handling state messages for the HLA object.
Casts hlaObj to DtHlaObject* and calls reflect().
| virtual void DtHlaObject::reflectLocal | ( | const DtStateMsg & | msg | ) | [pure virtual] |
Called by callReflectLocal to handle the reflection of updates that we are sending locally.
Used when the exercise connection's reflecting flag is set.
Implemented in DtHlaObjectWithStateRep.
| virtual void DtHlaObject::removePostReflectCb | ( | DtObjectReflectAttributeValuesCb | cb, |
| void * | usr | ||
| ) | [virtual] |
Remove (deregister) function to be called after each reflectAttrValues.
| virtual void DtHlaObject::removeRemoveObjectCb | ( | DtRemoveObjectCb | cb, |
| void * | usr | ||
| ) | [virtual] |
Remove (deregister) function to be called when object is about to be removed.
| const RTI::AttributeHandleSet & DtHlaObject::requestedAttributes | ( | ) | [inline, virtual] |
Returns the union of all sets of attributes requested since the last call to clearRequestedAttributes.
References myRequestedAttributes.
| virtual void DtHlaObject::requestUpdate | ( | RTI::AttributeHandleSet * | attrs = 0 | ) | [virtual] |
Request an update for the object for the set of attributes indicated by attrs (or all subscribed attributes if attrs is NULL).
| virtual const RTI::AttributeHandleSet& DtHlaObject::requiredAttributes | ( | ) | [virtual] |
Returns the set of attributes that should be included in the next update regardless of whether their update conditions have been met.
| virtual void DtHlaObject::setLastProducingFederate | ( | const DtString & | fedName | ) | [protected, virtual] |
Set the Federate Handle of the last federate to produce a reflect attribute update.
| void DtHlaObject::setLastReceivedTimeStamp | ( | DtTime | tm | ) | [inline, protected, virtual] |
References myLastReceivedTimeStamp.
| void DtHlaObject::setLastSimTimeUpdateReceived | ( | DtTime | tm | ) | [inline, protected, virtual] |
Set the time an update was last received or sent.
References myLastSimTimeUpdateReceived.
| virtual DtOwnershipHandler* DtHlaObject::setOwnershipHandler | ( | DtOwnershipHandler * | handler | ) | [virtual] |
Ownership-Management-related functions.
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.
| void DtHlaObject::setupClassForUpdating | ( | ) |
If the class has never been published, publish it with all attributes using DtObjClassDesc::publish.
Non Virtual -- called from CTOR
| virtual void DtHlaObject::setupReflecting | ( | ) | [virtual] |
Remote Object specific functions.
Do the initialization required to handle reflection of object.
| virtual void DtHlaObject::setupUpdating | ( | ) | [virtual] |
Local Object specific functions.
Do the initialization required to begin updating attributes of this object. Calls registerObject() if the object has not yet been registered or discovered (that is, we are creating a new object).
| virtual void DtHlaObject::unconditionalDivest | ( | const RTI::AttributeHandleSet & | attrs | ) | [virtual] |
Unconditionally divest ownership of attrs.
Elements of attrs that are not currently owned are ignored. Caller needs to handle other RTI- generated exceptions.
| static void DtHlaObject::unconditionalDivestitureCb | ( | void * | usr | ) | [static] |
| virtual void DtHlaObject::update | ( | ) | [virtual] |
Generate and send any necessary attribute updates through the RTI.
Called by publisher's tick function. Default implementation is to call the (logically) pure virtual generateUpdate, and then send the generated message.
Reimplemented in DtUnknownHlaObject.
| static void DtHlaObject::updatesOffCb | ( | RTI::ObjectHandle | handle, |
| const RTI::AttributeHandleSet & | attributeSet, | ||
| void * | usr | ||
| ) | [static, protected] |
Callback for handling turnUpdatesOffForObjectInstance RTI call.
| static void DtHlaObject::updatesOnCb | ( | RTI::ObjectHandle | handle, |
| const RTI::AttributeHandleSet & | attributeSet, | ||
| void * | usr | ||
| ) | [static, protected] |
Callback for handling turnUpdatesOnForObjectInstance RTI call.
| void DtHlaObject::wipeReflectList | ( | ) | [protected] |
Remove all callbacks from the reflect callback list.
Non-virtual since meant to be called from dtor.
| void DtHlaObject::wipeRemoveList | ( | ) | [protected] |
Remove all callbacks from the remove callback list.
Non-virtual since meant to be called from dtor.
friend class DtHlaObjectManager [friend] |
DtObjClassDesc& DtHlaObject::myClassDesc [protected] |
Referenced by attrHandleSet(), classDesc(), numAttributes(), and objectClassHandle().
RTI::AttributeHandleSet* DtHlaObject::myEligibleAttrs [protected] |
Attributes that are eligible to be sent from within update() - passed to generateUpdate.
If we are reflecting local objects, then it's the union of needed attributes, locally subscribed attributes, and owned attributes. Otherwise, it's the union of owned attributes and needed attributes.
DtExerciseConn* DtHlaObject::myExConn [protected] |
Referenced by exerciseConn().
RTI::AttributeHandleSet* DtHlaObject::myForcedAttributes [protected] |
Requested by a call to setForcedUpdate.
DtString DtHlaObject::myLastProducingFederate [protected] |
DtTime DtHlaObject::myLastReceivedTimeStamp [protected] |
Referenced by lastReceivedTimeStamp(), and setLastReceivedTimeStamp().
DtTime DtHlaObject::myLastSimTimeUpdateReceived [protected] |
Referenced by lastSimTimeUpdateReceived(), and setLastSimTimeUpdateReceived().
char* DtHlaObject::myName [protected] |
Referenced by name().
RTI::AttributeHandleSet* DtHlaObject::myNeededAttrs [protected] |
Set of owned attributes for which we have received a turnUpdatesOn more recently than a turnUpdatesOff.
RTI::ObjectHandle DtHlaObject::myObjectId [protected] |
RTI::AttributeHandleSet* DtHlaObject::myOwnedAttributes [protected] |
Set of attributes owned by the local federate.
If we register the object, the owned set defaults to the published set.
Referenced by ownedAttributes().
DtOwnershipHandler* DtHlaObject::myOwnershipHandler [protected] |
DtList DtHlaObject::myReflectCbList [protected] |
DtListItem* DtHlaObject::myReflectCbListNextPtr [protected] |
bool DtHlaObject::myReflecting [protected] |
DtList DtHlaObject::myRemoveCbList [protected] |
DtListItem* DtHlaObject::myRemoveCbListNextPtr [protected] |
RTI::AttributeHandleSet* DtHlaObject::myRequestedAttributes [protected] |
Requested by other federates.
Referenced by requestedAttributes().
RTI::AttributeHandleSet* DtHlaObject::myRequiredAttributes [protected] |
Union of forced and requested - not computed until needed.
bool DtHlaObject::myUpdating [protected] |