summaryrefslogtreecommitdiff
path: root/digital/io/src/top.fsm
blob: 8203dfdbb9fcd7f722c37cacc3ea6120efc7d378 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# Top FSM.
top
  Main FSM calling other FSM.

States:
 IDLE
  waiting for the beginning of the top FSM.
 WAIT_INIT_TO_FINISH
  waiting for the end of init.

Events:
 start
  initialize the FSM.
 move_fsm_succeed
  when the move FSM returns with success.
 move_fsm_failed
  when the move FSM returns with an error.
 move_fsm_stopped
  when the move FSM has stop the bot (as asked).
 bot_move_succeed
  when the bot has succeed its asserv movement.
 bot_move_failed
  when the bot has failed its asserv movement.
 init_match_is_started
  when the init FSM has finished and the match start.
 state_timeout
  timeout in cycle count.
 asserv_last_cmd_ack
  last command sent to the asserv board has been acquitted.

IDLE:
 start -> WAIT_INIT_TO_FINISH
  nothing to do.

WAIT_INIT_TO_FINISH:
 init_match_is_started -> .
  the match start, place something interresting here