de.cau.cs.kieler.sj
Class SJProgram<StateLabel extends Enum<?>>
java.lang.Object
de.cau.cs.kieler.sj.EmbeddedSJProgram<StateLabel>
de.cau.cs.kieler.sj.SJProgram<StateLabel>
- Type Parameters:
StateLabel
- The state labels which exits for this program.
- Direct Known Subclasses:
- ABRO, Count2Suspend, FilteredSR, GRCbal3, PrimeFactor, ProducerConsumer, Shifter3, SurfDepth
public abstract class SJProgram<StateLabel extends Enum<?>>
- extends EmbeddedSJProgram<StateLabel>
- Rating

Constructor Summary |
SJProgram(StateLabel startLabel,
int prio)
Creates a new SJ program with a given start label and priority. |
SJProgram(StateLabel startLabel,
int prio,
SJLogger logger)
Creates a new SJ program with a given start label, priority and logger. |
Method Summary |
void |
initSignals()
Adds all public signals to the Signal list. |
Methods inherited from class de.cau.cs.kieler.sj.EmbeddedSJProgram |
abort, activateCausalityCheck, addSignals, awaitDoneCB, doTick, fork, forkEB, getLogger, getName, getSignals, getTickNr, gotoB, haltCB, isCausalityCheckActive, isInInitialTick, isTerminated, isThreadRunning, isTickDone, joinDoneCB, pauseB, prioB, removeSignals, setLogger, state, suspend, termB, tick, toString, transB |
SJProgram
public SJProgram(StateLabel startLabel,
int prio)
- Creates a new SJ program with a given start label and priority.
- Parameters:
startLabel
- The label the program should start at.prio
- The priority the program should start with.- See Also:
EmbeddedSJProgram.EmbeddedSJProgram(Enum, int)
SJProgram
public SJProgram(StateLabel startLabel,
int prio,
SJLogger logger)
- Creates a new SJ program with a given start label, priority and logger.
- Parameters:
startLabel
- The label the program should start at.prio
- The priority the program should start with.logger
- The logger to deal with the logging informations.- See Also:
EmbeddedSJProgram.EmbeddedSJProgram(Enum, int, SJLogger)
initSignals
public void initSignals()
- Adds all public signals to the Signal list. Also initialize all not defined public class
variables of the depending sub class using the default constructor.
For example:
If you write public Signal a, b, c;
in the sub class, this method does the same
like a = new Signal("a"); b = new Signal("b"); c = new Signal("c");
addSignals(a, b, c, d);
Attention: If initSignals should be work all Signals an the class with the program should be
public
You can not do this as part of the constructor because it could not consider a variable
declaration in the head of the class.