public static class ModularSDFCodeGenerator.SimulationJunction
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
int |
counter
The current number of tokens in a junction.
|
Constructor and Description |
---|
SimulationJunction(IOPort inputPort,
IOPort outputPort,
int numInitialTokens)
Constructor for simulation junction.
|
Modifier and Type | Method and Description |
---|---|
IOPort |
getInputPort() |
int |
getNumInitialTokens()
Return the number of initial tokens in a junction.
|
IOPort |
getOutputPort() |
boolean |
isInInitialState()
test if the junction has the same number of tokens as its initial state.
|
void |
reset()
Reset the number of tokens to the junction's initial state.
|
public SimulationJunction(IOPort inputPort, IOPort outputPort, int numInitialTokens)
inputPort
- The input port of the junction.outputPort
- The output port of the junction.numInitialTokens
- The number of initial tokens in the junction.public int getNumInitialTokens()
public IOPort getInputPort()
public IOPort getOutputPort()
public boolean isInInitialState()
public void reset()