de.cau.cs.kieler.sj
Class SJProgram<StateLabel extends Enum<?>>

java.lang.Object
  extended by de.cau.cs.kieler.sj.EmbeddedSJProgram<StateLabel>
      extended by 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 red

Field Summary
 
Fields inherited from class de.cau.cs.kieler.sj.EmbeddedSJProgram
INITIAL_TICK
 
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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

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)
Method Detail

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.