MAK Data Logger API Documentation for DIS
List of all members | Public Types | Public Member Functions | Public Attributes | Protected Types | Protected Member Functions | Protected Attributes
MAKLogger::DtLgrSimInterface Class Reference

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.
typedef int EntityTrackerUpdateId

Public Member Functions

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

Public Attributes

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

Protected Types

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

Protected Member Functions

void connectResponseHandlers ()
 Function which connects the response handlers.
virtual void connectResponseHandler (DtLgrCommandId, void(DtLgrSimInterface::*)(DtResponse))
 Utility function which connects a DtLgrSimInterface member function as a response handler.
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)

Protected Attributes

bool myConnectedFlag
bool myActivityFlag
bool myProcessRemoteControls
bool myRecordRemoteControls
bool myAllowAllRemoteControls
bool myAllowRemoteDelete
bool mySendResponses
bool myCrippleGui
bool myUseLegacyPdu
bool myUseBackChannel
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.
DtCommandDispatcherSP myDispatcher
 A shared pointer to the interface's dispatcher.

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 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.

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 DtString MAKLogger::DtLgrSimInterface::protocol ( ) const
pure virtual

Get the protocol as a string.

Implemented in MAKLogger::DtLgrDisSimInterface.

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::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::setRemoteControlSettings ( bool  process,
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::setScaleAttributes ( bool  scale) const
virtual

Send command to scale attributes.

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?

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

Use Legacy control PDU.

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
int MAKLogger::DtLgrSimInterface::myFilterCount
protected
FilterTypeList MAKLogger::DtLgrSimInterface::myFilterList
protected
DtTime MAKLogger::DtLgrSimInterface::myHeartbeatSendInterval
protected
bool MAKLogger::DtLgrSimInterface::myProcessRemoteControls
protected
bool MAKLogger::DtLgrSimInterface::myRecordRemoteControls
protected
int MAKLogger::DtLgrSimInterface::myRemoteControlId
protected
bool MAKLogger::DtLgrSimInterface::myScaleAttributes
protected
bool MAKLogger::DtLgrSimInterface::mySendResponses
protected
bool MAKLogger::DtLgrSimInterface::myUseBackChannel
protected
bool MAKLogger::DtLgrSimInterface::myUseLegacyPdu
protected

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

Document ID: Generated on Thu Apr 11 12:13:00 EDT 2013 from SVN revision 126011
Copyright © 2005-2012 VT MÄK. All Rights Reserved (www.mak.com)