MAK RTIspy API Documentation for HLA 1516
componentMgr.h
Go to the documentation of this file.
00001 /*********************************************************************
00002 ** Copyright (c) 2009 MaK Technologies, Inc.
00003 ** All rights reserved.
00004 *********************************************************************/
00005 /*********************************************************************
00006 ** $RCSfile: componentMgr.h,v $ $Revision: 1.16 $ $State: Exp $
00007 *********************************************************************/
00008 
00009 #ifndef componentMgr_H_
00010 #define componentMgr_H_
00011 
00014 
00015 #include "rtiMsConfig.h"
00016 #include "assistantMgr.h"
00017 #include "assistantConnectionInfo.h"
00018 #include "connectionAndConfiguration.h"
00019 #include "assistantConnectionConfigurationInfo.h"
00020 #include "assistantConnMsg.h"
00021 #include <rtiVersion.h>
00022 #include <vlutil/vlTime.h>
00023 
00024 class DtAssistantPreferencesInfoMgr;
00025 class DtAssistantLrcCompInfoMsg;
00026 class DtAssistantRtiexecCompInfoMsg;
00027 class DtAssistantShmExecCompInfoMsg;
00028 class DtAssistantWwwCompInfoMsg;
00029 class DtAssistantRtiForwarderCompInfoMsg;
00030 class DtAssistantExecStateMsg;
00031 class DtAssistantForwarderStateMsg;
00032 class DtAssistantSignalTickedMsg;
00033 class DtAssistantComponentInfo;
00034 
00035 typedef std::map< int, DtBoost::shared_ptr<DtAssistantComponentInfo> > DtIdToComponentInfoMap;
00036 
00042 class DT_DLL_ASSISTANTAPP DtAssistantComponentMgr : public DtAssistantMgr
00043 {
00044    Q_OBJECT
00045 
00046 public:
00047 
00049    DtAssistantComponentMgr( DtBoost::shared_ptr<DtRtiAssistantServer> server,
00050       DtBoost::shared_ptr<DtRtiAssistantPeer> peer,
00051       DtBoost::shared_ptr<DtAssistantPreferencesInfoMgr> prefMgr );
00052 
00054    virtual ~DtAssistantComponentMgr();
00055 
00056 private:
00057 
00059    DtAssistantComponentMgr(DtAssistantComponentMgr const& );
00060 
00062    DtAssistantComponentMgr& operator= (DtAssistantComponentMgr const& );
00063 
00064 public:
00065 
00066 
00069    virtual const DtAssistantComponentInfo* componentInfo( int compId ) const;
00070 
00072    virtual void updateComponent( int compId, const DtAssistantComponentInfo& comp );
00073 
00075    virtual const DtIdToComponentInfoMap& components() const;
00076 
00078    virtual const DtIdToComponentInfoMap& rtiexecComponents() const;
00079 
00081    virtual const DtIdToComponentInfoMap& lrcComponents() const;
00082 
00084    virtual const DtIdToComponentInfoMap& forwarderComponents() const;
00085 
00087    virtual const DtIdToComponentInfoMap& webServerComponents() const;
00088 
00091    virtual const DtIdToComponentInfoMap& sharedMemComponents() const;
00092 
00094    virtual MAKRti::DtString printLocalComponentList() const;
00095 
00097    virtual MAKRti::DtString printFederationList(const DtAssistantExecStateMsg& msg);
00098 
00100    virtual MAKRti::DtString printRtiExecComponentsList(std::map<int, MAKRti::DtString>& data) const;
00101 
00103    virtual MAKRti::DtString printForwarderComponentsList(const std::map<int, MAKRti::DtString>& data) const;
00104 
00105 protected:
00106 
00109 
00110 
00111    static void processConnMsg(const DtAssistantConnMsg& msg, void* usr);
00112 
00114    virtual void processConnMsg(const DtAssistantConnMsg& msg);
00115 
00117    virtual void processNewConnMsg(const DtAssistantConnMsg& msg);
00118 
00120    virtual void processCloseConnMsg(const DtAssistantConnMsg& msg);
00121 
00123    static void processLrcCompInfoMsg(const DtAssistantLrcCompInfoMsg& msg, void* usr);
00124 
00126    virtual void processLrcCompInfoMsg(const DtAssistantLrcCompInfoMsg& msg);
00127 
00129    static void processRtiexecCompInfoMsg(const DtAssistantRtiexecCompInfoMsg& msg, void* usr);
00130 
00132    virtual void processRtiexecCompInfoMsg(const DtAssistantRtiexecCompInfoMsg& msg);
00133 
00135    static void processRtiForwarderCompInfoMsg(const DtAssistantRtiForwarderCompInfoMsg& msg, void* usr);
00136 
00138    virtual void processRtiForwarderCompInfoMsg(const DtAssistantRtiForwarderCompInfoMsg& msg);
00139 
00141    static void processWwwCompInfoMsg(const DtAssistantWwwCompInfoMsg& msg, void* usr);
00142 
00144    virtual void processWwwCompInfoMsg(const DtAssistantWwwCompInfoMsg& msg);
00145 
00147 
00149    static void processSocketRemoval(int compId, const MAKRti::DtString& reason, void* usr);
00150 
00152    virtual void processSocketRemoval(int compId, const MAKRti::DtString& reason);
00153 
00154 signals:
00155 
00158 
00159    void lrcComponentAdded( int compId );
00160    void rtiexecComponentAdded( int compId );
00161    void forwarderComponentAdded( int compId );
00162    void webServerComponentAdded( int compId );
00163    void sharedMemComponentAdded( int compId );
00165 
00168 
00169    void lrcComponentRemoved( int compId );
00170    void rtiexecComponentRemoved( int compId );
00171    void forwarderComponentRemoved( int compId );
00172    void webServerComponentRemoved( int compId );
00173    void sharedMemComponentRemoved( int compId );
00175 
00178 
00179    void lrcComponentRemovedUnexpectedly( int compId );
00180    void rtiexecComponentRemovedUnexpectedly( int compId );
00181    void forwarderComponentRemovedUnexpectedly( int compId );
00182    void webServerComponentRemovedUnexpectedly( int compId );
00183    void sharedMemComponentRemovedUnexpectedly( int compId );
00185 
00188 
00189    void lrcComponentRenamed( int compId );
00190    void rtiexecComponentRenamed( int compId );
00191    void forwarderComponentRenamed( int compId );
00192    void webServerComponentRenamed( int compId );
00193    void sharedMemComponentRenamed( int compId );
00195 
00198 
00199    void lrcComponentConnected( int compId );
00200    void rtiexecComponentConnected( int compId );
00201    void forwarderComponentConnected( int compId );
00203 
00206 
00207    void lrcComponentDisconnected( int compId );
00208    void rtiexecComponentDisconnected( int compId );
00209    void forwarderComponentDisconnected( int compId );
00211 
00214 
00215    void lrcComponentUpdated( int compId );
00216    void rtiexecComponentUpdated( int compId );
00217    void forwarderComponentUpdated( int compId );
00218    void webServerComponentUpdated( int compId );
00219    void sharedMemComponentUpdated( int compId );
00221 
00223    void localFederateJoined( int compId,
00224       const MAKRti::DtString& federateType,
00225       const MAKRti::DtString& federateName,
00226       unsigned federateHandle,
00227       const MAKRti::DtString& federationName,
00228       unsigned federationHandle,
00229       DtHlaVersionId hlaVersion );
00230 
00232    void localFederateResigned( int compId );
00233 
00235    void forwarderHasRtiexec( int compId );
00236 
00238    void forwarderHasNoRtiexec( int compId );
00239 
00240 protected:
00241 
00243    DtBoost::shared_ptr<DtAssistantPreferencesInfoMgr> myPrefMgr;
00244 
00247 
00248    DtIdToComponentInfoMap myComponentsById;
00249 
00250    DtIdToComponentInfoMap myRtiExecComponentsById;
00251 
00252    DtIdToComponentInfoMap myLrcComponentsById;
00253 
00254    DtIdToComponentInfoMap myForwarderComponentsById;
00255 
00256    DtIdToComponentInfoMap myWebComponentsById;
00257 
00258    DtIdToComponentInfoMap mySharedMemComponentsById;
00260 
00262    DtClock myClock;
00263 };
00264 
00265 #endif

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)