MAK Data Logger API Documentation for HLA
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
lgrSimInterface.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 1992-2026 MAK Technologies, Inc
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #ifndef lgrSimInterface_H_
11 #define lgrSimInterface_H_
12 
13 #include <lgrCore/lgrCore.h>
14 #include <lgrCore/lgrInterface.h>
16 #include <lgrUtil/signalSlot.h>
18 
19 #include <vlutil/vlString.h>
20 #include <vlutil/vlTime.h>
21 #include <list>
22 
23 class DtExerciseConn;
24 
25 namespace MAKLogger
26 {
27  class DtLgrSimDriver;
28  class DtLgrSimCommandFactory;
29  class DtLgrPacketFilter;
30 
35  {
36  public:
37 
40 
41  public:
42 
45 
46 
48 
49  public:
50 
52  virtual ~DtLgrSimInterface();
53 
55  virtual DtLgrProtocolId protocolId() const = 0;
56 
58  virtual DtString protocolName() const;
59 
61  virtual void connect() const;
62 
64  virtual void connectToSharedExerciseConn(DtExerciseConn* exconn,
65  bool allowDrainInput,bool allowSetSimTime,bool allowUnsubscribe) const;
66 
68  virtual void disconnect() const;
69 
71  virtual void getLoggerName(DtString& name) const = 0;
72 
74  virtual bool isConnected() const;
75 
77  virtual void setDumpFilename(const DtString&);
78 
80  virtual bool processRemoteControls() const;
81 
84  virtual bool recordRemoteControls() const;
85 
87  virtual bool allowAllRemoteControls() const;
88 
90  virtual bool allowRemoteDelete() const;
91 
93  virtual int remoteControlId() const;
94 
96  virtual bool sendResponses() const;
97 
99  virtual bool crippleGui() const;
100 
102  virtual bool useLegacyPdu() const;
103 
105  virtual DtTime connectSendInterval() const;
106 
108  virtual DtTime heartbeatSendInterval() const;
109 
111  virtual bool useSimChannel() const;
112 
114  virtual bool useBackChannel() const;
115 
117  virtual const DtString& backChannelAddress() const;
118 
120  virtual int backChannelPort() const;
121 
123  virtual const DtString& backChannelInterface() const;
124 
126  virtual int backChannelTickBudget() const;
127 
129  virtual void setRemoteControlSettings(bool useSimChannel, bool useBackChannel, bool record,
130  bool allowDelete, bool allowAll, bool sendResponses, bool crippleGui, bool useLegacyPdu,
131  DtTime connectSendInterval, DtTime heartbeatSendInterval) const;
132 
134  virtual void addFilteredEntityName(const DtString& name) const;
135 
137  virtual void clearFilteredEntityNames() const;
138 
146  virtual void addFilter(DtLgrPacketFilter*) const;
147 
152  virtual void setFilterSettings(const DtLgrPacketFilter*) const;
153 
155  virtual int filterCount() const;
156 
159  virtual int filterIndex( const DtLgrPacketFilter* filter ) const;
160 
162  virtual void setScaleAttributes(bool scale) const;
163 
165  virtual bool scaleAttributes() const;
166 
168  virtual bool networkActivity() const;
169 
171  virtual void setSaveConnectionConfiguration(bool saveConnectConfig) const;
172 
174  virtual bool saveConnectConfiguration() const;
175 
177  virtual void setSaveIndexConfiguration(bool saveIndexConfig) const;
178 
180  virtual bool saveIndexConfiguration() const;
181 
183  virtual void setSaveProtocolConfiguration(bool saveProtocolConfig) const;
184 
186  virtual bool saveProtocolConfiguration() const;
187 
189  virtual void setListenWhenIdle(bool listen) const;
190 
192  virtual bool listenWhenIdle() const;
193 
195  virtual bool staticDROnPause() const;
196 
198  virtual void setStaticDROnPause(bool staticDRAlgorithm) const;
199 
202  virtual void setReactToSimulationManagement(bool react) const;
203 
206  virtual bool reactToSimulationManagement() const;
207 
209  DtLgrPacketFilter* filter(int index);
211  const DtLgrPacketFilter* filter(int index) const;
213 
215  virtual const DtLgrEntityTracker* entityTracker() const;
216 
218  virtual void addTemporaryTrackedEntity(const DtString& name) const;
219 
221  virtual bool connectionSettingsMatchInputFile( DtString& filename);
222 
224  virtual void useRecommendedSettings();
225 
227  virtual EntityTrackerUpdateId entityTrackerUpdateId() const;
228 
229  public:
230 
232  DtValueSignal<int> filterCountChangedSignal;
233 
235  DtValueSignal<bool> connectedStatusChangedSignal;
236 
238  DtValueSignal<bool> unableToConnectSignal;
239 
241  DtValueSignal<bool> activityChangedSignal;
242 
244  DtValueSignal<bool> crippleGuiChangedSignal;
245 
249  DtValueSignal<bool> simanRequestSaveAsSignal;
250 
251  protected:
252 
255  void connectResponseHandlers();
256 
259  virtual void connectResponseHandler(DtLgrCommandId,
260  void (DtLgrSimInterface::*)(DtResponse));
261 
263 
264  void updatedEntityTracker(DtResponse response);
265  void connected(DtResponse);
266  void disconnected(DtResponse);
267  void unableToConnect(DtResponse);
268  void lostConnection(DtResponse);
269  void filterAdded(DtResponse);
270  void filterRemoved(DtResponse);
271  void filterModified(DtResponse);
272  void remoteControlsChanged(DtResponse);
273  void activityChanged(DtResponse);
274  void scaleAttributesChanged(DtResponse);
275  void remoteControlIdChanged(DtResponse);
276  void backChannelConnectionChanged(DtResponse);
277  void saveConnectConfigurationChanged(DtResponse response);
278  void saveIndexConfigurationChanged(DtResponse response);
279  void saveProtocolConfigurationChanged(DtResponse response);
280  void listenWhenIdleChanged(DtResponse response);
281  void staticDROnPauseChanged(DtResponse response);
282  void reactToSimulationManagementChanged(DtResponse response);
283  void simanRequestSaveAs(DtResponse response);
285 
286 
287  protected:
288  bool myConnectedFlag;
289  bool myFailedConnectFlag;
290  bool myActivityFlag;
291  bool myRecordRemoteControls;
292  bool myAllowAllRemoteControls;
293  bool myAllowRemoteDelete;
294  bool mySendResponses;
295  bool myCrippleGui;
296  bool myUseLegacyPdu;
297  bool myUseSimChannel;
298  bool myUseBackChannel;
299  bool mySaveConnectConfiguration;
300  bool mySaveIndexConfiguration;
301  bool mySaveProtocolConfiguration;
302  bool myListenWhenIdle;
303  bool myStaticDROnPause;
304  bool myReactToSimulationManagement;
305  bool mySimanRequestSaveAsPending;
306  DtString myBackChannelAddress;
307  DtString myBackChannelInterface;
308  int myBackChannelPort;
309  int myBackChannelTickBudget;
310  DtTime myConnectSendInterval;
311  DtTime myHeartbeatSendInterval;
312 
313  bool myScaleAttributes;
314  int myFilterCount;
315  DtString myDumpFilename;
316  typedef std::list<DtLgrPacketFilter*> FilterTypeList;
317  FilterTypeList myFilterList;
318  DtLgrEntityTracker* myEntityTracker;
319  int myEntityTrackerUpdateId;
320  int myRemoteControlId;
321  };
322 
323 }
324 
325 #endif
int EntityTrackerUpdateId
Definition: lgrSimInterface.h:226
The class responsible for interfacing with the simulation in a protocol independent manner...
Definition: lgrSimInterface.h:34
#define DT_PURE_VIRTUAL_CTR(CLASS_NAME, ARG_TYPES_LIST)
Declare a pure virtual constructor.
Definition: virtualConstructor.h:138
Contains MAKLogger::DtSlot and MAKLogger::DtFunctionSlot and MAKLogger::DtMemberSlot and MAKLogger::S...
The base class for command interface which allows an interface to send and receive commands...
Definition: lgrInterface.h:33
The abstract interface for the class responsible for controlling the simulation.
Definition: lgrSimDriver.h:37
DtLgrSimCommandFactory Factory
The factory type of this object.
Definition: lgrSimInterface.h:39
std::list< DtLgrPacketFilter * > FilterTypeList
Definition: lgrSimInterface.h:316
Contains DT_VIRTUAL_CTR DT_VIRTUAL_CTR_DEFAULTS DT_VIRTUAL_COPY_ASSIGN DT_VIRTUAL_BASE_CTR DT_PURE_VI...
Base interface class for packet filters.
Definition: lgrPacketFilter.h:25
Contains MAKLogger::DtLgrEntityTracker class.
#define DT_DLL_LGRCORE
Definition: lgrCore.h:19
Indexes packets in a file.
Definition: lgrEntityTracker.h:32
unsigned char DtLgrProtocolId
Definition: lgrCommand.h:24
std::shared_ptr< const DtCommand > DtResponse
Definition: lgrCommand.h:175
DtLogger provides the core system structure and controls the execution model for the underlying objec...
Definition: logger.h:35
The factory responsible for creating simulation commands.
Definition: lgrSimCommandFactory.h:21
short DtLgrCommandId
Definition: lgrCommand.h:25
Contains MAKLogger::DtCommandInterface class.
Contains lgrCore library definitions.
Definition: signalSlot.h:164

Document ID: Generated on Tue Nov 17 15:25:07 EST 2026 from SVN revision 298446
Copyright © 2026 MAK Technologies. All Rights Reserved (www.mak.com)