MAK RTIspy API Documentation for HLA 1516
componentMgr.h
Go to the documentation of this file.
1 /*********************************************************************
2 ** Copyright (c) 2009 MaK Technologies, Inc.
3 ** All rights reserved.
4 *********************************************************************/
5 /*********************************************************************
6 ** $RCSfile: componentMgr.h,v $ $Revision: 1.16 $ $State: Exp $
7 *********************************************************************/
8 
9 #ifndef componentMgr_H_
10 #define componentMgr_H_
11 
14 
15 #include "rtiMsConfig.h"
16 #include "assistantMgr.h"
20 #include "assistantConnMsg.h"
21 #include <rtiVersion.h>
22 #include <vlutil/vlTime.h>
23 
26 class DtAssistantShmExecCompInfoMsg;
33 
34 typedef std::map< int, DtBoost::shared_ptr<DtAssistantComponentInfo> > DtIdToComponentInfoMap;
35 
42 {
43  Q_OBJECT
44 
45 public:
46 
48  DtAssistantComponentMgr( DtBoost::shared_ptr<DtRtiAssistantServer> server,
49  DtBoost::shared_ptr<DtRtiAssistantPeer> peer,
50  DtAssistantSignalRouter& signalRouter );
51 
53  virtual ~DtAssistantComponentMgr();
54 
55 private:
56 
59 
62 
63 public:
64 
65 
68  virtual const DtAssistantComponentInfo* componentInfo( int compId ) const;
69 
71  virtual const DtIdToComponentInfoMap& components() const;
72 
74  virtual const DtIdToComponentInfoMap& rtiexecComponents() const;
75 
77  virtual const DtIdToComponentInfoMap& lrcComponents() const;
78 
80  virtual const DtIdToComponentInfoMap& forwarderComponents() const;
81 
84  virtual const DtIdToComponentInfoMap& sharedMemComponents() const;
85 
87  virtual MAKRti::DtString printLocalComponentList() const;
88 
90  virtual MAKRti::DtString printFederationList(const DtAssistantExecStateMsg& msg);
91 
93  virtual MAKRti::DtString printRtiExecComponentsList(std::map<int, MAKRti::DtString>& data) const;
94 
96  virtual MAKRti::DtString printForwarderComponentsList(const std::map<int, MAKRti::DtString>& data) const;
97 
98 public slots:
99 
101  void updateComponent( int compId, const DtAssistantComponentInfo& comp );
102 
103 protected:
104 
107 
108 
109  static void processConnMsg(const DtAssistantConnMsg& msg, void* usr);
110 
112  virtual void processConnMsg(const DtAssistantConnMsg& msg);
113 
115  virtual void processNewConnMsg(const DtAssistantConnMsg& msg);
116 
118  virtual void processCloseConnMsg(const DtAssistantConnMsg& msg);
119 
121  static void processLrcCompInfoMsg(const DtAssistantLrcCompInfoMsg& msg, void* usr);
122 
124  virtual void processLrcCompInfoMsg(const DtAssistantLrcCompInfoMsg& msg);
125 
127  static void processRtiexecCompInfoMsg(const DtAssistantRtiexecCompInfoMsg& msg, void* usr);
128 
130  virtual void processRtiexecCompInfoMsg(const DtAssistantRtiexecCompInfoMsg& msg);
131 
133  static void processRtiForwarderCompInfoMsg(const DtAssistantRtiForwarderCompInfoMsg& msg, void* usr);
134 
136  virtual void processRtiForwarderCompInfoMsg(const DtAssistantRtiForwarderCompInfoMsg& msg);
137 
139 
141  static void processSocketRemoval(int compId, const MAKRti::DtString& reason, void* usr);
142 
144  virtual void processSocketRemoval(int compId, const MAKRti::DtString& reason);
145 
146 signals:
147 
150 
151  void lrcComponentAdded( const DtAssistantComponentInfo* );
152  void rtiexecComponentAdded( const DtAssistantComponentInfo* );
153  void forwarderComponentAdded( const DtAssistantComponentInfo* );
154  void sharedMemComponentAdded( const DtAssistantComponentInfo* );
156 
159 
160  void lrcComponentRemoved( const DtAssistantComponentInfo* );
161  void rtiexecComponentRemoved( const DtAssistantComponentInfo* );
162  void forwarderComponentRemoved( const DtAssistantComponentInfo* );
163  void sharedMemComponentRemoved( const DtAssistantComponentInfo* );
165 
168 
169  void lrcComponentRemovedUnexpectedly( const DtAssistantComponentInfo* );
170  void rtiexecComponentRemovedUnexpectedly( const DtAssistantComponentInfo* );
171  void forwarderComponentRemovedUnexpectedly( const DtAssistantComponentInfo* );
172  void sharedMemComponentRemovedUnexpectedly( const DtAssistantComponentInfo* );
174 
177 
178  void lrcComponentRenamed( const DtAssistantComponentInfo* );
179  void rtiexecComponentRenamed( const DtAssistantComponentInfo* );
180  void forwarderComponentRenamed( const DtAssistantComponentInfo* );
181  void sharedMemComponentRenamed( const DtAssistantComponentInfo* );
183 
186 
187  void lrcComponentConnected( const DtAssistantComponentInfo* );
188  void rtiexecComponentConnected( const DtAssistantComponentInfo* );
189  void forwarderComponentConnected( const DtAssistantComponentInfo* );
191 
194 
195  void lrcComponentDisconnected( const DtAssistantComponentInfo* );
196  void rtiexecComponentDisconnected( const DtAssistantComponentInfo* );
197  void forwarderComponentDisconnected( const DtAssistantComponentInfo* );
199 
202 
203  void lrcComponentUpdated( const DtAssistantComponentInfo* );
204  void rtiexecComponentUpdated( const DtAssistantComponentInfo* );
205  void forwarderComponentUpdated( const DtAssistantComponentInfo* );
206  void sharedMemComponentUpdated( const DtAssistantComponentInfo* );
208 
210  void localFederateJoined( const DtAssistantComponentInfo*,
211  const MAKRti::DtString& federateType,
212  const MAKRti::DtString& federateName,
213  unsigned federateHandle,
214  const MAKRti::DtString& federationName,
215  unsigned federationHandle,
216  DtHlaVersionId hlaVersion );
217 
219  void localFederateResigned( const DtAssistantComponentInfo* );
220 
222  void forwarderHasRtiexec( const DtAssistantComponentInfo* );
223 
225  void forwarderHasNoRtiexec( const DtAssistantComponentInfo* );
226 
227 protected:
228 
231 
233 
235 
237 
239 
242 
244  DtClock myClock;
245 };
246 
247 #endif

Document ID: Generated on Fri Mar 14 19:08:55 EDT 2014 from SVN revision 137085
Copyright © 2005-2014 VT MÄK Inc. All Rights Reserved (www.mak.com)