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


Public Member Functions | |
| virtual void | calculateSizes (const wns::ldk::CommandPool *commandPool, Bit &commandPoolSize, Bit &dataSize) const |
| Calculate the sizes of the PDU. | |
| wns::ldk::CommandPool * | createReply (const wns::ldk::CommandPool *original) const |
| Create a reply to the given CommandPool. | |
| TCPHeader (wns::ldk::fun::FUN *fun, const wns::pyconfig::View &config) | |
| virtual | ~TCPHeader () |
Private Attributes | |
| Bit | headerSize |
| Allow for changing the TCP-header size from the default 20*8b (UDP header: 8*8bit). | |
Definition at line 97 of file TCPHeader.hpp.
| TCPHeader::TCPHeader | ( | wns::ldk::fun::FUN * | fun, | |
| const wns::pyconfig::View & | config | |||
| ) |
Definition at line 39 of file TCPHeader.cpp.
| virtual tcp::TCPHeader::~TCPHeader | ( | ) | [inline, virtual] |
Definition at line 104 of file TCPHeader.hpp.
| void TCPHeader::calculateSizes | ( | const wns::ldk::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.
Definition at line 64 of file TCPHeader.cpp.
| wns::ldk::CommandPool * TCPHeader::createReply | ( | const wns::ldk::CommandPool * | original | ) | const [virtual] |
A lower layer asks us to create a reply to the given CommandPool. Some functional units (such as ARQ) need to inject compounds (ACKs) back into the stack as reply to compounds they received.
Unfortunately, not every layer has enough information to create a PCI that codes a valid reply to the original PCI. But it may ask the CommandProxy to construct a reply for it. The CommandProxy in turn delegates the reply creation to the functional units right above the questioner. This is what the default implementation of createReply does, as implemented by CommandTypeSpecifier<>.
Layers that do know, how to create a reply can simply create a CommandPool, activate their Command and fill in the fields to form the reply.
Implements wns::ldk::CommandTypeSpecifierInterface.
Definition at line 46 of file TCPHeader.cpp.
Bit tcp::TCPHeader::headerSize [private] |
Definition at line 117 of file TCPHeader.hpp.
1.5.5