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  DtBoost::shared_ptr<DtRtiAssistantLrcClient> assistantClient =
28  DtBoost::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  DtBoost::shared_ptr<DtRtiAssistantLrcClient> assistantClient =
82  DtBoost::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 

Document ID: Generated on Mon Jul 9 10:30:41 EDT 2018 from SVN revision 190224
Copyright © 2005-2018 VT MÄK Inc. All Rights Reserved (www.mak.com)