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

Instances of DtReflectedEmitterSystemList manage the list of of remote EmitterSystems in the exercise. More...

+ Inheritance diagram for DtReflectedEmitterSystemList:
+ Collaboration diagram for DtReflectedEmitterSystemList:

Public Member Functions

 DtReflectedEmitterSystemList (DtExerciseConn *exConn, bool beamsUpdateSystems=true, const DtDDMRegionSet *regionSetToUse=0, const DtString &updateRateTag=DtString(""))
 Constructor If beamsUpdateSystems == true, then a system's post-update callbacks are called whenever one of the beams in the system is updated.
 DtReflectedEmitterSystemList (DtExerciseConn *exConn, const DtList *handleList, bool beamsUpdateSystems=true, const DtDDMRegionSet *regionSetToUse=0, const DtString &updateRateTag=DtString(""))
 Constructor - only subscribe to the RTI::ObjectClassHandles in handleList.
virtual ~DtReflectedEmitterSystemList ()
 destructor
virtual DtReflectedEmitterSystemlookup (RTI::ObjectHandle id)
 Look up emitter system by identifier.
virtual DtReflectedEmitterSystemlookup (const DtGlobalObjectDesignator &objName)
 Look up emitter system by name.
virtual DtReflectedEmitterSystemlookup (const DtGlobalObjectDesignator &emittingEntity, int systemId) const
 Lookup an emitter from its object ID and system ID.
virtual DtReflectedEmitterSystemfirst () const
 Get the first/last emitter system in the list.
virtual DtReflectedEmitterSystemlast () const
virtual void addEmitterSystemAdditionCallback (DtEmitterSystemCallbackFunction cb, void *usr)
 EmitterSystem added callback registration/deregistration.
virtual void removeEmitterSystemAdditionCallback (DtEmitterSystemCallbackFunction cb, void *usr)
virtual void addEmitterSystemRemovalCallback (DtEmitterSystemCallbackFunction cb, void *usr)
 EmitterSystem removed callback registration/deregistration.
virtual void removeEmitterSystemRemovalCallback (DtEmitterSystemCallbackFunction cb, void *usr)
virtual
DtReflectedEmitterBeamList
refBeamList ()
 Returns a pointer to a reflected emitter beam list that we are using internally to track our constituent beams.
virtual void setDiscoveryCondition (DtDiscoveryCondition fn, void *usr)
 Over-rides DtReflectedObjectList::setDiscoveryCondition().
virtual void clearDiscoveryCondition ()
 Overrides the DtReflectedObjectList::clearDiscoveryCondition.
virtual void setBeamDiscoveryCondition (DtDiscoveryCondition fn, void *usr)
 Call this function to register a discovery condition on the beams of Emitter Systems.
virtual void clearBeamDiscoveryCondition ()
 Call this function to remove the previously registered discovery condition.
virtual bool delayBeamDiscovery (DtReflectedObject *beam, void *usr)
 The following function checks whether a beam should be discovered; It only gets called if discovery conditions get registered either by calling DtReflectedEmitterSystemList::setDiscoveryCondition() or DtReflectedEmitterSystemList::setBeamDiscoveryCondition().
- 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 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 const DtDDMRegionSetsubscribedRegions ()
 Returns list of regions subscribed to.

Protected Member Functions

virtual void processDiscoverObject (DtHlaObject *obj)
 Process the discovery of a remote emitter system on the network.
virtual void processRemoveObject (DtHlaObject *obj)
 Process the removal of a remote emitter system from the network.
virtual void processEmitterBeamAddition (DtReflectedEmitterBeam *beam)
 Called by similar callback functions registered with myBeamList on beam additions/removals.
virtual void processEmitterBeamUpdate (DtReflectedEmitterBeam *beam)
virtual void processEmitterBeamRemoval (DtReflectedEmitterBeam *beam)
virtual void resolveOrphans ()
 Check if any orphanBeams have non-NULL emittingSystemId.
virtual DtReflectedObjectnewReflectedObject (DtHlaObject *obj) const
 Override of virtual function. Here, we create a DtReflectedEmitterSystem.
virtual DtReflectedEmitterSystemnewReflectedEmitterSystem (const DtGlobalObjectDesignator &des) const
 Create a remote emitter system object for the HLA object.
virtual void objectAdded (DtReflectedObject *obj)
 Called from processDiscoverObject() after a remote transmitter has been added to the list.
virtual bool shouldBeTimedOut (DtReflectedObject *object)
 Returns whether or not the object should be timed out.
virtual const DtListdfltHandleList ()
 Returns a DtList of RTI::ObjectClassHandles that represent the list of object classes to which this list should subscribe.
- Protected Member Functions inherited from DtReflectedObjectList
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 void removeAndDelete (DtReflectedObject *obj, char *msg=NULL)
 Remove the remote object from the list if found and delete it.
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 (RTI::ObjectHandle id)
 Find object in waitList by identifier.
virtual DtReflectedObjectlookupObjInWaitList (const DtGlobalObjectDesignator &name)
 Find object in waitList by name.
void unsubscribeRegions ()

Static Protected Member Functions

static void emitterBeamAdditionCb (DtReflectedEmitterBeam *beam, void *usr)
 Callback functions registered with myBeamList on beam additions, updates, and removals.
static void emitterBeamUpdateCb (DtReflectedEmitterBeam *beam, void *usr)
static void emitterBeamRemovalCb (DtReflectedEmitterBeam *beam, void *usr)
static void resolveOrphansPostDrainCb (void *usr)
 Callback that calls resolveOrphans.
static bool delayBeamDiscoveryCondition (DtReflectedObject *beam, void *usr)
 The following discovery condition function gets set for EmitterBeams when users register a discovery condition for either DtReflectedEmitterSystemList or its beam list.
- 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

DtObjectId myCounterId
DtList myOrphanBeams
 used for generating dummy obj ids
DtReflectedEmitterBeamList myBeamList
bool myBeamsUpdateSystems
DtDiscoveryCondition myBeamDiscoveryCondition
void * myBeamDiscoveryConditionParameter
- 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

Private Member Functions

 DtReflectedEmitterSystemList (const DtReflectedEmitterSystemList &orig)
 copy constructor – not implemented
DtReflectedEmitterSystemListoperator= (const DtReflectedEmitterSystemList &orig)
 assignment operator – not implemented

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 Attributes inherited from DtReflectedObjectList
static bool theAutoSubscribeFlag
static bool theRequestClassUpdateFlag
static bool theRequestObjectUpdateFlag

Detailed Description

Instances of DtReflectedEmitterSystemList manage the list of of remote EmitterSystems in the exercise.

Constructor & Destructor Documentation

DtReflectedEmitterSystemList::DtReflectedEmitterSystemList ( DtExerciseConn exConn,
bool  beamsUpdateSystems = true,
const DtDDMRegionSet regionSetToUse = 0,
const DtString updateRateTag = DtString("") 
)

Constructor If beamsUpdateSystems == true, then a system's post-update callbacks are called whenever one of the beams in the system is updated.

DtReflectedEmitterSystemList::DtReflectedEmitterSystemList ( DtExerciseConn exConn,
const DtList handleList,
bool  beamsUpdateSystems = true,
const DtDDMRegionSet regionSetToUse = 0,
const DtString updateRateTag = DtString("") 
)

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

virtual DtReflectedEmitterSystemList::~DtReflectedEmitterSystemList ( )
virtual

destructor

DtReflectedEmitterSystemList::DtReflectedEmitterSystemList ( const DtReflectedEmitterSystemList orig)
private

copy constructor – not implemented

Member Function Documentation

virtual void DtReflectedEmitterSystemList::addEmitterSystemAdditionCallback ( DtEmitterSystemCallbackFunction  cb,
void *  usr 
)
virtual

EmitterSystem added callback registration/deregistration.

Called when an emitter system is added due to discovery of a system OR beam.

virtual void DtReflectedEmitterSystemList::addEmitterSystemRemovalCallback ( DtEmitterSystemCallbackFunction  cb,
void *  usr 
)
virtual

EmitterSystem removed callback registration/deregistration.

Called when an emitter system is removed due to discovery of a system OR beam.

virtual void DtReflectedEmitterSystemList::clearBeamDiscoveryCondition ( )
virtual

Call this function to remove the previously registered discovery condition.

virtual void DtReflectedEmitterSystemList::clearDiscoveryCondition ( )
virtual

Overrides the DtReflectedObjectList::clearDiscoveryCondition.

This function clears the discovery condition on the emitter systems and beams.

Reimplemented from DtReflectedObjectList.

virtual bool DtReflectedEmitterSystemList::delayBeamDiscovery ( DtReflectedObject beam,
void *  usr 
)
virtual

The following function checks whether a beam should be discovered; It only gets called if discovery conditions get registered either by calling DtReflectedEmitterSystemList::setDiscoveryCondition() or DtReflectedEmitterSystemList::setBeamDiscoveryCondition().

static bool DtReflectedEmitterSystemList::delayBeamDiscoveryCondition ( DtReflectedObject beam,
void *  usr 
)
staticprotected

The following discovery condition function gets set for EmitterBeams when users register a discovery condition for either DtReflectedEmitterSystemList or its beam list.

Calls DtReflectedEmitterSystem::delayBeamDiscovery()

virtual const DtList* DtReflectedEmitterSystemList::dfltHandleList ( )
protectedvirtual

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

static void DtReflectedEmitterSystemList::emitterBeamAdditionCb ( DtReflectedEmitterBeam beam,
void *  usr 
)
staticprotected

Callback functions registered with myBeamList on beam additions, updates, and removals.

Calls processEmitterBeamAddition/Update/Removal.

static void DtReflectedEmitterSystemList::emitterBeamRemovalCb ( DtReflectedEmitterBeam beam,
void *  usr 
)
staticprotected
static void DtReflectedEmitterSystemList::emitterBeamUpdateCb ( DtReflectedEmitterBeam beam,
void *  usr 
)
staticprotected
virtual DtReflectedEmitterSystem* DtReflectedEmitterSystemList::first ( ) const
virtual

Get the first/last emitter system in the list.

virtual DtReflectedEmitterSystem* DtReflectedEmitterSystemList::last ( ) const
virtual
virtual DtReflectedEmitterSystem* DtReflectedEmitterSystemList::lookup ( RTI::ObjectHandle  id)
virtual

Look up emitter system by identifier.

virtual DtReflectedEmitterSystem* DtReflectedEmitterSystemList::lookup ( const DtGlobalObjectDesignator objName)
virtual

Look up emitter system by name.

virtual DtReflectedEmitterSystem* DtReflectedEmitterSystemList::lookup ( const DtGlobalObjectDesignator emittingEntity,
int  systemId 
) const
virtual

Lookup an emitter from its object ID and system ID.

virtual DtReflectedEmitterSystem* DtReflectedEmitterSystemList::newReflectedEmitterSystem ( const DtGlobalObjectDesignator des) const
protectedvirtual

Create a remote emitter system object for the HLA object.

Caller is responsible for deletion.

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

Override of virtual function. Here, we create a DtReflectedEmitterSystem.

Implements DtReflectedObjectList.

virtual void DtReflectedEmitterSystemList::objectAdded ( DtReflectedObject obj)
protectedvirtual

Called from processDiscoverObject() after a remote transmitter 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.

DtReflectedEmitterSystemList& DtReflectedEmitterSystemList::operator= ( const DtReflectedEmitterSystemList orig)
private

assignment operator – not implemented

virtual void DtReflectedEmitterSystemList::processDiscoverObject ( DtHlaObject obj)
protectedvirtual

Process the discovery of a remote emitter system on the network.

Can't use base version, since we need to account for systems that are already in the list by virtue of discovered beams.

Reimplemented from DtReflectedObjectList.

virtual void DtReflectedEmitterSystemList::processEmitterBeamAddition ( DtReflectedEmitterBeam beam)
protectedvirtual

Called by similar callback functions registered with myBeamList on beam additions/removals.

Addition function adds the beam to the set of orphan beams (since we don't know what system he's part of), the removal function removes the beam's beamSR from his system's systemSR. Update function calls the beam's system update callbacks if beamsUpdateSystems == true in the reflected system list constructor.

virtual void DtReflectedEmitterSystemList::processEmitterBeamRemoval ( DtReflectedEmitterBeam beam)
protectedvirtual
virtual void DtReflectedEmitterSystemList::processEmitterBeamUpdate ( DtReflectedEmitterBeam beam)
protectedvirtual
virtual void DtReflectedEmitterSystemList::processRemoveObject ( DtHlaObject obj)
protectedvirtual

Process the removal of a remote emitter system from the network.

Removes the remote emitter system from this list. Can't use base version, since we need to keep systems that still have live beams.

Reimplemented from DtReflectedObjectList.

virtual DtReflectedEmitterBeamList* DtReflectedEmitterSystemList::refBeamList ( )
virtual

Returns a pointer to a reflected emitter beam list that we are using internally to track our constituent beams.

Normally, you do not need to access this beam list. Instead, you should find out the state of a beam by going through the parent DtReflectedEmitterSystem, and its DtEmitterSystemRepository (through which you can get a list of DtEmitterBeamRepositories). This function, however, may be used in conjunction with ownership management. If you want to take ownership of some attributes of a beam object, use this function to grab the beam list, find the appropriate beam's DtHlaObject, and pass it to the DtEmitterBeamPublisher's constructor.

virtual void DtReflectedEmitterSystemList::removeEmitterSystemAdditionCallback ( DtEmitterSystemCallbackFunction  cb,
void *  usr 
)
virtual
virtual void DtReflectedEmitterSystemList::removeEmitterSystemRemovalCallback ( DtEmitterSystemCallbackFunction  cb,
void *  usr 
)
virtual
virtual void DtReflectedEmitterSystemList::resolveOrphans ( )
protectedvirtual

Check if any orphanBeams have non-NULL emittingSystemId.

If so, add them to their appropriate system (creating one if it doesn't exist), and delete them from orphan list.

static void DtReflectedEmitterSystemList::resolveOrphansPostDrainCb ( void *  usr)
staticprotected

Callback that calls resolveOrphans.

virtual void DtReflectedEmitterSystemList::setBeamDiscoveryCondition ( DtDiscoveryCondition  fn,
void *  usr 
)
virtual

Call this function to register a discovery condition on the beams of Emitter Systems.

Generally, it will be preferable to call this function rather than calling setDiscoveryCondition() directly on the beamList. (Calling setDiscoveryCondition() directly will over-ride the mechanism by which beam discoveries are delayed when a user registers a discovery condition on DtReflectedEmitterSystem – See comment above).

virtual void DtReflectedEmitterSystemList::setDiscoveryCondition ( DtDiscoveryCondition  fn,
void *  usr 
)
virtual

Over-rides DtReflectedObjectList::setDiscoveryCondition().

This function checks that emitter system objects satisfy the given criteria before getting discovered and added to the list (the discovery of beams belonging to the system will also be delayed until the after the system is discovered)

Reimplemented from DtReflectedObjectList.

virtual bool DtReflectedEmitterSystemList::shouldBeTimedOut ( DtReflectedObject object)
protectedvirtual

Returns whether or not the object should be timed out.

Assumes that timeout processing is enabled. Can't use base version since we don't want to time out systems with live beams.

Reimplemented from DtReflectedObjectList.

Member Data Documentation

DtDiscoveryCondition DtReflectedEmitterSystemList::myBeamDiscoveryCondition
protected
void* DtReflectedEmitterSystemList::myBeamDiscoveryConditionParameter
protected
DtReflectedEmitterBeamList DtReflectedEmitterSystemList::myBeamList
protected
bool DtReflectedEmitterSystemList::myBeamsUpdateSystems
protected
DtObjectId DtReflectedEmitterSystemList::myCounterId
mutableprotected
DtList DtReflectedEmitterSystemList::myOrphanBeams
protected

used for generating dummy obj ids


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

Document ID: Generated on Wed Jan 7 13:31:29 EST 2015 from SVN revision 149162
Copyright © 2005-2014 VT MÄK. All Rights Reserved (www.mak.com)