MAK RTIspy API Documentation for HLA 1.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
messageThrottle.h
Go to the documentation of this file.
1 /*********************************************************************
2 ** Copyright (c) 2004 MaK Technologies, Inc.
3 ** All rights reserved.
4 *********************************************************************/
5 /*********************************************************************
6 ** $RCSfile: messageThrottle.h,v $ $Revision: 1.10 $ $State: Exp $
7 *********************************************************************/
8 
11 
12 #ifndef DtMessageThrottle_H_
13 #define DtMessageThrottle_H_
14 
15 #include "rtiMsConfig.h"
16 #include <vlutil/vlFedTarget.h>
17 #include <vlutil/vlTime.h>
18 #include <vlutil/vlInetAddr.h>
19 #include <queue>
20 
25 
26 
27 class DtConnectionMgr;
28 class DtRtiMsg;
29 
33 {
34 protected:
37 
38 public:
39 
41  DtDelayedMessage(DtRtiMsg* msg, MAKRti::DtTransportType transport, MAKRti::DtInetAddr addr);
42 
45 
47  MAKRti::DtTransportType transport;
48  MAKRti::DtInetAddr addr;
49 };
50 
52 {
53 protected:
56 
57 public:
58 
60  DtMessageThrottle(float transmitDelay, float transmitRate, float autoProvideDelay );
61 
63  virtual ~DtMessageThrottle();
64 
68  virtual void activateTransmitDelay();
69 
71  virtual bool delayTransmit() const;
72 
75  virtual bool queueMessage(DtRtiMsg const& msg, MAKRti::DtTransportType transport,
76  MAKRti::DtInetAddr addr);
77 
81  virtual bool queueMessage(DtRtiMsg* msg, MAKRti::DtTransportType transport,
82  MAKRti::DtInetAddr addr);
83 
90  virtual void testTransmitDelay(DtConnectionMgr* connMgr);
91 
95  virtual void activateAutoProvideDelay();
96 
98  virtual bool delayAutoProvide() const;
99 
102  virtual void testAutoProvideDelay(DtConnectionMgr* connMgr);
103 
105  virtual void processQueuedMessages(DtConnectionMgr* connMgr);
106 
108  virtual void flush(DtConnectionMgr* connMgr);
109 
111  virtual void clear();
112 
113 protected:
114 
115  MAKRti::DtClock myClock;
116  std::queue<DtDelayedMessage*> myMessageQueue;
117  MAKRti::DtTime myTransmitTime;
118  MAKRti::DtTime myTickTime;
119  MAKRti::DtTime myAutoProvideTime;
123  unsigned long myMessagePerTick;
124  unsigned long myMessagesSent;
132 };
133 
134 #endif

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)