Duplicators.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 "Duplicators.hh"
18 //#include "Duplicators.ih"
19 
20 // Custom includes
21 
22 //#include "Duplicators.mpp"
23 #define prefix_
24 //-/////////////////////////////////////////////////////////////////////////////////////////////////
25 
27 {
28  noroute(input);
29  input.onRequest(&ActiveDuplicator::request);
30 }
31 
32 prefix_ void senf::ppi::module::ActiveDuplicator::connectorSetup(ConnectorType & conn)
33 {
34  route(input, conn);
35 }
36 
37 prefix_ void senf::ppi::module::ActiveDuplicator::request()
38 {
39  Packet p (input());
40  ContainerType::iterator i (connectors().begin());
41  ContainerType::iterator const i_end (connectors().end());
42  for (; i != i_end; ++i)
43  (*i)(p);
44 }
45 
46 //-/////////////////////////////////////////////////////////////////////////////////////////////////
47 #undef prefix_
48 //#include "Duplicators.mpp"
49 
50 
51 // Local Variables:
52 // mode: c++
53 // fill-column: 100
54 // comment-column: 40
55 // c-file-style: "senf"
56 // indent-tabs-mode: nil
57 // ispell-local-dictionary: "american"
58 // compile-command: "scons -u test"
59 // End:
ConnectorType_ ConnectorType
Type of MultiConnector connector.
Route< connector::InputConnector, connector::OutputConnector > & route(connector::InputConnector &input, connector::OutputConnector &output)
Define flow information.
Definition: Module.cc:39
void noroute(connector::Connector &connector)
Define terminal connectors.
Definition: Module.cc:114
void onRequest(Handler handler)
Register I/O event handler.
ContainerType_ & connectors()
Get connector container.
#define prefix_
Definition: Duplicators.cc:23
connector::PassiveInput input
Definition: Duplicators.hh:42
Duplicators public header.