fsm:use_fsm
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| fsm:use_fsm [2007/04/29 14:21] – fgm | fsm:use_fsm [2020/11/23 17:23] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 14: | Line 14: | ||
| ===== Controlling the FSM operation ===== | ===== Controlling the FSM operation ===== | ||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| ==== Directed work with the " | ==== Directed work with the " | ||
| Line 29: | Line 24: | ||
| ==== Filtering events ==== | ==== Filtering events ==== | ||
| - | The OSInet FSM has three event processing modes, controlled by the " | + | The OSInet FSM has three event processing modes, controlled by the {get|set}_event_mode methods: |
| * fsm:: | * fsm:: | ||
| Line 36: | Line 31: | ||
| * fsm:: | * fsm:: | ||
| * Switching from fsm:: | * Switching from fsm:: | ||
| - | |||
| - | |||
| - | |||
| ==== Disabling post-events actions ==== | ==== Disabling post-events actions ==== | ||
| Line 50: | Line 42: | ||
| For a very basic FSM going just from initial to final randomly, building the table and transitions can look like: | For a very basic FSM going just from initial to final randomly, building the table and transitions can look like: | ||
| - | <php> | + | <code php> |
| class foo extends fsm | class foo extends fsm | ||
| { | { | ||
| Line 77: | Line 69: | ||
| } | } | ||
| } | } | ||
| - | </php> | + | </code> |
| + | |||
| Application code not involved in the FSM operation can use the FSM apply_event method($event_name) to submit an event to the FSM. Only allowed events for the given state the FSM is in are allowed: submitting other events throws an exception. | Application code not involved in the FSM operation can use the FSM apply_event method($event_name) to submit an event to the FSM. Only allowed events for the given state the FSM is in are allowed: submitting other events throws an exception. | ||
fsm/use_fsm.1177856512.txt.gz · Last modified: (external edit)
