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 Connectors non-inline non-template implementation */
26 #include "Connectors.hh"
27 //#include "Connectors.ih"
32 //#include "Connectors.mpp"
34 ///////////////////////////////cc.p////////////////////////////////////////
36 ///////////////////////////////////////////////////////////////////////////
37 // senf::ppi::connector::PassiveConnector
39 ////////////////////////////////////////
42 ///////////////////////////////////////////////////////////////////////////
43 // senf::ppi::connector::ActiveConnector
45 ////////////////////////////////////////
48 prefix_ void senf::ppi::connector::ActiveConnector::notifyThrottle()
50 if (throttleCallback_)
52 NotifyRoutes::const_iterator i (notifyRoutes_.begin());
53 NotifyRoutes::const_iterator const i_end (notifyRoutes_.end());
54 for (; i != i_end; ++i)
55 (*i)->notifyThrottle();
58 prefix_ void senf::ppi::connector::ActiveConnector::notifyUnthrottle()
60 if (unthrottleCallback_)
61 unthrottleCallback_();
62 NotifyRoutes::const_iterator i (notifyRoutes_.begin());
63 NotifyRoutes::const_iterator const i_end (notifyRoutes_.end());
64 for (; i != i_end; ++i)
65 (*i)->notifyUnthrottle();
68 prefix_ void senf::ppi::connector::ActiveConnector::registerRoute(ForwardingRoute & route)
70 notifyRoutes_.push_back(&route);
73 ///////////////////////////////////////////////////////////////////////////
74 // senf::ppi::connector::InputConnector
76 prefix_ senf::Packet senf::ppi::connector::InputConnector::operator()()
89 ////////////////////////////////////////
92 prefix_ void senf::ppi::connector::InputConnector::v_requestEvent()
95 prefix_ void senf::ppi::connector::InputConnector::v_enqueueEvent()
98 prefix_ void senf::ppi::connector::InputConnector::v_dequeueEvent()
101 ///////////////////////////////////////////////////////////////////////////
102 // senf::ppi::connector::ActiveInput
104 ////////////////////////////////////////
107 prefix_ void senf::ppi::connector::ActiveInput::v_requestEvent()
112 ///////////////////////////////////////////////////////////////////////////
113 // senf::ppi::connector::PassiveInput
115 ////////////////////////////////////////
118 prefix_ void senf::ppi::connector::PassiveInput::v_enqueueEvent()
121 qdisc_->update(*this, QueueingDiscipline::ENQUEUE);
124 prefix_ void senf::ppi::connector::PassiveInput::v_dequeueEvent()
126 qdisc_->update(*this, QueueingDiscipline::DEQUEUE);
129 prefix_ void senf::ppi::connector::PassiveInput::v_unthrottleEvent()
131 size_type n (queueSize());
134 size_type nn (queueSize());
141 ///////////////////////////////cc.e////////////////////////////////////////
143 //#include "Connectors.mpp"
149 // comment-column: 40
150 // c-file-style: "senf"
151 // indent-tabs-mode: nil
152 // ispell-local-dictionary: "american"
153 // compile-command: "scons -u test"