MAK Data Logger API Documentation for HLA
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes
MAKLogger::DtLgrHlaMessageState Class Reference

HLA Specific State. More...

+ Inheritance diagram for MAKLogger::DtLgrHlaMessageState:
+ Collaboration diagram for MAKLogger::DtLgrHlaMessageState:

Public Member Functions

 DT_VIRTUAL_CTR_DEFAULTS (DtLgrHlaMessageState,(const DtLgrHlaSimulationManager *simMgr),(const DtLgrHlaSimulationManager *simMgr=0)) virtual ~DtLgrHlaMessageState()
 
virtual void setInputInfo (const DtMessageIOInfo *info)
 Set the input info. More...
 
virtual void setOutputInfo (const DtMessageIOInfo *info)
 Sets the Input Io Info. More...
 
virtual void modifyMessages (DtMessageBuffer &messages) const
 Modifies the messages. More...
 
virtual void modifyMessage (DtPacket &packet) const
 Modify the message. More...
 
virtual void decodeInitialState (const DtPacket &packet, DtMessageBuffer &buffer)
 Decode an initial state packet into a message buffer. More...
 
virtual void decodeCheckpoint (const DtPacket &packet, DtMessageBuffer &buffer, bool includeInteractions)
 Decodes a checkpoint packet into a message buffer. More...
 
virtual void decodeLinkedCheckpoint (const DtPacket &packet, DtMessageBuffer &messageBuffer, bool includeInteractions)
 Decode a linked checkpoint packet into a message buffer. More...
 
virtual bool isUpdateMessage (const DtPacket &packet) const
 Check to see if the state thinks this is an udpate. More...
 
virtual bool isRemovalMessage (const DtPacket &packet) const
 Check to see if the state thinks this is an remove entity. More...
 
virtual bool isInteractionMessage (const DtPacket &packet) const
 Check to see if the state thinks this is an interaction. More...
 
virtual void createUpdate (const DtStateObject &object, const DtAbsoluteTime *time, std::list< DtPacket * > &packetlist) const
 
virtual DtPacketcreateRemoval (const DtStateObject &object, const DtAbsoluteTime &time) const
 Create an removal packet for the object at the given time. More...
 
virtual void setInputFom (const DtBaseFomDesc *inputFom)
 
virtual void setOutputFom (const DtBaseFomDesc *outputFom)
 
virtual DtStateObjectfindObject (const DtHlaObject *object)
 Find the state object for a corresponding hla object. More...
 
const DtBaseFomDescinputFom () const
 
const DtBaseFomDescoutputFom () const
 
virtual DtLgrHlaHandle mapObjectHandleInputToOutput (DtLgrHlaHandle handle) const
 Map a Input object handle to an output handle. More...
 
virtual DtLgrHlaHandle mapObjectHandleOutputToInput (DtLgrHlaHandle handle) const
 Map a Output object handle to an input handle. More...
 
virtual DtLgrHlaHandle mapInteractionHandleInputToOutput (DtLgrHlaHandle handle) const
 Map a Input interaction handle to an output handle. More...
 
- Public Member Functions inherited from MAKLogger::DtMessageState
virtual ~DtMessageState ()
 DTOR Will destroy all state objects. More...
 
virtual const DtLgrSimManagersimMgr () const
 Return the sim manager. More...
 
virtual void startDiff ()
 Start difference mode, creates snapshot of existing state to be used with. More...
 
virtual void generateDiff (DtMessageBuffer &stateBuffer, const DtAbsoluteTime &time, bool addUpdates, InteractionProcessing processInteractions)
 Next update will generate only diff messages which are necessary to go from the backed up state to the current state. More...
 
virtual void endDiff ()
 Destroys the snapshot. More...
 
virtual bool isDiffInProgress () const
 Indicates if a diff is in progress. More...
 
virtual void updateState (DtMessageBuffer &stateBuffer)
 Update existing objects and add new objects. More...
 
virtual void updateState (DtPacket *packet)
 Update existing objects and add new objects. More...
 
virtual void postUpdate ()
 Call post update after finished. More...
 
virtual void setState (DtMessageBuffer &completeStateBuffer, const DtAbsoluteTime &time, DtMessageBuffer *diffBuffer=0)
 Set the state with the internal messages. More...
 
virtual void addState (DtMessageBuffer &stateBuffer, const DtAbsoluteTime &time)
 Add objects from buffer to the state. More...
 
virtual void clearState (DtMessageBuffer &emptyBuffer, const DtAbsoluteTime &time)
 Clear the state and returns the messages necessary to send to clear the state. More...
 
virtual void getState (DtMessageBuffer &emptyBuffer, const DtAbsoluteTime *time, bool modifyMessages=true)
 Return a message buffer with state messages of all cached objects and interactions. More...
 
virtual void getStateObjects (DtMessageBuffer &buffer, const DtAbsoluteTime *time, bool modifyMessages=true)
 Create update packets at the given time for each object in the state and add them to the buffer. More...
 
virtual void getStateInteractions (DtMessageBuffer &buffer, const DtAbsoluteTime *time, bool modifyMessages=true)
 Get any cached interactions into the given buffer. More...
 
virtual void activate ()
 Activate the Message state. More...
 
virtual void deactivate ()
 Deactivate the message state. More...
 
virtual const std::list
< DtStateObject * > & 
stateObjectList () const
 Gets a list of state objects. More...
 
virtual void clearState ()
 Clear the state without creating the removals. More...
 
virtual CheckpointProcessing processCheckpoints ()
 Check to see if checkpoints affect the state. More...
 
virtual void setProcessCheckpoints (CheckpointProcessing value)
 Set whether checkpoints affect the state. More...
 
virtual void setInteractionsCollectedForCheckpoints (bool enable)
 Set whether to collect interactions used for checkpoints. More...
 
virtual bool interactionsCollectedForCheckpoints () const
 Get whether to collect interactions used for checkpoints. More...
 
virtual void setInteractionsCollectedFromCheckpoints (bool enable)
 Set whether to collect interactions from checkpoints) More...
 
virtual bool interactionsCollectedFromCheckpoints () const
 Get whether to collect interactions from checkpoints. More...
 
virtual bool isInitialStateMessage (const DtPacket &packet) const
 Check to see if the State considers this packet an initial state. More...
 
virtual bool isCheckpointMessage (const DtPacket &packet) const
 Check to see if the State considers this packet a checkpoint. More...
 
virtual void createUpdate (const DtStateObject &object, const DtAbsoluteTime *time, DtPacketList &packetlist) const =0
 Create update packet(s) for the object at the given time if provided. More...
 
virtual DtStateObjectfindObject (DtU64 uniqueId)
 Find an object. More...
 
virtual const DtStateObjectfindObject (DtU64 uniqueId) const
 Find an object. More...
 
virtual DtStateObjectfindObjectByName (const DtString &name)
 Find an object with the given name. More...
 
virtual const DtStateObjectfindObjectByName (const DtString &name) const
 Find an object with the given name. More...
 
virtual void setLinkCheckpoints (bool enableLinking)
 Set/Get link checkpoint flag. More...
 
virtual bool linkCheckpointsEnabled () const
 Set/Get link checkpoint flag. More...
 
virtual DtPacketgenerateInitialState (const DtAbsoluteTime &timestamp, const DtAbsoluteTime &currentTime, bool isTransition)
 Generates an initial state packet containing the current state. More...
 
virtual DtPacketgenerateCheckpoint (const DtAbsoluteTime &timestamp, bool includeInteractions)
 Generates a checkpoint packet containing the current state including received interactions if specified. More...
 
virtual DtObserveEvent
< DtMessageState > * 
inputChangedEvent ()
 Event accessors. More...
 
virtual DtObserveEvent
< DtMessageState > * 
outputChangedEvent ()
 Event accessors. More...
 
virtual DtObserveEvent
< DtMessageState > * 
stateModifiedEvent ()
 Event accessors. More...
 
virtual DtObserveEvent
< DtMessageState > * 
stateActivatedEvent ()
 Event accessors. More...
 
virtual DtObserveEvent
< DtMessageState > * 
stateDeactivatedEvent ()
 Event accessors. More...
 
virtual DtObserveEvent
< DtMessageState > * 
endDiffEvent ()
 Event accessors. More...
 
virtual DtObserveEvent
< DtStateObject > * 
objectAddedEvent ()
 Event accessors. More...
 
virtual DtObserveEvent
< DtStateObject > * 
objectToBeRemovedEvent ()
 Event accessors. More...
 
virtual DtObserveEvent
< DtStateObject > * 
objectUpdatedEvent ()
 Event accessors. More...
 

Protected Types

typedef std::map
< DtLgrHlaHandle,
DtLgrHlaHandle
HandleMap
 
- Protected Types inherited from MAKLogger::DtMessageState
typedef std::list
< DtStateObject * > 
DtStateObjectList
 Type for the list of objects. More...
 
typedef std::map< DtU64,
DtStateObject * > 
DtStateObjectMap
 Type for lookup objects by unique id. More...
 
typedef std::map< DtString,
DtStateObject * > 
DtStateObjectNameMap
 Type for lookup objects by name. More...
 

Protected Member Functions

 DtLgrHlaMessageState (const DtLgrHlaMessageState &)
 CopyCTOR operator not implemented. More...
 
DtLgrHlaMessageStateoperator= (const DtLgrHlaMessageState &)
 Assignment operator not implemented. More...
 
virtual size_t decodeState (const char *checkpointBuffer, size_t bufferSize, const DtAbsoluteTime &stateTime, DtMessageBuffer &messageBuffer, bool includeInteractions)
 Decode packets from a checkpoint/initial state buffer. More...
 
virtual DtPacketcreateInitialStatePacket (const DtMessageBuffer &initialStateBuffer, const DtAbsoluteTime &timestamp, double offsetTime)
 Return an initial state packet with the given timestamp filled with the state data from the given buffer A negative offset indicates the state data is transitional and when decoding state packet times from the past should not be adjusted. More...
 
virtual DtPacketcreateCheckpointPacket (const DtMessageBuffer &checkpointBuffer, const DtAbsoluteTime &timestamp)
 Return a checkpoint packet filled with the state data from the given buffer. More...
 
virtual void fillWithStateData (const DtMessageBuffer &stateBuffer, char *data)
 Fill the given data buffer with the contents of the state buffer. More...
 
virtual void printMappingFailure (const std::string &classname, const std::string &message) const
 
virtual void activateState ()
 Activate the protocol specific state. More...
 
virtual void deactivateState ()
 Deactivate the protocol specific state. More...
 
virtual bool mapMessageHandles (DtPacket *packet) const
 
- Protected Member Functions inherited from MAKLogger::DtMessageState
 DtMessageState (const DtLgrSimManager *simMgr=0)
 Protected CTOR since class is abstract. More...
 
 DtMessageState (const DtMessageState &)
 CopyCTOR not implemented. More...
 
DtMessageStateoperator= (const DtMessageState &)
 Assignment operator not implemented. More...
 
virtual bool updateStateObjects (const DtPacket &packet)
 Used to update state objects using the packet. More...
 
virtual DtStateObjectcreateStateObject (const DtPacket &packet)
 Create the state object based upon the packet. More...
 
virtual DtStateObjectupdateStateObject (const DtPacket &packet)
 Update the state object based upon the packet. More...
 
virtual DtStateObjectfindStateObject (const DtPacket &packet)
 Find a state object for a packet. More...
 
virtual void removeStateObject (const DtStateObject *object)
 Remove the state object. More...
 
virtual void createUpdate (const DtStateObject &object, const DtAbsoluteTime *time, DtMessageBuffer &buffer) const
 Create update packet(s) for the object at the given time if provided and add them to buffer. More...
 
virtual bool removeStateObject (const DtPacket &packet)
 Remove the state object based upon the packet. More...
 
virtual void clearObjectList (DtStateObjectList &objectList, DtMessageBuffer *emptyStateBuffer, DtAbsoluteTime time)
 Clear the object list. More...
 
virtual void clearObjectList (DtStateObjectList &objectList)
 Clear the object list. More...
 
virtual void clearInteractionList (DtPacketList &interactionList)
 Clear the interaction list. More...
 

Protected Attributes

const DtBaseFomDescmyInputFom
 
const DtBaseFomDescmyOutputFom
 
HandleMap myObjectHandleMap
 
HandleMap myReverseObjectHandleMap
 
HandleMap myInteractionHandleMap
 
std::set< std::string > myMutablePrintedMappingFailures
 
- Protected Attributes inherited from MAKLogger::DtMessageState
DtStateObjectList myObjects
 List of state objects. More...
 
DtPacketList myInteractions
 List of interactions received since last flush. More...
 
DtStateObjectMap myObjectLookupMap
 Map to lookup state objects. More...
 
DtStateObjectNameMap myObjectLookupNameMap
 Map to lookup state objects. More...
 
DtStateObjectList mySnapshotOfObjects
 List of objects used when diffing two different states. More...
 
const DtLgrSimManagermySimMgr
 The simulation manager. More...
 
CheckpointProcessing myCheckpointProcessing
 
bool myStateChanged
 
bool myCheckpointInteractions
 
bool myLinkCheckpoints
 
bool myUseDiffTimeForStateObjects
 
bool myCollectInteractionsFromCheckpoint
 
bool myDiffInProgress
 
DtObserveEvent< DtMessageStatemyInputChangedEvent
 Events called on certain actions of the messageState. More...
 
DtObserveEvent< DtMessageStatemyOutputChangedEvent
 Events called on certain actions of the messageState. More...
 
DtObserveEvent< DtMessageStatemyStateModifiedEvent
 Events called on certain actions of the messageState. More...
 
DtObserveEvent< DtMessageStatemyStateActivatedEvent
 Events called on certain actions of the messageState. More...
 
DtObserveEvent< DtMessageStatemyStateDeactivetedEvent
 Events called on certain actions of the messageState. More...
 
DtObserveEvent< DtMessageStatemyEndDiffEvent
 Events called on certain actions of the messageState. More...
 
DtObserveEvent< DtStateObjectmyObjectAddedEvent
 Events called on certain actions of the messageState. More...
 
DtObserveEvent< DtStateObjectmyObjectToBeRemovedEvent
 Events called on certain actions of the messageState. More...
 
DtObserveEvent< DtStateObjectmyObjectUpdatedEvent
 Events called on certain actions of the messageState. More...
 

Additional Inherited Members

- Public Types inherited from MAKLogger::DtMessageState
enum  CheckpointProcessing { IgnoreCheckpoints, ProcessAllCheckpoints, ProcessFirstCheckpoint }
 
enum  InteractionProcessing { IgnoreInteractions, IncludeInteractions, DrainInteractions }
 
typedef std::list< DtPacket * > DtPacketList
 Type for the queue of interactions. More...
 

Detailed Description

HLA Specific State.

Member Typedef Documentation

Constructor & Destructor Documentation

MAKLogger::DtLgrHlaMessageState::DtLgrHlaMessageState ( const DtLgrHlaMessageState )
protected

CopyCTOR operator not implemented.

Member Function Documentation

virtual void MAKLogger::DtLgrHlaMessageState::activateState ( )
protectedvirtual

Activate the protocol specific state.

Implements MAKLogger::DtMessageState.

virtual DtPacket* MAKLogger::DtLgrHlaMessageState::createCheckpointPacket ( const DtMessageBuffer checkpointBuffer,
const DtAbsoluteTime timestamp 
)
protectedvirtual

Return a checkpoint packet filled with the state data from the given buffer.

Implements MAKLogger::DtMessageState.

virtual DtPacket* MAKLogger::DtLgrHlaMessageState::createInitialStatePacket ( const DtMessageBuffer initialStateBuffer,
const DtAbsoluteTime timestamp,
double  offsetTime 
)
protectedvirtual

Return an initial state packet with the given timestamp filled with the state data from the given buffer A negative offset indicates the state data is transitional and when decoding state packet times from the past should not be adjusted.

The actual offset value is not used other than informational.

Implements MAKLogger::DtMessageState.

virtual DtPacket* MAKLogger::DtLgrHlaMessageState::createRemoval ( const DtStateObject object,
const DtAbsoluteTime time 
) const
virtual

Create an removal packet for the object at the given time.

Implements MAKLogger::DtMessageState.

virtual void MAKLogger::DtLgrHlaMessageState::createUpdate ( const DtStateObject object,
const DtAbsoluteTime time,
std::list< DtPacket * > &  packetlist 
) const
virtual
virtual void MAKLogger::DtLgrHlaMessageState::deactivateState ( )
protectedvirtual

Deactivate the protocol specific state.

Implements MAKLogger::DtMessageState.

virtual void MAKLogger::DtLgrHlaMessageState::decodeCheckpoint ( const DtPacket packet,
DtMessageBuffer buffer,
bool  includeInteractions 
)
virtual

Decodes a checkpoint packet into a message buffer.

Implements MAKLogger::DtMessageState.

virtual void MAKLogger::DtLgrHlaMessageState::decodeInitialState ( const DtPacket packet,
DtMessageBuffer buffer 
)
virtual

Decode an initial state packet into a message buffer.

Implements MAKLogger::DtMessageState.

virtual void MAKLogger::DtLgrHlaMessageState::decodeLinkedCheckpoint ( const DtPacket packet,
DtMessageBuffer messageBuffer,
bool  includeInteractions 
)
virtual

Decode a linked checkpoint packet into a message buffer.

Implements MAKLogger::DtMessageState.

virtual size_t MAKLogger::DtLgrHlaMessageState::decodeState ( const char *  checkpointBuffer,
size_t  bufferSize,
const DtAbsoluteTime stateTime,
DtMessageBuffer messageBuffer,
bool  includeInteractions 
)
protectedvirtual

Decode packets from a checkpoint/initial state buffer.

Each generated packet is assigned the last update time from its stored state. Include interaction data (if present) as directed Return the number decoded of state packets.

MAKLogger::DtLgrHlaMessageState::DT_VIRTUAL_CTR_DEFAULTS ( DtLgrHlaMessageState  ,
(const DtLgrHlaSimulationManager *simMgr ,
(const DtLgrHlaSimulationManager *simMgr=0)   
)
virtual void MAKLogger::DtLgrHlaMessageState::fillWithStateData ( const DtMessageBuffer stateBuffer,
char *  data 
)
protectedvirtual

Fill the given data buffer with the contents of the state buffer.

virtual DtStateObject* MAKLogger::DtLgrHlaMessageState::findObject ( const DtHlaObject *  object)
virtual

Find the state object for a corresponding hla object.

Return values
0If no state object is found.
const DtBaseFomDesc* MAKLogger::DtLgrHlaMessageState::inputFom ( ) const
inline
virtual bool MAKLogger::DtLgrHlaMessageState::isInteractionMessage ( const DtPacket packet) const
virtual

Check to see if the state thinks this is an interaction.

Implements MAKLogger::DtMessageState.

virtual bool MAKLogger::DtLgrHlaMessageState::isRemovalMessage ( const DtPacket packet) const
virtual

Check to see if the state thinks this is an remove entity.

Implements MAKLogger::DtMessageState.

virtual bool MAKLogger::DtLgrHlaMessageState::isUpdateMessage ( const DtPacket packet) const
virtual

Check to see if the state thinks this is an udpate.

Implements MAKLogger::DtMessageState.

virtual DtLgrHlaHandle MAKLogger::DtLgrHlaMessageState::mapInteractionHandleInputToOutput ( DtLgrHlaHandle  handle) const
virtual

Map a Input interaction handle to an output handle.

virtual bool MAKLogger::DtLgrHlaMessageState::mapMessageHandles ( DtPacket packet) const
protectedvirtual
virtual DtLgrHlaHandle MAKLogger::DtLgrHlaMessageState::mapObjectHandleInputToOutput ( DtLgrHlaHandle  handle) const
virtual

Map a Input object handle to an output handle.

virtual DtLgrHlaHandle MAKLogger::DtLgrHlaMessageState::mapObjectHandleOutputToInput ( DtLgrHlaHandle  handle) const
virtual

Map a Output object handle to an input handle.

virtual void MAKLogger::DtLgrHlaMessageState::modifyMessage ( DtPacket packet) const
virtual

Modify the message.

Parameters
Input
packetthe packet to modify.
Output
packetthe packet to modify.

Implements MAKLogger::DtMessageState.

virtual void MAKLogger::DtLgrHlaMessageState::modifyMessages ( DtMessageBuffer messages) const
virtual

Modifies the messages.

Parameters
Output

Reimplemented from MAKLogger::DtMessageState.

DtLgrHlaMessageState& MAKLogger::DtLgrHlaMessageState::operator= ( const DtLgrHlaMessageState )
protected

Assignment operator not implemented.

const DtBaseFomDesc* MAKLogger::DtLgrHlaMessageState::outputFom ( ) const
inline
virtual void MAKLogger::DtLgrHlaMessageState::printMappingFailure ( const std::string &  classname,
const std::string &  message 
) const
protectedvirtual
virtual void MAKLogger::DtLgrHlaMessageState::setInputFom ( const DtBaseFomDesc inputFom)
virtual
virtual void MAKLogger::DtLgrHlaMessageState::setInputInfo ( const DtMessageIOInfo info)
virtual

Set the input info.

Will throw if info is not HLA protocol.

Reimplemented from MAKLogger::DtMessageState.

virtual void MAKLogger::DtLgrHlaMessageState::setOutputFom ( const DtBaseFomDesc outputFom)
virtual
virtual void MAKLogger::DtLgrHlaMessageState::setOutputInfo ( const DtMessageIOInfo info)
virtual

Sets the Input Io Info.

Reimplemented from MAKLogger::DtMessageState.

Member Data Documentation

const DtBaseFomDesc* MAKLogger::DtLgrHlaMessageState::myInputFom
protected
HandleMap MAKLogger::DtLgrHlaMessageState::myInteractionHandleMap
mutableprotected
std::set<std::string> MAKLogger::DtLgrHlaMessageState::myMutablePrintedMappingFailures
mutableprotected
HandleMap MAKLogger::DtLgrHlaMessageState::myObjectHandleMap
mutableprotected
const DtBaseFomDesc* MAKLogger::DtLgrHlaMessageState::myOutputFom
protected
HandleMap MAKLogger::DtLgrHlaMessageState::myReverseObjectHandleMap
mutableprotected

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

Document ID: Generated on Thu Dec 18 15:35:09 EST 2025 from SVN revision 282494
Copyright © 2024 MAK Technologies. All Rights Reserved (www.mak.com)