OS  v7.3.3
Documentation
qSM_State_t Struct Reference

A state object. More...

#include <qfsm.h>

Detailed Description

A state object.

States are represented as instances of the qSM_State_t object. One important attribute of this object is the callback function, which is used to describe the behavior specific to the state. Also there is a pointer to the parent state to define nesting of the state and its place in the hierarchical topology.

So concrete state machine are built by adding an arbitrary number states and defining callback functions.

State machines are constructed by composition, therefore, the topology of a state machine is determined upon construction. In this FSM implementation, there are not distinction between composite states(states containing sub-states) and leaf states. All states are potentially composite.

The API qStateMachine_StateSubscribe() should be used to initialize the state and define its position in the topology.

Note
Do not access any member of this structure directly.