MAK RTIspy API Documentation for HLA 1.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
netStatsConnMgr.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2012 MaK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
6 #ifndef netStatsConnMgr_h__
7 #define netStatsConnMgr_h__
8 
9 
10 #include <vlutil/vlThreadSafe.h>
11 #include <asyConMgr.h>
12 
13 // Forward References
14 class DtNetStatsMonitor;
15 class MAKRti::DtClock;
16 class DtRIDParameters;
17 class DtFederateMgr;
18 
19 // The DtNetStatsAsyncConnMgr class adds statistics gathering capabilities
20 // to the DtAsyncConnectionMgr class.
21 
23 {
24 protected:
25 
26  DtNetStatsAsyncConnMgr( DtRIDParameters* params, bool isFederate = false,
27  std::shared_ptr<DtRtiAssistantLrcClient> assistantClient =
28  std::shared_ptr<DtRtiAssistantLrcClient>() );
29 
30 public:
31 
32  virtual ~DtNetStatsAsyncConnMgr();
33 
34  // Set the handle to the Network Traffic Monitor
35  virtual void setTrafficMonitor( DtNetStatsMonitor* stats );
36 
37 
38  // Sending
39 
40  // Send a message
41  // Returns the size of the data sent
42  virtual int send( const DtRtiMsg& msg,
43  DtTransportType transport,
44  const DtInetAddr& addr = DtInetAddr::inaddrAny() );
45 
46  // Send a message and delete the message after it has been sent
47  virtual int sendAndDelete( DtRtiMsg* msg,
48  DtTransportType transport,
49  const DtInetAddr& addr = DtInetAddr::inaddrAny() );
50 
51 
52  // Receiving
53 
54  // Record received messages here for synch. I/O
55  // Read from the given connection and process the message (if received)
56  // Return boolean: message was received? (i.e. could be more input).
57  virtual bool processConnection( DtRtiConnection* conn,
58  DtTransportType trans);
59 
60  // Get a message if one exists
61  // Message must be destroyed by caller
62  virtual DtRtiMsg* getMessage();
63 
64 
65  // Record received messages here for asynch. I/O
66  // this function applies the callbacks to the message
67  virtual DtNetReadStatus processMsg( const DtRtiMsg& msg );
68 
70  virtual void shutdown();
71 
72  virtual bool netStatsEnabled() const;
73  virtual void setNetStatsEnabled(bool shouldEnable);
74 
75 public:
76 
77  // Creates an instance of a DtAsyncConnectionMgr; If an alternate
78  // creator function has been set, that creator function will be called
79  // from within this function.
80  static DtConnectionMgr* create( DtRIDParameters* p, bool isFederate = false,
81  std::shared_ptr<DtRtiAssistantLrcClient> assistantClient =
82  std::shared_ptr<DtRtiAssistantLrcClient>() );
83 
84 
85 
86 protected:
87 
88  // Statistics Log
90 
91  // Network Call Timer
92  MAKRti::DtClock myTimer;
93 
94  // Enable/Disable flag for network statistics
96 
97 };
98 #endif // netStatsConnMgr_h__
99 
virtual bool netStatsEnabled() const
DtNetReadStatus
Definition: connection.h:21
virtual int send(const DtRtiMsg &msg, DtTransportType transport, const DtInetAddr &addr=DtInetAddr::inaddrAny())
This class manages the RTI&#39;s start-up configuration using both MTL variables and functions.
Definition: RIDparams.h:87
This class represents a network connection with another RTI component.
Definition: connection.h:38
the Asynchronous Connection Mgr adds asynchronous I/O to the connectionMgr class. ...
Definition: asyConMgr.h:60
Definition: netStatsMonitor.h:33
virtual bool processConnection(DtRtiConnection *conn, DtTransportType trans)
MAKRti::DtClock myTimer
Definition: netStatsConnMgr.h:92
virtual DtNetReadStatus processMsg(const DtRtiMsg &msg)
this function applies the callbacks to the message
Definition: netStatsConnMgr.h:22
virtual void setNetStatsEnabled(bool shouldEnable)
static DtConnectionMgr * create(DtRIDParameters *p, bool isFederate=false, std::shared_ptr< DtRtiAssistantLrcClient > assistantClient=std::shared_ptr< DtRtiAssistantLrcClient >())
Instances of DtFederateMgr process federation-level messages (such as create, destroy, join, resign, and sync points) and manages the objects responsible for handling general communication, objects, interactions, the FOM, MOM, and data distribution mmg.
Definition: fedMgr.h:93
virtual void setTrafficMonitor(DtNetStatsMonitor *stats)
Instances of DtConnectionMgr manage the communication objects that the RTI will use to either communi...
Definition: connectMgr.h:67
DtRtiMsg is the base class for messages between RTI components.
Definition: rtiMsg.h:34
virtual void shutdown()
Request shutdown of communication activities.
virtual int sendAndDelete(DtRtiMsg *msg, DtTransportType transport, const DtInetAddr &addr=DtInetAddr::inaddrAny())
virtual ~DtNetStatsAsyncConnMgr()
virtual DtRIDParameters * params()
Get a pointer to the RID parameters.
bool myNetStatsEnabled
Definition: netStatsConnMgr.h:95
DtNetStatsAsyncConnMgr(DtRIDParameters *params, bool isFederate=false, std::shared_ptr< DtRtiAssistantLrcClient > assistantClient=std::shared_ptr< DtRtiAssistantLrcClient >())
virtual DtRtiMsg * getMessage()
Get a message if one exists Message must be destroyed by caller.
DtNetStatsMonitor * myNetStats
Definition: netStatsConnMgr.h:89

Document ID: Generated on Wed Jul 8 16:20:32 EDT 2026 from SVN revision 291616
Copyright © 2005-2025 MAK Technologies Inc. All Rights Reserved (www.mak.com)