VR-Link API Documentation for HLA 1.3
List of all members | Public Member Functions | Protected Member Functions
DtReflectedIffList Class Reference

An instance of this class manages the list of "IFF" objects that are simulated remotely, and reflected to us by the RTI. More...

+ Inheritance diagram for DtReflectedIffList:
+ Collaboration diagram for DtReflectedIffList:

Public Member Functions

 DtReflectedIffList (DtExerciseConn *exConn, const DtDDMRegionSet *regionSetToUse=0, const DtString &updateRateTag=DtString(""))
 Constructor.
 DtReflectedIffList (DtExerciseConn *exConn, const DtList *handleList, const DtDDMRegionSet *regionSetToUse=0, const DtString &updateRateTag=DtString(""))
 Constructor - only subscribe to the RTI::ObjectClassHandles in handleList.
virtual ~DtReflectedIffList ()
 destructor
virtual DtReflectedIfflookup (RTI::ObjectHandle id)
 Look up object by identifier.
virtual DtReflectedIfflookup (const DtGlobalObjectDesignator &objName)
 Look up object by name (global object designator).
virtual DtReflectedIfffirst () const
 Get the first/last object in the list.
virtual DtReflectedIfflast () const
virtual void addIffAdditionCallback (DtIffCallbackFunction cb, void *userData)
 Registration/deregistration of object addition callbacks.
virtual void removeIffAdditionCallback (DtIffCallbackFunction cb, void *userData)
virtual void addIffRemovalCallback (DtIffCallbackFunction cb, void *userData)
 Registration/deregistration of object removal callbacks.
virtual void removeIffRemovalCallback (DtIffCallbackFunction cb, void *userData)
- Public Member Functions inherited from DtReflectedObjectList
 DtReflectedObjectList (DtExerciseConn *exConn, const DtDDMRegionSet *regionSetToUse=0, const DtString &updateRateTag=DtString(""))
 Constructor.
virtual ~DtReflectedObjectList ()
 destructor
virtual DtReflectedObjectlookupObj (RTI::ObjectHandle id)
 Look up object by identifier.
virtual DtReflectedObjectlookupObj (const DtGlobalObjectDesignator &objName)
 Look up object by global ID (which is the object name in RTI1.3.3).
virtual DtReflectedObjectfirstObj () const
 Get the first/last object in the list.
virtual DtReflectedObjectlastObj () const
virtual int count () const
 Get number of objects.
virtual DtExerciseConnexerciseConn () 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 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 DtDDMRegionSetsubscribedRegions ()
 Returns list of regions subscribed to.

Protected Member Functions

 DtReflectedIffList (const DtReflectedIffList &orig)
 copy constructor
DtReflectedIffListoperator= (const DtReflectedIffList &orig)
 assignment operator
virtual const DtListdfltHandleList ()
 Asks the FOM Mapper for the DtList of RTI::ObjectClassHandles to use.
virtual void objectAdded (DtReflectedObject *obj)
 Called from processDiscoverObject() after a remote transmitter has been added to the list.
virtual void iffAdded (DtReflectedIff *ent)
 Called by objectAdded (which is called from processDiscoverObject()) after a remote entity has been added to the list.
virtual DtReflectedObjectnewReflectedObject (DtHlaObject *obj) const
 Override of virtual function that the base class uses to create the appropriate kind of DtReflectedObject.
virtual DtReflectedObjectnewReflectedIff (DtHlaObject *obj) const
 Override of virtual function that the base class uses to create the appropriate kind of DtReflectedObject.
virtual void removeAndDelete (DtReflectedObject *object, char *msg)
 Virtual function override.
virtual void removeAndDelete (DtReflectedIff *entity, char *msg=NULL)
 Default calls down to base class version, but can be overridden.
- Protected Member Functions inherited from DtReflectedObjectList
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 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 DtReflectedObjectlookupObjInWaitList (const DtGlobalObjectDesignator &name)
 Find object in waitList by name.
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.
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().
- Static Protected Member Functions inherited from DtReflectedObjectList
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.
- Protected Attributes inherited from DtReflectedObjectList
DtExerciseConnmyExConn
DtObjectIdHashList myObjectList
DtHashList myObjectListByName
DtObjectIdHashList 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

An instance of this class manages the list of "IFF" objects that are simulated remotely, and reflected to us by the RTI.

This class is derived from DtReflectedObjectList, which does most of the work. The derived class mostly exists to provide type safety, and to let the base class know which FOM classes should be managed by this list.

Constructor & Destructor Documentation

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

Constructor.

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

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

virtual DtReflectedIffList::~DtReflectedIffList ( )
virtual

destructor

DtReflectedIffList::DtReflectedIffList ( const DtReflectedIffList orig)
protected

copy constructor

Member Function Documentation

virtual void DtReflectedIffList::addIffAdditionCallback ( DtIffCallbackFunction  cb,
void *  userData 
)
virtual

Registration/deregistration of object addition callbacks.

virtual void DtReflectedIffList::addIffRemovalCallback ( DtIffCallbackFunction  cb,
void *  userData 
)
virtual

Registration/deregistration of object removal callbacks.

virtual const DtList* DtReflectedIffList::dfltHandleList ( )
protectedvirtual

Asks the FOM Mapper for the DtList of RTI::ObjectClassHandles to use.

virtual DtReflectedIff* DtReflectedIffList::first ( ) const
virtual

Get the first/last object in the list.

virtual void DtReflectedIffList::iffAdded ( DtReflectedIff ent)
protectedvirtual

Called by objectAdded (which is called from processDiscoverObject()) after a remote entity has been added to the list.

Default implementation prints a message. Subclasses can override this function to add functionality on addition.

virtual DtReflectedIff* DtReflectedIffList::last ( ) const
virtual
virtual DtReflectedIff* DtReflectedIffList::lookup ( RTI::ObjectHandle  id)
virtual

Look up object by identifier.

virtual DtReflectedIff* DtReflectedIffList::lookup ( const DtGlobalObjectDesignator objName)
virtual

Look up object by name (global object designator).

virtual DtReflectedObject* DtReflectedIffList::newReflectedIff ( DtHlaObject obj) const
protectedvirtual

Override of virtual function that the base class uses to create the appropriate kind of DtReflectedObject.

Here, we create a DtReflectedIff.

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

Override of virtual function that the base class uses to create the appropriate kind of DtReflectedObject.

Here, we create a DtReflectedIff.

Implements DtReflectedObjectList.

virtual void DtReflectedIffList::objectAdded ( DtReflectedObject obj)
protectedvirtual

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

Calls iffAdded.

Reimplemented from DtReflectedObjectList.

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

assignment operator

virtual void DtReflectedIffList::removeAndDelete ( DtReflectedObject object,
char *  msg 
)
protectedvirtual

Virtual function override.

Calls removeAndDelete(DtReflectedEntity*....)

Reimplemented from DtReflectedObjectList.

virtual void DtReflectedIffList::removeAndDelete ( DtReflectedIff entity,
char *  msg = NULL 
)
protectedvirtual

Default calls down to base class version, but can be overridden.

virtual void DtReflectedIffList::removeIffAdditionCallback ( DtIffCallbackFunction  cb,
void *  userData 
)
virtual
virtual void DtReflectedIffList::removeIffRemovalCallback ( DtIffCallbackFunction  cb,
void *  userData 
)
virtual

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

Document ID: Generated on Wed Aug 14 15:35:11 EDT 2013 from SVN revision 130445
Copyright © 2005-2013 VT MÄK. All Rights Reserved (www.mak.com)