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

The class responsible for interfacing with the simulation in a protocol independent manner. More...

+ Inheritance diagram for MAKLogger::DtLgrSimInterface:
+ Collaboration diagram for MAKLogger::DtLgrSimInterface:

Public Types

typedef DtLgrSimCommandFactory Factory
 The factory type of this object. More...
 
typedef int EntityTrackerUpdateId
 

Public Member Functions

 DtLgrSimInterface (DtLogger &, const DtLgrSimDriver &)
 Ctr with Logger and driver for initialization of state. More...
 
virtual ~DtLgrSimInterface ()
 DTOR. More...
 
virtual DtLgrProtocolId protocolId () const =0
 Get the protocol ID. More...
 
virtual DtString protocolName () const
 Get the protocol as a string. More...
 
virtual void connect () const
 Send a command to connect. More...
 
virtual void connectToSharedExerciseConn (DtExerciseConn *exconn, bool allowDrainInput, bool allowSetSimTime, bool allowUnsubscribe) const
 Send a command to connect using a shared exercise connection. More...
 
virtual void disconnect () const
 Send a command to disconnect. More...
 
virtual void getLoggerName (DtString &name) const =0
 Get a descriptive name for this logger instance. More...
 
virtual bool isConnected () const
 Check to see if the logger is currently connected. More...
 
virtual void setDumpFilename (const DtString &)
 Set the dump filename. More...
 
virtual bool processRemoteControls () const
 Get whether remote control messages are processed. More...
 
virtual bool recordRemoteControls () const
 Get whether remote control messages are recorded in the logger tape. More...
 
virtual bool allowAllRemoteControls () const
 Get whether remote control messages are processed regardless of site ID. More...
 
virtual bool allowRemoteDelete () const
 Allow the delete file message to be processed. More...
 
virtual int remoteControlId () const
 Remote control ID. More...
 
virtual bool sendResponses () const
 Send responses to remote controller? More...
 
virtual bool crippleGui () const
 Cripple GUI interaction (e.g., mouse clicks and minimize window) More...
 
virtual bool useLegacyPdu () const
 Use Legacy control PDU. More...
 
virtual DtTime connectSendInterval () const
 Connect messages are sent using this interval. More...
 
virtual DtTime heartbeatSendInterval () const
 Logger heartbeat messages are sent using this interval. More...
 
virtual bool useSimChannel () const
 Use the sim channel connection for remote control? More...
 
virtual bool useBackChannel () const
 Use the back channel connection for remote control? More...
 
virtual const DtString & backChannelAddress () const
 Back channel connection address. More...
 
virtual int backChannelPort () const
 Back Channel port. More...
 
virtual const DtString & backChannelInterface () const
 Back Channel interface. More...
 
virtual void setRemoteControlSettings (bool useSimChannel, bool useBackChannel, bool record, bool allowDelete, bool allowAll, bool sendResponses, bool crippleGui, bool useLegacyPdu, DtTime connectSendInterval, DtTime heartbeatSendInterval) const
 Change how remote control settings. More...
 
virtual void addFilteredEntityName (const DtString &name) const
 Add a filtered entity name. More...
 
virtual void clearFilteredEntityNames () const
 Clear filtered entity names. More...
 
virtual void addFilter (DtLgrPacketFilter *) const
 Install a new filter object. More...
 
virtual void setFilterSettings (const DtLgrPacketFilter *) const
 Set the filter settings using a copy of the filter. More...
 
virtual int filterCount () const
 Get the number of filters. More...
 
virtual int filterIndex (const DtLgrPacketFilter *filter) const
 Get the index of the given filter. More...
 
virtual void setScaleAttributes (bool scale) const
 Send command to scale attributes. More...
 
virtual bool scaleAttributes () const
 Get whether attributes are being scaled. More...
 
virtual bool networkActivity () const
 Get whether there was network activity during the last tick. More...
 
virtual void setSaveConnectionConfiguration (bool saveConnectConfig) const
 Sends the command to change save connection configuration. More...
 
virtual bool saveConnectConfiguration () const
 Return whether connection configuration should be saved. More...
 
virtual void setSaveIndexConfiguration (bool saveIndexConfig) const
 Sends the command to change save index configuration. More...
 
virtual bool saveIndexConfiguration () const
 Return whether index configuration should be saved. More...
 
virtual void setSaveProtocolConfiguration (bool saveProtocolConfig) const
 Sends the command to change save protocol configuration. More...
 
virtual bool saveProtocolConfiguration () const
 Return whether protocol configuration should be saved. More...
 
virtual void setListenWhenIdle (bool listen) const
 Sends the command to change switch to listen when idle. More...
 
virtual bool listenWhenIdle () const
 Return whether listen when idle is enabled. More...
 
virtual bool staticDROnPause () const
 Return whether Static Dead Reckon Algorithm when pause is enabled. More...
 
virtual void setStaticDROnPause (bool staticDRAlgorithm) const
 Set whether to swap Dead reckon algorithms when paused. More...
 
virtual const DtLgrEntityTrackerentityTracker () const
 Get the current entity tracker, or null if none. More...
 
virtual void addTemporaryTrackedEntity (const DtString &name) const
 Add a temporary name to the entity tracker. More...
 
virtual bool connectionSettingsMatchInputFile (DtString &filename)
 Check the connection settings in the Logger file meta data. More...
 
virtual void useRecommendedSettings ()
 Set connection settings to match those in the Logger file meta data. More...
 
virtual EntityTrackerUpdateId entityTrackerUpdateId () const
 
DtLgrPacketFilterfilter (int index)
 Get the filter by index. More...
 
const DtLgrPacketFilterfilter (int index) const
 Get the filter by index. More...
 
- Public Member Functions inherited from MAKLogger::DtCommandInterface
virtual ~DtCommandInterface ()
 Virtual Constructor. More...
 
virtual bool update ()
 Remove all all commands from response queue Update is responsible for updating all responses and synchronizing state. More...
 
void disconnectFromDispatcher ()
 Disconnects the interface from its dispatcher, this is for temporarily removing itself from the message queue. More...
 
void reconnectToDispatcher ()
 Reconnect the interface to its dispatcher. More...
 
void addResponseHandler (const DtCommand &command, DtResponseFunctorSP)
 
virtual void sendCommand (const DtCommand &) const
 Send a command to the interface's dispatcher. More...
 
bool executeResponse (DtResponse command)
 Execute a response. More...
 

Public Attributes

DtValueSignal< int > filterCountChangedSignal
 Response signals. More...
 
DtValueSignal< bool > connectedStatusChangedSignal
 Response signals. More...
 
DtValueSignal< bool > unableToConnectSignal
 Response signals. More...
 
DtValueSignal< bool > activityChangedSignal
 Response signal. More...
 
DtValueSignal< bool > crippleGuiChangedSignal
 Response signal. More...
 

Protected Types

typedef std::list
< DtLgrPacketFilter * > 
FilterTypeList
 
- Protected Types inherited from MAKLogger::DtCommandInterface
typedef std::map< DtCommand,
DtResponseFunctorSP, std::less
< DtCommand > > 
DtResponseMap
 Callback types. More...
 

Protected Member Functions

void connectResponseHandlers ()
 Function which connects the response handlers. More...
 
virtual void connectResponseHandler (DtLgrCommandId, void(DtLgrSimInterface::*)(DtResponse))
 Utility function which connects a DtLgrSimInterface member function as a response handler. More...
 
Response Handlers
void updatedEntityTracker (DtResponse response)
 
void connected (DtResponse)
 
void disconnected (DtResponse)
 
void unableToConnect (DtResponse)
 
void lostConnection (DtResponse)
 
void filterAdded (DtResponse)
 
void filterRemoved (DtResponse)
 
void filterModified (DtResponse)
 
void remoteControlsChanged (DtResponse)
 
void activityChanged (DtResponse)
 
void scaleAttributesChanged (DtResponse)
 
void remoteControlIdChanged (DtResponse)
 
void backChannelConnectionChanged (DtResponse)
 
void saveConnectConfigurationChanged (DtResponse response)
 
void saveIndexConfigurationChanged (DtResponse response)
 
void saveProtocolConfigurationChanged (DtResponse response)
 
void listenWhenIdleChanged (DtResponse response)
 
void staticDROnPauseChanged (DtResponse response)
 

Protected Attributes

bool myConnectedFlag
 
bool myFailedConnectFlag
 
bool myActivityFlag
 
bool myRecordRemoteControls
 
bool myAllowAllRemoteControls
 
bool myAllowRemoteDelete
 
bool mySendResponses
 
bool myCrippleGui
 
bool myUseLegacyPdu
 
bool myUseSimChannel
 
bool myUseBackChannel
 
bool mySaveConnectConfiguration
 
bool mySaveIndexConfiguration
 
bool mySaveProtocolConfiguration
 
bool myListenWhenIdle
 
bool myStaticDROnPause
 
DtString myBackChannelAddress
 
DtString myBackChannelInterface
 
int myBackChannelPort
 
DtTime myConnectSendInterval
 
DtTime myHeartbeatSendInterval
 
bool myScaleAttributes
 
int myFilterCount
 
DtString myDumpFilename
 
FilterTypeList myFilterList
 
DtLgrEntityTrackermyEntityTracker
 
int myEntityTrackerUpdateId
 
int myRemoteControlId
 
- Protected Attributes inherited from MAKLogger::DtCommandInterface
DtResponseMap myResponseMap
 
DtResponseQueueSP myResponseQueue
 The queue which stores commands sent to the interface from the dispatcher. More...
 
DtCommandDispatcherSP myDispatcher
 A shared pointer to the interface's dispatcher. More...
 

Detailed Description

The class responsible for interfacing with the simulation in a protocol independent manner.

Member Typedef Documentation

The factory type of this object.

Constructor & Destructor Documentation

MAKLogger::DtLgrSimInterface::DtLgrSimInterface ( DtLogger ,
const DtLgrSimDriver  
)

Ctr with Logger and driver for initialization of state.

Secondary constructor.

virtual MAKLogger::DtLgrSimInterface::~DtLgrSimInterface ( )
virtual

DTOR.

Member Function Documentation

void MAKLogger::DtLgrSimInterface::activityChanged ( DtResponse  )
protected
virtual void MAKLogger::DtLgrSimInterface::addFilter ( DtLgrPacketFilter ) const
virtual

Install a new filter object.

The filter object should be initialized, and allocated with 'new'. Ownership of the memory will be taken by the SimDriver. Access to the object should be completely lost as the object may pass through THREAD boundaries.

Warning
the filter object added NOT be returned to the interfaces.
Do not call functions on the filter object after it has been added. Instead use the fitler(index) and setFilterSettings interface.
virtual void MAKLogger::DtLgrSimInterface::addFilteredEntityName ( const DtString &  name) const
virtual

Add a filtered entity name.

virtual void MAKLogger::DtLgrSimInterface::addTemporaryTrackedEntity ( const DtString &  name) const
virtual

Add a temporary name to the entity tracker.

virtual bool MAKLogger::DtLgrSimInterface::allowAllRemoteControls ( ) const
virtual

Get whether remote control messages are processed regardless of site ID.

virtual bool MAKLogger::DtLgrSimInterface::allowRemoteDelete ( ) const
virtual

Allow the delete file message to be processed.

virtual const DtString& MAKLogger::DtLgrSimInterface::backChannelAddress ( ) const
virtual

Back channel connection address.

void MAKLogger::DtLgrSimInterface::backChannelConnectionChanged ( DtResponse  )
protected
virtual const DtString& MAKLogger::DtLgrSimInterface::backChannelInterface ( ) const
virtual

Back Channel interface.

virtual int MAKLogger::DtLgrSimInterface::backChannelPort ( ) const
virtual

Back Channel port.

virtual void MAKLogger::DtLgrSimInterface::clearFilteredEntityNames ( ) const
virtual

Clear filtered entity names.

virtual void MAKLogger::DtLgrSimInterface::connect ( ) const
virtual

Send a command to connect.

void MAKLogger::DtLgrSimInterface::connected ( DtResponse  )
protected
virtual bool MAKLogger::DtLgrSimInterface::connectionSettingsMatchInputFile ( DtString &  filename)
virtual

Check the connection settings in the Logger file meta data.

Reimplemented in MAKLogger::DtLgrDisSimInterface.

virtual void MAKLogger::DtLgrSimInterface::connectResponseHandler ( DtLgrCommandId  ,
void(DtLgrSimInterface::*)(DtResponse  
)
protectedvirtual

Utility function which connects a DtLgrSimInterface member function as a response handler.

void MAKLogger::DtLgrSimInterface::connectResponseHandlers ( )
protected

Function which connects the response handlers.

This is called from the constructor and thus not virtual.

virtual DtTime MAKLogger::DtLgrSimInterface::connectSendInterval ( ) const
virtual

Connect messages are sent using this interval.

virtual void MAKLogger::DtLgrSimInterface::connectToSharedExerciseConn ( DtExerciseConn exconn,
bool  allowDrainInput,
bool  allowSetSimTime,
bool  allowUnsubscribe 
) const
virtual

Send a command to connect using a shared exercise connection.

virtual bool MAKLogger::DtLgrSimInterface::crippleGui ( ) const
virtual

Cripple GUI interaction (e.g., mouse clicks and minimize window)

virtual void MAKLogger::DtLgrSimInterface::disconnect ( ) const
virtual

Send a command to disconnect.

void MAKLogger::DtLgrSimInterface::disconnected ( DtResponse  )
protected
virtual const DtLgrEntityTracker* MAKLogger::DtLgrSimInterface::entityTracker ( ) const
virtual

Get the current entity tracker, or null if none.

virtual EntityTrackerUpdateId MAKLogger::DtLgrSimInterface::entityTrackerUpdateId ( ) const
virtual
DtLgrPacketFilter* MAKLogger::DtLgrSimInterface::filter ( int  index)

Get the filter by index.

const DtLgrPacketFilter* MAKLogger::DtLgrSimInterface::filter ( int  index) const

Get the filter by index.

void MAKLogger::DtLgrSimInterface::filterAdded ( DtResponse  )
protected
virtual int MAKLogger::DtLgrSimInterface::filterCount ( ) const
virtual

Get the number of filters.

virtual int MAKLogger::DtLgrSimInterface::filterIndex ( const DtLgrPacketFilter filter) const
virtual

Get the index of the given filter.

If filter is not found, return -1.

void MAKLogger::DtLgrSimInterface::filterModified ( DtResponse  )
protected
void MAKLogger::DtLgrSimInterface::filterRemoved ( DtResponse  )
protected
virtual void MAKLogger::DtLgrSimInterface::getLoggerName ( DtString &  name) const
pure virtual

Get a descriptive name for this logger instance.

Implemented in MAKLogger::DtLgrDisSimInterface.

virtual DtTime MAKLogger::DtLgrSimInterface::heartbeatSendInterval ( ) const
virtual

Logger heartbeat messages are sent using this interval.

virtual bool MAKLogger::DtLgrSimInterface::isConnected ( ) const
virtual

Check to see if the logger is currently connected.

virtual bool MAKLogger::DtLgrSimInterface::listenWhenIdle ( ) const
virtual

Return whether listen when idle is enabled.

void MAKLogger::DtLgrSimInterface::listenWhenIdleChanged ( DtResponse  response)
protected
void MAKLogger::DtLgrSimInterface::lostConnection ( DtResponse  )
protected
virtual bool MAKLogger::DtLgrSimInterface::networkActivity ( ) const
virtual

Get whether there was network activity during the last tick.

virtual bool MAKLogger::DtLgrSimInterface::processRemoteControls ( ) const
virtual

Get whether remote control messages are processed.

virtual DtLgrProtocolId MAKLogger::DtLgrSimInterface::protocolId ( ) const
pure virtual

Get the protocol ID.

Implemented in MAKLogger::DtLgrDisSimInterface.

virtual DtString MAKLogger::DtLgrSimInterface::protocolName ( ) const
virtual

Get the protocol as a string.

virtual bool MAKLogger::DtLgrSimInterface::recordRemoteControls ( ) const
virtual

Get whether remote control messages are recorded in the logger tape.

virtual int MAKLogger::DtLgrSimInterface::remoteControlId ( ) const
virtual

Remote control ID.

void MAKLogger::DtLgrSimInterface::remoteControlIdChanged ( DtResponse  )
protected
void MAKLogger::DtLgrSimInterface::remoteControlsChanged ( DtResponse  )
protected
virtual bool MAKLogger::DtLgrSimInterface::saveConnectConfiguration ( ) const
virtual

Return whether connection configuration should be saved.

void MAKLogger::DtLgrSimInterface::saveConnectConfigurationChanged ( DtResponse  response)
protected
virtual bool MAKLogger::DtLgrSimInterface::saveIndexConfiguration ( ) const
virtual

Return whether index configuration should be saved.

void MAKLogger::DtLgrSimInterface::saveIndexConfigurationChanged ( DtResponse  response)
protected
virtual bool MAKLogger::DtLgrSimInterface::saveProtocolConfiguration ( ) const
virtual

Return whether protocol configuration should be saved.

void MAKLogger::DtLgrSimInterface::saveProtocolConfigurationChanged ( DtResponse  response)
protected
virtual bool MAKLogger::DtLgrSimInterface::scaleAttributes ( ) const
virtual

Get whether attributes are being scaled.

void MAKLogger::DtLgrSimInterface::scaleAttributesChanged ( DtResponse  )
protected
virtual bool MAKLogger::DtLgrSimInterface::sendResponses ( ) const
virtual

Send responses to remote controller?

virtual void MAKLogger::DtLgrSimInterface::setDumpFilename ( const DtString &  )
virtual

Set the dump filename.

virtual void MAKLogger::DtLgrSimInterface::setFilterSettings ( const DtLgrPacketFilter ) const
virtual

Set the filter settings using a copy of the filter.

The filter supplied must be an existing filter in the internal list, received via filter(int).

Warning
A filter object
virtual void MAKLogger::DtLgrSimInterface::setListenWhenIdle ( bool  listen) const
virtual

Sends the command to change switch to listen when idle.

virtual void MAKLogger::DtLgrSimInterface::setRemoteControlSettings ( bool  useSimChannel,
bool  useBackChannel,
bool  record,
bool  allowDelete,
bool  allowAll,
bool  sendResponses,
bool  crippleGui,
bool  useLegacyPdu,
DtTime  connectSendInterval,
DtTime  heartbeatSendInterval 
) const
virtual

Change how remote control settings.

virtual void MAKLogger::DtLgrSimInterface::setSaveConnectionConfiguration ( bool  saveConnectConfig) const
virtual

Sends the command to change save connection configuration.

virtual void MAKLogger::DtLgrSimInterface::setSaveIndexConfiguration ( bool  saveIndexConfig) const
virtual

Sends the command to change save index configuration.

virtual void MAKLogger::DtLgrSimInterface::setSaveProtocolConfiguration ( bool  saveProtocolConfig) const
virtual

Sends the command to change save protocol configuration.

virtual void MAKLogger::DtLgrSimInterface::setScaleAttributes ( bool  scale) const
virtual

Send command to scale attributes.

virtual void MAKLogger::DtLgrSimInterface::setStaticDROnPause ( bool  staticDRAlgorithm) const
virtual

Set whether to swap Dead reckon algorithms when paused.

virtual bool MAKLogger::DtLgrSimInterface::staticDROnPause ( ) const
virtual

Return whether Static Dead Reckon Algorithm when pause is enabled.

void MAKLogger::DtLgrSimInterface::staticDROnPauseChanged ( DtResponse  response)
protected
void MAKLogger::DtLgrSimInterface::unableToConnect ( DtResponse  )
protected
void MAKLogger::DtLgrSimInterface::updatedEntityTracker ( DtResponse  response)
protected
virtual bool MAKLogger::DtLgrSimInterface::useBackChannel ( ) const
virtual

Use the back channel connection for remote control?

virtual bool MAKLogger::DtLgrSimInterface::useLegacyPdu ( ) const
virtual

Use Legacy control PDU.

virtual void MAKLogger::DtLgrSimInterface::useRecommendedSettings ( )
virtual

Set connection settings to match those in the Logger file meta data.

virtual bool MAKLogger::DtLgrSimInterface::useSimChannel ( ) const
virtual

Use the sim channel connection for remote control?

Member Data Documentation

DtValueSignal<bool> MAKLogger::DtLgrSimInterface::activityChangedSignal

Response signal.

DtValueSignal<bool> MAKLogger::DtLgrSimInterface::connectedStatusChangedSignal

Response signals.

DtValueSignal<bool> MAKLogger::DtLgrSimInterface::crippleGuiChangedSignal

Response signal.

DtValueSignal<int> MAKLogger::DtLgrSimInterface::filterCountChangedSignal

Response signals.

bool MAKLogger::DtLgrSimInterface::myActivityFlag
protected
bool MAKLogger::DtLgrSimInterface::myAllowAllRemoteControls
protected
bool MAKLogger::DtLgrSimInterface::myAllowRemoteDelete
protected
DtString MAKLogger::DtLgrSimInterface::myBackChannelAddress
protected
DtString MAKLogger::DtLgrSimInterface::myBackChannelInterface
protected
int MAKLogger::DtLgrSimInterface::myBackChannelPort
protected
bool MAKLogger::DtLgrSimInterface::myConnectedFlag
protected
DtTime MAKLogger::DtLgrSimInterface::myConnectSendInterval
protected
bool MAKLogger::DtLgrSimInterface::myCrippleGui
protected
DtString MAKLogger::DtLgrSimInterface::myDumpFilename
protected
DtLgrEntityTracker* MAKLogger::DtLgrSimInterface::myEntityTracker
protected
int MAKLogger::DtLgrSimInterface::myEntityTrackerUpdateId
protected
bool MAKLogger::DtLgrSimInterface::myFailedConnectFlag
protected
int MAKLogger::DtLgrSimInterface::myFilterCount
protected
FilterTypeList MAKLogger::DtLgrSimInterface::myFilterList
protected
DtTime MAKLogger::DtLgrSimInterface::myHeartbeatSendInterval
protected
bool MAKLogger::DtLgrSimInterface::myListenWhenIdle
protected
bool MAKLogger::DtLgrSimInterface::myRecordRemoteControls
protected
int MAKLogger::DtLgrSimInterface::myRemoteControlId
protected
bool MAKLogger::DtLgrSimInterface::mySaveConnectConfiguration
protected
bool MAKLogger::DtLgrSimInterface::mySaveIndexConfiguration
protected
bool MAKLogger::DtLgrSimInterface::mySaveProtocolConfiguration
protected
bool MAKLogger::DtLgrSimInterface::myScaleAttributes
protected
bool MAKLogger::DtLgrSimInterface::mySendResponses
protected
bool MAKLogger::DtLgrSimInterface::myStaticDROnPause
protected
bool MAKLogger::DtLgrSimInterface::myUseBackChannel
protected
bool MAKLogger::DtLgrSimInterface::myUseLegacyPdu
protected
bool MAKLogger::DtLgrSimInterface::myUseSimChannel
protected
DtValueSignal<bool> MAKLogger::DtLgrSimInterface::unableToConnectSignal

Response signals.


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

Document ID: Generated on Thu Jul 14 15:45:33 EDT 2022 from SVN revision 244827
Copyright © 2021 MAK Technologies. All Rights Reserved (www.mak.com)