![]() |
MAK RTIspy API Documentation for HLA 1.3
|
00001 /********************************************************************* 00002 ** Copyright (c) 2008 MaK Technologies, Inc. 00003 ** All rights reserved. 00004 *********************************************************************/ 00005 /********************************************************************* 00006 ** $RCSfile: networkCompViewMgr.h,v $ $Revision: 1.11 $ $State: Exp $ 00007 *********************************************************************/ 00008 00009 #ifndef rtiNetworkComponentViewMgr_H_ 00010 #define rtiNetworkComponentViewMgr_H_ 00011 00014 00015 #include "rtiMsConfig.h" 00016 #include "assistantMgr.h" 00017 #include "assistantInfo.h" 00018 #include "assistantConnectionInfo.h" 00019 #include "forwarderInfo.h" 00020 #include <qwidget.h> 00021 #include <vlutil/vlSmartPointers.h> 00022 00023 class DtRtiAssistantServer; 00024 class DtRtiAssistantPeer; 00025 class DtRtiNetworkComponentViewDialog; 00026 class DtForwarderConnStatusDialog; 00027 class DtRtiConnectionInfo; 00028 class DtAssistantInfo; 00029 class DtAssistantTimeStateMsg; 00030 class DtAssistantSyncPtUpdateMsg; 00031 class DtAssistantTestMgrStatusMsg; 00032 class DtAssistantCommandMsg; 00033 class DtAssistantDeleteFederateMsg; 00034 class DtAssistantDeleteFederationMsg; 00035 class DtAssistantComponentMgr; 00036 class DtAssistantForwarderStateMsg; 00037 class DtAssistantStateObserveMsg; 00038 class DtRtiConnectionAndConfiguration; 00039 class DtAssistantConnectionInfoMgr; 00040 class DtAssistantExecObserveRspMsg; 00041 class DtAssistantNotifyMsg; 00042 class DtAssistantLogMsg; 00043 class DtAssistantAwaitingForwardersMsg; 00044 class DtAssistantPreferencesInfoMgr; 00045 class DtAssistantFederationsInfoMgr; 00046 class DtAssistantNetworkCompInfoMgr; 00047 class DtAssistantTrayIconMgr; 00048 class QSignalMapper; 00049 00053 class DT_DLL_ASSISTANTAPP DtAssistantNetworkCompViewMgr : public DtAssistantMgr 00054 { 00055 Q_OBJECT 00056 00057 public: 00058 00060 DtAssistantNetworkCompViewMgr( DtBoost::shared_ptr<DtRtiAssistantServer> server, 00061 DtBoost::shared_ptr<DtRtiAssistantPeer> peer, 00062 DtBoost::shared_ptr<DtAssistantComponentMgr> compMgr, 00063 DtBoost::shared_ptr<DtAssistantConnectionInfoMgr> connInfoMgr, 00064 DtBoost::shared_ptr<DtAssistantFederationsInfoMgr> fedInfoMgr, 00065 DtBoost::shared_ptr<DtAssistantNetworkCompInfoMgr> netCompInfoMgr, 00066 DtBoost::shared_ptr<DtAssistantTrayIconMgr> trayIconMgr, 00067 const MAKRti::DtFilename& configDir ); 00068 00070 ~DtAssistantNetworkCompViewMgr(); 00071 00072 private: 00073 00075 DtAssistantNetworkCompViewMgr(DtAssistantNetworkCompViewMgr const& ); 00076 00078 DtAssistantNetworkCompViewMgr& operator= (DtAssistantNetworkCompViewMgr const& ); 00079 00080 public: 00081 00083 virtual void tick(); 00084 00086 virtual void startShutdown(); 00087 00089 virtual bool dialogsVisible() const; 00090 00092 void saveGuiState(); 00093 00096 00097 00099 static void processExecObserveRspMsg( const DtAssistantExecObserveRspMsg& msg, void* usr ); 00100 00102 virtual void processExecObserveRspMsg( const DtAssistantExecObserveRspMsg& msg ); 00103 00105 static void processRtiexecNotifyMsg( const DtAssistantNotifyMsg& msg, void* usr ); 00106 00108 virtual void processRtiexecNotifyMsg( const DtAssistantNotifyMsg& msg ); 00109 00111 static void processRtiexecLogMsg( const DtAssistantLogMsg& msg, void* usr ); 00112 00114 virtual void processRtiexecLogMsg( const DtAssistantLogMsg& msg ); 00115 00117 static void processAwaitingForwardersMsg( const DtAssistantAwaitingForwardersMsg& msg, void* usr ); 00118 00120 virtual void processAwaitingForwardersMsg( const DtAssistantAwaitingForwardersMsg& msg ); 00122 00123 public slots: 00124 00126 void showRtiNetworkComponentView(); 00127 00129 void changeViewedRtiForwarder( const DtRtiConnectionInfo& conn = 00130 DtRtiConnectionInfo::invalidConn() ); 00131 00133 virtual void sendLogRequest(); 00134 00136 void shutdownRtiexec(); 00137 00139 void shutdownRtiForwarder(); 00140 00142 void processForwarderAdded( const DtRtiConnectionInfo& conn ); 00143 00145 void processForwarderConnUpdated( const DtRtiConnectionInfo& conn ); 00146 00148 void processForwarderUpdated( const DtRtiConnectionInfo& conn ); 00149 00151 void processForwarderRemoved( const DtRtiConnectionInfo& conn ); 00152 00155 void processDoNotWaitForForwarders(QWidget* dlg); 00156 00159 void processShutDownWaitingForwarder(QWidget* dlg); 00160 00161 00162 signals: 00163 00165 void aboutDialogRequested(); 00166 00168 void showPopup(const MAKRti::DtString&, const MAKRti::DtString&, 00169 const MAKRti::DtString&); 00170 00171 protected: 00172 00173 typedef std::map< DtRtiConnectionInfo, DtAssistantInfoSet > DtConnectionToObserversMap; 00174 00176 DtBoost::shared_ptr<DtAssistantComponentMgr> myCompMgr; 00177 00179 DtBoost::shared_ptr<DtAssistantConnectionInfoMgr> myConnInfoMgr; 00180 00182 DtBoost::shared_ptr<DtAssistantFederationsInfoMgr> myFedInfoMgr; 00183 00185 DtBoost::shared_ptr<DtAssistantNetworkCompInfoMgr> myNetCompInfoMgr; 00186 00188 DtRtiConnectionInfo myViewedRtiForwarder; 00189 00191 DtRtiNetworkComponentViewDialog* myRtiNetworkComponentViewDialog; 00192 00194 MAKRti::DtClock myClock; 00195 00198 bool myReceivedRemoteForwarderInfo; 00199 00202 MAKRti::DtTime myRemoteForwarderInfoTimeout; 00203 00204 typedef std::map< DtRtiConnectionInfo, DtForwarderConnStatusDialog* > DtConnectionToFwStatusDialogMap; 00206 DtConnectionToFwStatusDialogMap myFwStatusDlgMap; 00207 00209 QSignalMapper* myFwStatusAcceptSigMapper; 00210 00212 QSignalMapper* myFwStatusRejectSigMapper; 00213 00216 static const int theUpdatePeriod; 00217 00219 static const unsigned theMaxLogLoadSize; 00220 }; 00221 00222 #endif //! networkComponentViewMgr_H_ 00223