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


Public Member Functions | |
| CompoundSwitch (wns::ldk::fun::FUN *fuNet, const wns::pyconfig::View &config) | |
| wns::ldk::FunctionalUnit * | findFUNFriend (std::string friendName) |
| wns::ldk::CommandProxy * | getCommandProxy () |
| virtual void | onFUNCreated () |
| Resolve inter-FU dependencies. | |
| ~CompoundSwitch () | |
Private Types | |
| typedef std::list< Filter * > | Filters |
Private Member Functions | |
| virtual bool | doIsAccepting (const wns::ldk::CompoundPtr &compound) const |
| virtual void | doOnData (const wns::ldk::CompoundPtr &compound) |
| virtual void | doSendData (const wns::ldk::CompoundPtr &compound) |
| virtual void | doWakeup () |
| void | printFilterAssociation () |
Private Attributes | |
| struct dll::compoundSwitch::CompoundSwitch::Friends | friends_ |
| wns::logger::Logger | logger_ |
| bool | mustAccept_ |
Classes | |
| struct | Friends |
Configuring: The filter for the processed compounds are defined in the PyConfig. There are lists for onData and sendData filters. All possible filters are related to compoundSwitch::filter. The order of the FU connections must require the order of the filters in the filterlist to bind the filter to the right FU connection.
With the parameter mustAccept, two different behaviors can be selected for an outgoing compound: 1) mustAccept = true --> take the first FU whose filter matches AND which is accepting. 2) mustAccept = false --> take the first FU whose filter matches, independently if the FU is accepting.
Definition at line 110 of file CompoundSwitch.hpp.
typedef std::list<Filter*> dll::compoundSwitch::CompoundSwitch::Filters [private] |
Definition at line 136 of file CompoundSwitch.hpp.
| CompoundSwitch::CompoundSwitch | ( | wns::ldk::fun::FUN * | fuNet, | |
| const wns::pyconfig::View & | config | |||
| ) |
Definition at line 41 of file CompoundSwitch.cpp.
| CompoundSwitch::~CompoundSwitch | ( | ) |
Definition at line 85 of file CompoundSwitch.cpp.
| bool CompoundSwitch::doIsAccepting | ( | const wns::ldk::CompoundPtr & | compound | ) | const [private, virtual] |
Definition at line 121 of file CompoundSwitch.cpp.
| void CompoundSwitch::doOnData | ( | const wns::ldk::CompoundPtr & | compound | ) | [private, virtual] |
Definition at line 114 of file CompoundSwitch.cpp.
| void CompoundSwitch::doSendData | ( | const wns::ldk::CompoundPtr & | compound | ) | [private, virtual] |
Definition at line 107 of file CompoundSwitch.cpp.
| void CompoundSwitch::doWakeup | ( | ) | [private, virtual] |
Definition at line 128 of file CompoundSwitch.cpp.
| wns::ldk::FunctionalUnit * CompoundSwitch::findFUNFriend | ( | std::string | friendName | ) |
Definition at line 100 of file CompoundSwitch.cpp.
| wns::ldk::CommandProxy* dll::compoundSwitch::CompoundSwitch::getCommandProxy | ( | ) | [inline] |
Definition at line 129 of file CompoundSwitch.hpp.
| void CompoundSwitch::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 91 of file CompoundSwitch.cpp.
| void CompoundSwitch::printFilterAssociation | ( | ) | [private] |
Definition at line 134 of file CompoundSwitch.cpp.
struct dll::compoundSwitch::CompoundSwitch::Friends dll::compoundSwitch::CompoundSwitch::friends_ [private] |
Definition at line 157 of file CompoundSwitch.hpp.
Definition at line 159 of file CompoundSwitch.hpp.
1.5.5