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

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

+ Inheritance diagram for DtReflectedEntity:
+ Collaboration diagram for DtReflectedEntity:

Public Types

typedef DtEntityStateRepository *(* DtStateRepCreator )()
 Function prototype for functions that create DtEntityStateRepositories.

Public Member Functions

 DtReflectedEntity (DtExerciseConn *conn, const DtEntityIdentifier &id, const DtEntityType &type)
 Constructor.
 DtReflectedEntity (DtEntityStateRepository *sr, DtExerciseConn *conn, const DtEntityIdentifier &id)
 Constructor -> This is a special constructor that takes a pre-made entity state repository in order to create a known initial state.
virtual ~DtReflectedEntity ()
 Destructor.
virtual DtEntityStateRepositoryentityStateRep () const
 Returns a pointer to the EntityStateRepository - through which you can inspect current state information.
virtual DtEntityStateRepositoryesr () const
 Synonym for entityStateRep().
virtual DtStateRepositorystateRep () const
 Returns a pointer to the StateRepository - through which you can inspect current state information.
virtual DtEntityStateDecoderdecoder ()
 Returns a pointer to the Decoder being used to decode state messages into our ESR.
virtual DtOwnershipHandlersetOwnershipHandler (DtOwnershipHandler *handler)
 Sets the current ownership handler to handler.
virtual const DtEntityIdentifierentityId () const
 Returns the entity identifier.
virtual const DtObjectIdid () const
 Get the entity's id. (For DIS, DtObjectId is DtEntityIdentifier).
virtual const DtObjectIdlocalId () const
 Get the entity's local id. For DIS - same as id().
virtual const
DtGlobalObjectDesignator
globalId () const
 Get the entity's object's global object designator - for DIS, it's the same as its DtEntityIdentifier.
virtual void processStateMessage (const DtStateMsg &msg)
 Process an entity state PDU. Calls processEntityState().
virtual void processRelativeLocation (const DtRelativeLocationPdu &pdu)
 Process a relative location PDU.
virtual void processEntityStateUpdate (const DtEntityStateUpdatePdu &pdu)
 Process an entity state update PDU.
virtual void processSees (const DtSuppEmisEntStatePdu &pdu)
 Process an SEES PDU.
virtual void processDiGuyPdu (const DtDIGuyCustomPdu &pdu)
 Process a DI Guy PDU.
virtual DtReflectedEntitynext () const
 Get the next and previous elements in the reflected entity list.
virtual DtReflectedEntityprev () const
virtual DtReflectedEntitywrapNext () const
 Get the next and previous elements, wrap at the ends of the list.
virtual DtReflectedEntitywrapPrev () const
virtual void addPostUpdateCallback (DtEntityCallbackFunction cb, void *userData)
 Entity state callback registration/deregistration.
virtual void removePostUpdateCallback (DtEntityCallbackFunction cb, void *userData)
virtual const DtBaseHashKeyhashKey () const
 Get a hash key for this object.
virtual DtString idString () const
 Get a string identification of this object.
virtual void processEntityState (const DtEntityStatePdu &pdu)
 Process an entity state PDU.
virtual void acquireObject ()
 If it exists, attempt to use ownership management to acquire control of this object.
virtual void decodeExtensions (const DtEntityStatePdu &pdu, DtEntityStateRepository *stateRep)
 Decode registered State Repository Extension records Called from processEntityState.
virtual void setProcessDiGuyAttributes (bool enableProcessing)
 Set/Get whether to process DI-Guy attributes.
virtual bool isProcessingDiGuyAttributes () const
 Set/Get whether to process DI-Guy attributes.
- Public Member Functions inherited from DtReflectedObject
 DtReflectedObject (DtExerciseConn *conn)
 constructor
virtual ~DtReflectedObject ()
 destructor
virtual DtStateRepositorysr () const
 Synonym for stateRep().
virtual DtTime lastTimeUpdated () const
 Returns the value of wallclock time at the time an update was last received for the entity.
virtual DtTime lastSimTimeUpdated () const
 Returns the value of sim time at the time an update was last received for the entity.
virtual DtTime lastReceivedTimeStamp () const
 Returns the value in seconds past the hour of the timeStamp from the last received PDU.
virtual void baseAddPostUpdateCallback (DtReflectedObjectCallbackFunction cb, void *userData)
 Object state callback registration/deregistration.
virtual void baseRemovePostUpdateCallback (DtReflectedObjectCallbackFunction cb, void *userData)
virtual DtReflectedObjectnextObj () const
 Get the next remote object.
virtual DtReflectedObjectprevObj () const
 Get the previous remote object.
virtual DtReflectedObjectwrapNextObj () const
 Get the next remote object.
virtual DtReflectedObjectwrapPrevObj () const
 Get the previous remote object.
- Public Member Functions inherited from DtListedObj
 DtListedObj ()
 Constructor.
virtual ~DtListedObj ()
 Destructor.

Static Public Member Functions

static void setStateRepCreator (DtStateRepCreator creator)
 Give us a function to be used for creating SRs.
static DtStateRepCreator stateRepCreator (void)

Protected Member Functions

 DtReflectedEntity (const DtReflectedEntity &orig)
 copy constructor – not implemented
DtReflectedEntityoperator= (const DtReflectedEntity &orig)
 assignment operator – not implemented
- Protected Member Functions inherited from DtReflectedObject
 DtReflectedObject (const DtReflectedObject &orig)
 copy constructor – not implemented
DtReflectedObjectoperator= (const DtReflectedObject &orig)
 assignment operator – not implemented
virtual void processPostUpdateCallbacks ()
 Process the post update callbacks.

Protected Attributes

DtEntityIdentifier myId
DtEntityStateRepositorymyEntityStateRep
DtEntityStateDecodermyEntityDecoder
DtDIGuyCustomPduDecodermyDiGuyDecoder
DtEntityIdentifierHashKey myHashKey
DtOwnershipHandlermyOwnershipHandler
std::vector
< DtStateRepositoryExtensionDecoder * > 
myStateRepositoryExtensionDecoderList
- Protected Attributes inherited from DtReflectedObject
DtExerciseConnmyExConn
DtIntrusiveList myStateUpdateCallbacks
DtTime myLastTimeUpdated
DtTime myLastSimTimeUpdated
DtTime myLastReceivedTimeStamp
- Protected Attributes inherited from DtListedObj
DtListmyList
DtListItemmyItem

Static Protected Attributes

static DtStateRepCreator theStateRepCreator

Detailed Description

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

Member Typedef Documentation

typedef DtEntityStateRepository*(* DtReflectedEntity::DtStateRepCreator)()

Function prototype for functions that create DtEntityStateRepositories.

Constructor & Destructor Documentation

DtReflectedEntity::DtReflectedEntity ( DtExerciseConn conn,
const DtEntityIdentifier id,
const DtEntityType type 
)

Constructor.

DtReflectedEntity::DtReflectedEntity ( DtEntityStateRepository sr,
DtExerciseConn conn,
const DtEntityIdentifier id 
)

Constructor -> This is a special constructor that takes a pre-made entity state repository in order to create a known initial state.

This constructor can be used for ownership management to convert a publisher into a reflected entity but otherwise should not be used.

virtual DtReflectedEntity::~DtReflectedEntity ( )
virtual

Destructor.

DtReflectedEntity::DtReflectedEntity ( const DtReflectedEntity orig)
protected

copy constructor – not implemented

Member Function Documentation

virtual void DtReflectedEntity::acquireObject ( )
virtual

If it exists, attempt to use ownership management to acquire control of this object.

If successful, the reflectedEntity will become an entityPublisher.

virtual void DtReflectedEntity::addPostUpdateCallback ( DtEntityCallbackFunction  cb,
void *  userData 
)
virtual

Entity state callback registration/deregistration.

virtual void DtReflectedEntity::decodeExtensions ( const DtEntityStatePdu pdu,
DtEntityStateRepository stateRep 
)
virtual

Decode registered State Repository Extension records Called from processEntityState.

virtual DtEntityStateDecoder* DtReflectedEntity::decoder ( )
virtual

Returns a pointer to the Decoder being used to decode state messages into our ESR.

virtual const DtEntityIdentifier& DtReflectedEntity::entityId ( ) const
virtual

Returns the entity identifier.

virtual DtEntityStateRepository* DtReflectedEntity::entityStateRep ( ) const
virtual

Returns a pointer to the EntityStateRepository - through which you can inspect current state information.

virtual DtEntityStateRepository* DtReflectedEntity::esr ( ) const
virtual

Synonym for entityStateRep().

virtual const DtGlobalObjectDesignator& DtReflectedEntity::globalId ( ) const
virtual

Get the entity's object's global object designator - for DIS, it's the same as its DtEntityIdentifier.

Implements DtReflectedObject.

virtual const DtBaseHashKey& DtReflectedEntity::hashKey ( ) const
virtual

Get a hash key for this object.

Implements DtReflectedObject.

virtual const DtObjectId& DtReflectedEntity::id ( ) const
virtual

Get the entity's id. (For DIS, DtObjectId is DtEntityIdentifier).

Referenced by localId().

virtual DtString DtReflectedEntity::idString ( ) const
virtual

Get a string identification of this object.

Implements DtReflectedObject.

virtual bool DtReflectedEntity::isProcessingDiGuyAttributes ( ) const
virtual

Set/Get whether to process DI-Guy attributes.

const DtObjectId & DtReflectedEntity::localId ( ) const
inlinevirtual

Get the entity's local id. For DIS - same as id().

References id().

virtual DtReflectedEntity* DtReflectedEntity::next ( ) const
virtual

Get the next and previous elements in the reflected entity list.

Reimplemented from DtListedObj.

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

assignment operator – not implemented

virtual DtReflectedEntity* DtReflectedEntity::prev ( ) const
virtual

Reimplemented from DtListedObj.

virtual void DtReflectedEntity::processDiGuyPdu ( const DtDIGuyCustomPdu pdu)
virtual

Process a DI Guy PDU.

virtual void DtReflectedEntity::processEntityState ( const DtEntityStatePdu pdu)
virtual

Process an entity state PDU.

Also calls down to base class processStateMessage().

virtual void DtReflectedEntity::processEntityStateUpdate ( const DtEntityStateUpdatePdu pdu)
virtual

Process an entity state update PDU.

virtual void DtReflectedEntity::processRelativeLocation ( const DtRelativeLocationPdu pdu)
virtual

Process a relative location PDU.

virtual void DtReflectedEntity::processSees ( const DtSuppEmisEntStatePdu pdu)
virtual

Process an SEES PDU.

virtual void DtReflectedEntity::processStateMessage ( const DtStateMsg msg)
virtual

Process an entity state PDU. Calls processEntityState().

Reimplemented from DtReflectedObject.

virtual void DtReflectedEntity::removePostUpdateCallback ( DtEntityCallbackFunction  cb,
void *  userData 
)
virtual
virtual DtOwnershipHandler* DtReflectedEntity::setOwnershipHandler ( DtOwnershipHandler handler)
virtual

Sets the current ownership handler to handler.

A DtOwnershipHandler is an object that encapsulates callback function for a variety of ownership-management-related functions. Returns previous handler.

virtual void DtReflectedEntity::setProcessDiGuyAttributes ( bool  enableProcessing)
virtual

Set/Get whether to process DI-Guy attributes.

static void DtReflectedEntity::setStateRepCreator ( DtStateRepCreator  creator)
static

Give us a function to be used for creating SRs.

virtual DtStateRepository* DtReflectedEntity::stateRep ( ) const
virtual

Returns a pointer to the StateRepository - through which you can inspect current state information.

Implementation for abstract base class. Calls esr().

Implements DtReflectedObject.

static DtStateRepCreator DtReflectedEntity::stateRepCreator ( void  )
static
virtual DtReflectedEntity* DtReflectedEntity::wrapNext ( ) const
virtual

Get the next and previous elements, wrap at the ends of the list.

Reimplemented from DtListedObj.

virtual DtReflectedEntity* DtReflectedEntity::wrapPrev ( ) const
virtual

Reimplemented from DtListedObj.

Member Data Documentation

DtDIGuyCustomPduDecoder* DtReflectedEntity::myDiGuyDecoder
protected
DtEntityStateDecoder* DtReflectedEntity::myEntityDecoder
protected
DtEntityStateRepository* DtReflectedEntity::myEntityStateRep
protected
DtEntityIdentifierHashKey DtReflectedEntity::myHashKey
protected
DtEntityIdentifier DtReflectedEntity::myId
protected
DtOwnershipHandler* DtReflectedEntity::myOwnershipHandler
protected
std::vector<DtStateRepositoryExtensionDecoder*> DtReflectedEntity::myStateRepositoryExtensionDecoderList
protected
DtStateRepCreator DtReflectedEntity::theStateRepCreator
staticprotected

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

Document ID: Generated on Mon Jun 22 21:18:40 EDT 2020 from SVN revision 213785
Copyright © 2005-2018 MAK Technologies. All Rights Reserved (www.mak.com)