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

Document ID: Generated on Tue May 7 16:26:47 EDT 2013 from SVN revision 126903
Copyright © 2005-2013 VT MÄK Inc. All Rights Reserved (www.mak.com)