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


Public Member Functions | |
| BlockACK (const BlockACK &other) | |
| Copy Constructor, required when std::auto_ptr is used. | |
| BlockACK (wns::ldk::fun::FUN *fun, const wns::pyconfig::View &config) | |
| Regular FU Constructor. | |
| virtual void | calculateSizes (const wns::ldk::CommandPool *commandPool, Bit &commandPoolSize, Bit &dataSize) const |
| SDU and PCI size calculation. | |
| virtual void | copyTransmissionCounter (const wns::ldk::CompoundPtr &src, const wns::ldk::CompoundPtr &dst) |
| Copy the tx counter to anther FU. | |
| virtual bool | doIsAccepting (const wns::ldk::CompoundPtr &compound) const |
| virtual wns::ldk::CompoundPtr | getACK () |
| Returns the pending BlockACK reply. | |
| virtual wns::ldk::CompoundPtr | getData () |
| Returns the currently pending compound. | |
| wifimac::lowerMAC::Manager * | getManager () const |
| Returns the pointer to the wifimac::lowerMAC::Manager FU. | |
| const size_t | getMaxOnAir () |
| wifimac::management::PERInformationBase * | getPERMIB () |
| virtual unsigned int | getTransmissionCounter (const wns::ldk::CompoundPtr &compound) const |
| Read the tx counter. | |
| virtual const wns::ldk::CompoundPtr | hasACK () const |
| Queries the rxQueue for which a BlockACK request has been received for the BlockACK reply. | |
| virtual bool | hasCapacity () const |
| Sets the conditions to accept a new compound to transmit. | |
| virtual const wns::ldk::CompoundPtr | hasData () const |
| Checks if the current txQueue has pending compounds. | |
| virtual void | onFUNCreated () |
| Initialization. | |
| virtual void | onRxEnd () |
| Observe rxEnd to signal the upcoming ACK reception. | |
| virtual void | onRxError () |
| Does nothing, required by IRxStartEnd interface. | |
| virtual void | onRxStart (wns::simulator::Time expRxTime) |
| Observe rxStart to stop the timeout for ACK reception. | |
| virtual void | onTimeout () |
| CanTimeout interface realization, required for missing ACKs. | |
| virtual void | onTransmissionHasFailed (const wns::ldk::CompoundPtr &compound) |
| Signal from RTS/CTS that the transmission has failed. | |
| virtual void | onTxEnd (const wns::ldk::CompoundPtr &compound) |
| Signals end of own transmission -> set timeout for ACK. | |
| virtual void | onTxStart (const wns::ldk::CompoundPtr &compound) |
| Signals start of transmission. | |
| virtual void | processIncoming (const wns::ldk::CompoundPtr &compound) |
| Processing of incoming (received) compounds. | |
| virtual void | processOutgoing (const wns::ldk::CompoundPtr &compound) |
| Processing of outgoing (to be transmitted) compounds. | |
| virtual void | registerObserver (IBlockACKObserver *o) |
| observers get called after an (un)successful transmission | |
| virtual | ~BlockACK () |
| Destructor. | |
Protected Types | |
| enum | BAState { idle, waitForACK, receiving, receptionFinished } |
| BlockACK state can be * idle: No ongoing transmission * waitForACK: Compound is send, waiting for beginning of reception of ACK * receiving: Reception has started, not sure if it is the (Block)ACK * receptionFinished: Got RxEndIndication and waiting for PHY to deliver the frame. More... | |
Protected Member Functions | |
| virtual void | processIncomingACKSNs (std::set< BlockACKCommand::SequenceNumber > ackSNs) |
| Manages an incoming ACK (or rather the set of SNs). | |
| virtual unsigned int | storageSize () const |
| Compute storage size (txQueue + sum(rxQueues). | |
Protected Attributes | |
| enum wifimac::draftn::BlockACK::BAState | baState |
| const Bit | capacity |
| Maximum number of stored bits (rx+tx+air). | |
| TransmissionQueue * | currentTxQueue |
| Storage of outgoing, non-ack'ed frames. | |
| wns::logger::Logger | logger |
| Logger. | |
| const size_t | maxOnAir |
| Window size of a link. | |
| std::auto_ptr < wns::ldk::buffer::SizeCalculator > | sizeCalculator |
| calculation of size (e.g. by bits or pdus) | |
Private Types | |
| typedef wns::container::Registry < wns::service::dll::UnicastAddress, BlockACKCommand::SequenceNumber > | AddrSNMap |
Private Member Functions | |
| bool | isAccepting (const wns::ldk::CompoundPtr &compound) const |
| void | printTxQueueStatus () const |
| Debug helper function. | |
Private Attributes | |
| const wns::simulator::Time | ackTimeout |
| Duration between start of preamble and rx indication. | |
| const Bit | baBits |
| size of BlockACK | |
| const Bit | baReqBits |
| size of BlockACKReques | |
| const wifimac::convergence::PhyMode | blockACKPhyMode |
| struct wifimac::draftn::BlockACK::Friends | friends |
| wns::service::dll::UnicastAddress | hasACKfor |
| indication that ACK must be transmitted | |
| const bool | impatientBAreqTransmission |
| transmit as BAreq as early as possible without reaching maxOnAir | |
| const std::string | managerName |
| const wns::simulator::Time | maximumACKDuration |
| Maximum expected duration of BlockACK. | |
| const size_t | maximumTransmissions |
| maximum number of transmissions before drop | |
| AddrSNMap | nextTransmissionSN |
| wns::probe::bus::ContextCollectorPtr | numTxAttemptsProbe |
| std::vector< IBlockACKObserver * > | observers |
| wifimac::management::PERInformationBase * | perMIB |
| const std::string | perMIBServiceName |
| wns::container::Registry < wns::service::dll::UnicastAddress, ReceptionQueue * > | rxQueues |
| Storage of incoming, non-ordered frames. | |
| const std::string | rxStartEndName |
| const std::string | sendBufferName |
| const wns::simulator::Time | sifsDuration |
| Duration of the Short InterFrame Space. | |
| const std::string | txStartEndName |
Friends | |
| class | ReceptionQueue |
| class | TransmissionQueue |
Classes | |
| struct | Friends |
Thus, the block ack decreases the overhead of IEEE 802.11 by reducing the multiple neccessary ACKs for each frame to one block ack request / reply for each maxOnAir frames. Furthermore, the BlockACK can be easily combined with a frame aggregation FU to further improve the efficiency, reducing the number of backoff attempts.
The BlockACK FU implementation follows the design of ARQs in the ldk by deriving from wns::ldk::arq::ARQ, but enhances it with the neccessary functionality for IEEE 802.11-style (i.e. immediate) ARQ, based on wifimac::convergence::ITxStartEnd and wifimac::convergence::IRxStartEnd. This is similar to the much simpler wifimac::lowerMAC::StopAndWaitARQ.
To handle outgoing and incoming compounds, the BlockACK uses the two classes wifimac::draftN::TransmissionQueue and wifimac::draftN::ReceptionQueue:
A BlockACK FU can be set to patient or impatient:
Definition at line 113 of file BlockACK.hpp.
typedef wns::container::Registry<wns::service::dll::UnicastAddress, BlockACKCommand::SequenceNumber> wifimac::draftn::BlockACK::AddrSNMap [private] |
Definition at line 126 of file BlockACK.hpp.
enum wifimac::draftn::BlockACK::BAState [protected] |
Definition at line 319 of file BlockACK.hpp.
| BlockACK::BlockACK | ( | wns::ldk::fun::FUN * | fun, | |
| const wns::pyconfig::View & | config | |||
| ) |
Definition at line 48 of file BlockACK.cpp.
| BlockACK::BlockACK | ( | const BlockACK & | other | ) |
Definition at line 93 of file BlockACK.cpp.
| BlockACK::~BlockACK | ( | ) | [virtual] |
Definition at line 125 of file BlockACK.cpp.
| void BlockACK::calculateSizes | ( | const wns::ldk::CommandPool * | commandPool, | |
| Bit & | commandPoolSize, | |||
| Bit & | dataSize | |||
| ) | const [virtual] |
| void BlockACK::copyTransmissionCounter | ( | const wns::ldk::CompoundPtr & | src, | |
| const wns::ldk::CompoundPtr & | dst | |||
| ) | [virtual] |
| bool BlockACK::doIsAccepting | ( | const wns::ldk::CompoundPtr & | ) | const [virtual] |
Part of CompoundHandlerInterface implementation.
Reimplemented from wns::ldk::Delayed< USER >.
Definition at line 177 of file BlockACK.cpp.
| wns::ldk::CompoundPtr BlockACK::getACK | ( | ) | [virtual] |
| wns::ldk::CompoundPtr BlockACK::getData | ( | ) | [virtual] |
| wifimac::lowerMAC::Manager* wifimac::draftn::BlockACK::getManager | ( | ) | const [inline] |
Definition at line 269 of file BlockACK.hpp.
| const size_t wifimac::draftn::BlockACK::getMaxOnAir | ( | ) | [inline] |
Definition at line 278 of file BlockACK.hpp.
| wifimac::management::PERInformationBase* wifimac::draftn::BlockACK::getPERMIB | ( | ) | [inline] |
Definition at line 284 of file BlockACK.hpp.
| unsigned int BlockACK::getTransmissionCounter | ( | const wns::ldk::CompoundPtr & | compound | ) | const [virtual] |
| const wns::ldk::CompoundPtr BlockACK::hasACK | ( | ) | const [virtual] |
| bool BlockACK::hasCapacity | ( | ) | const [virtual] |
These conditions are #- The storage capacity of the FU (size txQueue + sizes rxQueues) is not exhausted. #- The last compound accepted has the same receiver as the current transmission queue #- The transmission queue does not wait for an ACK, i.e. there are no frames on the air. #- The number of frames in the txQueue is below the number which can be send in the next round.
Implements wns::ldk::DelayedInterface.
Definition at line 186 of file BlockACK.cpp.
| const wns::ldk::CompoundPtr BlockACK::hasData | ( | ) | const [virtual] |
| bool wifimac::draftn::BlockACK::isAccepting | ( | const wns::ldk::CompoundPtr & | compound | ) | const [private] |
| void BlockACK::onFUNCreated | ( | ) | [virtual] |
| void BlockACK::onRxEnd | ( | ) | [virtual] |
| void BlockACK::onRxError | ( | ) | [virtual] |
| void BlockACK::onRxStart | ( | wns::simulator::Time | expRxTime | ) | [virtual] |
| void BlockACK::onTimeout | ( | ) | [virtual] |
| void BlockACK::onTransmissionHasFailed | ( | const wns::ldk::CompoundPtr & | compound | ) | [virtual] |
A failed CTS is handled in the same way as a missing ACK or a BlockACK reply with an empty SN-set
Implements wifimac::lowerMAC::ITransmissionCounter.
Definition at line 423 of file BlockACK.cpp.
| void BlockACK::onTxEnd | ( | const wns::ldk::CompoundPtr & | compound | ) | [virtual] |
| void BlockACK::onTxStart | ( | const wns::ldk::CompoundPtr & | compound | ) | [virtual] |
| void BlockACK::printTxQueueStatus | ( | ) | const [private] |
Definition at line 503 of file BlockACK.cpp.
| void BlockACK::processIncoming | ( | const wns::ldk::CompoundPtr & | compound | ) | [virtual] |
Depending on the compound type and its transmitter, the correct function is applied:
Implements wns::ldk::DelayedInterface.
Definition at line 237 of file BlockACK.cpp.
| void BlockACK::processIncomingACKSNs | ( | std::set< BlockACKCommand::SequenceNumber > | ackSNs | ) | [protected, virtual] |
After the forwarding of the set of SNs to the current txQueue with processIncomingACK(), the function checks if the txQueue has finished processing the current row of frames. If yes, it is deleted and the current receiver is reset, so that a new round of transmissions can start (possible with the one compound for a different receiver that has been stored temporarily)
Definition at line 286 of file BlockACK.cpp.
| void BlockACK::processOutgoing | ( | const wns::ldk::CompoundPtr & | compound | ) | [virtual] |
The BlockACK FU owns only one transmission queue which is operated on until all compounds are either successfully transmitted or discarded. Hence, if a compound for a different receiving peer node arrives, it is temporary stored until the current txQueue has finished operation.
As speciallity, the function tries to get as much frames as possible from the upper FU before starting the transmission using a getReceptor()->wakeup() recursion.
Implements wns::ldk::DelayedInterface.
Definition at line 196 of file BlockACK.cpp.
| virtual void wifimac::draftn::BlockACK::registerObserver | ( | IBlockACKObserver * | o | ) | [inline, virtual] |
Definition at line 145 of file BlockACK.hpp.
| unsigned int BlockACK::storageSize | ( | ) | const [protected, virtual] |
Definition at line 156 of file BlockACK.cpp.
friend class ReceptionQueue [friend] |
Definition at line 124 of file BlockACK.hpp.
friend class TransmissionQueue [friend] |
Definition at line 123 of file BlockACK.hpp.
const wns::simulator::Time wifimac::draftn::BlockACK::ackTimeout [private] |
Definition at line 360 of file BlockACK.hpp.
const Bit wifimac::draftn::BlockACK::baBits [private] |
Definition at line 363 of file BlockACK.hpp.
const Bit wifimac::draftn::BlockACK::baReqBits [private] |
Definition at line 365 of file BlockACK.hpp.
enum wifimac::draftn::BlockACK::BAState wifimac::draftn::BlockACK::baState [protected] |
Definition at line 353 of file BlockACK.hpp.
const Bit wifimac::draftn::BlockACK::capacity [protected] |
Definition at line 301 of file BlockACK.hpp.
Definition at line 294 of file BlockACK.hpp.
struct wifimac::draftn::BlockACK::Friends wifimac::draftn::BlockACK::friends [private] |
Definition at line 377 of file BlockACK.hpp.
const bool wifimac::draftn::BlockACK::impatientBAreqTransmission [private] |
Definition at line 371 of file BlockACK.hpp.
wns::logger::Logger wifimac::draftn::BlockACK::logger [protected] |
Definition at line 291 of file BlockACK.hpp.
const std::string wifimac::draftn::BlockACK::managerName [private] |
Definition at line 347 of file BlockACK.hpp.
const wns::simulator::Time wifimac::draftn::BlockACK::maximumACKDuration [private] |
Definition at line 358 of file BlockACK.hpp.
const size_t wifimac::draftn::BlockACK::maximumTransmissions [private] |
Definition at line 368 of file BlockACK.hpp.
const size_t wifimac::draftn::BlockACK::maxOnAir [protected] |
Definition at line 307 of file BlockACK.hpp.
mapping from unicast addresses to compound transmission SNs for each link (receiver), the first SN of the next transmission round is stored
Definition at line 382 of file BlockACK.hpp.
probing the number of tx attempts until successfull transmission or retry abort
Definition at line 398 of file BlockACK.hpp.
std::vector<IBlockACKObserver *> wifimac::draftn::BlockACK::observers [private] |
Definition at line 400 of file BlockACK.hpp.
Signalling successfull/failed transmission attempts to the management information base
Definition at line 394 of file BlockACK.hpp.
const std::string wifimac::draftn::BlockACK::perMIBServiceName [private] |
Definition at line 351 of file BlockACK.hpp.
wns::container::Registry<wns::service::dll::UnicastAddress, ReceptionQueue*> wifimac::draftn::BlockACK::rxQueues [private] |
Definition at line 374 of file BlockACK.hpp.
const std::string wifimac::draftn::BlockACK::rxStartEndName [private] |
Definition at line 348 of file BlockACK.hpp.
const std::string wifimac::draftn::BlockACK::sendBufferName [private] |
Definition at line 350 of file BlockACK.hpp.
const wns::simulator::Time wifimac::draftn::BlockACK::sifsDuration [private] |
Definition at line 356 of file BlockACK.hpp.
std::auto_ptr<wns::ldk::buffer::SizeCalculator> wifimac::draftn::BlockACK::sizeCalculator [protected] |
Definition at line 304 of file BlockACK.hpp.
const std::string wifimac::draftn::BlockACK::txStartEndName [private] |
Definition at line 349 of file BlockACK.hpp.
1.5.5