QP/C  5.9.8
Go to the documentation of this file.
48 #define QP_IMPL /* this is QP implementation */
49 #include "qf_port.h" /* QF port */
50 #include "qf_pkg.h" /* QF package-scope interface */
52 /*Q_DEFINE_THIS_MODULE("qf_qmact")*/
54 /****************************************************************************/
67 void QMActive_ctor(QMActive * const me, QStateHandler initial) {
68  static QMActiveVtbl const vtbl = { /* QMActive virtual table */
69  { &QMsm_init_,
70  &QMsm_dispatch_ },
74  };
76  /* clear the whole QActive object, so that the framework can start
77  * correctly even if the startup code fails to clear the uninitialized
78  * data (as is required by the C Standard).
79  */
80  QF_bzero(me, (uint_fast16_t)sizeof(*me));
91  QMsm_ctor(&me->super, initial);
93  me->super.vptr = &vtbl.super; /* hook vptr to QMActive virtual table */
94 }
QState(* QStateHandler)(void *const me, QEvt const *const e)
Pointer to a state-handler function.
Definition: qep.h:211
void QActive_postLIFO_(QActive *const me, QEvt const *const e)
Implementation of the active object post LIFO operation.
Definition: qf_actq.c:193
struct QHsmVtbl const * vptr
virtual pointer
Definition: qep.h:281
Virtual table for the QActive class.
Definition: qf.h:166
Internal (package scope) QF/C interface.
void QMsm_ctor(QMsm *const me, QStateHandler initial)
Protected "constructor" of QMsm.
Definition: qep_msm.c:108
void QMsm_dispatch_(QMsm *const me, QEvt const *const e)
Implementation of disparching events to QMsm.
Definition: qep_msm.c:180
void QF_bzero(void *const start, uint_fast16_t len)
Clear a specified region of memory to zero.
Definition: qf_act.c:159
bool QActive_post_(QActive *const me, QEvt const *const e, uint_fast16_t const margin, void const *const sender)
Implementation of the active object post (FIFO) operation.
Definition: qf_actq.c:93
QHsm super
inherits QHsm
Definition: qf.h:111
unsigned int uint_fast16_t
fast at-least 16-bit unsigned int
Definition: stdint.h:37
void QActive_start_(QActive *const me, uint_fast8_t prio, QEvt const *qSto[], uint_fast16_t qLen, void *stkSto, uint_fast16_t stkSize, QEvt const *ie)
Implementation of the active object start operation.
Definition: qk.c:162
void QMsm_init_(QMsm *const me, QEvt const *const e)
Implementation of the top-most initial transition in QMsm.
Definition: qep_msm.c:129
struct QHsmVtbl super
inherits QHsmVtbl
Definition: qf.h:167
Active Object (based on QHsm implementation)
Definition: qf.h:110
void QMActive_ctor(QMActive *const me, QStateHandler initial)
protected "constructor" of an QMActive active object.
Definition: qf_qmact.c:67