MAK RTIspy API Documentation for HLA 1516
assistant.h
Go to the documentation of this file.
00001 /*********************************************************************
00002 ** Copyright (c) 2008 MaK Technologies, Inc.
00003 ** All rights reserved.
00004 *********************************************************************/
00005 /*********************************************************************
00006 ** $RCSfile: assistant.h,v $ $Revision: 1.56 $ $State: Exp $
00007 *********************************************************************/
00008 
00009 #ifndef assistant_H_
00010 #define assistant_H_
00011 
00014 
00015 #include "rtiMsConfig.h"
00016 #include "assistantShutdownMsg.h"
00017 #include "assistantCommandMsg.h"
00018 #include "assistantShowDialogMsg.h"
00019 #include "rtiUtil.h"
00020 #include <vlutil/vlSmartPointers.h>
00021 
00022 class DtRtiAssistantServer;
00023 class DtRtiAssistantPeer;
00024 class DtRtiAssistantToAssistantClient;
00025 class DtAssistantMgr;
00026 class DtAssistantPreferencesInfoMgr;
00027 class DtAssistantPreferencesViewMgr;
00028 class DtAssistantComponentMgr;
00029 class DtAssistantConnectionInfoMgr;
00030 class DtAssistantConnQueryMgr;
00031 class DtAssistantLatencyTestMgr;
00032 class DtAssistantLicenseQueryMgr;
00033 class DtAssistantPopupMsgMgr;
00034 class DtAssistantTrayIconMgr;
00035 class DtAssistantFederationsViewMgr;
00036 class DtAssistantFederationsInfoMgr;
00037 class DtAssistantNetworkCompViewMgr;
00038 class DtAssistantNetworkCompInfoMgr;
00039 class DtAssistantFederateInfoDialogMgr;
00040 class DtSignalToCallbackMapper;
00041 class QApplication;
00042 class QTimer;
00043 
00051 class DT_DLL_ASSISTANTAPP DtRtiAssistant
00052 {
00053 public:
00054 
00056    DtRtiAssistant( int argc, char** argv, 
00057                    bool autoExit,
00058                    DtAssistantShowDialogMsg::DtAssistantShowDialogEnum showDialog = DtAssistantShowDialogMsg::DoNotShowDialog,
00059                    DtAssistantShutdownMsg::DtShutdownEnum shouldShutdown = DtAssistantShutdownMsg::DtDoNotShutdown,                   
00060                    const std::vector<DtRtiAssistantCommand>& commands = 
00061                                        std::vector<DtRtiAssistantCommand>());
00062    
00064    ~DtRtiAssistant();
00065 
00066 private:
00067    
00069    DtRtiAssistant(DtRtiAssistant const& );
00070 
00072    DtRtiAssistant& operator= (DtRtiAssistant const& );
00073 
00074 public:
00075 
00077    static void tick( void* usr );
00078    void tick();
00079 
00080 protected:
00081 
00085    virtual void initializeAssistantServer(int argc, char**argv, 
00086                                           DtAssistantShowDialogMsg::DtAssistantShowDialogEnum showDialog );
00087 
00091    virtual bool processCommands(DtAssistantShowDialogMsg::DtAssistantShowDialogEnum showDialog,
00092       DtAssistantShutdownMsg::DtShutdownEnum shouldShutdown,
00093       const std::vector<DtRtiAssistantCommand>& commands );
00094 
00095    
00101    virtual bool showDialogOnConnectedAssistant(DtAssistantShowDialogMsg::DtAssistantShowDialogEnum dialog);
00102 
00107    virtual void sendShutdownToConnectedAssistant(DtAssistantShutdownMsg::DtShutdownEnum shouldShutDown);
00108 
00109 
00114    virtual void sendCommandToConnectedAssistant( 
00115       const DtRtiAssistantCommand& command);
00116 
00121    virtual MAKRti::DtString sendInteractiveCommandToConnectedAssistant( const DtRtiAssistantCommand& command);
00122 
00127    virtual bool connectToAssistant();
00128 
00130 
00131 
00133    static void processAssistantShutdownMsg( const DtAssistantShutdownMsg& msg, void* usr );
00134 
00136    virtual void processAssistantShutdownMsg( const DtAssistantShutdownMsg& msg );
00137 
00139 
00141    static void processShutdown(void* usr);
00142 
00144    virtual void processShutdown( bool shouldConfirm );
00145 
00146 protected:
00147 
00148    typedef std::vector<DtAssistantMgr*> DtAssistantMgrVector;
00149 
00151    DtBoost::shared_ptr<DtRtiAssistantServer> myServer;
00152 
00154    DtBoost::shared_ptr<DtRtiAssistantPeer> myPeer;
00155 
00157    QApplication* myQApp;
00158 
00160 
00161 
00162 
00163    DtBoost::shared_ptr<DtAssistantComponentMgr> myCompMgr;
00164 
00167    DtBoost::shared_ptr<DtAssistantPreferencesInfoMgr> myPrefMgr;
00168 
00171    DtBoost::shared_ptr<DtAssistantConnectionInfoMgr> myConnInfoMgr;
00172 
00175    DtBoost::shared_ptr<DtAssistantFederationsInfoMgr> myFederationInfoMgr;
00176 
00179    DtBoost::shared_ptr<DtAssistantNetworkCompInfoMgr> myNetworkCompInfoMgr;
00180 
00182    DtBoost::shared_ptr<DtAssistantTrayIconMgr> myTrayIconMgr; 
00183 
00185    DtBoost::shared_ptr<DtAssistantPopupMsgMgr> myPopupMgr;
00186 
00189    DtBoost::shared_ptr<DtAssistantConnQueryMgr> myConnQueryMgr; 
00190 
00193    DtBoost::shared_ptr<DtAssistantLicenseQueryMgr> myLicQueryMgr;
00194 
00197    DtBoost::shared_ptr<DtAssistantLatencyTestMgr> myLatTestMgr;
00198 
00201    DtBoost::shared_ptr<DtAssistantPreferencesViewMgr> myPrefViewMgr;
00202 
00205    DtBoost::shared_ptr<DtAssistantFederationsViewMgr> myFederationViewMgr;
00206 
00209    DtBoost::shared_ptr<DtAssistantNetworkCompViewMgr> myNetworkCompViewMgr;
00211 
00214    DtBoost::shared_ptr<DtAssistantFederateInfoDialogMgr> myFederateInfoDialogMgr;
00216 
00218    DtAssistantMgrVector myManagers;
00219 
00221    DtSignalToCallbackMapper* myShutdownSignalMapper;
00222 
00224    DtSignalToCallbackMapper* myTickSignalMapper;
00225 
00227    QTimer* myTickTimer;
00228 
00230    int myServerPortNumber;
00231 
00233    int myClientPortNumber;
00234 
00237    bool myAutoExit;
00238 
00240    bool myShutdownInProgress;
00241 
00243    DtTime myExitTime;
00244 
00246    DtClock myClock;
00247 
00249    DtBoost::shared_ptr< DtFilePrinter > myLogPrinter;
00250 
00252    MAKRti::DtString myAssistantLogName;
00253 
00254 };
00255 
00256 #endif //! assistant_H_
00257 

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)