Skip to content

Commit

Permalink
Lib: SMF: Update index.rst
Browse files Browse the repository at this point in the history
Incorporated changes requested by @keith-zephyr:
1. Grammar fix
2. Make explicit that transition to self in super-states is not supported

Signed-off-by: Glenn Andrews <[email protected]>
  • Loading branch information
glenn-andrews authored and henrikbrixandersen committed Mar 4, 2024
1 parent 5245311 commit 3203bd6
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions doc/services/smf/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,10 @@ function is used and it has the following prototype:

.. note:: If :kconfig:option:`CONFIG_SMF_INITIAL_TRANSITION` is not set,
:c:func:`smf_set_initial` and :c:func:`smf_set_state` function should
not be passed a parent state as they will not know which child state
to transition to. Transitioning to a parent state is OK if an initial
transition to a child state is defined. A well-formed HSM will have
initial transitions defined for all parent states.
not be passed a parent state as the parent state does not know which
child state to transition to. Transitioning to a parent state is OK
if an initial transition to a child state is defined. A well-formed
HSM will have initial transitions defined for all parent states.

.. note:: While the state machine is running, smf_set_state should only be
called from the Entry and Run functions. Calling smf_set_state from the
Expand Down Expand Up @@ -353,9 +353,9 @@ When designing hierarchical state machines, the following should be considered:
is called.
- The parent_run function only executes if the child_run function does not
call either :c:func:`smf_set_state` or :c:func:`smf_set_handled`.
- When a parent state intitiates a transition to self, the parents's exit
action is not called, e.g. instead of child_exit, parent_exit, parent_entry
it performs child_exit, parent_entry
- Transitions to self in super-states containing sub-states are not supported.
Transitions to self from the most-nested child state are supported and will
call the exit and entry function of the child state correctly.

Event Driven State Machine Example
==================================
Expand Down

0 comments on commit 3203bd6

Please sign in to comment.