MAK Data Logger API Documentation for DIS
List of all members | 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:

Public Member Functions

 DtLgrSimManager ()
virtual ~DtLgrSimManager ()
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 DtString &description) 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 const DtLgrEntityTrackerentityTracker () const
 Get the current entity tracker, or null if none or tracking is disabled.
virtual const std::vector
< DtString > & 
filterEntityList ()
 Get the list of filtered entity ID's that were set in the config file.
virtual void addTemporaryTrackedEntity (const DtString &name)
virtual void setEntityTracker (DtLgrEntityTracker *tracker)
 takes ownership
virtual void addToFilterEntityList (const std::vector< DtString > &nameList)
virtual void setConfigurationFileName (const DtString &filename)=0
virtual void initPlayback (DtLgrFileInput &input)
 Perform initialization before tape playback.
virtual void setEntitiesForRefresh (const DtLgrEntityTracker::EntryHandleSet &handleSet)
 Indicate/clear set of entities that need to be refreshed.
virtual const
DtLgrEntityTracker::EntryHandleSet
entitiesForRefresh () const
 Indicate/clear set of entities that need to be refreshed.
virtual void clearEntitiesForRefresh ()
 Indicate/clear set of entities that need to be refreshed.
virtual DtLgrPacketFilterfilterByIndex (int index)
 Get filter by index.
virtual const DtLgrPacketFilterfilterByIndex (int index) const
 Get filter by index.
virtual bool playbackFilesUseRandomAccess () const
 Set/Get flag indicating playback files opened to optimize random access (primarily for windows)
virtual void setPlaybackFilesUseRandomAccess (bool val)
 Set/Get flag indicating playback files opened to optimize random access (primarily for windows)

Protected Types

typedef std::list
< DtLgrPacketFilter * > 
FilterList

Protected Attributes

int myRemoteControlId
DtLgrEntityTrackermyEntityTracker
std::vector< DtString > myFilterEntityList
DtLgrEntityTracker::EntryHandleSet myEntitiesToRefresh
bool myIsTrackingEnabled
bool myScaleAttributesFlag
FilterList myFilterList
std::map< DtString,
DtLgrSimDriver::HeartbeatTimeRecord
myHeartbeatIntervals
std::map< DtString,
DtLgrSimDriver::HeartbeatTimeRecord
myTimeoutIntervals
bool myPlaybackFilesUseRandomAccess

Detailed Description

Implements a protocol independent Simulation manager.

Member Typedef Documentation

Constructor & Destructor Documentation

MAKLogger::DtLgrSimManager::DtLgrSimManager ( )
virtual MAKLogger::DtLgrSimManager::~DtLgrSimManager ( )
virtual

Member Function Documentation

virtual void MAKLogger::DtLgrSimManager::activateFilters ( const DtMessageIOInfo info)
virtual

Activate sim filters.

virtual bool MAKLogger::DtLgrSimManager::activity ( ) const
pure virtual

Get if there is any activity this tick.

Implemented in MAKLogger::DtLgrBaseSimManager.

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

Add filter.

Sim Manager now maintains ownership of filter.

Returns
The index added.
virtual void MAKLogger::DtLgrSimManager::addTemporaryTrackedEntity ( const DtString &  name)
virtual
virtual void MAKLogger::DtLgrSimManager::addToFilterEntityList ( const std::vector< DtString > &  nameList)
virtual
virtual void MAKLogger::DtLgrSimManager::clearEntitiesForRefresh ( )
virtual

Indicate/clear set of entities that need to be refreshed.

virtual DtMessageState* MAKLogger::DtLgrSimManager::createState ( ) const
pure virtual

Creates an empty state object.

Implemented in MAKLogger::DtLgrDisSimulationManager.

virtual void MAKLogger::DtLgrSimManager::deactivateFilters ( )
virtual

Deactivate sim filters.

virtual const DtLgrEntityTracker::EntryHandleSet& MAKLogger::DtLgrSimManager::entitiesForRefresh ( ) const
virtual

Indicate/clear set of entities that need to be refreshed.

virtual DtLgrEntityTracker* MAKLogger::DtLgrSimManager::entityTracker ( )
virtual

Get the current entity tracker, or null if none or tracking is disabled.

virtual const DtLgrEntityTracker* MAKLogger::DtLgrSimManager::entityTracker ( ) const
virtual

Get the current entity tracker, or null if none or tracking is disabled.

virtual bool MAKLogger::DtLgrSimManager::filter ( DtPacket packet)
virtual

Check to see if the packet should be filtered.

virtual DtLgrPacketFilter* MAKLogger::DtLgrSimManager::filterByIndex ( int  index)
virtual

Get filter by index.

virtual const DtLgrPacketFilter* MAKLogger::DtLgrSimManager::filterByIndex ( int  index) const
virtual

Get filter by index.

virtual int MAKLogger::DtLgrSimManager::filterCount ( ) const
virtual

Get the count of filters.

virtual const std::vector<DtString>& MAKLogger::DtLgrSimManager::filterEntityList ( )
virtual

Get the list of filtered entity ID's that were set in the config file.

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 const std::map<DtString, DtLgrSimDriver::HeartbeatTimeRecord>& MAKLogger::DtLgrSimManager::heartbeatIntervals ( ) const
virtual
virtual void MAKLogger::DtLgrSimManager::initPlayback ( DtLgrFileInput input)
virtual

Perform initialization before tape playback.

virtual const DtLgrSimInput* MAKLogger::DtLgrSimManager::input ( ) const
pure virtual

Get a simulation input.

Implemented in MAKLogger::DtLgrDisSimulationManager, and MAKLogger::DtLgrBaseSimManager.

virtual DtLgrSimInput* MAKLogger::DtLgrSimManager::input ( )
pure virtual

Get a simulation input.

Implemented in MAKLogger::DtLgrDisSimulationManager, and MAKLogger::DtLgrBaseSimManager.

virtual bool MAKLogger::DtLgrSimManager::isConnected ( ) const
pure virtual

Returns number of connections.

Implemented in MAKLogger::DtLgrDisSimulationManager.

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 DtString &  description 
) 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 DtLgrFileInput* MAKLogger::DtLgrSimManager::openPartialFileForCopying ( const DtLgrFileOutput output,
DtFilePosition  firstPacket,
DtFilePosition  lastPacket 
) const
pure virtual

Opens a file for reading which is currently being recorded to.

Implemented in MAKLogger::DtLgrDisSimulationManager.

virtual const DtLgrSimOutput* MAKLogger::DtLgrSimManager::output ( ) const
pure virtual

Get a simulation output.

Implemented in MAKLogger::DtLgrDisSimulationManager, and MAKLogger::DtLgrBaseSimManager.

virtual DtLgrSimOutput* MAKLogger::DtLgrSimManager::output ( )
pure virtual

Get a simulation output.

Implemented in MAKLogger::DtLgrDisSimulationManager, and MAKLogger::DtLgrBaseSimManager.

virtual bool MAKLogger::DtLgrSimManager::playbackFilesUseRandomAccess ( ) const
virtual

Set/Get flag indicating playback files opened to optimize random access (primarily for windows)

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 bool MAKLogger::DtLgrSimManager::scaleAttributes ( ) const
virtual

Get whether attributes are scaled with time scaling.

virtual void MAKLogger::DtLgrSimManager::setAllowEntityTracking ( bool  trackingEnabled)
virtual

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 void MAKLogger::DtLgrSimManager::setConfigurationFileName ( const DtString &  filename)
pure virtual
virtual void MAKLogger::DtLgrSimManager::setEntitiesForRefresh ( const DtLgrEntityTracker::EntryHandleSet handleSet)
virtual

Indicate/clear set of entities that need to be refreshed.

virtual void MAKLogger::DtLgrSimManager::setEntityTracker ( DtLgrEntityTracker tracker)
virtual

takes ownership

virtual void MAKLogger::DtLgrSimManager::setHeartbeatIntervals ( const std::map< DtString, DtLgrSimDriver::HeartbeatTimeRecord > &  intervals)
virtual
virtual void MAKLogger::DtLgrSimManager::setPlaybackFilesUseRandomAccess ( bool  val)
virtual

Set/Get flag indicating playback files opened to optimize random access (primarily for windows)

virtual void MAKLogger::DtLgrSimManager::setRemoteControlId ( int  id)
virtual

Set the remote control id for this logger.

virtual void MAKLogger::DtLgrSimManager::setScaleAttributes ( bool  enable)
virtual

Enable or Disable attribute scaling.

virtual void MAKLogger::DtLgrSimManager::setTimeoutIntervals ( const std::map< DtString, DtLgrSimDriver::HeartbeatTimeRecord > &  intervals)
virtual
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.

virtual const DtMessageState* MAKLogger::DtLgrSimManager::state ( ) const
pure virtual

Get a simulation state.

Implemented in MAKLogger::DtLgrDisSimulationManager.

virtual DtMessageState* MAKLogger::DtLgrSimManager::state ( )
pure virtual

Get a simulation state.

Implemented in MAKLogger::DtLgrDisSimulationManager.

virtual void MAKLogger::DtLgrSimManager::tick ( )
pure virtual

A common method need for simulation managers to update the simulation.

Implemented in MAKLogger::DtLgrDisSimulationManager, and MAKLogger::DtLgrBaseSimManager.

virtual const std::map<DtString, DtLgrSimDriver::HeartbeatTimeRecord>& MAKLogger::DtLgrSimManager::timeoutIntervals ( ) const
virtual
virtual const DtTimeProvider* MAKLogger::DtLgrSimManager::timeProvider ( ) const
pure virtual

Get a time provider.

Implemented in MAKLogger::DtLgrBaseSimManager.

virtual void MAKLogger::DtLgrSimManager::updateEntityTracker ( const DtString &  tracker)
virtual

Update the driver's entity tracker to match argument.

Member Data Documentation

DtLgrEntityTracker::EntryHandleSet MAKLogger::DtLgrSimManager::myEntitiesToRefresh
protected
DtLgrEntityTracker* MAKLogger::DtLgrSimManager::myEntityTracker
protected
std::vector<DtString> MAKLogger::DtLgrSimManager::myFilterEntityList
protected
FilterList MAKLogger::DtLgrSimManager::myFilterList
protected
std::map<DtString, DtLgrSimDriver::HeartbeatTimeRecord> MAKLogger::DtLgrSimManager::myHeartbeatIntervals
protected
bool MAKLogger::DtLgrSimManager::myIsTrackingEnabled
protected
bool MAKLogger::DtLgrSimManager::myPlaybackFilesUseRandomAccess
protected
int MAKLogger::DtLgrSimManager::myRemoteControlId
protected
bool MAKLogger::DtLgrSimManager::myScaleAttributesFlag
protected
std::map<DtString, DtLgrSimDriver::HeartbeatTimeRecord> MAKLogger::DtLgrSimManager::myTimeoutIntervals
protected

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

Document ID: Generated on Thu Apr 10 18:53:01 EDT 2014 from SVN revision 138105
Copyright © 2005-2012 VT MÄK. All Rights Reserved (www.mak.com)