P
- type of parameterpublic abstract class Expander<P> extends Entity
To each output port in the generic class Expander
an attribute
can be associated whose type is the generic parameter.
An initial number of output ports can be defined on construction. The names
of the ports are then "output 1", "output 2", ... Moreover, it is possible to
add and remove ports dynamically using AddPort
and
RemovePort
.
Entity.PortAlias
Modifier and Type | Field and Description |
---|---|
protected InputPort |
inputPort |
protected java.util.List<SynchronousOutputPort> |
outputPorts |
protected java.util.List<P> |
portParameters |
portAliases, ports, simNode
Constructor and Description |
---|
Expander(int nrOfPorts,
P initValue,
java.lang.String name,
SimNode parantNode) |
Expander(java.lang.String name,
SimNode parentNode) |
Modifier and Type | Method and Description |
---|---|
void |
addPort(P para) |
void |
addPort(java.lang.String portName,
P para) |
protected abstract void |
handleMessageIndication(Message msg) |
protected int |
portName2Index(java.lang.String portName) |
void |
removePort(java.lang.String portName) |
void |
setPortParameter(int portNr,
P para) |
addPort, aliasPort, aliasPort, connect, disconnect, getName, getNode, getPortByName, getPorts, isPortKnown, unaliasPort
protected InputPort inputPort
protected java.util.List<SynchronousOutputPort> outputPorts
protected java.util.List<P> portParameters
public Expander(java.lang.String name, SimNode parentNode)
protected int portName2Index(java.lang.String portName)
protected abstract void handleMessageIndication(Message msg)
public void addPort(java.lang.String portName, P para)
public void addPort(P para)
public void removePort(java.lang.String portName)
public void setPortParameter(int portNr, P para)