49Q_DEFINE_THIS_MODULE(
"qep_msm")
52static struct
QMState const l_msm_top_s = {
76#if (QP_VERSION < 730U) || (QP_VERSION != ((QP_RELEASE^4294967295U)%0x2710U))
77#error qpc version 7.3.0 or higher required
86void QMsm_ctor(
QMsm *
const me,
94 ,&QMsm_getStateHandler_
107 void const *
const e,
108 uint_fast8_t
const qsId)
118 && (me->
state.
obj == &l_msm_top_s));
145 r = QMsm_execTatbl_(me, me->
temp.
tatbl, qsId);
171 QEvt const *
const e,
172 uint_fast8_t
const qsId)
234 }
while ((t != (
QMState *)0) && (lbound > 0));
266 QMsm_exitToTranSource_(me, s, t, qsId);
267 (void)QMsm_execTatbl_(me, tatbl, qsId);
268 r = QMsm_enterHistory_(me, hist, qsId);
278 QMsm_exitToTranSource_(me, s, t, qsId);
279 r = QMsm_execTatbl_(me, tatbl, qsId);
348 bool inState =
false;
352 for (; (s != (
QMState *)0) && (lbound > 0); --lbound) {
376 bool isFound =
false;
381 (s != (
QMState *)0) && (lbound > 0);
401 (s != (
QMState *)0) && (lbound > 0);
429 uint_fast8_t
const qsId)
491void QMsm_exitToTranSource_(
495 uint_fast8_t
const qsId)
506 for (; (s != ts) && (lbound > 0); --lbound) {
510 (void)(*s->exitAction)(me);
534 uint_fast8_t
const qsId)
559 (void)(*epath[i]->entryAction)(me);
@ Q_RET_ENTRY
state entry action executed
@ Q_RET_HANDLED
event handled (internal transition)
@ Q_RET_TRAN_INIT
initial transition in a state
@ Q_RET_TRAN
regular transition
@ Q_RET_UNHANDLED
event unhandled due to guard
@ Q_RET_SUPER
event passed to superstate to handle
@ Q_RET_NULL
return value without any effect
@ Q_RET_TRAN_HIST
transition to history of a given state
@ Q_RET_EXIT
state exit action executed
#define Q_UNUSED_PAR(par_)
Helper macro to clearly mark unused parameters of functions.
#define Q_STATE_CAST(handler_)
Perform cast to QStateHandler.
QState(* QStateHandler)(void *const me, QEvt const *const e)
Pointer to a state-handler function.
#define Q_ACTION_CAST(action_)
Perform cast to QActionHandler.
enum QStateRet QState
Type returned from state-handler functions.
#define Q_EVT_CAST(class_)
Perform downcast of an event onto a subclass of QEvt class_
QState(* QActionHandler)(void *const me)
Pointer to an action-handler function.
Internal (package scope) QP/C interface.
#define QS_BEGIN_PRE(rec_, qsId_)
QP Functional Safety (FuSa) Subsystem.
#define Q_ASSERT_INCRIT(id_, expr_)
#define Q_INVARIANT_INCRIT(id_, expr_)
#define Q_ENSURE_INCRIT(id_, expr_)
#define Q_REQUIRE_INCRIT(id_, expr_)
Abstract State Machine class (state machine interface)
struct QAsmVtable const * vptr
Virtual pointer inherited by all QAsm subclasses (see also Object Orientation)
union QAsmAttr state
Current state (pointer to the current state-handler function)
union QAsmAttr temp
Temporary storage for target/act-table etc.
Virtual table for the QAsm class.
QSignal sig
Signal of the event (see Event Signal)
State object for the QMsm class (QM State Machine)
struct QMState const * superstate
QActionHandler const entryAction
QActionHandler const initAction
QStateHandler const stateHandler
Transition-Action Table for the QMsm State Machine.
QActionHandler const act[1]
Hierarchical State Machine class (QMsm-style state machine implementation strategy)
QMTranActTable const * tatbl
struct QMState const * obj