![]() |
VR-Link API Documentation for HLA 1.3
|
class DtHlaObjectWithStateRep: More...
Inheritance diagram for DtHlaObjectWithStateRep:
Collaboration diagram for DtHlaObjectWithStateRep: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 DtStateRepository * | stateRepForUpdating () const |
| Returns current state repository used for updating. | |
| virtual DtStateRepository * | stateRepForReflecting () const |
| Returns current state repository used for reflecting. | |
| virtual DtStateRepository * | asSeenByRemote () 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 DtHlaObject * | create (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. | |
| DtHlaObjectWithStateRep & | operator= (const DtHlaObjectWithStateRep &orig) |
| assignment operator - not implemented. | |
Protected Attributes | |
| DtHlaStateDecoder * | myDecoder |
| These are all used for encoding only. | |
| DtHlaStateEncoder * | myEncoder |
| DtStateRepository * | myStateRepForUpdating |
| DtStateRepository * | myAsSeenByRemote |
| DtList | myDecList |
| List of decoder/stateRep pairs. | |
class DtHlaObjectWithStateRep:
Instances of DtHlaObjectWithStateRep are used to represent an HLA object via a state representation.
| 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
| virtual DtHlaObjectWithStateRep::~DtHlaObjectWithStateRep | ( | ) | [virtual] |
destructor
| DtHlaObjectWithStateRep::DtHlaObjectWithStateRep | ( | const DtHlaObjectWithStateRep & | orig | ) | [protected] |
copy constructor - not implemented.
| DtStateRepository * DtHlaObjectWithStateRep::asSeenByRemote | ( | ) | const [inline, virtual] |
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.
| virtual DtStateRepository* DtHlaObjectWithStateRep::stateRepForReflecting | ( | ) | const [virtual] |
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.
| DtStateRepository * DtHlaObjectWithStateRep::stateRepForUpdating | ( | ) | const [inline, virtual] |
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.
Referenced by asSeenByRemote().
DtList DtHlaObjectWithStateRep::myDecList [protected] |
List of decoder/stateRep pairs.
It is a list of pointers to DtHlaObjectView. They are used for decoding.
DtHlaStateDecoder* DtHlaObjectWithStateRep::myDecoder [protected] |
These are all used for encoding only.
DtHlaStateEncoder* DtHlaObjectWithStateRep::myEncoder [protected] |
Referenced by stateRepForUpdating().