cc2ffc16f89c3b18df568d994bf2f1b181838eb8
[senf.git] / senf / PPI / ActiveFeeder.hh
1 // $Id$
2 //
3 // Copyright (C) 2007
4 // Fraunhofer Institute for Open Communication Systems (FOKUS)
5 // Competence Center NETwork research (NET), St. Augustin, GERMANY
6 //     Stefan Bund <g0dil@berlios.de>
7 //
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.
12 //
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.
17 //
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.
22
23 /** \file
24     \brief ActiveFeeder public header */
25
26 #ifndef HH_SENF_PPI_ActiveFeeder_
27 #define HH_SENF_PPI_ActiveFeeder_ 1
28
29 // Custom includes
30 #include "Module.hh"
31 #include "Connectors.hh"
32 #include "IdleEvent.hh"
33
34 //#include "ActiveFeeder.mpp"
35 ///////////////////////////////hh.p////////////////////////////////////////
36
37 namespace senf {
38 namespace ppi {
39 namespace module {
40
41     /** \brief Adapter to connect passive connectors
42
43         ActiveFeeder is an adapter module which allows two connect to passive connectors. As long as
44         none of the connectors is throttled, the ActiveFeeder will forward packets from it's input
45         to it's output.
46
47         \note For this Module to work correctly, it is very important for the connectors to be
48             correctly throttled. Otherwise the system might well hang in an endless loop.
49
50         \ingroup adapter_modules
51      */
52     class ActiveFeeder
53         : public Module
54     {
55         SENF_PPI_MODULE(ActiveFeeder);
56     public:
57         connector::ActiveInput<> input;
58         connector::ActiveOutput<> output;
59
60         ActiveFeeder();
61
62     private:
63         void request();
64
65         IdleEvent idle_;
66     };
67
68 }}}
69
70 ///////////////////////////////hh.e////////////////////////////////////////
71 #include "ActiveFeeder.cci"
72 //#include "ActiveFeeder.ct"
73 //#include "ActiveFeeder.cti"
74 #endif
75
76 \f
77 // Local Variables:
78 // mode: c++
79 // fill-column: 100
80 // comment-column: 40
81 // c-file-style: "senf"
82 // indent-tabs-mode: nil
83 // ispell-local-dictionary: "american"
84 // compile-command: "scons -u test"
85 // End: