MAK RTIspy API Documentation for HLA 1.3
federationsViewDialog.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2013 MaK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
6 
9 
10 #ifndef federationsViewDialog_H_
11 #define federationsViewDialog_H_
12 
13 #include "rtiMsConfig.h"
14 #include "ui_federationsViewDialogUI.h"
16 #include "federationInfo.h"
17 #include "forwarderInfo.h"
18 #include "assistantEnums.h"
19 #include <qtreewidget.h>
20 #include <map>
21 #include <vector>
22 #include <list>
23 
24 #include <vlutil/vlUtil.h>
25 #include <vlutil/vlTime.h>
26 
27 #include <qdir.h>
28 #include <qcombobox.h>
29 
30 class DtWidgetDialog;
31 class QSignalMapper;
32 class QProcess;
34 class QTextEdit;
35 class QSplitter;
36 class DtNetworkMapWidget;
37 class QTime;
40 class DtFederateTree;
42 class QLabel;
43 
45 {
46  Q_OBJECT
47 
48 public:
50  {
51  DtFederationsViewProcess = 0,
59  DtFederationsViewCommandLine
60  };
61 
64  const MAKRti::DtFilename& configDir,
65  QWidget* parent = 0,
66  Qt::WindowFlags flags = 0 );
67 
69  virtual ~DtFederationsViewDialog();
70 
72  virtual QSize sizeHint() const;
73 
75  virtual void tick();
76 
79  virtual void setConnectionIsLocal( const MAKRti::DtString& name, bool isLocal );
80 
82  virtual void checkAndAddMainForwarder(const MAKRti::DtString& hostname);
83 
85  virtual void checkAndAddLightweight(const MAKRti::DtString& hostname);
86 
88  virtual void addNetworkMapForwarderNode(const MAKRti::DtString& forwarderName);
89 
91  virtual void removeNetworkMapForwarderNode(const MAKRti::DtString& forwarderName);
92 
94  virtual void addNetworkMapRtiexecNode();
95 
97  virtual void removeNetworkMapRtiexecNode();
98 
100  virtual void addNetworkMapFederateNode( int fedHandle,
101  const MAKRti::DtString& federationName,
102  const MAKRti::DtString& processName, const MAKRti::DtString& fedType,
103  const MAKRti::DtString& fedName, bool notJoined = false,
104  bool isDropped = false);
105 
107  virtual void removeNetworkMapFederateNode(int fedHandle,
108  const MAKRti::DtString& federationName );
109 
111  void updateNetworkMapFederateNode( int fedHandle,
112  const MAKRti::DtString& federationName, int queueStatus,
113  bool disconnected, bool reconnecting, bool inErrorState = false );
114 
116  void refreshNetworkMap();
117 
119  virtual void clearData();
120 
122  virtual void setViewedConnectionDescription(const DtRtiConnectionInfo& conn);
123 
125  virtual void clearNetworkMap();
126 
128  virtual void enableCommands( bool enable );
129 
131  virtual void enableRtiExecShutdownCommand( bool enable );
132 
134  virtual void enableRtiForwarderShutdownCommand( bool enable );
135 
136  //virtual void refreshCommandsEnabled();
137 
139  virtual void displayLoadingIndication();
140 
142  virtual void removeLoadingIndication();
143 
145  void saveGuiConfiguration();
146 
147  Ui::FederationsViewDialog getUiImpl() const;
148 
149  // Ported from federationsViewDialog
154  virtual int addConnection( const MAKRti::DtString& name,
155  const DtRtiConnectionInfo& conn, bool isLocal );
156 
158  virtual void removeConnection( const MAKRti::DtString& name );
159 
162  virtual void updateFederations( const DtFederationStateByNameMap* federations,
163  const DtAssistantForwarderInfo* forwarderInfo );
164 
167  virtual void updateFederation( const DtAssistantFederationInfo* federation,
168  const DtAssistantForwarderInfo* forwarderInfo );
169 
171  virtual void removeFederation( const MAKRti::DtString& federationName );
172 
174  virtual void removeAllFederations();
175 
178  virtual void updateFederate( const DtAssistantFederateInfo& federate,
179  const DtAssistantForwarderInfo * forwarderInfo,
180  const MAKRti::DtString& federationName );
181 
184  virtual void removeFederate( int federateHandle, const MAKRti::DtString& federationName);
185 
188  void setupFederateTree();
189 
191  virtual void setFederateIdentifierType( DtFederateIdentifierType fedIdType );
192 
194  void selectFederate(const MAKRti::DtString& federation, int federateHandle,
195  const DtAssistantFederateInfo* fedInfo,
196  const DtAssistantNetworkCompInfo* netCompInfo);
197 
199  void selectDeadFederate(const MAKRti::DtString& federation,
200  const MAKRti::DtString& federateName, const DtAssistantNetworkCompInfo& newInfo);
201 
203  void selectRtiexec(const DtAssistantNetworkCompInfo* netCompInfo);
204 
206  void selectForwarder(const MAKRti::DtString& name);
207 
209  void selectPeerForwarder(const DtAssistantNetworkCompInfo* netCompInfo);
210 
212  void selectFederation(const DtAssistantFederationInfo*);
213 
215  void selectLightweight();
216 
217 public slots:
218 
221  void processConnectionSelection( int index, bool ignoreVisibility = false );
222 
224  void showHelpDialog();
225 
227  void processHelpDialogClose();
228 
230  void showEvent( QShowEvent* event );
231 
233  virtual void hideEvent( QHideEvent* event );
234 
236  void closeEvent(QCloseEvent* event);
237 
239  void keyPressEvent( QKeyEvent* event );
240 
242  void shutdownCurrentRtiexec();
243 
245  void shutdownCurrentRtiForwarder();
246 
248  void updateNetworkMap();
249 
251  void changeFederationColor( const QString & federationName,
252  const QColor & newColor );
253 
255  void enableFederationColors( bool enable );
256 
258  void setFederateIdentifierType( unsigned int fedIdType );
259 
261  void showSyncPointDialog();
262 
264  void showFederateStatsDialog();
265 
267  void showFomDialog();
268 
270  void enableOrDisableMenuActions( const DtRtiConnectionInfo& conn );
271 
273  void updateFederateRemovalTime( float period );
274 
276  void clearSelection();
277 
279  void updateFederateIcon();
280 
282  void showSelectedFederateRidParams();
283 
285  void showSelectedFederateLog();
286 
287 signals:
288 
290  void viewedConnectionChanged( const DtRtiConnectionInfo& conn );
292  void shutdownRtiexec();
293 
295  void shutdownForwarder();
296 
298  void aboutDialogRequested();
299 
301  void showPopup(const MAKRti::DtString&, const MAKRti::DtString&, const MAKRti::DtString&);
302 
304  void forceFederateResign( int, const QString& );
305 
307  void forceFederationDestroy( const QString& );
308 
310  void showRtiexecWebSpy();
311 
313  void showFederateWebSpy( const QString& fedexName, int fedHandle );
314 
316  void showRtiexecRidParams();
317 
319  void showForwarderRidParams();
320 
322  void showFederateRidParams(const MAKRti::DtString& federation, int federateHandle);
323 
325  void showRtiexecLog();
326 
328  void showForwarderLog();
329 
331  void showFederateLog(const MAKRti::DtString& federation, int federateHandle);
332 
334  void showLatencyTestDialog( const QString& fedexName, int fedHandle );
335 
337  void enableNetworkTesting( const QString& fedexName );
338 
340  void disableNetworkTesting( const QString& fedexName );
341 
344  void saveToLog();
345 
347  void showFederationsViewPreferences();
348 
350  void federateSelected(const MAKRti::DtString& federation, int federateHandle);
351 
353  void rtiexecSelected();
354 
356  void forwarderSelected(const MAKRti::DtString& name);
357 
359  void peerForwarderSelected(const MAKRti::DtString& name);
360 
362  void federationSelected(const MAKRti::DtString& name);
363 
365  void lightweightSelected();
366 
368  void showSyncPointDialog(const MAKRti::DtString& name);
369 
371  void showFederateStatsDialog(const MAKRti::DtString& federation,
372  int federateHandle);
373 
375  void defunctFederateRemoved(const MAKRti::DtString& federation,
376  int federateHandle);
377 
379  void showFomDialog(const MAKRti::DtString& federation, int federateHandle);
380 
381 protected:
382 
384  void showFederateInfo(const MAKRti::DtString& federation, int federateHandle,
385  const DtAssistantFederateInfo* fedInfo,
386  const DtAssistantNetworkCompInfo* netCompInfo );
388  void showDeadFederateInfo(const MAKRti::DtString& federation,
389  const MAKRti::DtString& federateName, bool isDropped, const DtAssistantNetworkCompInfo& newInfo );
390 
392  void showRtiexecInfo( const DtAssistantNetworkCompInfo* info );
393 
395  void showForwarderInfo( const DtRtiConnectionInfo& info );
396 
398  void showPeerForwarderInfo( const DtAssistantNetworkCompInfo* netCompInfo );
399 
403  void showFederationInfo( const DtAssistantFederationInfo* info, bool update );
404 
406  void showLightweightInfo( const DtRtiConnectionInfo& info );
407 
409  MAKRti::DtString selectedFederateId() const;
410 
412 
413 
414  void setupUI();
415 
417  void setupMenus();
418 
420  void connectSignals();
422 
424  void loadGuiConfiguration();
425 
426 protected:
427 
428  Ui::FederationsViewDialog myUiImpl;
429 
431 
433  QProcess* myHelpAssistant;
434 
437 
442  QToolBar* myToolBar;
444 
447 
449 
450 
451  QMenu* myFileMenu;
452  QAction* myCloseAction;
453  QAction* mySaveAction;
454 
456  QMenu* myViewMenu;
460 
466 
472 
482 
488 
490  QMenu* myToolsMenu;
491  QAction* myOptionsAction;
492 
494  QMenu* myHelpMenu;
495  QAction* myHelpAction;
496  QAction* myAboutAction;
497 
501 
504 
507 
509  static const QString theLoadingText;
510 
515 
518 
520  QDockWidget* myNetworkMapDock;
521  QDockWidget* mySelectedItemDock;
522 
525 
528 
531 
533  MAKRti::DtFilename myConfigDir;
534 
537 
538  // Ported from federationsViewDialog
539 
541  std::map< QString, DtRtiConnectionInfo > myConnsByName;
542 
545 
548 
550  QDockWidget* myFederationsViewDock;
551 
554 
556  {
562  DtNoSelectedNode
563  };
564 
567 
569  MAKRti::DtString mySelectedFederation;
570 
573 
575  MAKRti::DtString mySelectedFederateType;
576 
578  MAKRti::DtString mySelectedFederateName;
579 
581  MAKRti::DtFilename mySelectedFederateProcess;
582 
585 
587  static const MAKRti::DtFilename theConfigFilename;
588 
591 
592  static const QString theRtiexecLogEnabledText;
593  static const QString theRtiexecLogDisabledText;
594  static const QString theForwarderLogEnabledText;
595  static const QString theForwarderLogDisabledText;
597 
598 };
599 
600 #endif
601 
602 

Document ID: Generated on Tue May 7 16:26:47 EDT 2013 from SVN revision 126903
Copyright © 2005-2013 VT MÄK Inc. All Rights Reserved (www.mak.com)