VR-Link API Documentation for HLA 1516
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Public Member Functions | Protected Member Functions
DtReflectedEnvironmentProcessList Class Reference

Instances of DtReflectedEnvironmentProcessList manage the list of remote environmental processes in the exercise. More...

+ Inheritance diagram for DtReflectedEnvironmentProcessList:
+ Collaboration diagram for DtReflectedEnvironmentProcessList:

Public Member Functions

 DtReflectedEnvironmentProcessList (DtExerciseConn *exConn, const DtDDMRegionSet *regionSetToUse=0, const DtString &updateRateTag=DtString(""))
 Constructor - obtains the set of object classes to subscribe to from the exConn's fomMapper. More...
 
 DtReflectedEnvironmentProcessList (DtExerciseConn *exConn, const DtList *handleList, const DtDDMRegionSet *regionSetToUse=0, const DtString &updateRateTag=DtString(""))
 Constructor - only subscribe to the RTI::ObjectClassHandles in handleList. More...
 
virtual ~DtReflectedEnvironmentProcessList ()
 destructor More...
 
virtual
DtReflectedEnvironmentProcess
lookup (RTI::ObjectInstanceHandle id)
 Look up environmental process by identifier. More...
 
virtual
DtReflectedEnvironmentProcess
lookup (const DtGlobalObjectDesignator &objName)
 Look up environmental process by name. More...
 
virtual
DtReflectedEnvironmentProcess
first () const
 Get the first/last environmental process in the list. More...
 
virtual
DtReflectedEnvironmentProcess
last () const
 
virtual void addEnvironmentProcessAdditionCallback (DtEnvironmentProcessCallbackFunction cb, void *userData)
 Environmental process added callback registration/deregistration. More...
 
virtual void removeEnvironmentProcessAdditionCallback (DtEnvironmentProcessCallbackFunction cb, void *userData)
 
virtual void addEnvironmentProcessRemovalCallback (DtEnvironmentProcessCallbackFunction cb, void *userData)
 Environmental process removed callback registration/deregistration. More...
 
virtual void removeEnvironmentProcessRemovalCallback (DtEnvironmentProcessCallbackFunction cb, void *userData)
 
- Public Member Functions inherited from DtReflectedObjectList
 DtReflectedObjectList (DtExerciseConn *exConn, const DtDDMRegionSet *regionSetToUse=0, const DtString &updateRateTag=DtString(""))
 Constructor. More...
 
virtual ~DtReflectedObjectList ()
 destructor More...
 
virtual DtReflectedObjectlookupObj (RTI::ObjectInstanceHandle id)
 Look up object by identifier. More...
 
virtual DtReflectedObjectlookupObj (const DtGlobalObjectDesignator &objName)
 Look up object by global ID (which is the object name in RTI1.3.3). More...
 
virtual DtReflectedObjectfirstObj () const
 Get the first/last object in the list. More...
 
virtual DtReflectedObjectlastObj () const
 
virtual int count () const
 Get number of objects. More...
 
virtual DtExerciseConnexerciseConn () const
 Get my exerciseConn. More...
 
virtual void manageObjectClass (RTI::ObjectClassHandle handle)
 Register callbacks with exercise connection so that we get notified when an object of this class is discovered. More...
 
virtual bool removeObject (const DtObjectId &id)
 Have the application act as though we had never discovered the object. More...
 
virtual void addObjectAdditionCallback (DtReflectedObjectCallbackFunction cb, void *userData)
 Object added callback registration/deregistration. More...
 
virtual void removeObjectAdditionCallback (DtReflectedObjectCallbackFunction cb, void *userData)
 
virtual void addObjectRemovalCallback (DtReflectedObjectCallbackFunction cb, void *userData)
 Object removed callback registration/deregistration. More...
 
virtual void removeObjectRemovalCallback (DtReflectedObjectCallbackFunction cb, void *userData)
 
virtual void print ()
 Print the SRs of all objects. More...
 
virtual void setTimeoutProcessing (bool onOff)
 Set whether or not timeout processing occurs. More...
 
virtual bool isTimeoutProcessing () const
 Get whether or not timeout processing occurs. More...
 
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. More...
 
virtual void setTimeoutInterval (DtTime time)
 Set/Get the remote object timeout period. More...
 
virtual DtTime timeoutInterval ()
 
virtual void setWaitlistRefreshPeriod (DtTime time)
 Set/Get the wait list refresh period. More...
 
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. More...
 
virtual void clearDiscoveryCondition ()
 Unregisters the checker function set in setDiscoverCondition. More...
 
virtual const DtDDMRegionSetsubscribedRegions ()
 Returns list of regions subscribed to. More...
 

Protected Member Functions

 DtReflectedEnvironmentProcessList (const DtReflectedEnvironmentProcessList &orig)
 copy constructor – not implemented More...
 
DtReflectedEnvironmentProcessListoperator= (const DtReflectedEnvironmentProcessList &orig)
 assignment operator – not implemented More...
 
virtual DtReflectedObjectnewReflectedObject (DtHlaObject *obj) const
 Override of virtual function. More...
 
virtual void objectAdded (DtReflectedObject *obj)
 Called from processDiscoverObject() after a remote environment process has been added to the list. More...
 
virtual const DtListdfltHandleList ()
 Returns a DtList of RTI::ObjectClassHandles that represent the list of object classes to which this list should subscribe. More...
 
- Protected Member Functions inherited from DtReflectedObjectList
virtual void processDiscoverObject (DtHlaObject *obj)
 Process the discovery of a remote object on the network. More...
 
virtual void processRemoveObject (DtHlaObject *obj)
 Process the removal of a remote object from the network. More...
 
virtual void processTimedOutObjectReflect (const DtStateMsg &msg, DtHlaObject *obj)
 Handle the receipt of attributes for a remote object which was timed out. More...
 
virtual void doTimeouts ()
 Remove any remote objects which have not been updated during the timeout period. More...
 
virtual void doRequestWaitListUpdates ()
 Request an update for any objects which have not met their discovery criteria yet. More...
 
virtual void removeAndDelete (DtReflectedObject *obj, char *msg=NULL)
 Remove the remote object from the list if found and delete it. More...
 
virtual bool shouldBeTimedOut (DtReflectedObject *object)
 Returns whether or not the object should be timed out. More...
 
virtual void timeOutObject (DtReflectedObject *object)
 Times out object by removing it from the remote object list and deleting it. More...
 
virtual void unTimeOutObject (DtHlaObject *obj)
 Manages callbacks and data used for reinstating a remote object which was timed out. More...
 
virtual void addObjectClass (RTI::ObjectClassHandle handle)
 Register interest in this FOM object class. More...
 
virtual void addObjectClassByName (const char *className)
 Register interest in this FOM object class by className. More...
 
virtual void init (const DtList *handleList)
 Register interest in a whole list of RTI::ObjectClassHandles all at once. More...
 
void emptyLists ()
 Empty the object list and the timeout list. More...
 
void emptyCallbackLists ()
 Empty the callback lists. More...
 
virtual void processObjectAdditionCallbacks (DtReflectedObject *object)
 Process object addition/removal callbacks. More...
 
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. More...
 
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. More...
 
virtual void addToObjectList (DtReflectedObject *refObj)
 Add refObj to myObjectList and initiates discovery callbacks. More...
 
virtual DtReflectedObjectlookupObjInWaitList (RTI::ObjectInstanceHandle id)
 Find object in waitList by identifier. More...
 
virtual DtReflectedObjectlookupObjInWaitList (const DtGlobalObjectDesignator &name)
 Find object in waitList by name. More...
 
void unsubscribeRegions ()
 

Additional Inherited Members

- Static Public Member Functions inherited from DtReflectedObjectList
static void setAutoSubscribeFlag (bool flag)
 Set/Get flag which determines whether to subscribe to object classes that this list manages. More...
 
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. More...
 
static bool requestClassUpdateFlag ()
 
static void setRequestObjectUpdateFlag (bool onOff)
 Set/Get flag that determines whether we request updates from an object as we discover it. More...
 
static bool requestObjectUpdateFlag ()
 
static void findDiscoveredObjectsCb (void *usr)
 Post-drain callback that calls findAlreadyDiscovedObjects(). More...
 
- Static Protected Member Functions inherited from DtReflectedObjectList
static void discoverObjectCb (DtHlaObject *hlaObj, void *rel)
 Cast the void* to a DtReflectedObjectList* and calls processDiscoverObject(). More...
 
static void removeObjectCb (DtHlaObject *hlaObj, void *rel)
 Cast the void* to a DtReflectedObjectList* and calls processRemoveObject(). More...
 
static void timedOutObjectReflectCb (const DtStateMsg &msg, DtHlaObject *obj, void *usr)
 Cast the void* to a DtReflectedObjectList* and calls processTimedOutObjectReflect(). More...
 
static void doTimeoutsPostDrainCb (void *usr)
 Calls doTimeouts. More...
 
static void doRequestWaitListUpdatesPostDrainCb (void *usr)
 Calls doRequestWaitListUpdates. More...
 
static void postUpdateCb (DtReflectedObject *obj, void *usr)
 Calls checkDiscoveryCondition. More...
 
- Protected Attributes inherited from DtReflectedObjectList
DtExerciseConnmyExConn
 
DtRefHlaObjectMap myObjectList
 
DtHashList myObjectListByName
 
DtRefHlaObjectMap myWaitList
 
DtList myTimedOutObjectList
 
std::vector
< RTI::ObjectClassHandle > 
myHandleList
 
DtIntrusiveList myObjectAddedCallbacks
 
DtIntrusiveList myObjectRemovedCallbacks
 
DtTime myTimeoutInterval
 
bool myTimeoutProcessingFlag
 
bool myWaitListRequestUpdateFlag
 
DtDiscoveryCondition myDiscoveryCondition
 
void * myDiscoveryConditionParameter
 
DtTime myWaitlistTime
 
DtTime myWaitlistRefreshPeriod
 
DtDDMRegionSet mySubscribedRegions
 
DtString myUpdateRateTag
 
- Static Protected Attributes inherited from DtReflectedObjectList
static bool theAutoSubscribeFlag
 
static bool theRequestClassUpdateFlag
 
static bool theRequestObjectUpdateFlag
 

Detailed Description

Instances of DtReflectedEnvironmentProcessList manage the list of remote environmental processes in the exercise.

Examples: Environmental Process Example

Constructor & Destructor Documentation

DtReflectedEnvironmentProcessList::DtReflectedEnvironmentProcessList ( DtExerciseConn exConn,
const DtDDMRegionSet regionSetToUse = 0,
const DtString updateRateTag = DtString("") 
)

Constructor - obtains the set of object classes to subscribe to from the exConn's fomMapper.

DtReflectedEnvironmentProcessList::DtReflectedEnvironmentProcessList ( DtExerciseConn exConn,
const DtList handleList,
const DtDDMRegionSet regionSetToUse = 0,
const DtString updateRateTag = DtString("") 
)

Constructor - only subscribe to the RTI::ObjectClassHandles in handleList.

virtual DtReflectedEnvironmentProcessList::~DtReflectedEnvironmentProcessList ( )
virtual

destructor

DtReflectedEnvironmentProcessList::DtReflectedEnvironmentProcessList ( const DtReflectedEnvironmentProcessList orig)
protected

copy constructor – not implemented

Member Function Documentation

virtual void DtReflectedEnvironmentProcessList::addEnvironmentProcessAdditionCallback ( DtEnvironmentProcessCallbackFunction  cb,
void *  userData 
)
virtual

Environmental process added callback registration/deregistration.

virtual void DtReflectedEnvironmentProcessList::addEnvironmentProcessRemovalCallback ( DtEnvironmentProcessCallbackFunction  cb,
void *  userData 
)
virtual

Environmental process removed callback registration/deregistration.

virtual const DtList* DtReflectedEnvironmentProcessList::dfltHandleList ( )
protectedvirtual

Returns a DtList of RTI::ObjectClassHandles that represent the list of object classes to which this list should subscribe.

virtual DtReflectedEnvironmentProcess* DtReflectedEnvironmentProcessList::first ( ) const
virtual

Get the first/last environmental process in the list.

virtual DtReflectedEnvironmentProcess* DtReflectedEnvironmentProcessList::last ( ) const
virtual
virtual DtReflectedEnvironmentProcess* DtReflectedEnvironmentProcessList::lookup ( RTI::ObjectInstanceHandle  id)
virtual

Look up environmental process by identifier.

virtual DtReflectedEnvironmentProcess* DtReflectedEnvironmentProcessList::lookup ( const DtGlobalObjectDesignator objName)
virtual

Look up environmental process by name.

virtual DtReflectedObject* DtReflectedEnvironmentProcessList::newReflectedObject ( DtHlaObject obj) const
protectedvirtual

Override of virtual function.

Here, we create a DtReflectedEnvironmentProcess.

Implements DtReflectedObjectList.

virtual void DtReflectedEnvironmentProcessList::objectAdded ( DtReflectedObject obj)
protectedvirtual

Called from processDiscoverObject() after a remote environment process has been added to the list.

Default implementation prints a message. Subclasses can override this function to add functionality on addition. obj will be an instance of a class derived from DtReflectedObj.

Reimplemented from DtReflectedObjectList.

DtReflectedEnvironmentProcessList& DtReflectedEnvironmentProcessList::operator= ( const DtReflectedEnvironmentProcessList orig)
protected

assignment operator – not implemented

virtual void DtReflectedEnvironmentProcessList::removeEnvironmentProcessAdditionCallback ( DtEnvironmentProcessCallbackFunction  cb,
void *  userData 
)
virtual
virtual void DtReflectedEnvironmentProcessList::removeEnvironmentProcessRemovalCallback ( DtEnvironmentProcessCallbackFunction  cb,
void *  userData 
)
virtual

The documentation for this class was generated from the following file:

Document ID: Generated on Tue Feb 2 21:02:17 EST 2021 from SVN revision 223668
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)