User Manual, Developers Guide and API Documentation

constanze::GeneratorBase Class Reference

Packet Generator Base Class takes care of bindings, start and stop trigger, logger and pyco the derived classes can focus on traffic generation.

#include <Generator.hpp>

Inheritance diagram for constanze::GeneratorBase:

Inheritance graph
[legend]
Collaboration diagram for constanze::GeneratorBase:

Collaboration graph
[legend]

List of all members.

Public Types

typedef
wns::PyConfigViewCreator
< GeneratorBase, GeneratorBase
Creator
typedef wns::StaticFactory
< Creator
Factory

Public Member Functions

void bindingReady ()
 after binding is ready (at startTrigger time = offset), set timeout for the first packet and delete the startTrigger
void bindingReleased ()
 when the stopTrigger event happens, the next timeout event is cancelled and the stopTrigger is deleted
virtual unsigned long int countedBits () const
virtual unsigned long int countedPackets () const
virtual void countPackets (const int packetSizeBits)
 called by SubGenerators or derived classes
 GeneratorBase (const wns::pyconfig::View &_pyco)
void registerBinding (constanze::Binding *_bind)
 store binding in member and make startTrigger and stopTrigger with parameters from pyConfig the binding is made when the startTrigger event happens
virtual void sendData (const wns::osi::PDUPtr &pdu)
 send PDU out downstack
virtual void start ()=0
 called when process should start generating events
virtual void stop ()=0
 called when process should stop generating events
virtual ~GeneratorBase ()

Protected Attributes

constanze::Bindingbinding
 Binding for plugging the Generator on top of any layer, eg., UDP or IP.
wns::logger::Logger log
 Logger instance.
wns::pyconfig::View pyco
 The Python configuration.

Private Attributes

unsigned long int bitCounter
 count bits
unsigned long int packetCounter
 count packets
constanze::StartTriggerstartTrigger
 Event-triggered handler for the START time.
constanze::StopTriggerstopTrigger
 Event-triggered handler for the STOP time.


Detailed Description

Definition at line 49 of file Generator.hpp.


Member Typedef Documentation

Definition at line 52 of file Generator.hpp.

Definition at line 53 of file Generator.hpp.


Constructor & Destructor Documentation

GeneratorBase::GeneratorBase ( const wns::pyconfig::View _pyco  )  [explicit]

Definition at line 38 of file Generator.cpp.

GeneratorBase::~GeneratorBase (  )  [virtual]

Definition at line 49 of file Generator.cpp.


Member Function Documentation

void GeneratorBase::bindingReady (  ) 

Definition at line 72 of file Generator.cpp.

void GeneratorBase::bindingReleased (  ) 

Definition at line 82 of file Generator.cpp.

virtual unsigned long int constanze::GeneratorBase::countedBits (  )  const [inline, virtual]

Definition at line 98 of file Generator.hpp.

virtual unsigned long int constanze::GeneratorBase::countedPackets (  )  const [inline, virtual]

Definition at line 97 of file Generator.hpp.

void GeneratorBase::countPackets ( const int  packetSizeBits  )  [virtual]

Definition at line 95 of file Generator.cpp.

void GeneratorBase::registerBinding ( constanze::Binding _bind  ) 

Definition at line 60 of file Generator.cpp.

void GeneratorBase::sendData ( const wns::osi::PDUPtr pdu  )  [virtual]

Definition at line 90 of file Generator.cpp.

virtual void constanze::GeneratorBase::start (  )  [pure virtual]

virtual void constanze::GeneratorBase::stop (  )  [pure virtual]


Member Data Documentation

Definition at line 116 of file Generator.hpp.

unsigned long int constanze::GeneratorBase::bitCounter [private]

Definition at line 131 of file Generator.hpp.

Definition at line 110 of file Generator.hpp.

Definition at line 129 of file Generator.hpp.

Definition at line 105 of file Generator.hpp.

Definition at line 122 of file Generator.hpp.

Definition at line 126 of file Generator.hpp.


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

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