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


Public Member Functions | |
| void | calculateSizes (const CommandPool *commandPool, Bit &commandPoolSize, Bit &sduSize) const |
| Calculate the sizes of the PDU. | |
| virtual wns::ldk::CompoundPtr | getACK () |
| Return an acknowledgement Compound for transmission. | |
| virtual wns::ldk::CompoundPtr | getData () |
| in retransmissionState: returns the HOL packet of toRetransmit queue in normal state: returns the (HOL) packet stored in activeCompound | |
| GoBackN (fun::FUN *fuNet, const wns::pyconfig::View &config) | |
| virtual const wns::ldk::CompoundPtr | hasACK () const |
| hasACK() is asked by lower layer FU's | |
| virtual bool | hasCapacity () const |
| hasCapacity() is true if we 1. don't have an active PDU we are processing 2. aren't occupied with retransmissions 3. don't exceed the sending window So the gate is only open if we are free for something new All other queueing must happen in a unit above us | |
| virtual const wns::ldk::CompoundPtr | hasData () const |
| hasData() is asked by lower layer FU's | |
| virtual void | onTimeout () |
| Your callback. Implement this. | |
| virtual void | processIncoming (const CompoundPtr &compound) |
| Upstack on receiver side. | |
| virtual void | processOutgoing (const CompoundPtr &sdu) |
| Downstack on transmitter side. | |
| virtual | ~GoBackN () |
Protected Member Functions | |
| virtual void | doDelayDelivery () |
| virtual void | doDeliver () |
| void | onACKFrame (const CompoundPtr &compound) |
| void | onIFrame (const CompoundPtr &compound) |
| void | onNAKFrame (const CompoundPtr &compound) |
| virtual bool | onSuspend () const |
| void | prepareRetransmission () |
| void | removeACKed (const ARQCommand::SequenceNumber ackedNS, CompoundContainer &container) |
| bool | retransmissionState () const |
| return whether we are in retransmission mode (Retransmit queue nonempty) | |
| void | show_seqnr_list (const char *name, CompoundContainer &compoundList) const |
| logger output of sequence numbers | |
Protected Attributes | |
| CompoundContainer | ackPDUs |
| list of ACK PDU to be sent (Rx side). | |
| CompoundPtr | activeCompound |
| PDU to be sent (Tx side). | |
| int | bitsPerACKFrame |
| Number of bits added to the header for each ACK-Frame. | |
| int | bitsPerIFrame |
| Number of bits added to the header for each I-Frame. | |
| ARQCommand::SequenceNumber | delayedDeliveryNR |
| bool | delayingDelivery |
| ARQCommand::SequenceNumber | LA |
| Sequence number of the last ACK received in order (Tx side). | |
| logger::Logger | logger |
| ARQCommand::SequenceNumber | NR |
| Sequence number of the last packet received in order (Rx side). | |
| ARQCommand::SequenceNumber | NS |
| Sequence number of the last packet sent (Transmitter side). | |
| CompoundContainer | receivedPDUs |
| received compounds (Rx side). | |
| double | resendTimeout |
| Time between two transmissions of the same PDU. | |
| bool | sendNow |
| Remember to send the activeCompound (transmit buffer nonidle). | |
| CompoundContainer | sentPDUs |
| The packets sent but not acknowledged yet (Tx side). | |
| int | sequenceNumberSize |
| Divisor/Modulo for Sequence Numbers (>=2*windowSize). Power of 2. | |
| CompoundContainer | toRetransmit |
| List of packets to be retransmit (Tx side). | |
| wns::probe::bus::ContextCollectorPtr | transmissionAttempts |
| probe to count the number of retransmissions needed. | |
| int | windowSize |
| Window size (so many packets may be sent without ACKs). | |
Private Types | |
| typedef std::list< CompoundPtr > | CompoundContainer |
Friends | |
| class | ::wns::ldk::arq::tests::GoBackNTest |
Definition at line 119 of file GoBackN.hpp.
typedef std::list<CompoundPtr> wns::ldk::arq::GoBackN::CompoundContainer [private] |
Definition at line 129 of file GoBackN.hpp.
| GoBackN::GoBackN | ( | fun::FUN * | fuNet, | |
| const wns::pyconfig::View & | config | |||
| ) |
Definition at line 50 of file GoBackN.cpp.
| GoBackN::~GoBackN | ( | ) | [virtual] |
Definition at line 84 of file GoBackN.cpp.
| void GoBackN::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 487 of file GoBackN.cpp.
| void GoBackN::doDelayDelivery | ( | ) | [protected, virtual] |
| void GoBackN::doDeliver | ( | ) | [protected, virtual] |
| wns::ldk::CompoundPtr GoBackN::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 163 of file GoBackN.cpp.
| wns::ldk::CompoundPtr GoBackN::getData | ( | ) | [virtual] |
| const wns::ldk::CompoundPtr GoBackN::hasACK | ( | ) | const [virtual] |
| bool GoBackN::hasCapacity | ( | ) | const [virtual] |
| const wns::ldk::CompoundPtr GoBackN::hasData | ( | ) | const [virtual] |
| void GoBackN::onACKFrame | ( | const CompoundPtr & | compound | ) | [protected] |
Definition at line 385 of file GoBackN.cpp.
| void GoBackN::onIFrame | ( | const CompoundPtr & | compound | ) | [protected] |
Definition at line 288 of file GoBackN.cpp.
| void GoBackN::onNAKFrame | ( | const CompoundPtr & | compound | ) | [protected] |
Definition at line 447 of file GoBackN.cpp.
| bool GoBackN::onSuspend | ( | ) | const [protected, virtual] |
| void GoBackN::onTimeout | ( | ) | [virtual] |
The deriver is forced to implement this method. It gets called, whenever the timer fires.
Implements wns::events::CanTimeout.
Definition at line 246 of file GoBackN.cpp.
| void GoBackN::prepareRetransmission | ( | ) | [protected] |
Definition at line 500 of file GoBackN.cpp.
| void GoBackN::processIncoming | ( | const CompoundPtr & | compound | ) | [virtual] |
| void GoBackN::processOutgoing | ( | const CompoundPtr & | sdu | ) | [virtual] |
| void GoBackN::removeACKed | ( | const ARQCommand::SequenceNumber | ackedNS, | |
| CompoundContainer & | container | |||
| ) | [protected] |
Definition at line 525 of file GoBackN.cpp.
| bool GoBackN::retransmissionState | ( | ) | const [protected] |
Definition at line 555 of file GoBackN.cpp.
| void GoBackN::show_seqnr_list | ( | const char * | name, | |
| CompoundContainer & | compoundList | |||
| ) | const [protected] |
Definition at line 561 of file GoBackN.cpp.
friend class ::wns::ldk::arq::tests::GoBackNTest [friend] |
Definition at line 128 of file GoBackN.hpp.
CompoundContainer wns::ldk::arq::GoBackN::ackPDUs [protected] |
Definition at line 288 of file GoBackN.hpp.
CompoundPtr wns::ldk::arq::GoBackN::activeCompound [protected] |
Definition at line 273 of file GoBackN.hpp.
int wns::ldk::arq::GoBackN::bitsPerACKFrame [protected] |
Definition at line 253 of file GoBackN.hpp.
int wns::ldk::arq::GoBackN::bitsPerIFrame [protected] |
Definition at line 248 of file GoBackN.hpp.
Definition at line 314 of file GoBackN.hpp.
bool wns::ldk::arq::GoBackN::delayingDelivery [protected] |
Definition at line 312 of file GoBackN.hpp.
ARQCommand::SequenceNumber wns::ldk::arq::GoBackN::LA [protected] |
Definition at line 268 of file GoBackN.hpp.
logger::Logger wns::ldk::arq::GoBackN::logger [protected] |
Definition at line 316 of file GoBackN.hpp.
ARQCommand::SequenceNumber wns::ldk::arq::GoBackN::NR [protected] |
Definition at line 263 of file GoBackN.hpp.
ARQCommand::SequenceNumber wns::ldk::arq::GoBackN::NS [protected] |
Definition at line 258 of file GoBackN.hpp.
Definition at line 293 of file GoBackN.hpp.
double wns::ldk::arq::GoBackN::resendTimeout [protected] |
Definition at line 303 of file GoBackN.hpp.
bool wns::ldk::arq::GoBackN::sendNow [protected] |
Definition at line 298 of file GoBackN.hpp.
CompoundContainer wns::ldk::arq::GoBackN::sentPDUs [protected] |
Definition at line 278 of file GoBackN.hpp.
int wns::ldk::arq::GoBackN::sequenceNumberSize [protected] |
Definition at line 243 of file GoBackN.hpp.
Definition at line 283 of file GoBackN.hpp.
Definition at line 310 of file GoBackN.hpp.
int wns::ldk::arq::GoBackN::windowSize [protected] |
Definition at line 238 of file GoBackN.hpp.
1.5.5