VR-Link API Documentation for DIS
 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
DtReflectedUnderwaterAcousticsList Class Reference

Instances of this class provide a protocol independent interface to a list of underwater acoustics objects in a DIS environment. More...

+ Inheritance diagram for DtReflectedUnderwaterAcousticsList:
+ Collaboration diagram for DtReflectedUnderwaterAcousticsList:

Public Member Functions

 DtReflectedUnderwaterAcousticsList (DtExerciseConn *exConn, int numBucketsPrimeNumber=503)
 Constructor. More...
 
virtual ~DtReflectedUnderwaterAcousticsList ()
 Destructor. More...
 
virtual
DtReflectedUnderwaterAcoustics
lookup (const DtGlobalObjectDesignator &hostEntity) const
 Lookup an underwater acoustics object from the object ID of its host entity and its acoustic identifier. More...
 
virtual
DtReflectedUnderwaterAcoustics
first () const
 Get the first and last elements of the reflected underwater acoustics list. More...
 
virtual
DtReflectedUnderwaterAcoustics
last () const
 
virtual void addUnderwaterAcousticsAdditionCallback (DtUnderwaterAcousticsCallbackFunction cb, void *userData)
 Underwater acoustics addition callback registration/deregistration. More...
 
virtual void removeUnderwaterAcousticsAdditionCallback (DtUnderwaterAcousticsCallbackFunction cb, void *userData)
 
virtual void addUnderwaterAcousticsRemovalCallback (DtUnderwaterAcousticsCallbackFunction cb, void *userData)
 Active Sonar remove callback registration/deregistration. More...
 
virtual void removeUnderwaterAcousticsRemovalCallback (DtUnderwaterAcousticsCallbackFunction cb, void *userData)
 
virtual void print () const
 Print the SRs of all reflected active sonar. More...
 
virtual void printDataToStream (std::ostream &stream) const
 Print the SRs to a stream. More...
 
- Public Member Functions inherited from DtReflectedObjectList
 DtReflectedObjectList (DtExerciseConn *exConn, int numBucketsPrimeNumber=503)
 Constructor. More...
 
virtual ~DtReflectedObjectList ()
 destructor Warning: makes non-virtual call to removeAndDelete More...
 
virtual void initializeAttributePduKindsOfInterest (const std::set< DtPduKind > &pduKinds)
 This initializes which PDU kinds will be processed when receiving an Attribute PDU. 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 DtReflectedObjectlookupObj (const DtBaseHashKey &key) const
 Search for an object. More...
 
virtual DtExerciseConnexerciseConn () const
 Get my exerciseConn. 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 setTimeoutProcessing (bool onOff)
 Set whether or not timeout processing occurs. More...
 
virtual void setTimeoutInterval (DtTime time)
 Set/Get the remote object timeout period. More...
 
virtual DtTime timeoutInterval ()
 
virtual void setDiscoveryCondition (DtDiscoveryCondition fn, void *usr)
 Set the checker function which will determine when an object gets discovered and put into the ref. More...
 
virtual void clearDiscoveryCondition ()
 Unregisters the checker function set in setDiscoverCondition. More...
 
virtual void removeAndDelete (DtReflectedObject *obj, char *msg=NULL)
 Remove the remote object from the list if found and delete it. More...
 
virtual void removeObject (DtReflectedObject *obj)
 This is the same as removeAndDelete, it exists to maintain equality with HLA objects. More...
 
virtual DtTime timeoutCheckInterval () const
 
virtual void setTimeoutCheckInterval (DtTime interval)
 

Protected Member Functions

virtual
DtReflectedUnderwaterAcoustics
newReflectedUnderwaterAcoustics (const DtEntityIdentifier &hostEntity)
 Creates a new reflected underwater acoustics object. More...
 
virtual DtReflectedObjectnewReflectedObj (const DtStateMsg &msg)
 Creates a a new object. Calls newReflectedPropulsionNoise to do so. More...
 
virtual void objectAdded (DtReflectedObject *obj)
 Called after a reflected underwater acoustics object is added to the list and before addition callbacks are processed. More...
 
const DtBaseHashKeyhashKeyFromStateMessage (const DtStateMsg *)
 Overrides the base class implementation. More...
 
 DtReflectedUnderwaterAcousticsList (const DtReflectedUnderwaterAcousticsList &)
 Copy constructor – Not Implemented. More...
 
DtReflectedUnderwaterAcousticsListoperator= (const DtReflectedUnderwaterAcousticsList &)
 Assignment operator – Not Implemented. More...
 
- Protected Member Functions inherited from DtReflectedObjectList
virtual DtReflectedObjectprocessStateMessage (const DtStateMsg &msg)
 Process an incoming state message. More...
 
virtual void doTimeouts ()
 Remove any remote objects which have not been updated during the timeout period. More...
 
virtual bool shouldBeTimedOut (DtReflectedObject *object)
 Returns whether or not the object should be timed out. More...
 
void emptyLists ()
 Empty the object list and the timeout list. More...
 
void emptyCallbackLists ()
 
virtual void processObjectAdditionCallbacks (DtReflectedObject *object)
 Process object addition/removal callbacks. More...
 
virtual void processObjectRemovalCallbacks (DtReflectedObject *object)
 
virtual DtBaseHashKeyhashKeyFromAttributeRecordSet (const DtAttributeRecordSet &recordSet)
 Get a hash key from an attribute record set. More...
 
virtual int acceptPdu (const DtStateMsg &) const
 Determines if a PDU should be processed or not. More...
 
virtual bool readyToAdd (DtReflectedObject *obj)
 Returns true if the obj is ready to be added to myObjectList; calls myDiscoveryCondition from within. More...
 
virtual void processAttributePduCb (DtAttributeInteraction *inter)
 
virtual void processAttributePduRecordSet (const DtAttributeRecordSet &recordSet, const DtSimulationAddress &simAddr, DtReflectedObject *obj=0)
 
virtual void processAttributePduWaitListCb (DtReflectedObject *obj)
 
virtual void deleteRecordSetBySimulationAddressMap (DtRecordSetBySimulationAddressMap &recordSetMap, const DtSimulationAddress &simAddr=DtSimulationAddress()) const
 

Static Protected Member Functions

static void underwaterAcousticCb (DtUnderwaterAcousticPdu *pdu, void *usr)
 Callback for the exercise connection. More...
 
- Static Protected Member Functions inherited from DtReflectedObjectList
static void doTimeoutsPostDrainCb (void *usr)
 Calls doTimeouts. More...
 
static void processAttributePduCb (DtAttributeInteraction *inter, void *usr)
 
static void processAttributePduWaitListCb (DtReflectedObject *obj, void *userData)
 

Protected Attributes

DtObjectIdHashKey myHashKey
 
- Protected Attributes inherited from DtReflectedObjectList
DtExerciseConnmyExConn
 
DtIntrusiveList myObjectAddedCallbacks
 
DtIntrusiveList myObjectRemovedCallbacks
 
DtIntrusiveList myObjectList
 
DtIntrusiveList myWaitList
 
DtHashlist myObjectHashlist
 
DtHashlist myWaitHashlist
 
DtAttributesByObjectIdMap myAttributeWaitHashlist
 
DtTime myTimeoutInterval
 
DtTime myNextTimeoutCheck
 
DtTime myTimeoutCheckInterval
 
bool myTimeoutProcessingFlag
 
DtDiscoveryCondition myDiscoveryCondition
 
void * myDiscoveryConditionParameter
 
std::set< DtPduKindmyPduKindSet
 

Detailed Description

Instances of this class provide a protocol independent interface to a list of underwater acoustics objects in a DIS environment.

Constructor & Destructor Documentation

DtReflectedUnderwaterAcousticsList::DtReflectedUnderwaterAcousticsList ( DtExerciseConn exConn,
int  numBucketsPrimeNumber = 503 
)

Constructor.

virtual DtReflectedUnderwaterAcousticsList::~DtReflectedUnderwaterAcousticsList ( )
virtual

Destructor.

DtReflectedUnderwaterAcousticsList::DtReflectedUnderwaterAcousticsList ( const DtReflectedUnderwaterAcousticsList )
protected

Copy constructor – Not Implemented.

Member Function Documentation

virtual void DtReflectedUnderwaterAcousticsList::addUnderwaterAcousticsAdditionCallback ( DtUnderwaterAcousticsCallbackFunction  cb,
void *  userData 
)
virtual

Underwater acoustics addition callback registration/deregistration.

virtual void DtReflectedUnderwaterAcousticsList::addUnderwaterAcousticsRemovalCallback ( DtUnderwaterAcousticsCallbackFunction  cb,
void *  userData 
)
virtual

Active Sonar remove callback registration/deregistration.

virtual DtReflectedUnderwaterAcoustics* DtReflectedUnderwaterAcousticsList::first ( ) const
virtual

Get the first and last elements of the reflected underwater acoustics list.

const DtBaseHashKey& DtReflectedUnderwaterAcousticsList::hashKeyFromStateMessage ( const DtStateMsg )
protectedvirtual

Overrides the base class implementation.

Generates a corresponding key from a Underwater Acoustic PDU. Returns an instance of 'DtSystemHashKey'. Note: the instance of the generated key is valid only until the next call to this method, or until the class instance itself goes out of scope (whichever is shorter).

Implements DtReflectedObjectList.

virtual DtReflectedUnderwaterAcoustics* DtReflectedUnderwaterAcousticsList::last ( ) const
virtual
virtual DtReflectedUnderwaterAcoustics* DtReflectedUnderwaterAcousticsList::lookup ( const DtGlobalObjectDesignator hostEntity) const
virtual

Lookup an underwater acoustics object from the object ID of its host entity and its acoustic identifier.

virtual DtReflectedObject* DtReflectedUnderwaterAcousticsList::newReflectedObj ( const DtStateMsg msg)
protectedvirtual

Creates a a new object. Calls newReflectedPropulsionNoise to do so.

Implements DtReflectedObjectList.

virtual DtReflectedUnderwaterAcoustics* DtReflectedUnderwaterAcousticsList::newReflectedUnderwaterAcoustics ( const DtEntityIdentifier hostEntity)
protectedvirtual

Creates a new reflected underwater acoustics object.

Called by processStateMessage(). Override this to change the creation of new DtReflectedUnderwaterAcousticss.

virtual void DtReflectedUnderwaterAcousticsList::objectAdded ( DtReflectedObject obj)
protectedvirtual

Called after a reflected underwater acoustics object is added to the list and before addition callbacks are processed.

Right now, it only calls DtInfo.

Reimplemented from DtReflectedObjectList.

DtReflectedUnderwaterAcousticsList& DtReflectedUnderwaterAcousticsList::operator= ( const DtReflectedUnderwaterAcousticsList )
protected

Assignment operator – Not Implemented.

virtual void DtReflectedUnderwaterAcousticsList::print ( ) const
virtual

Print the SRs of all reflected active sonar.

Reimplemented from DtReflectedObjectList.

virtual void DtReflectedUnderwaterAcousticsList::printDataToStream ( std::ostream &  stream) const
virtual

Print the SRs to a stream.

virtual void DtReflectedUnderwaterAcousticsList::removeUnderwaterAcousticsAdditionCallback ( DtUnderwaterAcousticsCallbackFunction  cb,
void *  userData 
)
virtual
virtual void DtReflectedUnderwaterAcousticsList::removeUnderwaterAcousticsRemovalCallback ( DtUnderwaterAcousticsCallbackFunction  cb,
void *  userData 
)
virtual
static void DtReflectedUnderwaterAcousticsList::underwaterAcousticCb ( DtUnderwaterAcousticPdu pdu,
void *  usr 
)
staticprotected

Callback for the exercise connection.

Member Data Documentation

DtObjectIdHashKey DtReflectedUnderwaterAcousticsList::myHashKey
protected

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

Document ID: Generated on Mon Apr 25 03:39:01 EDT 2022 from SVN revision 242502
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)