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 public:
73 
74  // Creates an instance of a DtAsyncConnectionMgr; If an alternate
75  // creator function has been set, that creator function will be called
76  // from within this function.
77  static DtConnectionMgr* create( DtRIDParameters* p, bool isFederate = false,
78  DtBoost::shared_ptr<DtRtiAssistantLrcClient> assistantClient =
79  DtBoost::shared_ptr<DtRtiAssistantLrcClient>() );
80 
81 
82 
83 protected:
84 
85  // Statistics Log
87 
88  // Network Call Timer
89  MAKRti::DtClock myTimer;
90 
91 };
92 #endif // netStatsConnMgr_h__
93 

Document ID: Generated on Mon Mar 21 09:41:37 EDT 2016 from SVN revision 163228
Copyright © 2005-2015 VT MÄK Inc. All Rights Reserved (www.mak.com)