VR-Link API Documentation for DIS
Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes
DtReflectedEntityList Class Reference

Instances of this class provide a protocol independent interface to a list of reflected entities in a DIS environment. More...

+ Inheritance diagram for DtReflectedEntityList:
+ Collaboration diagram for DtReflectedEntityList:

List of all members.

Public Member Functions

 DtReflectedEntityList (DtExerciseConn *exConn, bool smoothCapable=false, bool processDiGuyPdus=false)
 Constructor.
virtual ~DtReflectedEntityList ()
 Destructor.
virtual DtReflectedEntitylookup (const DtObjectId &id) const
 Lookup an entity from its object ID.
virtual DtReflectedEntityfirst () const
 Get the first and last elements of the entity list.
virtual DtReflectedEntitylast () const
virtual void addEntityAdditionCallback (DtEntityCallbackFunction cb, void *userData)
 Entity added callback registration/deregistration.
virtual void removeEntityAdditionCallback (DtEntityCallbackFunction cb, void *userData)
virtual void addEntityRemovalCallback (DtEntityCallbackFunction cb, void *userData)
 Entity removed callback registration/deregistration.
virtual void removeEntityRemovalCallback (DtEntityCallbackFunction cb, void *userData)
virtual void print ()
 Print the SRs of all objects.
virtual DtReflectedEntityprocessEntityState (const DtEntityStatePdu &pdu)
 Process an incoming entity state pdu.
virtual void processRelativeLocationPdu (const DtRelativeLocationPdu &pdu)
 Process an incoming relativeLocation pdu.
virtual void processEntityStateUpdatePdu (const DtEntityStateUpdatePdu &pdu)
 Process an incoming relativeLocation pdu.
virtual void processDiGuyPdu (const DtDIGuyCustomPdu &pdu)
 Process an incoming DI Guy Custom PDU.
virtual void processSeesPdu (const DtSuppEmisEntStatePdu &pdu)
 Process an incoming SEES PDU.
virtual void setProcessDiGuyPdus (bool trueFalse)
 Tells the reflected list whether to process DI-Guy PDU's or not.
virtual void discoverOnlyWhenEntityTypeKnown (bool yesNo)
 Allows one to specify whether the REL should wait until the entity type is known before adding the entity to the list.

Protected Member Functions

DtReflectedEntityListoperator= (const DtReflectedEntityList &orig)
 Assignment operator -- not implemented.
 DtReflectedEntityList (const DtReflectedEntityList &orig)
 Copy constructor -- not implemented.
virtual DtReflectedObjectnewReflectedObj (const DtStateMsg &msg)
 Create a new object from a state message.
virtual DtReflectedObjectprocessStateMessage (const DtStateMsg &msg)
 Process an incoming state message. Calls processEntityState().
virtual void objectAdded (DtReflectedObject *obj)
 Called after an entity is added and before additional callbacks are processed.
virtual void finalPduIsSetAction (DtReflectedEntity *entity)
 Called when an entity sends its final PDU.
virtual const DtBaseHashKeyhashKeyFromStateMessage (const DtStateMsg *msg)
 Get a hash key from a state message.
virtual DtReflectedEntitynewReflectedEntity (const DtEntityIdentifier &id, const DtEntityType &type) const
 Create a new reflected entity.
virtual void entityAdded (DtReflectedEntity *ent)
 Called after an entity is added and before additional callbacks are processed.

Static Protected Member Functions

static void entityStateCb (DtEntityStatePdu *pdu, void *usr)
 Callback for the exercise connection.
static void relativeLocationCb (DtRelativeLocationPdu *pdu, void *usr)
 Callback which calls processRelativeLocationPdu.
static void entityStateUpdateCb (DtEntityStateUpdatePdu *pdu, void *usr)
 Callback which calls processEntityStateUpdatePdu.
static void diGuyPduCb (DtDIGuyCustomPdu *pdu, void *usr)
 Callback which calls processDiGuyPdu.
static void seesPduCb (DtSuppEmisEntStatePdu *pdu, void *usr)
 SEES PDU callback.
static bool checkEntityType (DtReflectedObject *obj, void *usr)
 Callback which checks whether the entity type has arrived yet; registered/deregistered using the fn, discoverOnlyWhenEntityTypeKnown.

Protected Attributes

bool mySmoothCapable
DtEntityIdentifierHashKeymyHashKey
bool myProcessingDiGuyPdus

Detailed Description

Instances of this class provide a protocol independent interface to a list of reflected entities in a DIS environment.

Examples

Constructor & Destructor Documentation

DtReflectedEntityList::DtReflectedEntityList ( DtExerciseConn exConn,
bool  smoothCapable = false,
bool  processDiGuyPdus = false 
)

Constructor.

Destructor.

Copy constructor -- not implemented.


Member Function Documentation

virtual void DtReflectedEntityList::addEntityAdditionCallback ( DtEntityCallbackFunction  cb,
void *  userData 
) [virtual]

Entity added callback registration/deregistration.

virtual void DtReflectedEntityList::addEntityRemovalCallback ( DtEntityCallbackFunction  cb,
void *  userData 
) [virtual]

Entity removed callback registration/deregistration.

static bool DtReflectedEntityList::checkEntityType ( DtReflectedObject obj,
void *  usr 
) [static, protected]

Callback which checks whether the entity type has arrived yet; registered/deregistered using the fn, discoverOnlyWhenEntityTypeKnown.

static void DtReflectedEntityList::diGuyPduCb ( DtDIGuyCustomPdu pdu,
void *  usr 
) [static, protected]

Callback which calls processDiGuyPdu.

virtual void DtReflectedEntityList::discoverOnlyWhenEntityTypeKnown ( bool  yesNo) [virtual]

Allows one to specify whether the REL should wait until the entity type is known before adding the entity to the list.

The default value is no, meaning entities will get added to the list immediately -- regardless of whether it has received any attr values or not.

virtual void DtReflectedEntityList::entityAdded ( DtReflectedEntity ent) [protected, virtual]

Called after an entity is added and before additional callbacks are processed.

Right now, this function only calls DtInfo.

static void DtReflectedEntityList::entityStateCb ( DtEntityStatePdu pdu,
void *  usr 
) [static, protected]

Callback for the exercise connection.

static void DtReflectedEntityList::entityStateUpdateCb ( DtEntityStateUpdatePdu pdu,
void *  usr 
) [static, protected]

Callback which calls processEntityStateUpdatePdu.

virtual void DtReflectedEntityList::finalPduIsSetAction ( DtReflectedEntity entity) [protected, virtual]

Called when an entity sends its final PDU.

Currently, this removes and deletes the entity.

virtual DtReflectedEntity* DtReflectedEntityList::first ( ) const [virtual]

Get the first and last elements of the entity list.

virtual const DtBaseHashKey& DtReflectedEntityList::hashKeyFromStateMessage ( const DtStateMsg msg) [protected, virtual]

Get a hash key from a state message.

Implements DtReflectedObjectList.

virtual DtReflectedEntity* DtReflectedEntityList::last ( ) const [virtual]
virtual DtReflectedEntity* DtReflectedEntityList::lookup ( const DtObjectId id) const [virtual]

Lookup an entity from its object ID.

virtual DtReflectedEntity* DtReflectedEntityList::newReflectedEntity ( const DtEntityIdentifier id,
const DtEntityType type 
) const [protected, virtual]

Create a new reflected entity.

virtual DtReflectedObject* DtReflectedEntityList::newReflectedObj ( const DtStateMsg msg) [protected, virtual]

Create a new object from a state message.

Calls newReflectedEntity() to create a new entity, and then tells the esr to use a smoother if smoothing is enabled.

Implements DtReflectedObjectList.

virtual void DtReflectedEntityList::objectAdded ( DtReflectedObject obj) [protected, virtual]

Called after an entity is added and before additional callbacks are processed.

Calls entityAdded().

Reimplemented from DtReflectedObjectList.

DtReflectedEntityList& DtReflectedEntityList::operator= ( const DtReflectedEntityList orig) [protected]

Assignment operator -- not implemented.

virtual void DtReflectedEntityList::print ( ) [virtual]

Print the SRs of all objects.

virtual void DtReflectedEntityList::processDiGuyPdu ( const DtDIGuyCustomPdu pdu) [virtual]

Process an incoming DI Guy Custom PDU.

Only used if capability is turned on in the constructor.

Process an incoming entity state pdu.

Then calls down to base class processStateMessage().

Process an incoming relativeLocation pdu.

Process an incoming relativeLocation pdu.

virtual void DtReflectedEntityList::processSeesPdu ( const DtSuppEmisEntStatePdu pdu) [virtual]

Process an incoming SEES PDU.

virtual DtReflectedObject* DtReflectedEntityList::processStateMessage ( const DtStateMsg msg) [protected, virtual]

Process an incoming state message. Calls processEntityState().

Reimplemented from DtReflectedObjectList.

static void DtReflectedEntityList::relativeLocationCb ( DtRelativeLocationPdu pdu,
void *  usr 
) [static, protected]

Callback which calls processRelativeLocationPdu.

virtual void DtReflectedEntityList::removeEntityAdditionCallback ( DtEntityCallbackFunction  cb,
void *  userData 
) [virtual]
virtual void DtReflectedEntityList::removeEntityRemovalCallback ( DtEntityCallbackFunction  cb,
void *  userData 
) [virtual]
static void DtReflectedEntityList::seesPduCb ( DtSuppEmisEntStatePdu pdu,
void *  usr 
) [static, protected]

SEES PDU callback.

virtual void DtReflectedEntityList::setProcessDiGuyPdus ( bool  trueFalse) [virtual]

Tells the reflected list whether to process DI-Guy PDU's or not.

If true, and the list is not processing DI-Guy PDU's, will add a callback for DI-Guy PDU's. If false, and the list is processing DI-Guy PDU's, will remove the callback to process the PDU's.


Member Data Documentation


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

Document ID: Generated on Mon May 14 08:06:18 EDT 2012 from SVN revision 114750
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)