MAK RTIspy API Documentation for HLA 1516
networkCompInfoMgr.h
Go to the documentation of this file.
1 /*********************************************************************
2 ** Copyright (c) 2011 MaK Technologies, Inc.
3 ** All rights reserved.
4 *********************************************************************/
5 /*********************************************************************
6 ** $RCSfile: networkCompInfoMgr.h,v $ $Revision: 1.16 $ $State: Exp $
7 *********************************************************************/
8 
9 #ifndef networkCompInfoMgr_H_
10 #define networkCompInfoMgr_H_
11 
14 
15 #include <map>
16 #include <rtiMsConfig.h>
17 #include <vlutil/vlFilename.h>
19 #include "assistantMgr.h"
20 
22 class DtRtiAssistantPeer;
23 class DtAssistantMsg;
32 
36 {
37  Q_OBJECT
38 
39 public:
40 
42  DtAssistantNetworkCompInfoMgr( DtBoost::shared_ptr<DtRtiAssistantServer> server,
43  DtBoost::shared_ptr<DtRtiAssistantPeer> peer,
44  DtAssistantSignalRouter& signalRouter,
45  DtBoost::shared_ptr<DtAssistantComponentMgr> compMgr,
46  DtBoost::shared_ptr<DtAssistantConnectionInfoMgr> connInfoMgr );
47 
50 
51 private:
52 
55 
58 
59 public:
60 
62  virtual void tick();
63 
66  virtual bool isLocalForwarder(const DtRtiConnectionInfo& conn) const;
67 
70  virtual bool isRemoteForwarder(const DtRtiConnectionInfo& conn) const;
71 
73  virtual void requestSingleUpdateFromConnectedForwarders(int id);
74 
76  virtual void viewNetworkComponentsForConnection(const DtRtiConnectionInfo& conn);
77 
79  virtual const DtAssistantForwarderInfo* forwarderInfo(const DtRtiConnectionInfo& conn) const;
80 
83 
84 
85  static void processForwarderObserveMsg( const DtAssistantStateObserveMsg& msg, void* usr );
86 
88  virtual void processForwarderObserveMsg( const DtAssistantStateObserveMsg& msg );
89 
92  static void processForwarderStateMsgForConnection(
93  const DtAssistantForwarderStateMsg& msg, void* usr );
94 
97  virtual void processForwarderStateMsgForConnection(
98  const DtAssistantForwarderStateMsg& msg );
99 
100  // Process state message, handle RTI command requests if any.
101  virtual void handleRtiCommands( const DtAssistantForwarderStateMsg& msg );
102 
104  static void processAssistantCommandMsg(const DtAssistantCommandMsg& msg, void* usr);
105 
107  virtual void processAssistantCommandMsg(const DtAssistantCommandMsg& msg);
109 
110 public slots:
111 
113  void processConnectionsUpdate( const DtRtiConnectionAndConfiguration& conns );
114 
116  void processConnectionsRemoval( const DtRtiConnectionAndConfiguration& conns );
117 
119  void sendAllForwarderInfo();
120 
123  void sendObserveForwarderMsg();
124 
126  void federateRemovalTimeChanged( float val );
127 
129  void provideForwarderInfo(const DtRtiConnectionInfo& conn,
130  const DtAssistantForwarderInfo** info);
131 
132 signals:
133 
135  void forwarderAdded(const DtRtiConnectionInfo& conn);
136 
138  void forwarderConnUpdated(const DtRtiConnectionInfo& conn);
139 
141  void forwarderUpdated(const DtRtiConnectionInfo& conn);
142 
144  void forwarderRemoved(const DtRtiConnectionInfo& conn);
145 
146 protected:
147 
149  virtual void pruneTimedOutSingleUpdates();
150 
151 protected:
152 
153  typedef std::map< DtRtiConnectionInfo, DtAssistantInfoSet > DtConnectionToObserversMap;
154  typedef std::map< DtRtiConnectionInfo, DtAssistantForwarderInfo > DtForwarderStateByConnectionMap;
155 
157  DtBoost::shared_ptr<DtAssistantComponentMgr> myCompMgr;
158 
160  DtBoost::shared_ptr<DtAssistantConnectionInfoMgr> myConnInfoMgr;
161 
164 
168 
171  std::set< DtRtiConnectionInfo > myRemotelyViewedConnectionsNeedingUpdate;
172 
175 
178 
180  MAKRti::DtClock myClock;
181 
186 
189 
190  std::map<std::pair<int, MAKRti::DtTime>, std::map<int, MAKRti::DtString> > myRequestedRtiForwarderUpdates;
191 
195 
196 };
197 
198 
199 #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)