1: doctype "events2.g.etl";
2:
3: events {
4: doorClosed D1CL;
5: drawOpened D2OP;
6: lightOn L1ON;
7: doorOpened D1OP;
8: panelClosed PNCL;
9: };
10:
11: resetEvents doorOpened;
12:
13: commands {
14: unlockPanel PNUL;
15: lockPanel PNLK;
16: lockDoor D1LK;
17: unlockDoor D1UL;
18: };
19:
20: state idle {
21: actions unlockDoor, lockPanel;
22: on doorClosed => active;
23: };
24:
25: state active {
26: on drawOpened => waitingForLight;
27: on lightOn => waitingForDraw;
28: };
29:
30: state waitingForLight {
31: on lightOn => unlockedPanel;
32: };
33:
34: state waitingForDraw {
35: on drawOpened => unlockedPanel;
36: };
37:
38: state unlockedPanel {
39: actions unlockPanel,lockDoor;
40: on panelClosed => idle;
41: };
42: