MAK RTIspy API Documentation for HLA 1516
federationsViewMgr.h
Go to the documentation of this file.
00001 /*********************************************************************
00002 ** Copyright (c) 2008 MaK Technologies, Inc.
00003 ** All rights reserved.
00004 *********************************************************************/
00005 /*********************************************************************
00006 ** $RCSfile: federationsViewMgr.h,v $ $Revision: 1.16 $ $State: Exp $
00007 *********************************************************************/
00008 
00009 #ifndef federationsViewMgr_H_
00010 #define federationsViewMgr_H_
00011 
00014 
00015 #include "rtiMsConfig.h"
00016 #include "assistantMgr.h"
00017 #include "assistantInfo.h"
00018 #include "federationInfo.h"
00019 #include "assistantConnectionInfo.h"
00020 #include "assistantConnectionConfigurationInfo.h"
00021 #include "assistantExecObserveRspMsg.h"
00022 #include "assistantRidParamsMsg.h"
00023 #include "connectionAndConfiguration.h"
00024 #include <qwidget.h>
00025 #include <vlutil/vlSmartPointers.h>
00026 
00027 class DtRtiAssistantServer;
00028 class DtRtiAssistantPeer;
00029 class DtFederationsViewDialog;
00030 class DtAssistantComponentMgr;
00031 class DtAssistantConnectionInfoMgr;
00032 class DtAssistantRtiexecStartupDialog;
00033 class DtAssistantFederationsInfoMgr;
00034 class DtAssistantPreferencesInfoMgr;
00035 class DtAssistantTrayIconMgr;
00036 class DtAssistantConnQueryMgr;
00037 class DtAssistantLatencyTestMgr;
00038 
00041 class DT_DLL_ASSISTANTAPP DtAssistantFederationsViewMgr : public DtAssistantMgr
00042 {
00043    Q_OBJECT
00044 
00045 public:
00046 
00048    DtAssistantFederationsViewMgr( DtBoost::shared_ptr<DtRtiAssistantServer> server,
00049       DtBoost::shared_ptr<DtRtiAssistantPeer> peer,
00050       DtBoost::shared_ptr<DtAssistantPreferencesInfoMgr> prefMgr,
00051       DtBoost::shared_ptr<DtAssistantComponentMgr> compMgr,
00052       DtBoost::shared_ptr<DtAssistantConnectionInfoMgr> connInfoMgr,
00053       DtBoost::shared_ptr<DtAssistantFederationsInfoMgr> fedInfoMgr,
00054       DtBoost::shared_ptr<DtAssistantTrayIconMgr> trayIconMgr,
00055       DtBoost::shared_ptr<DtAssistantConnQueryMgr> connQueryMgr,
00056       DtBoost::shared_ptr<DtAssistantLatencyTestMgr> latTestMgr,
00057       const MAKRti::DtFilename& configDir );
00058 
00060    ~DtAssistantFederationsViewMgr();
00061 
00062 private:
00063 
00065    DtAssistantFederationsViewMgr(DtAssistantFederationsViewMgr const& );
00066 
00068    DtAssistantFederationsViewMgr& operator= (DtAssistantFederationsViewMgr const& );
00069 
00070 public:
00071 
00073    virtual void tick();
00074 
00076    virtual void startShutdown();
00077 
00079    virtual bool dialogsVisible() const;
00080 
00082    void saveGuiState();
00083 
00086 
00087 
00089    static void processRidParamMsg( const DtAssistantRidParamsMsg& msg, void* usr );
00090 
00092    virtual void processRidParamMsg( const DtAssistantRidParamsMsg& msg );
00093 
00095 
00096 public slots:
00097 
00100 
00101 
00103    void showFederationsView();
00104 
00106    void changeViewedConnection( const DtRtiConnectionInfo& conn =
00107       DtRtiConnectionInfo::invalidConn() );
00108 
00110    void resignFederate( int, const QString& );
00111 
00113    void destroyFederation( const QString& );
00114 
00116    void showRtiexecWebSpy();
00117 
00119    void showFederateWebSpy( const QString& fedexName, int fedHandle );
00120 
00123    void sendRidParamRequest();
00124 
00126    void sendNetworkTestingEnableMsg( const QString& fedexName );
00127 
00129    void sendNetworkTestingDisableMsg( const QString& fedexName );
00130 
00132    void showLatencyTestDialog( const QString& fedexName, int fedHandle );
00133 
00135    void processFederationUpdate(const DtRtiConnectionInfo& conn, 
00136       const MAKRti::DtString& federationName);
00137 
00139    void processFederationRemoved(const DtRtiConnectionInfo& conn, 
00140       const MAKRti::DtString& federationName);
00141 
00143    void processFederateUpdated(const DtRtiConnectionInfo& conn, 
00144       const MAKRti::DtString& federationName,
00145       unsigned federateHandle);
00146 
00148    void processFederateRemoved(const DtRtiConnectionInfo& conn, 
00149       const MAKRti::DtString& federationName,
00150       unsigned federateHandle);
00151 
00153    void removeLoadingIndication(const DtRtiConnectionInfo& conn);
00154 
00156    void processViewedWebSpyInfoUpdated(const MAKRti::DtInetAddr& addr, int port);
00157 
00159    void saveToLog();
00160 
00162 
00163 
00165    void processConnectionsUpdate( const DtRtiConnectionAndConfiguration& conns );
00166 
00168    void processConnectionsRemoval( const DtRtiConnectionAndConfiguration& conns );
00169 
00170 signals:
00171 
00173    void federateRemovalTimeChanged( float period );
00174 
00175 protected:
00176 
00178    virtual void processConnectionRemoval( const DtRtiConnectionInfoDataPair& conn );
00179 
00181    void logConnectionInfo(std::ofstream& fileStrm);
00182 
00184    void logFederationInfo(std::ofstream& fileStrm, const DtFederationStateByNameMap* federations);
00185 
00187    void logFomInfo(std::ofstream& fileStrm, const std::list<MAKRti::DtString>* foms);
00188 
00190    void logFederateInfo(std::ofstream& fileStrm, const DtFederateInfoByHandleMap* federates);
00191 
00192 protected:
00193 
00195    DtBoost::shared_ptr<DtAssistantPreferencesInfoMgr> myPrefMgr;
00196 
00198    DtBoost::shared_ptr<DtAssistantComponentMgr> myCompMgr;
00199 
00201    DtBoost::shared_ptr<DtAssistantConnectionInfoMgr> myConnInfoMgr;
00202 
00204    DtBoost::shared_ptr<DtAssistantFederationsInfoMgr> myFedInfoMgr;
00205    
00207    DtBoost::shared_ptr<DtAssistantTrayIconMgr> myTrayIconMgr;
00208 
00210    DtBoost::shared_ptr<DtAssistantLatencyTestMgr> myLatTestMgr;
00211 
00213    DtRtiConnectionInfo myViewedConnection;
00214 
00216    MAKRti::DtInetAddr myViewedRtiexecWebServerIp;
00217 
00219    int myViewedRtiexecWebServerPort;
00220 
00222    DtFederationsViewDialog* myFederationsViewDialog;
00223 
00225    MAKRti::DtClock myClock;
00226 
00228    QString mySavedFile;
00229 };
00230 
00231 #endif //! federationViewMgr_H_
00232 

Document ID: Generated on Thu Jun 14 14:15:04 EDT 2012 from SVN revision 116116
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)