summaryrefslogtreecommitdiff
path: root/tools/dfagen/examples/ex2.fsm
diff options
context:
space:
mode:
authorNicolas Schodet2008-03-17 22:53:01 +0100
committerNicolas Schodet2008-03-17 22:53:01 +0100
commit164ac3a34cbac441e82b256c97cb8784ea9d482c (patch)
treeb0db1276083d168b50e6aa2be9621368a36184cd /tools/dfagen/examples/ex2.fsm
parent388a90600023cca7d7b28702fa4cc75ed5074123 (diff)
* tools/dfagen:
- added dfagen.
Diffstat (limited to 'tools/dfagen/examples/ex2.fsm')
-rw-r--r--tools/dfagen/examples/ex2.fsm40
1 files changed, 40 insertions, 0 deletions
diff --git a/tools/dfagen/examples/ex2.fsm b/tools/dfagen/examples/ex2.fsm
new file mode 100644
index 00000000..e290c05c
--- /dev/null
+++ b/tools/dfagen/examples/ex2.fsm
@@ -0,0 +1,40 @@
+# Second FSM example.
+Example 2
+ A barman robot.
+
+States:
+ IDLE
+ waiting for a command
+ DROPPING_ICE
+ FILLING_GLASS
+
+Events:
+ command
+ ice dropped
+ glass filled
+ replace bottle
+
+IDLE:
+ command: with ice -> DROPPING_ICE
+ open the ice door
+ command: without ice -> FILLING_GLASS
+ start filling
+ command: empty bottle -> .
+ display "empty bottle, please replace it"
+ replace bottle -> .
+ reset glass counter
+
+DROPPING_ICE:
+ ice dropped -> FILLING_GLASS
+ close the ice door
+ start filling
+
+FILLING_GLASS:
+ glass filled -> IDLE
+ stop filling
+
+DROPPING_ICE, FILLING_GLASS:
+ command -> .
+ ignored
+ replace bottle -> .
+ ignored