64ed349c85eddae486eee62c2e831c212acdeb47
[senf.git] / PPI / PassiveQueue.hh
1 // Copyright (C) 2007 
2 // Fraunhofer Institut fuer offene Kommunikationssysteme (FOKUS)
3 // Kompetenzzentrum fuer Satelitenkommunikation (SatCom)
4 //     Stefan Bund <g0dil@berlios.de>
5 //
6 // This program is free software; you can redistribute it and/or modify
7 // it under the terms of the GNU General Public License as published by
8 // the Free Software Foundation; either version 2 of the License, or
9 // (at your option) any later version.
10 //
11 // This program is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 // GNU General Public License for more details.
15 //
16 // You should have received a copy of the GNU General Public License
17 // along with this program; if not, write to the
18 // Free Software Foundation, Inc.,
19 // 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
20
21 /** \file
22     \brief PassiveQueue public header */
23
24 #ifndef HH_PassiveQueue_
25 #define HH_PassiveQueue_ 1
26
27 // Custom includes
28
29 //#include "PassiveQueue.mpp"
30 ///////////////////////////////hh.p////////////////////////////////////////
31
32 namespace senf {
33 namespace ppi {
34 namespace module {
35     
36     /** \brief Adaptor to connect active a pair of active connectors.
37
38         This adaptor queue is used to connect two active connectors to each other. The queue
39         receives data in it's passive input and places them in it's queue. Whenever data is
40         requested from the passive output, a packet is dequeued. 
41
42         The PassiveQueue will automatically throttle in both directions. Throttling on the input
43         connector is the standard throttling as implemented in connector::PassiveInput. Additional,
44         forward throttling notifications are sent out whenever the queue is empty.
45      */
46     class PassiveQueue 
47     {
48     public:
49         connector::PassiveInput input;
50         connector::PassiveOutput output;
51         
52         PassiveQueue();
53
54         void qdisc(QueueingDiscipline const & disc); ///< Change the queueing discipline
55         /**< This call changs the queueing discipline of the queue. This call is just forwarded to
56              the \a input connector.
57              
58              \see connector::PassiveInput::qdisc() */
59     };
60
61 }}}
62
63 ///////////////////////////////hh.e////////////////////////////////////////
64 //#include "PassiveQueue.cci"
65 //#include "PassiveQueue.ct"
66 //#include "PassiveQueue.cti"
67 #endif
68
69 \f
70 // Local Variables:
71 // mode: c++
72 // fill-column: 100
73 // c-file-style: "senf"
74 // indent-tabs-mode: nil
75 // ispell-local-dictionary: "american"
76 // End: