ForwardSwitch.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_Ext_NetEmu_DVB_ForwardSwitch_
18 #define HH_SENF_Ext_NetEmu_DVB_ForwardSwitch_ 1
19 
20 // Custom includes
21 #include <senf/PPI/Module.hh>
22 
24 
25 namespace senf {
26 namespace emu {
27 
29  : public ppi::module::Module
30  {
32 
33  public:
34  ForwardSwitch(bool state = true);
35 
36  bool forward() const;
37  void forward(bool state);
38 
41 
42  private:
43  void onRequest_discard();
44  void onRequest_forward();
45  bool forward_;
46  };
47 
48 }}
50 #include "ForwardSwitch.cci"
51 //#include "ForwardSwitch.ct"
52 //#include "ForwardSwitch.cti"
53 #endif
ppi::connector::PassiveInput< EthernetPacket > input
#define SENF_PPI_MODULE(name)
ppi::connector::ActiveOutput< EthernetPacket > output
ForwardSwitch(bool state=true)