MAK RTIspy API Documentation for HLA 1516
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 <set>
17 #include <rtiMsConfig.h>
18 #include <vlutil/vlFilename.h>
20 #include "assistantMgr.h"
21 
23 class DtRtiAssistantPeer;
24 class DtAssistantMsg;
34 
38 {
39  Q_OBJECT
40 
41 public:
42 
44  DtAssistantForwarderCompInfoMgr( std::shared_ptr<DtRtiAssistantServer> server,
45  std::shared_ptr<DtRtiAssistantPeer> peer,
46  DtAssistantSignalRouter& signalRouter,
47  std::shared_ptr<DtAssistantComponentMgr> compMgr,
48  std::shared_ptr<DtAssistantConnectionInfoMgr> connInfoMgr );
49 
52 
53 private:
54 
57 
60 
61 public:
62 
64  virtual void tick();
65 
68  virtual bool isLocalForwarder(const DtRtiConnectionInfo& conn) const;
69 
72  virtual bool isRemoteForwarder(const DtRtiConnectionInfo& conn) const;
73 
75  virtual void requestSingleUpdateFromConnectedForwarders(int id);
76 
78  virtual void viewNetworkComponentsForConnection(const DtRtiConnectionInfo& conn);
79 
81  virtual const DtAssistantForwarderInfo* forwarderInfo(const DtRtiConnectionInfo& conn) const;
82 
84  const std::set<const DtAssistantForwarderInfo*> peerForwarderInfos(const DtRtiConnectionInfo& conn) const;
85 
87  virtual std::pair<DtRtiConnectionInfo, bool> forwarderConnectionInfo(const DtAssistantNetworkCompInfo& conn) const;
88 
90  virtual bool isObservedPeerOfViewedConnection(const DtRtiConnectionInfo& conn) const;
91 
93  virtual void updateObservedPeers(const DtRtiConnectionInfo& conn, bool addOrRemove);
94 
97  virtual int getPeerForwarders(const DtRtiConnectionInfo& conn, std::set<DtRtiConnectionInfo>& peers) const;
98 
100  virtual bool isPeerForwarder(const DtRtiConnectionInfo& conn, const DtRtiConnectionInfo& peerConn) const;
101 
104 
105  static void processForwarderObserveMsg( const DtAssistantStateObserveMsg& msg, void* usr );
107 
109  virtual void processForwarderObserveMsg( const DtAssistantStateObserveMsg& msg );
110 
113  static void processForwarderStateMsgForConnection(
114  const DtAssistantForwarderStateMsg& msg, void* usr );
115 
118  virtual void processForwarderStateMsgForConnection(
119  const DtAssistantForwarderStateMsg& msg );
120 
121  // Process state message, handle RTI command requests if any.
122  virtual void handleRtiCommands( const DtAssistantForwarderStateMsg& msg );
123 
125  static void processAssistantCommandMsg(const DtAssistantCommandMsg& msg, void* usr);
126 
128  virtual void processAssistantCommandMsg(const DtAssistantCommandMsg& msg);
130 
131 public slots:
132 
134  void processConnectionsUpdate( const DtRtiConnectionAndConfiguration& conns );
135 
137  void processConnectionsRemoval( const DtRtiConnectionAndConfiguration& conns );
138 
140  void sendAllForwarderInfo();
141 
144  void sendObserveForwarderMsgToPeer(bool shouldObserve = true);
145 
147  void sendObserveForwarderMsgForViewedPeers(bool shouldObserve = true);
148 
150  void federateRemovalTimeChanged( float val );
151 
153  void provideForwarderInfo(const DtRtiConnectionInfo& conn,
154  const DtAssistantForwarderInfo** info);
155 
157  void providePeerForwarderInfo(const DtRtiConnectionInfo&,
158  std::vector<DtAssistantForwarderInfo>*);
159 
160 signals:
161 
163  void forwarderAdded(const DtRtiConnectionInfo& conn);
164 
166  void forwarderConnUpdated(const DtRtiConnectionInfo& conn);
167 
169  void forwarderUpdated(const DtRtiConnectionInfo& conn);
170 
172  void forwarderRemoved(const DtRtiConnectionInfo& conn);
173 
174 protected:
175 
177  virtual void pruneTimedOutSingleUpdates();
178 
179 protected:
180 
181  typedef std::map< DtRtiConnectionInfo, DtAssistantInfoSet > DtConnectionToObserversMap;
182  typedef std::map< DtRtiConnectionInfo, DtAssistantForwarderInfo > DtForwarderStateByConnectionMap;
183 
185  std::shared_ptr<DtAssistantComponentMgr> myCompMgr;
186 
188  std::shared_ptr<DtAssistantConnectionInfoMgr> myConnInfoMgr;
189 
192 
196 
199 
202 
204  MAKRti::DtClock myClock;
205 
210 
213 
214  std::map<std::pair<int, MAKRti::DtTime>, std::map<int, MAKRti::DtString> > myRequestedRtiForwarderUpdates;
215 
219 
220  std::set<DtRtiConnectionInfo> myObservedPeerRtiForwarderSet;
221 
222 };
223 
224 
225 #endif
Compiles network component information from RTI Forwarders.
Definition: networkCompInfoMgr.h:37
The DtAssistantCommandMsg defines a wrapper for the messages sent to and from the Assistant to delive...
Definition: assistantCommandMsg.h:32
MAKRti::DtClock myClock
Clock used to determine if we need to resend lost messages.
Definition: networkCompInfoMgr.h:204
At startup all of the assistant manager classes will register their signals and slots with the signal...
Definition: assistantSignalRouter.h:29
DtRtiConnectionInfo myViewedRtiForwarder
The forwarder connection currently being viewed at this Assistant.
Definition: networkCompInfoMgr.h:191
This file contains the declaration of DtRtiConnectionInfo.
std::set< DtRtiConnectionInfo > myObservedPeerRtiForwarderSet
Definition: networkCompInfoMgr.h:220
Base class for assistant Messages.
Definition: assistantMsg.h:153
std::map< DtRtiConnectionInfo, DtAssistantForwarderInfo > DtForwarderStateByConnectionMap
Definition: networkCompInfoMgr.h:182
Stores information on a single component connected to a forwarder.
Definition: forwarderInfo.h:24
std::map< std::pair< int, MAKRti::DtTime >, std::map< int, MAKRti::DtString > > myRequestedRtiForwarderUpdates
Definition: networkCompInfoMgr.h:214
float myDefunctRemovalTime
Defunct removal time for dropped federates.
Definition: networkCompInfoMgr.h:212
Base class for all classes which perform management activities for the Assistant. ...
Definition: assistantMgr.h:31
This file contains the declaration of DtAssistantMgr.
DtRtiAssistantPeer manages the sharing of information between one Assistant to other Assistants using...
Definition: rtiAssistantPeer.h:82
Maintains lists of known RTI connections.
Definition: connInfoMgr.h:49
Manages the server connections of the RTI Assistant.
Definition: rtiAssistantServer.h:45
DtAssistantMgr & operator=(DtAssistantMgr const &)
Assignment not implemented – Assignment Not Allowed!
virtual void tick()
Performs tasks that need to be completed periodically.
Definition: assistantMgr.h:59
DtForwarderStateByConnectionMap myLocalForwarders
information on all local forwarders.
Definition: networkCompInfoMgr.h:201
The DtAssistantForwarderStateMsg defines a wrapper for the RTI Assistant forwarder state message sent...
Definition: assistantForwarderStateMsg.h:31
std::shared_ptr< DtAssistantComponentMgr > myCompMgr
The local RTI component manager.
Definition: networkCompInfoMgr.h:185
The DtAssistantStateObserveMsg defines a wrapper for the RTI Assistant message used by the Assistant ...
Definition: assistantStateObserveMsg.h:40
std::shared_ptr< DtAssistantConnectionInfoMgr > myConnInfoMgr
The connection info manager.
Definition: networkCompInfoMgr.h:188
#define DT_DLL_ASSISTANTAPP
Definition: rtiMsConfig.h:151
static const int theTimeToWaitForForwarderInfo
The time, in seconds, to wait for information from the remotely viewed RTI Forwarder before resending...
Definition: networkCompInfoMgr.h:218
Stores the information on an RTI connection and possibly matching configuration known by the Assistan...
Definition: connectionAndConfiguration.h:22
std::map< DtRtiConnectionInfo, DtAssistantInfoSet > DtConnectionToObserversMap
Definition: networkCompInfoMgr.h:181
DtConnectionToObserversMap myRemotelyViewedRtiForwarders
Local forwarder connections currently being viewed by remote Assistants, and the set of all Assistant...
Definition: networkCompInfoMgr.h:195
DtForwarderStateByConnectionMap myRemoteForwarders
information on all known remote forwarders.
Definition: networkCompInfoMgr.h:198
Processes information on each local RTI component that is connected to this Assistant.
Definition: componentMgr.h:38
Stores the current state of a single forwarder.
Definition: forwarderInfo.h:123
unsigned int myTimeStateUpdateInterval
The interval, in ms, at which local rtiForwarders should be requested to send updated time state info...
Definition: networkCompInfoMgr.h:209
Stores the information on an RTI connection known by the Assistant.
Definition: assistantConnectionInfo.h:36

Document ID: Generated on Sun Jul 20 16:15:30 EDT 2025 from SVN revision 277985
Copyright © 2005-2025 MAK Technologies Inc. All Rights Reserved (www.mak.com)