9#ifndef ZEPHYR_INCLUDE_SMF_H_
10#define ZEPHYR_INCLUDE_SMF_H_
12#ifdef CONFIG_SMF_ANCESTOR_SUPPORT
21#define SMF_CREATE_STATE(_entry, _run, _exit, _parent) \
38#define SMF_CREATE_STATE(_entry, _run, _exit) \
53#define SMF_CTX(o) ((struct smf_ctx *)o)
void smf_set_state(struct smf_ctx *ctx, const struct smf_state *new_state)
Changes a state machines state. This handles exiting the previous state and entering the target state...
void smf_set_initial(struct smf_ctx *ctx, const struct smf_state *init_state)
Initializes the state machine and sets its initial state.
int32_t smf_run_state(struct smf_ctx *ctx)
Runs one iteration of a state machine (including any parent states)
void smf_set_terminate(struct smf_ctx *ctx, int32_t val)
Terminate a state machine.
void(* state_execution)(void *obj)
Function pointer that implements a portion of a state.
Definition: smf.h:66
__UINT32_TYPE__ uint32_t
Definition: stdint.h:90
__INT32_TYPE__ int32_t
Definition: stdint.h:74
int32_t terminate_val
Definition: smf.h:104
const struct smf_state * previous
Definition: smf.h:97
const struct smf_state * current
Definition: smf.h:95
const state_execution exit
Definition: smf.h:78
const state_execution entry
Definition: smf.h:71
const state_execution run
Definition: smf.h:76
const struct smf_state * parent
Definition: smf.h:89