MAK RTIspy API Documentation for HLA 1.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
netStatsObservationMgr.h
Go to the documentation of this file.
1 
2 #ifndef netStatsObservationMgr_h__
3 #define netStatsObservationMgr_h__
4 
5 #include "rtiMsConfig.h"
6 #include "assistantMgr.h"
7 #include <vlutil/vlSmartPointers.h>
8 #include "map"
9 #include "list"
10 #include "set"
11 #include <QtCore/QObject>
12 #include "assistantMsg.h"
13 #include "assistantNetStatsEnums.h"
14 
16 class DtRtiAssistantPeer;
17 class DtAssistantInfo;
20 
21 typedef std::map<int, unsigned int> DtIntervalMap;
22 typedef std::map<DtAssistantInfo, int> DtLrcCompIdByAssistantInfoMap;
23 typedef std::map<int, std::set<DtAssistantInfo> > DtAssistantInfoByLrcCompIdMap;
24 typedef std::map<int, bool> DtLrcNetStatsEnabledMap;
25 
27 {
28  Q_OBJECT
29 
30 public:
32  DtAssistantNetStatsObservationMgr(std::shared_ptr<DtRtiAssistantServer> server,
33  std::shared_ptr<DtRtiAssistantPeer> peer, DtAssistantSignalRouter& signalRouter,
34  DtAssistantObservationType observationType);
35 
38 
39 signals:
40  void sendLocalNetStatsObserveRsp(const DtAssistantInfo& observer, int compId, bool response);
41  void processPeerNetStatsInitStateReq(const DtAssistantInfo& observer, int compId);
42  void lrcNoLongerObserved(const DtAssistantInfo& observer, int compId);
43 
44 public:
45  void processObserveRequest(const DtAssistantInfo& observer, int compId,
46  bool observe, unsigned int interval, bool isLocalAssistant = false);
47  static void processNetStatsInitStateRequestMsg(
48  const DtAssistantNetStatsInitStateRequestMsg& msg, void* usr );
49  void processNetStatsInitStateRequestMsg(
51  const DtAssistantInfoByLrcCompIdMap& getObservingAssistantsMap() const;
52  void setLrcNetStatsEnabled(int lrcCompId, bool enabled);
53  void removeLrcNetStatsEnabled( int lrcCompId );
54  void forwardNetStatsUpdateToRemoteAstnt(const DtAssistantMsg & msg );
55  void federateDisconnected( int lrcCompId );
56  void sendNetStatsInitStateReq(const DtAssistantInfo& observer, int compId);
57 protected:
58  void addObserver(const DtAssistantInfo& observer, int compId, unsigned int interval);
59  void removeObserver(const DtAssistantInfo& observer, int compId);
60  void sendNetStatsObserveRsp(const DtAssistantInfo& observer, int compId, bool response);
61 
62  bool isLrcNetStatsEnabled(int lrcCompId);
63  bool updateIntervalMap(int compId, unsigned int interval);
64  void removeLrcFromIntervalMap(int compId);
65  bool addToMaps( const DtAssistantInfo& observer, int compId);
66  bool removeFromMaps( const DtAssistantInfo& observer, int compId);
67  void sanitizeMaps( int lrcCompId );
68  void removeAllObservers();
69  void messageCallbacks();
70 protected:
71 
73  // LRC compId for key, interval for value
78 // std::shared_ptr<DtRtiAssistantServer> myServer;
79 // std::shared_ptr<DtRtiAssistantPeer> myPeer;
80 
81 };
82 
83 #endif // netStatsObservationMgr_h__
DtAssistantInfoByLrcCompIdMap myObservingAssistantsByLrcCompId
Definition: netStatsObservationMgr.h:76
std::map< int, unsigned int > DtIntervalMap
Definition: netStatsObservationMgr.h:19
At startup all of the assistant manager classes will register their signals and slots with the signal...
Definition: assistantSignalRouter.h:29
Stores basic information about a remote assistant.
Definition: assistantInfo.h:96
DtIntervalMap myObservedIntervalsByLrcCompId
Definition: netStatsObservationMgr.h:74
Base class for assistant Messages.
Definition: assistantMsg.h:153
The DtAssistantNetStatsInitStateRequestMsg defines...
Definition: assistantNetStatsInitStateRequestMsg.h:22
DtAssistantObservationType myObservationType
Definition: netStatsObservationMgr.h:72
std::map< int, bool > DtLrcNetStatsEnabledMap
Definition: netStatsObservationMgr.h:24
DtAssistantObservationType
Definition: assistantNetStatsEnums.h:8
Base class for all classes which perform management activities for the Assistant. ...
Definition: assistantMgr.h:31
DtLrcCompIdByAssistantInfoMap myObservedLrcCompIdByAssistantCompId
Definition: netStatsObservationMgr.h:75
This file contains the declaration of DtAssistantMgr.
DtRtiAssistantPeer manages the sharing of information between one Assistant to other Assistants using...
Definition: rtiAssistantPeer.h:82
Manages the server connections of the RTI Assistant.
Definition: rtiAssistantServer.h:45
std::map< int, std::set< DtAssistantInfo > > DtAssistantInfoByLrcCompIdMap
Definition: netStatsObservationMgr.h:23
Definition: netStatsObservationMgr.h:26
#define DT_DLL_ASSISTANTAPP
Definition: rtiMsConfig.h:151
std::map< DtAssistantInfo, int > DtLrcCompIdByAssistantInfoMap
Definition: netStatsObservationMgr.h:22
DtLrcNetStatsEnabledMap myLrcNetStatsEnabled
Definition: netStatsObservationMgr.h:77

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)