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


Public Types | |
| typedef std::deque< CompoundPtr > | ContainerType |
Public Member Functions | |
| virtual void | calculateSizes (const CommandPool *commandPool, Bit &commandPoolSize, Bit &dataSize) const |
| Calculate the sizes of the PDU. | |
| void | close () |
| Disallow packets to be received. | |
| void | flush () |
| Empty the receive and sent buffer. | |
| bool | integrityCheck () |
| virtual void | onFUNCreated () |
| Resolve inter-FU dependencies. | |
| void | open (bool wakeup=true) |
| Allow packets to be received. | |
| void | setAcceptanceSize (Bit compoundSize) |
| Accept only compounds with total size smaller or equal compoundSize. | |
| void | setSizes (Bit addToPCISize, Bit addToPDUSize) |
| Set PCI and PDU size offsets. | |
| void | setStepping (bool _stepping) |
| Enable or disable stepping. | |
| void | step () |
| Allow one packet to be received when in stepping mode. | |
| virtual | ~StubBase () |
Public Attributes | |
| long | onFUNCreatedCalled |
| Incremented each time onFUNCreated gets called. | |
| ContainerType | received |
| Container storing the compounds received via doOnData. | |
| ContainerType | sent |
| Container storing the compounds received via doSendData. | |
| long | wakeupCalled |
| Incremented each time wakeup gets called. | |
Protected Member Functions | |
| virtual bool | doIsAccepting (const CompoundPtr &compound) const |
| virtual void | doOnData (const CompoundPtr &compound) |
| virtual void | doSendData (const CompoundPtr &sdu) |
| virtual void | doWakeup () |
| StubBase () | |
Protected Attributes | |
| bool | accepting |
| int | addToPCISize |
| int | addToPDUSize |
| int | compoundAcceptanceSize |
| bool | stepping |
Definition at line 82 of file Stub.hpp.
| typedef std::deque<CompoundPtr> wns::ldk::tools::StubBase::ContainerType |
| void StubBase::calculateSizes | ( | const CommandPool * | commandPool, | |
| Bit & | commandPoolSize, | |||
| Bit & | dataSize | |||
| ) | const [virtual] |
During size calculation, each FunctionalUnit is asked for the size of the PCI and SDU. Calculation begins with the layer the PDU last visited. To be able to calculate the sizes, a FunctionalUnit may in turn need to know the sizes as calculated by the FunctionalUnit right above itself.
It can do that by simply asking the CommandProxy, giving itself as questioner. The CommandProxy will then delegate the calculation request to the next higher FunctionalUnit in the path of the PDU.
Implements wns::ldk::CommandTypeSpecifierInterface.
Reimplemented in wns::ldk::tools::PERProviderStub, and wns::ldk::tools::Stub.
| bool StubBase::doIsAccepting | ( | const CompoundPtr & | compound | ) | const [protected, virtual] |
| void StubBase::doOnData | ( | const CompoundPtr & | compound | ) | [protected, virtual] |
Reimplemented in wns::ldk::tools::PERProviderStub, and wns::ldk::tools::Stub.
| void StubBase::doSendData | ( | const CompoundPtr & | sdu | ) | [protected, virtual] |
| void StubBase::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.
bool wns::ldk::tools::StubBase::accepting [protected] |
int wns::ldk::tools::StubBase::addToPCISize [protected] |
int wns::ldk::tools::StubBase::addToPDUSize [protected] |
int wns::ldk::tools::StubBase::compoundAcceptanceSize [protected] |
bool wns::ldk::tools::StubBase::stepping [protected] |
1.5.5