public class DStdGenerator extends Generator
DStdGenerator
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:
setInterArrivalTime()
method.
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 double |
interArrivalTime |
protected DiscreteDistribution |
messageLengthDist |
activated, event, messageFactory, outputPort
portAliases, ports, simNode
CREATE_INSTANCE_METHOD_NAME
Modifier | Constructor and Description |
---|---|
|
DStdGenerator(double iat,
DiscreteDistribution lengthdist,
SimNode ownNode) |
|
DStdGenerator(double iat,
DiscreteDistribution lengthdist,
SimNode ownNode,
boolean activateOnStart) |
|
DStdGenerator(double iat,
DiscreteDistribution lengthdist,
SimNode ownNode,
Factory<Message> factory) |
|
DStdGenerator(double iat,
DiscreteDistribution lengthdist,
SimNode ownNode,
Factory<Message> factory,
boolean activateOnStart)
Constructor with factory but without parsing.
|
|
DStdGenerator(double iat,
SimNode ownNode) |
|
DStdGenerator(double iat,
SimNode ownNode,
boolean activateOnStart) |
|
DStdGenerator(double iat,
SimNode ownNode,
Factory<Message> factory) |
|
DStdGenerator(double iat,
SimNode ownNode,
Factory<Message> factory,
boolean activateOnStart)
Constructor without parsing of distributions (w and w/o factory)
|
protected |
DStdGenerator(SimNode ownNode) |
protected |
DStdGenerator(SimNode ownNode,
boolean activateOnStart) |
protected |
DStdGenerator(SimNode ownNode,
Factory<Message> factory) |
protected |
DStdGenerator(SimNode ownNode,
Factory<Message> factory,
boolean activateOnStart)
to be used for subclasses parsing
|
Modifier and Type | Method and Description |
---|---|
static DStdGenerator |
createInstance(SimNode ownNode,
Parameters pars)
as required by
ReflectionConstructable |
protected Message |
createMessage() |
protected double |
getNextEventTime(double currentTime) |
void |
setInterArrivalTime(double interArrivalTime) |
activate, deactivate, getMessageFactory, getOutput, setActivated, setMessageFactory
addPort, aliasPort, aliasPort, connect, disconnect, getName, getNode, getPortByName, getPorts, isPortKnown, unaliasPort
protected double interArrivalTime
protected DiscreteDistribution messageLengthDist
protected DStdGenerator(SimNode ownNode, Factory<Message> factory, boolean activateOnStart)
protected DStdGenerator(SimNode ownNode, boolean activateOnStart)
protected DStdGenerator(SimNode ownNode)
public DStdGenerator(double iat, DiscreteDistribution lengthdist, SimNode ownNode, Factory<Message> factory, boolean activateOnStart)
public DStdGenerator(double iat, DiscreteDistribution lengthdist, SimNode ownNode, Factory<Message> factory)
public DStdGenerator(double iat, DiscreteDistribution lengthdist, SimNode ownNode, boolean activateOnStart)
public DStdGenerator(double iat, DiscreteDistribution lengthdist, SimNode ownNode)
public DStdGenerator(double iat, SimNode ownNode, Factory<Message> factory, boolean activateOnStart)
public DStdGenerator(double iat, SimNode ownNode, boolean activateOnStart)
public DStdGenerator(double iat, SimNode ownNode)
public static DStdGenerator createInstance(SimNode ownNode, Parameters pars)
ReflectionConstructable
protected Message createMessage()
createMessage
in class Generator
protected double getNextEventTime(double currentTime)
getNextEventTime
in class Generator
public void setInterArrivalTime(double interArrivalTime)