pamvotis.sources
Class GenericSource
java.lang.Object
pamvotis.sources.Source
pamvotis.sources.GenericSource
public class GenericSource
- extends Source
Represent a source generating continuous generic (abstract) traffic, CBR or VBR
- Author:
- Dimitris El. Vassis
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 java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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 sourceintArrDstr
- 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 lognormalpktLength
- The packet length (bits)
- Throws:
UnknownDistributionException
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