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"
35 //#include "DebugModules.mpp"
36 ///////////////////////////////hh.p////////////////////////////////////////
38 /** \namespace senf::ppi::module::debug
41 This namespace collects several modules helpful for PPI debugging. The modules allow to manually
42 pass packets into a network and read back the output packets.
54 class ActivePacketSource
56 public SafeBool<ActivePacketSource>
58 SENF_PPI_MODULE(ActivePacketSource);
61 connector::ActiveOutput output;
65 void submit(Packet packet);
67 bool boolean_test() const;
70 class PassivePacketSource
73 SENF_PPI_MODULE(PassivePacketSource);
75 typedef std::deque<Packet> Queue;
78 typedef Queue::size_type size_type;
80 PassivePacketSource();
82 connector::PassiveOutput output;
84 void submit(Packet packet);
96 class ActivePacketSink
98 public SafeBool<ActivePacketSink>
100 SENF_PPI_MODULE(ActivePacketSink);
103 connector::ActiveInput input;
109 bool boolean_test() const;
112 class PassivePacketSink
115 SENF_PPI_MODULE(PassivePacketSink);
117 typedef std::deque<Packet> Queue;
120 typedef Queue::size_type size_type;
121 typedef Queue::const_iterator iterator;
123 connector::PassiveInput input;
145 ///////////////////////////////hh.e////////////////////////////////////////
146 #include "DebugModules.cci"
147 //#include "DebugModules.ct"
148 //#include "DebugModules.cti"
155 // comment-column: 40
156 // c-file-style: "senf"
157 // indent-tabs-mode: nil
158 // ispell-local-dictionary: "american"
159 // compile-command: "scons -u test"