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