Throttling.hh
Go to the documentation of this file.
1 //
2 // Copyright (c) 2020 Fraunhofer Institute for Applied Information Technology (FIT)
3 // Network Research Group (NET)
4 // Schloss Birlinghoven, 53754 Sankt Augustin, GERMANY
5 // Contact: support@wiback.org
6 //
7 // This file is part of the SENF code tree.
8 // It is licensed under the 3-clause BSD License (aka New BSD License).
9 // See LICENSE.txt in the top level directory for details or visit
10 // https://opensource.org/licenses/BSD-3-Clause
11 //
12 
13 
17 #ifndef HH_SENF_PPI_Throttling_
18 #define HH_SENF_PPI_Throttling_ 1
19 
20 // Custom includes
21 #include "predecl.hh"
22 
23 //#include "Queueing.mpp"
24 //-/////////////////////////////////////////////////////////////////////////////////////////////////
25 
26 namespace senf {
27 namespace ppi {
28 
47  {
48  public:
49  virtual ~ThrottlingDiscipline();
50 
51  enum Event { ENQUEUE, DEQUEUE };
52  enum None_t { NONE };
53 
54  virtual void update(connector::GenericPassiveInput & input, Event event) = 0;
56 
63  };
64 
74  : public ThrottlingDiscipline
75  {
76  public:
77  ThresholdThrottling(unsigned high, unsigned low);
78 
79  virtual void update(connector::GenericPassiveInput & input, Event event);
80 
81  private:
82  unsigned high_;
83  unsigned low_;
84  };
85 
86 }}
87 
88 //-/////////////////////////////////////////////////////////////////////////////////////////////////
89 #include "Throttling.cci"
90 //#include "Queueing.ct"
91 //#include "Queueing.cti"
92 #endif
93 
94 
95 // Local Variables:
96 // mode: c++
97 // fill-column: 100
98 // c-file-style: "senf"
99 // indent-tabs-mode: nil
100 // ispell-local-dictionary: "american"
101 // compile-command: "scons -u test"
102 // comment-column: 40
103 // End:
Simple throttling discipline with high and low threshold.
Definition: Throttling.hh:73
predecl public header
virtual void update(connector::GenericPassiveInput &input, Event event)=0
Calculate new throttling state.
Throttling discipline base class.
Definition: Throttling.hh:46
Combination of PassiveConnector and InputConnector.
Definition: Connectors.hh:478