public class StdGenerator extends Generator
StdGenerator
generates messages according to a renewal point
process for which IAT distribution is provided/parsed. If a distribution for
the length of a message is provided/parsed it sets the message length in an
iid fashion. That is, each time a message is created, the message length is
drawn according to the given distribution. A MessageFactory may be provided
to create messages other than Message.
If a length distribution is provided, the length of the default Message
generated by the MessageFactory
is overwritten.
StdGenerator is a very flexible Generator with the following characteristics:
MessageFactory
, the length is adapted
by calling setLength()
of the message and passing the new length
according to the length distribution.
MessageFactory
.
StdGenerator
or during the parsing procedure.
Entity.PortAlias
Modifier and Type | Field and Description |
---|---|
protected ContinuousDistribution |
interArrivalTime |
protected DiscreteDistribution |
messageLengthDist |
activated, event, messageFactory, outputPort
portAliases, ports, simNode
CREATE_INSTANCE_METHOD_NAME
Modifier | Constructor and Description |
---|---|
|
StdGenerator(ContinuousDistribution iat,
DiscreteDistribution lengthdist,
SimNode ownNode) |
|
StdGenerator(ContinuousDistribution iat,
DiscreteDistribution lengthdist,
SimNode ownNode,
boolean activateOnStart) |
|
StdGenerator(ContinuousDistribution iat,
DiscreteDistribution lengthdist,
SimNode ownNode,
Factory<Message> factory) |
|
StdGenerator(ContinuousDistribution iat,
DiscreteDistribution lengthdist,
SimNode ownNode,
Factory<Message> factory,
boolean activateOnStart)
Constructor with factory but without parsing.
|
|
StdGenerator(ContinuousDistribution iat,
SimNode ownNode) |
|
StdGenerator(ContinuousDistribution iat,
SimNode ownNode,
boolean activateOnStart) |
|
StdGenerator(ContinuousDistribution iat,
SimNode ownNode,
Factory<Message> factory) |
|
StdGenerator(ContinuousDistribution iat,
SimNode ownNode,
Factory<Message> factory,
boolean activateOnStart)
Constructor without parsing of distributions (w and w/o factory)
|
protected |
StdGenerator(SimNode ownNode) |
protected |
StdGenerator(SimNode ownNode,
boolean activateOnStart) |
protected |
StdGenerator(SimNode ownNode,
Factory<Message> factory) |
protected |
StdGenerator(SimNode ownNode,
Factory<Message> factory,
boolean activateOnStart)
to be used for subclasses parsing
|
Modifier and Type | Method and Description |
---|---|
static StdGenerator |
createInstance(SimNode ownNode,
Parameters pars)
as required by
ReflectionConstructable |
protected Message |
createMessage() |
protected double |
getNextEventTime(double currentTime) |
activate, deactivate, getMessageFactory, getOutput, setActivated, setMessageFactory
addPort, aliasPort, aliasPort, connect, disconnect, getName, getNode, getPortByName, getPorts, isPortKnown, unaliasPort
protected ContinuousDistribution interArrivalTime
protected DiscreteDistribution messageLengthDist
protected StdGenerator(SimNode ownNode, Factory<Message> factory, boolean activateOnStart)
protected StdGenerator(SimNode ownNode, boolean activateOnStart)
protected StdGenerator(SimNode ownNode)
public StdGenerator(ContinuousDistribution iat, DiscreteDistribution lengthdist, SimNode ownNode, Factory<Message> factory, boolean activateOnStart)
public StdGenerator(ContinuousDistribution iat, DiscreteDistribution lengthdist, SimNode ownNode, Factory<Message> factory)
public StdGenerator(ContinuousDistribution iat, DiscreteDistribution lengthdist, SimNode ownNode, boolean activateOnStart)
public StdGenerator(ContinuousDistribution iat, DiscreteDistribution lengthdist, SimNode ownNode)
public StdGenerator(ContinuousDistribution iat, SimNode ownNode, Factory<Message> factory, boolean activateOnStart)
public StdGenerator(ContinuousDistribution iat, SimNode ownNode, Factory<Message> factory)
public StdGenerator(ContinuousDistribution iat, SimNode ownNode, boolean activateOnStart)
public StdGenerator(ContinuousDistribution iat, SimNode ownNode)
public static StdGenerator createInstance(SimNode ownNode, Parameters pars)
ReflectionConstructable
protected Message createMessage()
createMessage
in class Generator
protected double getNextEventTime(double currentTime)
getNextEventTime
in class Generator