de.cau.cs.kieler.sj.examples
Class Shifter3

java.lang.Object
  extended by de.cau.cs.kieler.sj.EmbeddedSJProgram<StateLabel>
      extended by de.cau.cs.kieler.sj.SJProgram<de.cau.cs.kieler.sj.examples.Shifter3.StateLabel>
          extended by de.cau.cs.kieler.sj.examples.Shifter3

public class Shifter3
extends SJProgram<de.cau.cs.kieler.sj.examples.Shifter3.StateLabel>

Example to illustrate the behavior of valued signals and pre. It is based on the SC example Shifter3-sc.c.

Rating red

Field Summary
 ValuedSignal i
          The signals used by the Program.
 ValuedSignal o
          The signals used by the Program.
 ValuedSignal s0
          The signals used by the Program.
 ValuedSignal s1
          The signals used by the Program.
 
Fields inherited from class de.cau.cs.kieler.sj.EmbeddedSJProgram
INITIAL_TICK
 
Constructor Summary
Shifter3()
          Starts a new instance of the program Shifter3.
 
Method Summary
 void tick()
          Function that should be implemented with a SJ-Program.
 
Methods inherited from class de.cau.cs.kieler.sj.SJProgram
initSignals
 
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, toString, transB
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

i

public ValuedSignal i
The signals used by the Program. Because the class SJProgram is in a different package than this program, all signals must be public.


o

public ValuedSignal o
The signals used by the Program. Because the class SJProgram is in a different package than this program, all signals must be public.


s0

public ValuedSignal s0
The signals used by the Program. Because the class SJProgram is in a different package than this program, all signals must be public.


s1

public ValuedSignal s1
The signals used by the Program. Because the class SJProgram is in a different package than this program, all signals must be public.

Constructor Detail

Shifter3

public Shifter3()
Starts a new instance of the program Shifter3.

Method Detail

tick

public void tick()
Description copied from class: EmbeddedSJProgram
Function that should be implemented with a SJ-Program. It should contain the behaver of the program. Every time the method is called it should do exactly one tick an then terminate. Use this method only to override it if you want to execute a tick use EmbeddedSJProgram.doTick(Signal...)

Specified by:
tick in class EmbeddedSJProgram<de.cau.cs.kieler.sj.examples.Shifter3.StateLabel>
See Also:
EmbeddedSJProgram.doTick(Signal...)