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


Public Member Functions | |
| void | calculateSizes (const CommandPool *commandPool, Bit &commandPoolSize, Bit &dataSize) const |
| Calculate the sizes of the PDU. | |
| virtual wns::ldk::CompoundPtr | getACK () |
| Return an acknowledgement Compound for transmission. | |
| virtual wns::ldk::CompoundPtr | getData () |
| Return a user data Compound for transmission. | |
| virtual const wns::ldk::CompoundPtr | hasACK () const |
| Return an acknowledgement Compound that should be considered for transmission. | |
| virtual bool | hasCapacity () const |
| Return true, if the FunctionalUnit is still accepting compounds. | |
| virtual const wns::ldk::CompoundPtr | hasData () const |
| Return a user data Compound that should be considered for transmission. | |
| virtual void | onTimeout () |
| Your callback. Implement this. | |
| virtual void | processIncoming (const CompoundPtr &compound) |
| Process compounds on uplink. | |
| virtual void | processOutgoing (const CompoundPtr &sdu) |
| Process compounds on downlink. | |
| StopAndWait (fun::FUN *fuNet, const wns::pyconfig::View &config) | |
| virtual | ~StopAndWait () |
Protected Member Functions | |
| virtual bool | onSuspend () const |
Protected Attributes | |
| CompoundPtr | ackCompound |
| An ACK to be sent. | |
| CompoundPtr | activeCompound |
| The last packet sent but not acknowledged yet. | |
| int | bitsPerIFrame |
| Number of bits added to the header for each I-Frame. | |
| int | bitsPerRRFrame |
| Number of bits added to the header for each RR-Frame. | |
| logger::Logger | logger |
| ARQCommand::SequenceNumber | NR |
| Sequence number of the last packet received. | |
| ARQCommand::SequenceNumber | NS |
| Sequence number of the last packet sent. | |
| double | resendTimeout |
| Time between two transmissions of the same PDU. | |
| bool | sendNow |
| Remember to send the activeCompound. | |
Definition at line 87 of file StopAndWait.hpp.
| StopAndWait::StopAndWait | ( | fun::FUN * | fuNet, | |
| const wns::pyconfig::View & | config | |||
| ) |
| StopAndWait::~StopAndWait | ( | ) | [virtual] |
Definition at line 70 of file StopAndWait.cpp.
| void StopAndWait::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.
Definition at line 280 of file StopAndWait.cpp.
| wns::ldk::CompoundPtr StopAndWait::getACK | ( | ) | [virtual] |
getACK will only get called after a call to hasACK. Every implementation of this interface /must/ return the same Compound for subsequent hasACK/getACK calls.
Implements wns::ldk::arq::ARQ.
Definition at line 127 of file StopAndWait.cpp.
| wns::ldk::CompoundPtr StopAndWait::getData | ( | ) | [virtual] |
getData will only get called after a call to hasData. Every implementation of this interface /must/ return the same Compound for subsequent hasData/getData calls.
Implements wns::ldk::arq::ARQ.
Reimplemented in wifimac::lowerMAC::StopAndWaitARQ, and glue::mac::StopAndWait.
Definition at line 137 of file StopAndWait.cpp.
| const wns::ldk::CompoundPtr StopAndWait::hasACK | ( | ) | const [virtual] |
Every implementation should return CompoundPtr() in case there is no user data Compound scheduled for transmission.
Implements wns::ldk::arq::ARQ.
Definition at line 106 of file StopAndWait.cpp.
| bool StopAndWait::hasCapacity | ( | ) | const [virtual] |
While hasCapacity returns false, processIncoming will never be called.
Implements wns::ldk::DelayedInterface.
Reimplemented in wifimac::lowerMAC::StopAndWaitARQ.
Definition at line 76 of file StopAndWait.cpp.
| const wns::ldk::CompoundPtr StopAndWait::hasData | ( | ) | const [virtual] |
Every implementation should return CompoundPtr() in case there is no user data Compound scheduled for transmission.
Implements wns::ldk::arq::ARQ.
Definition at line 113 of file StopAndWait.cpp.
| bool StopAndWait::onSuspend | ( | ) | const [protected, virtual] |
| void StopAndWait::onTimeout | ( | ) | [virtual] |
The deriver is forced to implement this method. It gets called, whenever the timer fires.
Implements wns::events::CanTimeout.
Reimplemented in wifimac::lowerMAC::StopAndWaitARQ, and glue::mac::StopAndWait.
Definition at line 148 of file StopAndWait.cpp.
| void StopAndWait::processIncoming | ( | const CompoundPtr & | compound | ) | [virtual] |
Override this method to handle incoming compounds.
Implements wns::ldk::DelayedInterface.
Reimplemented in wifimac::lowerMAC::StopAndWaitARQ.
Definition at line 169 of file StopAndWait.cpp.
| void StopAndWait::processOutgoing | ( | const CompoundPtr & | ) | [virtual] |
Override this method to handle outgoing compounds.
Implements wns::ldk::DelayedInterface.
Reimplemented in wifimac::lowerMAC::StopAndWaitARQ.
Definition at line 83 of file StopAndWait.cpp.
CompoundPtr wns::ldk::arq::StopAndWait::ackCompound [protected] |
Definition at line 173 of file StopAndWait.hpp.
If the activeCompound is set to CompoundPtr(), this means no Compound is currently waiting for acknowledgment
Definition at line 168 of file StopAndWait.hpp.
int wns::ldk::arq::StopAndWait::bitsPerIFrame [protected] |
Definition at line 145 of file StopAndWait.hpp.
int wns::ldk::arq::StopAndWait::bitsPerRRFrame [protected] |
Definition at line 150 of file StopAndWait.hpp.
logger::Logger wns::ldk::arq::StopAndWait::logger [protected] |
Definition at line 180 of file StopAndWait.hpp.
Definition at line 160 of file StopAndWait.hpp.
Definition at line 155 of file StopAndWait.hpp.
double wns::ldk::arq::StopAndWait::resendTimeout [protected] |
Definition at line 140 of file StopAndWait.hpp.
bool wns::ldk::arq::StopAndWait::sendNow [protected] |
Definition at line 178 of file StopAndWait.hpp.
1.5.5