User Manual, Developers Guide and API Documentation

wns::ldk::sar::SAR< COMMANDTYPE > Class Template Reference

Segmentation and Reassembly. More...

#include <ldk/sar/SAR.hpp>

Inheritance diagram for wns::ldk::sar::SAR< COMMANDTYPE >:

Inheritance graph
[legend]
Collaboration diagram for wns::ldk::sar::SAR< COMMANDTYPE >:

Collaboration graph
[legend]

List of all members.

Public Member Functions

virtual void calculateSizes (const CommandPool *commandPool, Bit &commandPoolSize, Bit &dataSize) const
 Default calculateSizes implementation.
Bit getCommandSize () const
Bit getSegmentSize () const
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 processOutgoing (const CompoundPtr &compound)
 Process compounds on downlink.
 SAR (fun::FUN *fuNet, const wns::pyconfig::View &config)
void setSegmentSize (const Bit size)
virtual ~SAR ()

Protected Member Functions

virtual void prepareSegment ()

Protected Attributes

CompoundPtr backupCompound
int fragmentNumber
Bit headerSize
logger::Logger logger
Bit nextPos
CompoundPtr nextSegment
Bit oldPCISize
Bit oldSDUSize
CompoundPtr outgoing
bool preserving
Bit segmentSize
Bit totalSize

Private Member Functions

virtual bool onSuspend () const


Detailed Description

template<typename COMMANDTYPE>
class wns::ldk::sar::SAR< COMMANDTYPE >

SAR supports changing the segment size during the segmentation of a PDU. If you use this feature, you should configure the header size to a sensible value.

Definition at line 79 of file SAR.hpp.


Constructor & Destructor Documentation

template<typename COMMANDTYPE>
wns::ldk::sar::SAR< COMMANDTYPE >::SAR ( fun::FUN fuNet,
const wns::pyconfig::View config 
) [inline]

Definition at line 87 of file SAR.hpp.

template<typename COMMANDTYPE>
virtual wns::ldk::sar::SAR< COMMANDTYPE >::~SAR (  )  [inline, virtual]

Definition at line 101 of file SAR.hpp.


Member Function Documentation

template<typename COMMANDTYPE>
virtual void wns::ldk::sar::SAR< COMMANDTYPE >::calculateSizes ( const CommandPool commandPool,
Bit commandPoolSize,
Bit dataSize 
) const [inline, virtual]

The default implementation delegates calculation to upper functional units, modifying the result to include the size of the provided Command.

Reimplemented from wns::ldk::CommandTypeSpecifier< COMMANDTYPE >.

Definition at line 218 of file SAR.hpp.

template<typename COMMANDTYPE>
Bit wns::ldk::sar::SAR< COMMANDTYPE >::getCommandSize (  )  const [inline]

Definition at line 210 of file SAR.hpp.

template<typename COMMANDTYPE>
Bit wns::ldk::sar::SAR< COMMANDTYPE >::getSegmentSize (  )  const [inline]

Definition at line 145 of file SAR.hpp.

template<typename COMMANDTYPE>
virtual CompoundPtr wns::ldk::sar::SAR< COMMANDTYPE >::getSomethingToSend (  )  [inline, 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 182 of file SAR.hpp.

template<typename COMMANDTYPE>
virtual bool wns::ldk::sar::SAR< COMMANDTYPE >::hasCapacity (  )  const [inline, virtual]

While hasCapacity returns false, processIncoming will never be called.

Implements wns::ldk::DelayedInterface.

Definition at line 194 of file SAR.hpp.

template<typename COMMANDTYPE>
virtual const CompoundPtr wns::ldk::sar::SAR< COMMANDTYPE >::hasSomethingToSend (  )  const [inline, virtual]

Implements wns::ldk::DelayedInterface.

Definition at line 199 of file SAR.hpp.

template<typename COMMANDTYPE>
virtual bool wns::ldk::sar::SAR< COMMANDTYPE >::onSuspend (  )  const [inline, private, virtual]

Implements wns::ldk::SuspendSupport.

Definition at line 321 of file SAR.hpp.

template<typename COMMANDTYPE>
virtual void wns::ldk::sar::SAR< COMMANDTYPE >::prepareSegment (  )  [inline, protected, virtual]

Definition at line 268 of file SAR.hpp.

template<typename COMMANDTYPE>
virtual void wns::ldk::sar::SAR< COMMANDTYPE >::processOutgoing ( const CompoundPtr  )  [inline, virtual]

Override this method to handle outgoing compounds.

Implements wns::ldk::DelayedInterface.

Definition at line 150 of file SAR.hpp.

template<typename COMMANDTYPE>
void wns::ldk::sar::SAR< COMMANDTYPE >::setSegmentSize ( const Bit  size  )  [inline]

Definition at line 113 of file SAR.hpp.


Member Data Documentation

template<typename COMMANDTYPE>
CompoundPtr wns::ldk::sar::SAR< COMMANDTYPE >::backupCompound [protected]

Todo:
(msg, ksw, swen) This should be removed. The problem here is that the Delayed interface should have two methods to be called in advance and after getSomethingToSend(), respectively.

Definition at line 252 of file SAR.hpp.

template<typename COMMANDTYPE>
int wns::ldk::sar::SAR< COMMANDTYPE >::fragmentNumber [protected]

Reimplemented in wns::ldk::sar::Fixed, and wns::ldk::sar::Soft.

Definition at line 255 of file SAR.hpp.

template<typename COMMANDTYPE>
Bit wns::ldk::sar::SAR< COMMANDTYPE >::headerSize [protected]

Definition at line 262 of file SAR.hpp.

template<typename COMMANDTYPE>
logger::Logger wns::ldk::sar::SAR< COMMANDTYPE >::logger [protected]

Definition at line 265 of file SAR.hpp.

template<typename COMMANDTYPE>
Bit wns::ldk::sar::SAR< COMMANDTYPE >::nextPos [protected]

Definition at line 254 of file SAR.hpp.

template<typename COMMANDTYPE>
CompoundPtr wns::ldk::sar::SAR< COMMANDTYPE >::nextSegment [protected]

Definition at line 245 of file SAR.hpp.

template<typename COMMANDTYPE>
Bit wns::ldk::sar::SAR< COMMANDTYPE >::oldPCISize [protected]

Definition at line 258 of file SAR.hpp.

template<typename COMMANDTYPE>
Bit wns::ldk::sar::SAR< COMMANDTYPE >::oldSDUSize [protected]

Definition at line 259 of file SAR.hpp.

template<typename COMMANDTYPE>
CompoundPtr wns::ldk::sar::SAR< COMMANDTYPE >::outgoing [protected]

Definition at line 244 of file SAR.hpp.

template<typename COMMANDTYPE>
bool wns::ldk::sar::SAR< COMMANDTYPE >::preserving [protected]

Definition at line 263 of file SAR.hpp.

template<typename COMMANDTYPE>
Bit wns::ldk::sar::SAR< COMMANDTYPE >::segmentSize [protected]

Definition at line 261 of file SAR.hpp.

template<typename COMMANDTYPE>
Bit wns::ldk::sar::SAR< COMMANDTYPE >::totalSize [protected]

Definition at line 257 of file SAR.hpp.


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

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