Project 1: Testlight Example

*Please submit all project-related questions to {email} -- thanks!

Example:

An example controller specification called "TestLight" is provided here.
Constants

State

Requirements

Statechart

Here is the TestLight Statechart (you will learn more about statecharts in project 4):

Testlight Statechart


Transition
Condition
TL.T.1
Counter >= TestlightFlashHalfPeriod && mDoorClosed[front, left] == true
TL.T.2 Counter <= 0 && mDoorClosed[front, left] == true
TL.T.3 mDoorClosed[front, left] == false
TL.T.4 mDoorClosed[front, left] == false
TL.T.5 mDoorClosed[front, left] == true && hallCall[f,b,d] == pressed

Requirements to Statechart Traceability

completed by STUDENT NAME (ANDREW ID)

Requirements
States
TL.1
TL.2
TL.3
TL.4
State 1:  Flash Off
X


X
State 2:  Flash On
X


X
State 3:  DoorNotClosed

X

X
Transitions




TL.T.1
X



TL.T.2 X



TL.T.3
X


TL.T.4
X


TL.T.5

X


Implementation

See the TestLight.java file for the implementation.  This example demonstrates several important details that will be important in implementing all of your designs:

Please see the comments within the file for more detailed information.


Back to Project 1 Simulation Exercise.