EmulatedDVBInterface.ih
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 
14 /** \file
15  \brief EmulatedDVBInterface internal header */
16 
17 #ifndef IH_SENF_Ext_NetEmu_DVB_EmulatedDVBInterface_
18 #define IH_SENF_Ext_NetEmu_DVB_EmulatedDVBInterface_ 1
19 
20 // Custom includes
21 
22 //-/////////////////////////////////////////////////////////////////////////////////////////////////
23 
24 namespace senf {
25 namespace emu {
26 
27  class EmulatedDVBSenderInterface;
28  class EmulatedDVBReceiverInterface;
29 
30 namespace detail {
31 
32  /** \brief Internal: Input filter of emulated DVBReceiver interface */
33  class EmulatedDVBReceiverReceiveFilter
34  : public ppi::module::Module
35  {
36  SENF_PPI_MODULE(EmulatedDVBReceiverReceiveFilter);
37  public:
38  ppi::connector::PassiveInput<DVBPacketHeader> input;
39  ppi::connector::ActiveOutput<EthernetPacket> output;
40 
41  EmulatedDVBReceiverReceiveFilter(EmulatedDVBReceiverInterface & iface);
42 
43  private:
44  void request();
45 
46  EmulatedDVBReceiverInterface & iface_;
47  };
48 
49  /** \brief Internal: Internal PPI Network of emulated DVBReceiver interface */
50  struct EmulatedDVBReceiverInterfaceNet
51  {
52 // Input chain
53  EmulatedDVBReceiverReceiveFilter receiveFilter_;
54 
55  //-/////////////////////////////////////////////////////////////////////////////////////////
56 
57  ppi::connector::PassiveInputJack<DVBPacketHeader> receiveInput;
58  ppi::connector::ActiveOutputJack<EthernetPacket> receiveOutput;
59 
60  EmulatedDVBReceiverInterfaceNet();
61 
62  EmulatedDVBReceiverInterface & self();
63  EmulatedDVBReceiverInterface const & self() const;
64  };
65 
66  /** \brief Internal: Transmit filter of emulated DVB interface */
67  class EmulatedDVBSenderTransmitFilter
68  : public ppi::module::Module
69  {
70  SENF_PPI_MODULE(EmulatedDVBSenderTransmitFilter);
71  public:
72  ppi::connector::PassiveInput<EthernetPacket> input;
73  ppi::connector::ActiveOutput<DVBPacketHeader> output;
74 
75  explicit EmulatedDVBSenderTransmitFilter(EmulatedDVBSenderInterface & iface);
76 
77  private:
78  void request();
79 
80  EmulatedDVBSenderInterface & iface_;
81  };
82 
83  /** \brief Internal: Internal PPI Network of emulated DVBSender interface */
84  struct EmulatedDVBSenderInterfaceNet
85  {
86 
87  // Output chain
88  EmulatedDVBSenderTransmitFilter transmitFilter_;
89 
90  //-/////////////////////////////////////////////////////////////////////////////////////////
91 
92  ppi::connector::PassiveInputJack<EthernetPacket> transmitInput;
93  ppi::connector::ActiveOutputJack<DVBPacketHeader> transmitOutput;
94 
95  EmulatedDVBSenderInterfaceNet();
96 
97  EmulatedDVBSenderInterface & self();
98  EmulatedDVBSenderInterface const & self() const;
99  };
100 
101 }}}
102 
103 //-/////////////////////////////////////////////////////////////////////////////////////////////////
104 #endif
105 
106 
107 // Local Variables:
108 // mode: c++
109 // fill-column: 100
110 // comment-column: 40
111 // c-file-style: "senf"
112 // indent-tabs-mode: nil
113 // ispell-local-dictionary: "american"
114 // compile-command: "scons -u test"
115 // End: