de.cau.cs.kieler.sj.examples
Class ProducerConsumer
java.lang.Object
de.cau.cs.kieler.sj.EmbeddedSJProgram<StateLabel>
de.cau.cs.kieler.sj.SJProgram<de.cau.cs.kieler.sj.examples.ProducerConsumer.StateLabel>
de.cau.cs.kieler.sj.examples.ProducerConsumer
public class ProducerConsumer
- extends SJProgram<de.cau.cs.kieler.sj.examples.ProducerConsumer.StateLabel>
Producer-Consumer-Observer Example for SJ. Based on the file PCO.c
from the SC
examples.
- Rating

Constructor Summary |
ProducerConsumer()
Starts a new instance of a Producer-Consumer-Observer SJ-program. |
Method Summary |
static void |
main(String[] args)
Main for the Producer-Consumer-Observer example. |
void |
tick()
Function that should be implemented with a SJ-Program. |
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 |
ProducerConsumer
public ProducerConsumer()
- Starts a new instance of a Producer-Consumer-Observer SJ-program.
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.ProducerConsumer.StateLabel>
- See Also:
EmbeddedSJProgram.doTick(Signal...)
main
public static void main(String[] args)
- Main for the Producer-Consumer-Observer example.
- Parameters:
args
- not used