GEN::StreamPareto Class Reference

StreamPareto -- To create Self-Similar traffic. More...

#include <trf_gen_v3.h>

Inheritance diagram for GEN::StreamPareto:

GEN::Stream AVL_tree_namespace::AVLNode< avlkey_t >

List of all members.

Public Member Functions

 StreamPareto (load_t ld, float mean_burst, shape_t shape)
virtual ~StreamPareto ()
virtual void SetLoad (load_t load)

Private Member Functions

virtual burst_size_t NextBurstSize (void)
virtual pause_size_t NextPauseSize (void)

Private Attributes

float MinBurst
float MinPause
shape_t Shape
pause_size_t pause
burst_size_t burst


Detailed Description

StreamPareto -- To create Self-Similar traffic.

Definition at line 223 of file trf_gen_v3.h.


Constructor & Destructor Documentation

GEN::StreamPareto::StreamPareto ( load_t  ld,
float  mean_burst,
shape_t  shape 
) [inline]

Definition at line 254 of file trf_gen_v3.h.

00254                                                                    : Stream()
00255         {
00256             Shape = SetInRange<shape_t>( shape,  MIN_ALPHA, MAX_ALPHA );
00257             MinBurst = mean_burst * ( 1.0F - 1.0F / Shape );
00258             SetLoad( ld );
00259             Reset();
00260         }

virtual GEN::StreamPareto::~StreamPareto (  )  [inline, virtual]

Definition at line 262 of file trf_gen_v3.h.

00262 {}


Member Function Documentation

virtual burst_size_t GEN::StreamPareto::NextBurstSize ( void   )  [inline, private, virtual]

Reimplemented from GEN::Stream.

Definition at line 236 of file trf_gen_v3.h.

00237         {
00238         //Generate a pareto distribution
00239         //According to http://www.omnetpp.org/listarchive/msg10899.php and
00240         //the file included in omnetpp: test/dist/omnetpp.ini, lines 390-425.
00241         burst=round<burst_size_t>(pareto_shifted(Shape,MinBurst,0));
00242                 return burst;
00243         }

virtual pause_size_t GEN::StreamPareto::NextPauseSize ( void   )  [inline, private, virtual]

Reimplemented from GEN::Stream.

Definition at line 244 of file trf_gen_v3.h.

00245         {
00246         pause=round<pause_size_t>(pareto_shifted(Shape,MinPause,0));
00247                 return pause;
00248         }

virtual void GEN::StreamPareto::SetLoad ( load_t  load  )  [inline, virtual]

Reimplemented from GEN::Stream.

Definition at line 265 of file trf_gen_v3.h.

00266         {
00267             MinPause = MinBurst * ( 1.0F / SetInRange(load, MIN_LOAD, MAX_LOAD) - 1.0F );
00268         }


Member Data Documentation

Definition at line 233 of file trf_gen_v3.h.

float GEN::StreamPareto::MinBurst [private]

Definition at line 227 of file trf_gen_v3.h.

float GEN::StreamPareto::MinPause [private]

Definition at line 228 of file trf_gen_v3.h.

Definition at line 232 of file trf_gen_v3.h.

Definition at line 229 of file trf_gen_v3.h.


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

Generated on Thu Nov 28 14:47:25 2013 for red_wireless by  doxygen 1.5.7.1