Trull

Package edu.luc.cs.trull.demo.wristwatch

Demonstrates a simple wristwatch (run this demo).

See:
          Description

Interface Summary
DateConstants Constants used in the calculation of times and dates.
EventLabels Event labels for the wristwatch.
 

Class Summary
DateMode datemode = emit DATE ; emit NOW(60 * month + day) ; loop UPDATE -> emit NOW(60 * month + day)
DateModel The passive data model of the wristwatch.
Light light = loop await LIGHT -> { ticks = DELAY; } emit LIGHT_ON ; do loop await TICK -> if -- ticks < 0 then emit LIGHT_OFF watching LIGHT_OFF
Main A driver for running this demo.
Presentation Presentation component for the wristwatch demo.
SetDay ( emit DAY ; emit NOW(60 * month + day) ; loop START -> emit NOW(60 * month + (day = ...)) )
SetHour ( emit HOUR ; emit NOW(time / 60) ; loop START -> emit NOW(time = (time + 3600) % ...) )
SetMinute ( emit MIN ; emit NOW(time / 60) ; loop START -> emit NOW(time = time / 3600 * 3600 + (time + 60) % ...) )
SetMode setmode = cycle RESET setHour setMinute setDay setMonth
SetMonth ( emit MONTH ; emit NOW(60 * month + day) ; loop START -> emit NOW(60 * (month = ...) + day) )
TimeMode timemode = emit TIME ; emit NOW(time / 60) ; loop UPDATE -> emit NOW(time / 60)
Update update = loop TICK -> { time ++; } emit UPDATE
WristWatch The top-level control logic for the wristwatch.
 

Package edu.luc.cs.trull.demo.wristwatch Description

Demonstrates a simple wristwatch (run this demo). The wristwatch uses the Trull stopwatch control logic unchanged as a subcomponent. This package also demonstrates event-driven unit testing within the JUnit framework.

See Also:


Trull

http://www.cs.luc.edu/trull/