User Manual, Developers Guide and API Documentation

wns::ldk::buffer::Dropping Class Reference

Discarding buffer of a fixed size. More...

#include <ldk/buffer/Dropping.hpp>

Inheritance diagram for wns::ldk::buffer::Dropping:

Inheritance graph
[legend]
Collaboration diagram for wns::ldk::buffer::Dropping:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 Dropping (const Dropping &other)
 Copy Constructor.
 Dropping (fun::FUN *fuNet, const wns::pyconfig::View &config)
 Constructor.
virtual unsigned long int getMaxSize ()
virtual unsigned long int getSize ()
virtual CompoundPtr getSomethingToSend ()
 Return the PDU that is ready to be sent.
virtual bool hasCapacity () const
 Return true, if the FunctionalUnit is still accepting compounds.
virtual const CompoundPtr hasSomethingToSend () const
 Return a PDU that is ready to be sent or NULL, if none available.
virtual void processIncoming (const CompoundPtr &compound)
 Process compounds on uplink.
virtual void processOutgoing (const CompoundPtr &compound)
 Process compounds on downlink.
virtual ~Dropping ()
 Destructor.

Protected Attributes

dropping::ContainerType buffer

Private Types

typedef unsigned long int PDUCounter

Private Attributes

unsigned long int currentSize
PDUCounter droppedPDUs
std::auto_ptr< dropping::Dropdropper
logger::Logger logger
unsigned long int maxSize
std::auto_ptr< SizeCalculatorsizeCalculator
PDUCounter totalPDUs


Detailed Description

FIFO buffer, discarding some compounds, when the buffer is full. The maximum size is given as number of compounds to store.

Definition at line 117 of file Dropping.hpp.


Member Typedef Documentation

typedef unsigned long int wns::ldk::buffer::Dropping::PDUCounter [private]

Reimplemented from wns::ldk::buffer::Buffer.

Definition at line 122 of file Dropping.hpp.


Constructor & Destructor Documentation

Dropping::Dropping ( fun::FUN fuNet,
const wns::pyconfig::View config 
)

Definition at line 78 of file Dropping.cpp.

Dropping::Dropping ( const Dropping other  ) 

Definition at line 104 of file Dropping.cpp.

Dropping::~Dropping (  )  [virtual]

Definition at line 129 of file Dropping.cpp.


Member Function Documentation

unsigned long int Dropping::getMaxSize (  )  [virtual]

Implements wns::ldk::buffer::Buffer.

Definition at line 210 of file Dropping.cpp.

unsigned long int Dropping::getSize (  )  [virtual]

Implements wns::ldk::buffer::Buffer.

Definition at line 203 of file Dropping.cpp.

CompoundPtr Dropping::getSomethingToSend (  )  [virtual]

This method must never return NULL. This method will only be called after a call to hasSomethingToSend returned a non-null value. The FunctionalUnit must return the same PDU as returned by hasSomethingToSend.

Implements wns::ldk::DelayedInterface.

Definition at line 186 of file Dropping.cpp.

bool Dropping::hasCapacity (  )  const [virtual]

While hasCapacity returns false, processIncoming will never be called.

Implements wns::ldk::DelayedInterface.

Definition at line 145 of file Dropping.cpp.

const CompoundPtr Dropping::hasSomethingToSend (  )  const [virtual]

Implements wns::ldk::DelayedInterface.

Definition at line 176 of file Dropping.cpp.

void Dropping::processIncoming ( const CompoundPtr compound  )  [virtual]

Override this method to handle incoming compounds.

Implements wns::ldk::DelayedInterface.

Definition at line 138 of file Dropping.cpp.

void Dropping::processOutgoing ( const CompoundPtr  )  [virtual]

Override this method to handle outgoing compounds.

Implements wns::ldk::DelayedInterface.

Definition at line 152 of file Dropping.cpp.


Member Data Documentation

Definition at line 170 of file Dropping.hpp.

Definition at line 174 of file Dropping.hpp.

Reimplemented from wns::ldk::buffer::Buffer.

Definition at line 180 of file Dropping.hpp.

Definition at line 177 of file Dropping.hpp.

Reimplemented from wns::ldk::buffer::Buffer.

Definition at line 182 of file Dropping.hpp.

unsigned long int wns::ldk::buffer::Dropping::maxSize [private]

Definition at line 173 of file Dropping.hpp.

Definition at line 176 of file Dropping.hpp.

Reimplemented from wns::ldk::buffer::Buffer.

Definition at line 179 of file Dropping.hpp.


The documentation for this class was generated from the following files:

Generated on Sat May 26 03:32:56 2012 for openWNS by  doxygen 1.5.5