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


Public Member Functions | |
| Buffer (const Buffer &other) | |
| Copy Constructor. | |
| Buffer (wns::ldk::fun::FUN *fuNet, const wns::pyconfig::View &config) | |
| Constructor. | |
| virtual unsigned long int | getMaxSize () |
| returns the maximum size of the buffer | |
| virtual wns::service::dll::UnicastAddress | getNextReceiver () const |
| returns receiver address of next compound (if any) | |
| virtual wns::simulator::Time | getNextTransmissionDuration () |
| returns transmission duration of next compound (if any) | |
| virtual unsigned long int | getSize () |
| returns the currently used buffer size | |
| virtual wns::ldk::CompoundPtr | getSomethingToSend () |
| returns the next waiting PDU | |
| virtual bool | hasCapacity () const |
| Always true: If size is exceeded, frames are discarded. | |
| virtual const wns::ldk::CompoundPtr | hasSomethingToSend () const |
| indicates a waiting PDU | |
| virtual void | processIncoming (const wns::ldk::CompoundPtr &compound) |
| Incoming (received) compounds: Do nothing. | |
| virtual void | processOutgoing (const wns::ldk::CompoundPtr &compound) |
| enqueues outgoing PDUs from above FUs outgoing compounds that are passed to the buffer from above FUs are stored in a FIFO fashion, as long as the overall sizs of the buffer isn't exceeded. Otherwise the compound is dropped | |
| virtual | ~Buffer () |
| Destructor. | |
Protected Attributes | |
| wns::ldk::buffer::dropping::ContainerType | buffer |
Private Types | |
| typedef unsigned long int | PDUCounter |
Private Member Functions | |
| void | checkLifetime () |
| void | onFUNCreated () |
| Resolve inter-FU dependencies. | |
Private Attributes | |
| unsigned long int | currentSize |
| PDUCounter | droppedPDUs |
| std::auto_ptr < wns::ldk::buffer::dropping::Drop > | dropper |
| struct wifimac::lowerMAC::Buffer::Friends | friends |
| bool | isActive |
| wns::logger::Logger | logger |
| const std::string | managerName |
| unsigned long int | maxSize |
| wifimac::management::ProtocolCalculator * | protocolCalculator |
| const std::string | protocolCalculatorName |
| const std::string | raName |
| std::auto_ptr < wns::ldk::buffer::SizeCalculator > | sizeCalculator |
| PDUCounter | totalPDUs |
Classes | |
| struct | Friends |
The maximum size is given as number of compounds to store. The Buffer class also implements the TXOPTimeWindow interface in order to let the TXOP FU determine the size of the next compound waiting to be passed to the FU below the buffer and /or the corresponding receiver
Definition at line 53 of file Buffer.hpp.
typedef unsigned long int wifimac::lowerMAC::Buffer::PDUCounter [private] |
| Buffer::Buffer | ( | wns::ldk::fun::FUN * | fuNet, | |
| const wns::pyconfig::View & | config | |||
| ) |
| Buffer::Buffer | ( | const Buffer & | other | ) |
Definition at line 74 of file Buffer.cpp.
| Buffer::~Buffer | ( | ) | [virtual] |
| void Buffer::checkLifetime | ( | ) | [private] |
Definition at line 188 of file Buffer.cpp.
| unsigned long int Buffer::getMaxSize | ( | ) | [virtual] |
| wns::service::dll::UnicastAddress Buffer::getNextReceiver | ( | ) | const [virtual] |
| wns::simulator::Time Buffer::getNextTransmissionDuration | ( | ) | [virtual] |
| unsigned long int Buffer::getSize | ( | ) | [virtual] |
| wns::ldk::CompoundPtr Buffer::getSomethingToSend | ( | ) | [virtual] |
returns and removes the next compound from the buffer (see hasSomethingToSend())
Implements wns::ldk::DelayedInterface.
Definition at line 171 of file Buffer.cpp.
| bool Buffer::hasCapacity | ( | ) | const [virtual] |
| const wns::ldk::CompoundPtr Buffer::hasSomethingToSend | ( | ) | const [virtual] |
if the buffer is not empty, the transmission duration of the next compound fits into the set time frame and the buffer is active, this method returns a pointer to that compound
Implements wns::ldk::DelayedInterface.
Definition at line 160 of file Buffer.cpp.
| void Buffer::onFUNCreated | ( | ) | [private, 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.
Definition at line 102 of file Buffer.cpp.
| void Buffer::processIncoming | ( | const wns::ldk::CompoundPtr & | compound | ) | [virtual] |
| void Buffer::processOutgoing | ( | const wns::ldk::CompoundPtr & | compound | ) | [virtual] |
Definition at line 136 of file Buffer.hpp.
unsigned long int wifimac::lowerMAC::Buffer::currentSize [private] |
Definition at line 143 of file Buffer.hpp.
std::auto_ptr<wns::ldk::buffer::dropping::Drop> wifimac::lowerMAC::Buffer::dropper [private] |
Definition at line 146 of file Buffer.hpp.
struct wifimac::lowerMAC::Buffer::Friends wifimac::lowerMAC::Buffer::friends [private] |
bool wifimac::lowerMAC::Buffer::isActive [private] |
Definition at line 144 of file Buffer.hpp.
const std::string wifimac::lowerMAC::Buffer::managerName [private] |
Definition at line 153 of file Buffer.hpp.
unsigned long int wifimac::lowerMAC::Buffer::maxSize [private] |
Definition at line 142 of file Buffer.hpp.
Definition at line 154 of file Buffer.hpp.
const std::string wifimac::lowerMAC::Buffer::protocolCalculatorName [private] |
Definition at line 152 of file Buffer.hpp.
const std::string wifimac::lowerMAC::Buffer::raName [private] |
Definition at line 151 of file Buffer.hpp.
std::auto_ptr<wns::ldk::buffer::SizeCalculator> wifimac::lowerMAC::Buffer::sizeCalculator [private] |
Definition at line 145 of file Buffer.hpp.
1.5.5