![]() |
User Manual, Developers Guide and API Documentation |
![]() |
#include <Forwarding.hpp>


Public Member Functions | |
| void | addListeningAddress (wns::service::nl::Address listenerAddress) |
| Forwarding (wns::ldk::fun::FUN *fun, const wns::pyconfig::View &_pyco) | |
| Forwarding functionality takes the component and a pyconfig::View for initialization. | |
| virtual wns::ldk::CompoundPtr | getSomethingToSend () |
| Return the PDU that is ready to be sent. | |
| virtual bool | hasCapacity () const |
| Return true, if the FunctionalUnit is still accepting compounds. | |
| virtual const wns::ldk::CompoundPtr | hasSomethingToSend () const |
| Return a PDU that is ready to be sent or NULL, if none available. | |
| virtual void | onFUNCreated () |
| Resolve inter-FU dependencies. | |
| virtual void | processIncoming (const wns::ldk::CompoundPtr &compound) |
| Process compounds on uplink. | |
| virtual void | processOutgoing (const wns::ldk::CompoundPtr &) |
| Process compounds on downlink. | |
| void | removeListeningAddress (wns::service::nl::Address listenerAddress) |
| virtual | ~Forwarding () |
| Destructor. | |
Protected Member Functions | |
| wns::pyconfig::View | getConfig () |
| Returns the configuration for this component. | |
Private Types | |
| typedef wns::service::nl::Address | Address |
| typedef std::list < wns::service::nl::Address > | AddressContainer |
Private Member Functions | |
| bool | putOnNextHop (const wns::ldk::CompoundPtr &compound) |
| Helper function to decide wether the compound can be forwarded to another hop. | |
| bool | reachedDestination (const wns::ldk::CompoundPtr &compound) |
| Helper function to decide wether the received compound is for this station. | |
Private Attributes | |
| wns::ldk::CompoundPtr | buffer |
| wns::ldk::CommandReaderInterface * | ipHeaderReader |
| bool | isForwarding |
| Decide wether incoming data is forwarded to another connected dll if it's not addressed to itself. | |
| AddressContainer | listeningAddresses |
| wns::logger::Logger | log |
| The logger for this component. | |
| wns::pyconfig::View | pyco |
| Configuration of this component. | |
| int | ttl |
| The TTL to use for new compounds. | |
Definition at line 71 of file Forwarding.hpp.
typedef wns::service::nl::Address ip::Forwarding::Address [private] |
Definition at line 79 of file Forwarding.hpp.
typedef std::list<wns::service::nl::Address> ip::Forwarding::AddressContainer [private] |
Definition at line 80 of file Forwarding.hpp.
| Forwarding::Forwarding | ( | wns::ldk::fun::FUN * | fun, | |
| const wns::pyconfig::View & | _pyco | |||
| ) |
| [in] | _component | The corresponding component |
| [in] | _pyco | Configuration for this component. |
Definition at line 41 of file Forwarding.cpp.
| virtual ip::Forwarding::~Forwarding | ( | ) | [inline, virtual] |
Definition at line 95 of file Forwarding.hpp.
| void Forwarding::addListeningAddress | ( | wns::service::nl::Address | listenerAddress | ) |
Definition at line 57 of file Forwarding.cpp.
| wns::pyconfig::View ip::Forwarding::getConfig | ( | ) | [protected] |
| wns::ldk::CompoundPtr Forwarding::getSomethingToSend | ( | ) | [virtual] |
This method must never return NULL. This method will only be called after a call to hasSomethingToSend returned a non-null value. The FunctionalUnit must return the same PDU as returned by hasSomethingToSend.
Implements wns::ldk::DelayedInterface.
Definition at line 213 of file Forwarding.cpp.
| bool Forwarding::hasCapacity | ( | ) | const [virtual] |
While hasCapacity returns false, processIncoming will never be called.
Implements wns::ldk::DelayedInterface.
Definition at line 195 of file Forwarding.cpp.
| const wns::ldk::CompoundPtr Forwarding::hasSomethingToSend | ( | ) | const [virtual] |
| void Forwarding::onFUNCreated | ( | ) | [virtual] |
Often FunctionalUnits require the collaboration with other FunctionalUnits to accomplish their task. For the collaboration between FunctionalUnits we coined the term "friendship".
The onFUNCreated method is a hook being called after the complete FUN has been set up. FunctionalUnits requiring the collaboration with other FunctionalUnits should resolve these dependencies by implementing this hook accordingly.
Finding friends is usually done calling wns::ldk::fun::FUN::findFriend.
When building reconfigurable FUNs, this method may get called multiple times (e.g., after each FUN reconfiguration). Keep that in mind when allocating resources in your onFUNCreated implementation.
Reimplemented from wns::ldk::FunctionalUnit.
Definition at line 80 of file Forwarding.cpp.
| void Forwarding::processIncoming | ( | const wns::ldk::CompoundPtr & | compound | ) | [virtual] |
Override this method to handle incoming compounds.
Implements wns::ldk::DelayedInterface.
Definition at line 113 of file Forwarding.cpp.
| void Forwarding::processOutgoing | ( | const wns::ldk::CompoundPtr & | ) | [virtual] |
Override this method to handle outgoing compounds.
Implements wns::ldk::DelayedInterface.
Definition at line 87 of file Forwarding.cpp.
| bool Forwarding::putOnNextHop | ( | const wns::ldk::CompoundPtr & | compound | ) | [private] |
Definition at line 249 of file Forwarding.cpp.
| bool Forwarding::reachedDestination | ( | const wns::ldk::CompoundPtr & | compound | ) | [private] |
Definition at line 222 of file Forwarding.cpp.
| void Forwarding::removeListeningAddress | ( | wns::service::nl::Address | listenerAddress | ) |
Definition at line 68 of file Forwarding.cpp.
wns::ldk::CompoundPtr ip::Forwarding::buffer [private] |
Definition at line 163 of file Forwarding.hpp.
Definition at line 138 of file Forwarding.hpp.
bool ip::Forwarding::isForwarding [private] |
Definition at line 154 of file Forwarding.hpp.
Definition at line 161 of file Forwarding.hpp.
wns::logger::Logger ip::Forwarding::log [private] |
Definition at line 148 of file Forwarding.hpp.
wns::pyconfig::View ip::Forwarding::pyco [private] |
Definition at line 143 of file Forwarding.hpp.
int ip::Forwarding::ttl [private] |
Definition at line 159 of file Forwarding.hpp.
1.5.5