QP/C  5.8.2
Go to the documentation of this file.
48 #define QP_IMPL /* this is QP implementation */
49 #include "qf_port.h" /* QF port */
51 /*Q_DEFINE_THIS_MODULE("qf_qact")*/
53 /****************************************************************************/
65 void QActive_ctor(QActive * const me, QStateHandler initial) {
66  static QActiveVtbl const vtbl = { /* QActive virtual table */
67  { &QHsm_init_,
68  &QHsm_dispatch_ },
72  };
73  /* clear the whole QActive object, so that the framework can start
74  * correctly even if the startup code fails to clear the uninitialized
75  * data (as is required by the C Standard).
76  */
77  QF_bzero(me, (uint_fast16_t)sizeof(*me));
79  QHsm_ctor(&me->super, initial); /* explicitly call superclass' ctor */
80  me->super.vptr = &vtbl.super; /* hook the vptr to QActive virtual table */
81 }
QState(* QStateHandler)(void *const me, QEvt const *const e)
Pointer to a state-handler function.
Definition: qep.h:212
struct QHsmVtbl const * vptr
virtual pointer
Definition: qep.h:282
void QActive_postLIFO_(QActive *const me, QEvt const *const e)
Implementation of the active object post LIFO operation.
Definition: qf_actq.c:198
Virtual table for the QActive class.
Definition: qf.h:161
void QHsm_dispatch_(QHsm *const me, QEvt const *const e)
Implementation of dispatching events to a QHsm subclass.
Definition: qep_hsm.c:248
void QHsm_init_(QHsm *const me, QEvt const *const e)
Implementation of the top-most initial transition in QHsm subclass.
Definition: qep_hsm.c:143
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:103
void QHsm_ctor(QHsm *const me, QStateHandler initial)
Protected "constructor" of QHsm.
Definition: qep_hsm.c:123
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:169
QHsm super
inherits QHsm
Definition: qf.h:111
void QActive_ctor(QActive *const me, QStateHandler initial)
protected "constructor" of an QActive active object
Definition: qf_qact.c:65
Active Object (based on QHsm implementation)
Definition: qf.h:110
struct QHsmVtbl super
inherits QHsmVtbl
Definition: qf.h:162