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
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
15 \brief Joins non-inline template implementation */
21 #include <boost/bind.hpp>
22 #include <boost/lambda/lambda.hpp>
23 #include <boost/lambda/bind.hpp>
26 //-/////////////////////////////////////////////////////////////////////////////////////////////////
28 //-/////////////////////////////////////////////////////////////////////////////////////////////////
29 // senf::ppi::module::PassiveJoin
31 template <class PacketType>
32 prefix_ senf::ppi::module::PassiveJoin<PacketType>::PassiveJoin()
35 output.onThrottle(&PassiveJoin::onThrottle);
36 output.onUnthrottle(&PassiveJoin::onUnthrottle);
39 //-/////////////////////////////////////////////////////////////////////////////////////////////////
42 template <class PacketType>
43 prefix_ void senf::ppi::module::PassiveJoin<PacketType>::connectorSetup(connector::PassiveInput<PacketType> & conn)
46 conn.onRequest(boost::bind(&PassiveJoin::request,this,boost::ref(conn)));
47 conn.throttlingDisc( ThrottlingDiscipline::NONE);
50 template <class PacketType>
51 prefix_ void senf::ppi::module::PassiveJoin<PacketType>::onThrottle()
53 using boost::lambda::_1;
54 using boost::lambda::bind;
55 std::for_each(this->connectors().begin(), this->connectors().end(),
56 bind(&connector::GenericPassiveInput::throttle, _1));
59 template <class PacketType>
60 prefix_ void senf::ppi::module::PassiveJoin<PacketType>::onUnthrottle()
62 using boost::lambda::_1;
63 using boost::lambda::bind;
64 std::for_each(this->connectors().begin(), this->connectors().end(),
65 bind(&connector::GenericPassiveInput::unthrottle, _1));
68 //-/////////////////////////////////////////////////////////////////////////////////////////////////
76 // c-file-style: "senf"
77 // indent-tabs-mode: nil
78 // ispell-local-dictionary: "american"
79 // compile-command: "scons -u test"