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, outputPortportAliases, ports, simNodeCREATE_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, setMessageFactoryaddPort, aliasPort, aliasPort, connect, disconnect, getName, getNode, getPortByName, getPorts, isPortKnown, unaliasPortprotected 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)
ReflectionConstructableprotected Message createMessage()
createMessage in class Generatorprotected double getNextEventTime(double currentTime)
getNextEventTime in class Generatorpublic void setInterArrivalTime(double interArrivalTime)