Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lib: SMF: Add initial transitions to HSMs and add smf_set_handled() #66753

Commits on Feb 15, 2024

  1. Lib: SMF: Add initial transition and smf_set_handled()

    Brings SMF framework closer into alignment with accepted Hierarchical State
    Machine operation by:
    1. Allowing 'programming by difference' by having some child states handle
       events and prevent propagation up to the parent run actions while others
       propagate events up to a common handler in a parent state.
    2. Optionally allow initial transitions within a parent state to determine
       the most nested child state to transition to.
    3. Adding a test case for `CONFIG_SMF_INITIAL_TRANSITION` and
       `smf_set_handled()`
    4. Updating documentation for the new API (and fixing some references)
    
    There was discussion in zephyrproject-rtos#55344
    about not making the initial transition a Kconfig option, but I'm not sure
    of any way else of doing it without permanently adding a pointer to each
    `smf_state` entry, which is a problem for resource-constrained devices.
    
    This does not fix zephyrproject-rtos#66341
    but documentation has been updated to warn users of the issue.
    
    Signed-off-by: Glenn Andrews <glenn.andrews.42@gmail.com>
    glenn-andrews committed Feb 15, 2024
    Copy the full SHA
    62e0237 View commit details
    Browse the repository at this point in the history
  2. Lib: SMF: Fix smf_set_terminate function typo.

    Fixed where `smf_set_terminate` was written `smf_terminate`
    
    Signed-off-by: Glenn Andrews <glenn.andrews.42@gmail.com>
    glenn-andrews committed Feb 15, 2024
    Copy the full SHA
    ebc7f7f View commit details
    Browse the repository at this point in the history
  3. Lib: SMF: Add Doxygen commands.

    Added Doxygen markup.
    
    Signed-off-by: Glenn Andrews <glenn.andrews.42@gmail.com>
    glenn-andrews committed Feb 15, 2024
    Copy the full SHA
    1390bfe View commit details
    Browse the repository at this point in the history

Commits on Mar 3, 2024

  1. Lib: SMF: Update index.rst

    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 <glenn.andrews.42@gmail.com>
    glenn-andrews committed Mar 3, 2024
    Copy the full SHA
    1643abf View commit details
    Browse the repository at this point in the history