4 // Fraunhofer Institut fuer offene Kommunikationssysteme (FOKUS)
5 // Kompetenzzentrum fuer Satelitenkommunikation (SatCom)
6 // Stefan Bund <g0dil@berlios.de>
8 // This program is free software; you can redistribute it and/or modify
9 // it under the terms of the GNU General Public License as published by
10 // the Free Software Foundation; either version 2 of the License, or
11 // (at your option) any later version.
13 // This program is distributed in the hope that it will be useful,
14 // but WITHOUT ANY WARRANTY; without even the implied warranty of
15 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 // GNU General Public License for more details.
18 // You should have received a copy of the GNU General Public License
19 // along with this program; if not, write to the
20 // Free Software Foundation, Inc.,
21 // 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
24 \brief DebugModules public header */
26 #ifndef HH_DebugModules_
27 #define HH_DebugModules_ 1
31 #include "Utils/SafeBool.hh"
32 #include "Packets/Packets.hh"
34 #include "ActiveFeeder.hh"
36 //#include "DebugModules.mpp"
37 ///////////////////////////////hh.p////////////////////////////////////////
39 /** \namespace senf::ppi::module::debug
42 This namespace collects several modules helpful for PPI debugging. The modules allow to manually
43 pass packets into a network and read back the output packets.
57 public SafeBool<ActiveSource>
59 SENF_PPI_MODULE(ActiveSource);
62 connector::ActiveOutput output;
66 void submit(Packet packet);
68 bool boolean_test() const;
74 SENF_PPI_MODULE(PassiveSource);
76 typedef std::deque<Packet> Queue;
79 typedef Queue::size_type size_type;
83 connector::PassiveOutput output;
85 void submit(Packet packet);
99 public SafeBool<ActiveSink>
101 SENF_PPI_MODULE(ActiveSink);
104 connector::ActiveInput input;
110 bool boolean_test() const;
116 SENF_PPI_MODULE(PassiveSink);
118 typedef std::deque<Packet> Queue;
121 typedef Queue::size_type size_type;
122 typedef Queue::const_iterator iterator;
124 connector::PassiveInput input;
144 class ActiveFeederSource
147 PassiveSource source;
151 typedef PassiveSource::size_type size_type;
153 connector::ActiveOutput & output;
155 ActiveFeederSource();
157 void submit(Packet packet);
162 class ActiveFeederSink
169 typedef PassiveSink::size_type size_type;
170 typedef PassiveSink::iterator iterator;
172 connector::ActiveInput & input;
189 ///////////////////////////////hh.e////////////////////////////////////////
190 #include "DebugModules.cci"
191 //#include "DebugModules.ct"
192 //#include "DebugModules.cti"
199 // comment-column: 40
200 // c-file-style: "senf"
201 // indent-tabs-mode: nil
202 // ispell-local-dictionary: "american"
203 // compile-command: "scons -u test"