pamvotis.sources
Class GenericSource

java.lang.Object
  extended by pamvotis.sources.Source
      extended by pamvotis.sources.GenericSource

public class GenericSource
extends Source

Represent a source generating continuous generic (abstract) traffic, CBR or VBR

Author:
Dimitris El. Vassis

Field Summary
 
Fields inherited from class pamvotis.sources.Source
_sourceId, generator, interArTime, pktLength, session, slot, timer
 
Constructor Summary
GenericSource(int sourceId, char intArrDstr, float rate, char pktLngthDstr, float pktLength)
          Instantiates a generic source with specified parameters.
 
Method Summary
 void getNextPacket()
          If a session is empty, meaning that no packet exists, create a new packet.
 void synchronize()
          This function is not needed for the case of the generic source.
 
Methods inherited from class pamvotis.sources.Source
genRv, genRv, genRv, genRv
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GenericSource

public GenericSource(int sourceId,
                     char intArrDstr,
                     float rate,
                     char pktLngthDstr,
                     float pktLength)
              throws UnknownDistributionException
Instantiates a generic source with specified parameters.

Parameters:
sourceId - The ID of the source
intArrDstr - The packet interarrival time (sec)
rate - The packet generation rate (packets/sec)
pktLngthDstr - The packet length distribution c for constant, u for uniform e for exponential, p for pareto, l for lognormal
pktLength - The packet length (bits)
Throws:
UnknownDistributionException
Method Detail

getNextPacket

public void getNextPacket()
If a session is empty, meaning that no packet exists, create a new packet. Then the first packet of the session is picked up in order to be born when its interarrival counter expires. For the case of the generic source, only one packet exists so each session is constituted of one packet only.

Specified by:
getNextPacket in class Source

synchronize

public void synchronize()
This function is not needed for the case of the generic source.

Specified by:
synchronize in class Source