![]() |
VR-Link API Documentation for HLA 1516
|
class DtReflectedObjectList More...
Inheritance diagram for DtReflectedObjectList:
Collaboration diagram for DtReflectedObjectList:Public Member Functions | |
| DtReflectedObjectList (DtExerciseConn *exConn, const DtDDMRegionSet *regionSetToUse=0, const DtString &updateRateTag=DtString("")) | |
| Constructor. | |
| virtual | ~DtReflectedObjectList () |
| destructor | |
| virtual DtReflectedObject * | lookupObj (RTI::ObjectInstanceHandle id) |
| Look up object by identifier. | |
| virtual DtReflectedObject * | lookupObj (const DtGlobalObjectDesignator &objName) |
| Look up object by global ID (which is the object name in RTI1.3.3). | |
| virtual DtReflectedObject * | firstObj () const |
| Get the first/last object in the list. | |
| virtual DtReflectedObject * | lastObj () const |
| virtual int | count () const |
| Get number of objects. | |
| virtual DtExerciseConn * | exerciseConn () const |
| Get my exerciseConn. | |
| virtual void | manageObjectClass (RTI::ObjectClassHandle handle) |
| Register callbacks with exercise connection so that we get notified when an object of this class is discovered. | |
| virtual bool | removeObject (const DtObjectId &id) |
| Have the application act as though we had never discovered the object. | |
| virtual void | addObjectAdditionCallback (DtReflectedObjectCallbackFunction cb, void *userData) |
| Object added callback registration/deregistration. | |
| virtual void | removeObjectAdditionCallback (DtReflectedObjectCallbackFunction cb, void *userData) |
| virtual void | addObjectRemovalCallback (DtReflectedObjectCallbackFunction cb, void *userData) |
| Object removed callback registration/deregistration. | |
| virtual void | removeObjectRemovalCallback (DtReflectedObjectCallbackFunction cb, void *userData) |
| virtual void | print () |
| Print the SRs of all objects. | |
| virtual void | setTimeoutProcessing (bool onOff) |
| Set whether or not timeout processing occurs. | |
| virtual bool | isTimeoutProcessing () const |
| Get whether or not timeout processing occurs. | |
| virtual void | setWaitListRefreshEnabled (bool on) |
| Set whether or not we will request updates for objects which have not met discovery and are therefor wait listed. | |
| virtual void | setTimeoutInterval (DtTime time) |
| Set/Get the remote object timeout period. | |
| virtual DtTime | timeoutInterval () |
| virtual void | setWaitlistRefreshPeriod (DtTime time) |
| Set/Get the wait list refresh period. | |
| virtual DtTime | waitlistRefreshPeriod () |
| virtual void | setDiscoveryCondition (DtDiscoveryCondition fn, void *usr) |
| Set the checker function which will determine when an object gets discovered and put into the reflected list. | |
| virtual void | clearDiscoveryCondition () |
| Unregisters the checker function set in setDiscoverCondition. | |
| virtual const DtDDMRegionSet & | subscribedRegions () |
| Returns list of regions subscribed to. | |
Static Public Member Functions | |
| static void | setAutoSubscribeFlag (bool flag) |
| Set/Get flag which determines whether to subscribe to object classes that this list manages. | |
| static bool | autoSubscribeFlag () |
| static void | setRequestClassUpdateFlag (bool onOff) |
| Set/Get flag that determines whether we request updates from all objects of the object classes we subscribe to. | |
| static bool | requestClassUpdateFlag () |
| static void | setRequestObjectUpdateFlag (bool onOff) |
| Set/Get flag that determines whether we request updates from an object as we discover it. | |
| static bool | requestObjectUpdateFlag () |
| static void | findDiscoveredObjectsCb (void *usr) |
| Post-drain callback that calls findAlreadyDiscovedObjects(). | |
Protected Member Functions | |
| virtual void | processDiscoverObject (DtHlaObject *obj) |
| Process the discovery of a remote object on the network. | |
| virtual void | processRemoveObject (DtHlaObject *obj) |
| Process the removal of a remote object from the network. | |
| virtual void | processTimedOutObjectReflect (const DtStateMsg &msg, DtHlaObject *obj) |
| Handle the receipt of attributes for a remote object which was timed out. | |
| virtual void | doTimeouts () |
| Remove any remote objects which have not been updated during the timeout period. | |
| virtual void | doRequestWaitListUpdates () |
| Request an update for any objects which have not met their discovery criteria yet. | |
| virtual DtReflectedObject * | newReflectedObject (DtHlaObject *obj) const =0 |
| Create a remote object object for the HLA object. | |
| virtual void | removeAndDelete (DtReflectedObject *obj, char *msg=NULL) |
| Remove the remote object from the list if found and delete it. | |
| virtual void | objectAdded (DtReflectedObject *object) |
| Called from processDiscoverObject() after a remote object has been added to the list. | |
| virtual bool | shouldBeTimedOut (DtReflectedObject *object) |
| Returns whether or not the object should be timed out. | |
| virtual void | timeOutObject (DtReflectedObject *object) |
| Times out object by removing it from the remote object list and deleting it. | |
| virtual void | unTimeOutObject (DtHlaObject *obj) |
| Manages callbacks and data used for reinstating a remote object which was timed out. | |
| virtual void | addObjectClass (RTI::ObjectClassHandle handle) |
| Register interest in this FOM object class. | |
| virtual void | addObjectClassByName (const char *className) |
| Register interest in this FOM object class by className. | |
| virtual void | init (const DtList *handleList) |
| Register interest in a whole list of RTI::ObjectClassHandles all at once. | |
| void | emptyLists () |
| Empty the object list and the timeout list. | |
| void | emptyCallbackLists () |
| Empty the callback lists. | |
| virtual void | processObjectAdditionCallbacks (DtReflectedObject *object) |
| Process object addition/removal callbacks. | |
| virtual void | processObjectRemovalCallbacks (DtReflectedObject *object) |
| virtual void | findAlreadyDiscoveredObjects () |
| When list is created, we call this function to go through the list of all discovered HLA objects to see if any should be managed by this list. | |
| virtual void | checkDiscoveryCondition (DtReflectedObject *refObj) |
| virtual bool | readyToAdd (DtReflectedObject *obj) |
| Returns true if the obj is ready to be added to myObjectList; calls myWaitListChecker from within. | |
| virtual void | addToObjectList (DtReflectedObject *refObj) |
| Add refObj to myObjectList and initiates discovery callbacks. | |
| virtual DtReflectedObject * | lookupObjInWaitList (RTI::ObjectInstanceHandle id) |
| Find object in waitList by identifier. | |
| virtual DtReflectedObject * | lookupObjInWaitList (const DtGlobalObjectDesignator &name) |
| Find object in waitList by name. | |
| void | unsubscribeRegions () |
Static Protected Member Functions | |
| static void | discoverObjectCb (DtHlaObject *hlaObj, void *rel) |
| Cast the void* to a DtReflectedObjectList* and calls processDiscoverObject(). | |
| static void | removeObjectCb (DtHlaObject *hlaObj, void *rel) |
| Cast the void* to a DtReflectedObjectList* and calls processRemoveObject(). | |
| static void | timedOutObjectReflectCb (const DtStateMsg &msg, DtHlaObject *obj, void *usr) |
| Cast the void* to a DtReflectedObjectList* and calls processTimedOutObjectReflect(). | |
| static void | doTimeoutsPostDrainCb (void *usr) |
| Calls doTimeouts. | |
| static void | doRequestWaitListUpdatesPostDrainCb (void *usr) |
| Calls doRequestWaitListUpdates. | |
| static void | postUpdateCb (DtReflectedObject *obj, void *usr) |
| Calls checkDiscoveryCondition. | |
Static Protected Attributes | |
| static bool | theAutoSubscribeFlag |
| static bool | theRequestClassUpdateFlag |
| static bool | theRequestObjectUpdateFlag |
Private Member Functions | |
| DtReflectedObjectList (const DtReflectedObjectList &orig) | |
| copy constructor – not implemented | |
| DtReflectedObjectList & | operator= (const DtReflectedObjectList &orig) |
| assignment operator – not implemented | |
class DtReflectedObjectList
Instances of DtReflectedObjectList are list of instances of classes derived from DtReflectedObject. A DtReflectedObjectList manages the comings and goings of its reflected objects based on discoveries and removes received from the RTI.
| DtReflectedObjectList::DtReflectedObjectList | ( | DtExerciseConn * | exConn, |
| const DtDDMRegionSet * | regionSetToUse = 0, |
||
| const DtString & | updateRateTag = DtString("") |
||
| ) |
Constructor.
|
virtual |
destructor
|
private |
copy constructor – not implemented
|
virtual |
Object added callback registration/deregistration.
|
protectedvirtual |
Register interest in this FOM object class.
Typically called by derived class constructor.
|
protectedvirtual |
Register interest in this FOM object class by className.
Typically called by derived class constructor.
|
virtual |
Object removed callback registration/deregistration.
|
protectedvirtual |
Add refObj to myObjectList and initiates discovery callbacks.
Reimplemented in DtReflectedEntityList.
|
static |
|
protectedvirtual |
|
virtual |
Unregisters the checker function set in setDiscoverCondition.
If there is none set, this has no effect.
Reimplemented in DtReflectedUnderwaterAcousticsList, DtReflectedEmitterSystemList, and DtReflectedActiveSonarList.
|
virtual |
Get number of objects.
|
staticprotected |
Cast the void* to a DtReflectedObjectList* and calls processDiscoverObject().
|
protectedvirtual |
Request an update for any objects which have not met their discovery criteria yet.
|
staticprotected |
Calls doRequestWaitListUpdates.
|
protectedvirtual |
Remove any remote objects which have not been updated during the timeout period.
Gets called automatically by a postDrainCallback registered by the constructor. Users should not need to call this.
|
staticprotected |
Calls doTimeouts.
|
protected |
Empty the callback lists.
Non-virtual since it's meant to be called from the destructor
|
protected |
Empty the object list and the timeout list.
Non-virtual since meant to be called from destructor.
|
inlinevirtual |
Get my exerciseConn.
References myExConn.
|
protectedvirtual |
When list is created, we call this function to go through the list of all discovered HLA objects to see if any should be managed by this list.
Otherwise, this list only hears about objects that are discovered by the app after the creation of this list.
|
static |
Post-drain callback that calls findAlreadyDiscovedObjects().
|
inlinevirtual |
Get the first/last object in the list.
References myObjectList.
|
protectedvirtual |
Register interest in a whole list of RTI::ObjectClassHandles all at once.
Uses addObjectClass above.
|
virtual |
Get whether or not timeout processing occurs.
|
inlinevirtual |
References myObjectList.
|
virtual |
Look up object by identifier.
|
virtual |
Look up object by global ID (which is the object name in RTI1.3.3).
|
protectedvirtual |
Find object in waitList by identifier.
|
protectedvirtual |
Find object in waitList by name.
|
virtual |
Register callbacks with exercise connection so that we get notified when an object of this class is discovered.
Automatically called for all object classes passed to the constructor, or for the default set of objects classes if the ctor without a handleList is used. But if you want to handle your own subscription and update requests, pass an empty handleSet to the constructor, use DtObjectClassDesc's registerInterest and requestUpdates, then use this function to tell the ROL to manage the objects that get discovered.
|
protectedpure virtual |
Create a remote object object for the HLA object.
Caller is responsible for deletion.
Implemented in DtReflectedUnderwaterAcousticsList, DtReflectedEntityList, DtReflectedEmitterSystemList, DtReflectedActiveSonarList, DtReflectedIffList, DtReflectedGenericObjectList, DtReflectedEnvironmentProcessList, DtReflectedDIGuyObjectList, DtReflectedAggregateList, DtReflectedGriddedDataList, DtReflectedActiveSonarBeamList, DtReflectedRadioReceiverList, DtReflectedRadioTransmitterList, DtReflectedLinearObjectList, DtReflectedAdditionalPassiveActivitiesList, DtReflectedPointObjectList, DtReflectedPropulsionNoiseList, DtReflectedArealObjectList, DtReflectedDesignatorList, DtReflectedFederateList, DtReflectedEmitterBeamList, and ReflectedTestList.
|
protectedvirtual |
Called from processDiscoverObject() after a remote object has been added to the list.
Defaults to do nothing. Subclasses can override this function to add functionality on addition.
Reimplemented in DtReflectedUnderwaterAcousticsList, DtReflectedEntityList, DtReflectedEmitterSystemList, DtReflectedActiveSonarList, DtReflectedAggregateList, DtReflectedEnvironmentProcessList, DtReflectedDIGuyObjectList, DtReflectedActiveSonarBeamList, DtReflectedGriddedDataList, DtReflectedRadioReceiverList, DtReflectedRadioTransmitterList, DtReflectedLinearObjectList, DtReflectedAdditionalPassiveActivitiesList, DtReflectedIffList, DtReflectedPointObjectList, DtReflectedPropulsionNoiseList, DtReflectedArealObjectList, DtReflectedDesignatorList, DtReflectedFederateList, and DtReflectedEmitterBeamList.
|
private |
assignment operator – not implemented
|
staticprotected |
Calls checkDiscoveryCondition.
|
virtual |
Print the SRs of all objects.
|
protectedvirtual |
Process the discovery of a remote object on the network.
Adds the remote object to this list.
Reimplemented in DtReflectedEmitterSystemList, and DtReflectedActiveSonarList.
|
protectedvirtual |
Process object addition/removal callbacks.
|
protectedvirtual |
|
protectedvirtual |
Process the removal of a remote object from the network.
Removes the remote object from this list.
Reimplemented in DtReflectedEmitterSystemList, and DtReflectedActiveSonarList.
|
protectedvirtual |
Handle the receipt of attributes for a remote object which was timed out.
Reinstates the remote object in this list.
|
protectedvirtual |
Returns true if the obj is ready to be added to myObjectList; calls myWaitListChecker from within.
|
protectedvirtual |
Remove the remote object from the list if found and delete it.
Prints a message on deletion if specified.
Reimplemented in DtReflectedEntityList, DtReflectedIffList, and DtReflectedAggregateList.
|
virtual |
Have the application act as though we had never discovered the object.
We call the RTI's localDelete service, and delete the DtHlaObject, which causes any DtReflectedObjects associated with id (in this list and in any others) to be removed. The object will be re-discovered (perhaps immediately), unless your subscriptions have changed so that the object is no longer relevant. Returns true if successful, false otherwise. Will be unsuccessful if you own attributes of the object in question.
|
virtual |
|
staticprotected |
Cast the void* to a DtReflectedObjectList* and calls processRemoveObject().
|
virtual |
|
static |
|
static |
|
static |
Set/Get flag which determines whether to subscribe to object classes that this list manages.
Defaults to true, but should be set to false if you will be managing subscriptions manually, e.g. if using DDM.
|
virtual |
Set the checker function which will determine when an object gets discovered and put into the reflected list.
Reimplemented in DtReflectedUnderwaterAcousticsList, DtReflectedEmitterSystemList, and DtReflectedActiveSonarList.
|
static |
Set/Get flag that determines whether we request updates from all objects of the object classes we subscribe to.
Default is true.
|
static |
Set/Get flag that determines whether we request updates from an object as we discover it.
Default is true.
|
inlinevirtual |
Set/Get the remote object timeout period.
References myTimeoutInterval.
|
virtual |
Set whether or not timeout processing occurs.
Defaults to off.
|
virtual |
Set whether or not we will request updates for objects which have not met discovery and are therefor wait listed.
|
inlinevirtual |
Set/Get the wait list refresh period.
References myWaitlistRefreshPeriod.
|
protectedvirtual |
Returns whether or not the object should be timed out.
Assumes that timeout processing is enabled.
Reimplemented in DtReflectedUnderwaterAcousticsList, DtReflectedEmitterSystemList, and DtReflectedActiveSonarList.
|
virtual |
Returns list of regions subscribed to.
|
staticprotected |
Cast the void* to a DtReflectedObjectList* and calls processTimedOutObjectReflect().
|
inlinevirtual |
References myTimeoutInterval.
|
protectedvirtual |
Times out object by removing it from the remote object list and deleting it.
Manages callbacks to reinstate remote object upon receiving attribute updates for the timed out object.
|
protected |
|
protectedvirtual |
Manages callbacks and data used for reinstating a remote object which was timed out.
|
inlinevirtual |
References myWaitlistRefreshPeriod.
|
protected |
|
protected |
|
protected |
Referenced by exerciseConn().
|
protected |
|
protected |
|
protected |
Referenced by firstObj(), and lastObj().
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Referenced by setTimeoutInterval(), and timeoutInterval().
|
protected |
|
protected |
|
protected |
|
protected |
Referenced by setWaitlistRefreshPeriod(), and waitlistRefreshPeriod().
|
protected |
|
protected |
|
staticprotected |
|
staticprotected |
|
staticprotected |