Joins.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_Joins_
18 #define HH_SENF_PPI_Joins_ 1
19 
20 // Custom includes
21 #include "Connectors.hh"
22 #include "Module.hh"
23 #include "MultiConnectorMixin.hh"
24 
25 //#include "Joins.mpp"
26 //-/////////////////////////////////////////////////////////////////////////////////////////////////
27 
28 namespace senf {
29 namespace ppi {
30 
31 namespace module {
32 
52  template <class PacketType = Packet>
54  : public Module,
55  public MultiConnectorMixin<PassiveJoin<PacketType>, connector::PassiveInput<PacketType> >
56  {
58  public:
60 
61  PassiveJoin();
62 
63  private:
64  void connectorSetup(connector::PassiveInput<PacketType> & conn);
65  void request(connector::PassiveInput<PacketType> & input);
66  void onThrottle();
67  void onUnthrottle();
68 
69  friend class MultiConnectorMixin<PassiveJoin<PacketType>, connector::PassiveInput<PacketType> >;
70  };
71 
99  : public Module,
100  public MultiConnectorMixin<PriorityJoin, connector::ActiveInput<> >
101  {
103  public:
105 
106  PriorityJoin();
107 
108  private:
109  void connectorSetup(PriorityJoin::ConnectorType & conn, int priority=-1);
110  void request();
111  void onThrottle();
112  void onUnthrottle();
113 
114  friend class MultiConnectorMixin<PriorityJoin, connector::ActiveInput<> >;
115  };
116 
117 }}}
118 
119 //-/////////////////////////////////////////////////////////////////////////////////////////////////
120 //#include "Joins.cci"
121 #include "Joins.ct"
122 #include "Joins.cti"
123 #endif
124 
125 
126 // Local Variables:
127 // mode: c++
128 // fill-column: 100
129 // comment-column: 40
130 // c-file-style: "senf"
131 // indent-tabs-mode: nil
132 // ispell-local-dictionary: "american"
133 // compile-command: "scons -u test"
134 // End:
Connector actively sending packets.
Definition: Connectors.hh:677
ConnectorType_ ConnectorType
Type of MultiConnector connector.
Module base-class.
Definition: Module.hh:169
Connectors public header.
Module public header.
connector::PassiveOutput output
Definition: Joins.hh:102
Join multiple packet streams with active inputs.
Definition: Joins.hh:98
Join multiple packet streams with passive inputs.
Definition: Joins.hh:53
#define SENF_PPI_MODULE(name)
Define PPI Module.
Definition: Module.hh:346
Connector passively providing packets.
Definition: Connectors.hh:697
connector::ActiveOutput< PacketType > output
Definition: Joins.hh:57
MultiConnectorMixin public header.
Connector passively receiving packets.
Definition: Connectors.hh:655