ThrottleBarrier.cc
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 #include "ThrottleBarrier.hh"
18 //#include "ThrottleBarrier.ih"
19 
20 // Custom includes
21 
22 //#include "ThrottleBarrier.mpp"
23 #define prefix_
24 //-/////////////////////////////////////////////////////////////////////////////////////////////////
25 
27 {
28  route( input, output ).autoThrottling( false );
29  input.onRequest( &ThrottleBarrier::request );
30 }
31 
32 prefix_ void senf::ppi::module::ThrottleBarrier::request()
33 {
34  Packet const & p (input());
35  if (output)
36  output(p);
37 }
38 
39 //-/////////////////////////////////////////////////////////////////////////////////////////////////
40 #undef prefix_
41 //#include "ThrottleBarrier.mpp"
42 
43 
44 // Local Variables:
45 // mode: c++
46 // fill-column: 100
47 // comment-column: 40
48 // c-file-style: "senf"
49 // indent-tabs-mode: nil
50 // ispell-local-dictionary: "american"
51 // compile-command: "scons -u test"
52 // End:
connector::ActiveOutput output
Route< connector::InputConnector, connector::OutputConnector > & route(connector::InputConnector &input, connector::OutputConnector &output)
Define flow information.
Definition: Module.cc:39
#define prefix_
ThrottleBarrier public header.
void onRequest(Handler handler)
Register I/O event handler.