VR-Link API Documentation for HLA 1.3
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes
DtHlaObjectWithStateRep Class Reference

class DtHlaObjectWithStateRep: More...

+ Inheritance diagram for DtHlaObjectWithStateRep:
+ Collaboration diagram for DtHlaObjectWithStateRep:

List of all members.

Public Member Functions

 DtHlaObjectWithStateRep (DtExerciseConn *conn, RTI::ObjectHandle id, const char *name, DtObjClassDesc &classDesc, bool reflecting)
 constructor
 DtHlaObjectWithStateRep (DtExerciseConn *conn, const char *name, DtObjClassDesc &classDesc, bool reflecting)
 constructor
virtual ~DtHlaObjectWithStateRep ()
 destructor
virtual void useTheseForUpdating (DtStateRepository *stateRep, DtStateRepository *asSeenByRemote, DtHlaStateEncoder *encoder, DtHlaStateDecoder *decoder)
 Local Entity specific functions.
virtual void generateUpdate (const RTI::AttributeHandleSet &eligibleAttrs, const RTI::AttributeHandleSet &requiredAttrs, DtStateMsg *stateMsg)
 Called by update() to actually generate an outgoing message.
virtual DtStateRepositorystateRepForUpdating () const
 Returns current state repository used for updating.
virtual DtStateRepositorystateRepForReflecting () const
 Returns current state repository used for reflecting.
virtual DtStateRepositoryasSeenByRemote () const
 Returns asSeenByRemote.
virtual void useTheseForReflecting (DtStateRepository *stateRep, DtHlaStateDecoder *decoder)
 Remote Entity specific functions.
virtual void stopUsingTheseForReflecting (DtStateRepository *stateRep, DtHlaStateDecoder *decoder)
 Remove a decoder/stateRep pair to use for decoding.
virtual void reflect (const DtStateMsg &stateMsg)
 Receive representation (remote reflection) from the RTI, and update any state repositories that have been registered with us, to reflect this incoming data.
virtual void reflectLocal (const DtStateMsg &stateMsg)
 When the DtExerciseConn's reflecting flag is on, this function is called when we send an update, so that the update can get reflected back into our "reflected" views of the object.
virtual void printMsg (const DtStateMsg &msg, bool fullReport) const
 Prints contents of a state msg.

Static Public Member Functions

static DtHlaObjectcreate (DtExerciseConn *conn, RTI::ObjectHandle id, const char *name, DtObjClassDesc &classDesc, bool reflecting)
 Creator function for this class.

Protected Member Functions

 DtHlaObjectWithStateRep (const DtHlaObjectWithStateRep &orig)
 copy constructor - not implemented.
DtHlaObjectWithStateRepoperator= (const DtHlaObjectWithStateRep &orig)
 assignment operator - not implemented.

Protected Attributes

DtHlaStateDecodermyDecoder
 These are all used for encoding only.
DtHlaStateEncodermyEncoder
DtStateRepositorymyStateRepForUpdating
DtStateRepositorymyAsSeenByRemote
DtList myDecList
 List of decoder/stateRep pairs.

Detailed Description

class DtHlaObjectWithStateRep:

Instances of DtHlaObjectWithStateRep are used to represent an HLA object via a state representation.


Constructor & Destructor Documentation

DtHlaObjectWithStateRep::DtHlaObjectWithStateRep ( DtExerciseConn conn,
RTI::ObjectHandle  id,
const char *  name,
DtObjClassDesc classDesc,
bool  reflecting 
)

constructor

Referenced by create().

DtHlaObjectWithStateRep::DtHlaObjectWithStateRep ( DtExerciseConn conn,
const char *  name,
DtObjClassDesc classDesc,
bool  reflecting 
)

constructor

destructor

copy constructor - not implemented.


Member Function Documentation

Returns asSeenByRemote.

References myAsSeenByRemote.

DtHlaObject * DtHlaObjectWithStateRep::create ( DtExerciseConn conn,
RTI::ObjectHandle  id,
const char *  name,
DtObjClassDesc classDesc,
bool  reflecting 
) [inline, static]

Creator function for this class.

References DtHlaObjectWithStateRep().

virtual void DtHlaObjectWithStateRep::generateUpdate ( const RTI::AttributeHandleSet &  eligibleAttrs,
const RTI::AttributeHandleSet &  requiredAttrs,
DtStateMsg stateMsg 
) [virtual]

Called by update() to actually generate an outgoing message.

This class's implementation uses an encoder, and stateRepositories to perform this function. eligibleAttrs is the set of owned attributes to which remote federates have subscribed. requiredAttrs is the set of attributes that have been requested or forced by application code since the attribute was last sent. stateMsg is the message to fill out.

Reimplemented from DtHlaObject.

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

assignment operator - not implemented.

virtual void DtHlaObjectWithStateRep::printMsg ( const DtStateMsg msg,
bool  fullReport 
) const [virtual]

Prints contents of a state msg.

Base class prints only header info. If fullReport set to true, printMsg requests a full status print out for objects with a state repository.

Reimplemented from DtHlaObject.

virtual void DtHlaObjectWithStateRep::reflect ( const DtStateMsg stateMsg) [virtual]

Receive representation (remote reflection) from the RTI, and update any state repositories that have been registered with us, to reflect this incoming data.

If the exercise connection's reflecting flag is set, and its reflectRemoteUpdatesIntoPub flag is set, then we decode the message into myStateRepForUpdating in addition to any state repositories that have been registered with us for reflection.

Implements DtHlaObject.

virtual void DtHlaObjectWithStateRep::reflectLocal ( const DtStateMsg stateMsg) [virtual]

When the DtExerciseConn's reflecting flag is on, this function is called when we send an update, so that the update can get reflected back into our "reflected" views of the object.

Implements DtHlaObject.

Returns current state repository used for reflecting.

Returns the state repository containing the current reflected state of the entity. If there is more than one such state repository (e.g. you have multiple RELs in your application), the first one is returned.

Returns current state repository used for updating.

References myStateRepForUpdating.

virtual void DtHlaObjectWithStateRep::stopUsingTheseForReflecting ( DtStateRepository stateRep,
DtHlaStateDecoder decoder 
) [virtual]

Remove a decoder/stateRep pair to use for decoding.

virtual void DtHlaObjectWithStateRep::useTheseForReflecting ( DtStateRepository stateRep,
DtHlaStateDecoder decoder 
) [virtual]

Remote Entity specific functions.

Add a decoder/stateRep pair to use for decoding. Incoming HLA messages will be decoded into stateRep using decoder.

virtual void DtHlaObjectWithStateRep::useTheseForUpdating ( DtStateRepository stateRep,
DtStateRepository asSeenByRemote,
DtHlaStateEncoder encoder,
DtHlaStateDecoder decoder 
) [virtual]

Local Entity specific functions.

Set the state repositories (local representation and remote reflection), and the encoder and decoder which are used to send and receive HLA state messages from/into the repository.


Member Data Documentation

Referenced by asSeenByRemote().

List of decoder/stateRep pairs.

It is a list of pointers to DtHlaObjectView. They are used for decoding.

These are all used for encoding only.

Referenced by stateRepForUpdating().


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)