![]() |
MAK RTIspy API Documentation for HLA 1.3
|
00001 /********************************************************************* 00002 ** Copyright (c) 2009 MaK Technologies, Inc. 00003 ** All rights reserved. 00004 *********************************************************************/ 00005 /********************************************************************* 00006 ** $RCSfile: latencyTestMgr.h,v $ $Revision: 1.4 $ $State: Exp $ 00007 *********************************************************************/ 00008 00009 #ifndef latencyTestMgr_H_ 00010 #define latencyTestMgr_H_ 00011 00014 00015 #include "rtiMsConfig.h" 00016 #include "assistantMgr.h" 00017 #include "componentMgr.h" 00018 #include "assistantInfo.h" 00019 00020 class DtRtiAssistantServer; 00021 class DtRtiAssistantPeer; 00022 class DtAveragedLatencyTestReport; 00023 class DtLatencyTestDialog; 00024 class DtAssistantLatencyReportMsg; 00025 class DtAssistantTestMgrStatusMsg; 00026 class DtAssistantChangeLatencyTestModeMsg; 00027 class DtRtiConnectionAndConfiguration; 00028 class DtAssistantConnectionInfoMgr; 00029 class DtAssistantPreferencesInfoMgr; 00030 class DtAssistantTrayIconMgr; 00031 class DtAssistantFederationsInfoMgr; 00032 00035 class DT_DLL_ASSISTANTAPP DtAssistantLatencyTestMgr : public DtAssistantMgr 00036 { 00037 Q_OBJECT 00038 00039 public: 00040 00042 DtAssistantLatencyTestMgr( DtBoost::shared_ptr<DtRtiAssistantServer> server, 00043 DtBoost::shared_ptr<DtRtiAssistantPeer> peer, 00044 DtBoost::shared_ptr<DtAssistantPreferencesInfoMgr> prefMgr, 00045 DtBoost::shared_ptr<DtAssistantComponentMgr> compMgr, 00046 DtBoost::shared_ptr<DtAssistantConnectionInfoMgr> connInfoMgr, 00047 DtBoost::shared_ptr<DtAssistantFederationsInfoMgr> fedInfoMgr, 00048 DtBoost::shared_ptr<DtAssistantTrayIconMgr> trayIconMgr ); 00049 00051 virtual ~DtAssistantLatencyTestMgr(); 00052 00053 private: 00054 00056 DtAssistantLatencyTestMgr(DtAssistantLatencyTestMgr const& ); 00057 00059 DtAssistantLatencyTestMgr& operator= (DtAssistantLatencyTestMgr const& ); 00060 00061 protected: 00062 00065 00066 00068 static void processLatencyTestResults( const DtAssistantLatencyReportMsg& msg, void* usr ); 00069 00071 virtual void processLatencyTestResults(const DtAssistantLatencyReportMsg& msg); 00072 00074 static void processTestMgrStatusUpdate( const DtAssistantTestMgrStatusMsg& msg, void* usr ); 00075 00078 virtual void processTestMgrStatusUpdate( const DtAssistantTestMgrStatusMsg& msg ); 00079 00081 static void processTestCommand( const DtAssistantChangeLatencyTestModeMsg& msg, void* usr ); 00082 00084 virtual void processTestCommand( const DtAssistantChangeLatencyTestModeMsg& msg ); 00085 00087 00089 bool getRtiexecConn( const DtAssistantMsg& msg, DtRtiConnectionInfoDataPair& exec ); 00090 00092 bool sendLatencyTestCommand( bool runTest, bool continuous, bool shouldHalt, 00093 bool observing ); 00094 00096 bool verifyNewTestCanBeRun(); 00097 00098 public slots: 00099 00102 void processConnectionsUpdate( const DtRtiConnectionAndConfiguration& conns ); 00103 00105 void processConnectionsRemoval( const DtRtiConnectionAndConfiguration& conns ); 00106 00108 void showLrcLatencyTestDialog( int id ); 00109 00111 void showRtiexecLatencyTestDialog( const DtRtiConnectionInfoDataPair&, 00112 unsigned int federationHdl, const MAKRti::DtString& federationName, 00113 unsigned int federateHdl); 00114 00117 void processLatencyTestObserve(); 00118 00120 void processLatencyTestDismiss(); 00121 00123 void initiateLatencyTest(); 00124 00126 void initiateContinuousLatencyTest(); 00127 00130 void haltContinuousLatencyTest(); 00131 00133 void renameComponent( int id ); 00134 00136 void removeLrcComponent( int id ); 00137 00139 void updateFederateTestStatus( const DtRtiConnectionInfo& conn, 00140 const MAKRti::DtString& federationName, unsigned federateHandle ); 00141 00143 void updateLatencyTestConfig( unsigned int interactionPeriod, 00144 unsigned int numInteractions, unsigned int payloadBytes ); 00145 00146 // Updates the period between latency test interactions 00147 void setLatencyTestInteractionPeriod( unsigned int ); 00148 00149 // Updates the number of interactions per latency test 00150 void setLatencyTestNumInteractions( unsigned int ); 00151 00152 // Updates the size of a latency test interaction payload in bytes 00153 void setLatencyTestPayloadBytes( unsigned int ); 00154 00155 protected: 00156 00158 DtBoost::shared_ptr<DtAssistantPreferencesInfoMgr> myPrefMgr; 00159 00161 DtBoost::shared_ptr<DtAssistantComponentMgr> myCompMgr; 00162 00164 DtBoost::shared_ptr<DtAssistantConnectionInfoMgr> myConnInfoMgr; 00165 00167 DtBoost::shared_ptr<DtAssistantFederationsInfoMgr> myFedInfoMgr; 00168 00170 DtBoost::shared_ptr<DtAssistantTrayIconMgr> myTrayIconMgr; 00171 00173 DtLatencyTestDialog* myLatencyTestDialog; 00174 00175 typedef std::map< DtRtiConnectionInfo, DtAssistantInfoSet > DtRtiexecToObserversMap; 00178 DtRtiexecToObserversMap myRemotelyObservedRtiexecs; 00179 00182 bool myTestViaRtiexec; 00183 00186 int myLrcCompId; 00187 00190 DtRtiConnectionInfo myRtiexecConn; 00191 00194 unsigned int myFederationHdl; 00195 00198 MAKRti::DtString myFederationName; 00199 00202 unsigned int myInitFederateHdl; 00203 00205 00206 unsigned int myInteractionPeriod; 00207 unsigned int myNumInteractions; 00208 unsigned int myPayloadBytes; 00210 00211 }; 00212 00213 #endif