summaryrefslogtreecommitdiff
path: root/examples/statemachine/videostate.pystate
diff options
context:
space:
mode:
Diffstat (limited to 'examples/statemachine/videostate.pystate')
-rw-r--r--examples/statemachine/videostate.pystate32
1 files changed, 32 insertions, 0 deletions
diff --git a/examples/statemachine/videostate.pystate b/examples/statemachine/videostate.pystate
new file mode 100644
index 0000000..874001c
--- /dev/null
+++ b/examples/statemachine/videostate.pystate
@@ -0,0 +1,32 @@
+#
+# videostate.pystate
+#
+# Statemachine describing the playing of a video
+# [] = stop
+# > = play
+# || = pause
+# >> = fast forward
+# << = rewind
+
+statemachine VideoState:
+ # basic >, [], and || controls
+ Stopped-(play)->Playing
+ Playing-(pause)-> Paused
+ Playing-(stop)-> Stopped
+ Paused-(stop)-> Stopped
+ Paused-(play)->Playing
+
+ # add >> and << controls - different meanings if occur while playing or stopped
+ Playing-(fast_forward)->FastForward
+ FastForward-(play)->Playing
+ FastForward-(pause)->Paused
+ FastForward-(stop)->Stopped
+ Stopped-(fast_forward)->Forwardwinding
+ Forwardwinding-(stop)->Stopped
+
+ Playing-(rewind)->ReversePlaying
+ ReversePlaying-(play)->Playing
+ ReversePlaying-(pause)->Paused
+ ReversePlaying-(stop)->Stopped
+ Stopped-(rewind)->Rewinding
+ Rewinding-(stop)->Stopped