Public Member Functions | Protected Types | Protected Attributes
MAKLogger::DtLgrSimManager Class Reference

Implements a protocol independent Simulation manager. More...

+ Inheritance diagram for MAKLogger::DtLgrSimManager:
+ Collaboration diagram for MAKLogger::DtLgrSimManager:

List of all members.

Public Member Functions

virtual bool isConnected () const =0
 Returns number of connections.
virtual void tick ()=0
 A common method need for simulation managers to update the simulation.
virtual bool scaleAttributes () const
 Get whether attributes are scaled with time scaling.
virtual void setScaleAttributes (bool enable)
 Enable or Disable attribute scaling.
virtual DtLgrFileInputopenFileForInput (const DtString &filename) const =0
 Opens a file for reading.
virtual DtLgrFileOutputopenFileForCopying (const DtString &filename, const DtLgrFileInput *input) const =0
 Opens a file for writing using the settings of the input file.
virtual DtLgrFileOutputopenFileForOutput (const DtString &filename) const =0
 Opens a file for writing using the settings defined by the simulation.
virtual DtLgrFileInputopenPartialFileForCopying (const DtLgrFileOutput *output, DtFilePosition firstPacket, DtFilePosition lastPacket) const =0
 Opens a file for reading which is currently being recorded to.
virtual DtMessageStatecreateState () const =0
 Creates an empty state object.
virtual const DtLgrSimInputinput () const =0
 Get a simulation input.
virtual DtLgrSimInputinput ()=0
 Get a simulation input.
virtual const DtLgrSimOutputoutput () const =0
 Get a simulation output.
virtual DtLgrSimOutputoutput ()=0
 Get a simulation output.
virtual const DtMessageStatestate () const =0
 Get a simulation state.
virtual DtMessageStatestate ()=0
 Get a simulation state.
virtual const DtTimeProvidertimeProvider () const =0
 Get a time provider.
virtual bool activity () const =0
 Get if there is any activity this tick.
virtual DtAbsoluteTime simTime () const =0
 A function to det the current simulation time.
virtual int remoteControlId () const
 Get the remote control id.
virtual void setRemoteControlId (int id)
 Set the remote control id for this logger.
virtual void activateFilters (const DtMessageIOInfo *info)
 Activate sim filters.
virtual void deactivateFilters ()
 Deactivate sim filters.
virtual bool filter (DtPacket *packet)
 Check to see if the packet should be filtered.
virtual int addFilter (DtLgrPacketFilter *filter)
 Add filter.
virtual int removeFilter (const DtLgrPacketFilter *filter)
 Remove a filter.
virtual int filterCount () const
 Get the count of filters.
virtual int filterIndex (const DtLgrPacketFilter *filter) const
 Get the index of the given filter.
virtual void setHeartbeatIntervals (const std::map< DtString, DtLgrSimDriver::HeartbeatTimeRecord > &intervals)
virtual const std::map
< DtString,
DtLgrSimDriver::HeartbeatTimeRecord > & 
heartbeatIntervals () const
virtual void setTimeoutIntervals (const std::map< DtString, DtLgrSimDriver::HeartbeatTimeRecord > &intervals)
virtual const std::map
< DtString,
DtLgrSimDriver::HeartbeatTimeRecord > & 
timeoutIntervals () const
virtual void updateEntityTracker (const DtString &tracker)
 Update the driver's entity tracker to match argument.
virtual void setAllowEntityTracking (bool trackingEnabled)
 Set a flag that allows entity tracking or not (i.e., even if there is an entity tracker, controls if it is returned or not)
virtual DtLgrEntityTrackerentityTracker ()
 Get the current entity tracker, or null if none or tracking is disabled.
virtual void addTemporaryTrackedEntity (const DtString &name)
virtual void setEntityTracker (DtLgrEntityTracker *tracker)
 takes ownership
virtual void setConfigurationFileName (const DtString &filename)=0
virtual DtLgrPacketFilterfilterByIndex (int index)
 Get filter by index.
virtual const DtLgrPacketFilterfilterByIndex (int index) const
 Get filter by index.

Protected Types

typedef std::list
< DtLgrPacketFilter * > 
FilterList

Protected Attributes

int myRemoteControlId
DtLgrEntityTrackermyEntityTracker
bool myIsTrackingEnabled
bool myScaleAttributesFlag
FilterList myFilterList
std::map< DtString,
DtLgrSimDriver::HeartbeatTimeRecord
myHeartbeatIntervals
std::map< DtString,
DtLgrSimDriver::HeartbeatTimeRecord
myTimeoutIntervals

Detailed Description

Implements a protocol independent Simulation manager.


Member Function Documentation

virtual int MAKLogger::DtLgrSimManager::addFilter ( DtLgrPacketFilter filter) [virtual]

Add filter.

Sim Manager now maintains ownership of filter.

Returns:
The index added.
virtual int MAKLogger::DtLgrSimManager::filterIndex ( const DtLgrPacketFilter filter) const [virtual]

Get the index of the given filter.

If filter is not found, return -1.

virtual DtLgrFileOutput* MAKLogger::DtLgrSimManager::openFileForCopying ( const DtString &  filename,
const DtLgrFileInput input 
) const [pure virtual]

Opens a file for writing using the settings of the input file.

The simulation manager typically does NOT need to be connected for this to succeed.

Implemented in MAKLogger::DtLgrDisSimulationManager.

virtual DtLgrFileInput* MAKLogger::DtLgrSimManager::openFileForInput ( const DtString &  filename) const [pure virtual]

Opens a file for reading.

The simulation manager typically does NOT need to be connected for this to succeed. Must be opened in Sim Manager interface for protocol specific information.

Implemented in MAKLogger::DtLgrDisSimulationManager.

virtual DtLgrFileOutput* MAKLogger::DtLgrSimManager::openFileForOutput ( const DtString &  filename) const [pure virtual]

Opens a file for writing using the settings defined by the simulation.

Typically the simulation manager MUST be connected for this call to succeed. Must be opened in Sim Manager interface for protocol specific information.

Implemented in MAKLogger::DtLgrDisSimulationManager.

virtual int MAKLogger::DtLgrSimManager::remoteControlId ( ) const [virtual]

Get the remote control id.

This is used in conjunction with any logger specific simulation operations. For example sending and receiving remote control messages.

virtual int MAKLogger::DtLgrSimManager::removeFilter ( const DtLgrPacketFilter filter) [virtual]

Remove a filter.

This call deallocates the filter object.

Returns:
The index removed.
Return values:
-1If the filter was not found.
virtual DtAbsoluteTime MAKLogger::DtLgrSimManager::simTime ( ) const [pure virtual]

A function to det the current simulation time.

Returns:
The value returned is the current time of the 'simulation'.

Implemented in MAKLogger::DtLgrBaseSimManager.


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

Document ID: Generated on Tue Oct 11 19:41:03 EDT 2011 from SVN revision 107422
Copyright © 2005-2011 VT MÄK Inc. All Rights Reserved (www.mak.com)