Implements a protocol independent Simulation manager. More...
Inheritance diagram for MAKLogger::DtLgrSimManager:
Collaboration diagram for MAKLogger::DtLgrSimManager: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 DtLgrFileInput * | openFileForInput (const DtString &filename) const =0 |
| Opens a file for reading. | |
| virtual DtLgrFileOutput * | openFileForCopying (const DtString &filename, const DtLgrFileInput *input) const =0 |
| Opens a file for writing using the settings of the input file. | |
| virtual DtLgrFileOutput * | openFileForOutput (const DtString &filename) const =0 |
| Opens a file for writing using the settings defined by the simulation. | |
| virtual DtLgrFileInput * | openPartialFileForCopying (const DtLgrFileOutput *output, DtFilePosition firstPacket, DtFilePosition lastPacket) const =0 |
| Opens a file for reading which is currently being recorded to. | |
| virtual DtMessageState * | createState () const =0 |
| Creates an empty state object. | |
| virtual const DtLgrSimInput * | input () const =0 |
| Get a simulation input. | |
| virtual DtLgrSimInput * | input ()=0 |
| Get a simulation input. | |
| virtual const DtLgrSimOutput * | output () const =0 |
| Get a simulation output. | |
| virtual DtLgrSimOutput * | output ()=0 |
| Get a simulation output. | |
| virtual const DtMessageState * | state () const =0 |
| Get a simulation state. | |
| virtual DtMessageState * | state ()=0 |
| Get a simulation state. | |
| virtual const DtTimeProvider * | timeProvider () 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 DtLgrEntityTracker * | entityTracker () |
| 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 DtLgrPacketFilter * | filterByIndex (int index) |
| Get filter by index. | |
| virtual const DtLgrPacketFilter * | filterByIndex (int index) const |
| Get filter by index. | |
Protected Types | |
|
typedef std::list < DtLgrPacketFilter * > | FilterList |
Protected Attributes | |
| int | myRemoteControlId |
| DtLgrEntityTracker * | myEntityTracker |
| bool | myIsTrackingEnabled |
| bool | myScaleAttributesFlag |
| FilterList | myFilterList |
|
std::map< DtString, DtLgrSimDriver::HeartbeatTimeRecord > | myHeartbeatIntervals |
|
std::map< DtString, DtLgrSimDriver::HeartbeatTimeRecord > | myTimeoutIntervals |
Implements a protocol independent Simulation manager.
| virtual int MAKLogger::DtLgrSimManager::addFilter | ( | DtLgrPacketFilter * | filter | ) | [virtual] |
Add filter.
Sim Manager now maintains ownership of filter.
| 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.
| -1 | If the filter was not found. |
| virtual DtAbsoluteTime MAKLogger::DtLgrSimManager::simTime | ( | ) | const [pure virtual] |
A function to det the current simulation time.
Implemented in MAKLogger::DtLgrBaseSimManager.