QP/C  7.0.0
Real-Time Embedded Framework
Go to the documentation of this file.
2* QP/C Real-Time Embedded Framework (RTEF)
3* Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved.
5* SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial
7* This software is dual-licensed under the terms of the open source GNU
8* General Public License version 3 (or any later version), or alternatively,
9* under the terms of one of the closed source Quantum Leaps commercial
10* licenses.
12* The terms of the open source GNU General Public License version 3
13* can be found at: <www.gnu.org/licenses/gpl-3.0>
15* The terms of the closed source Quantum Leaps commercial licenses
16* can be found at: <www.state-machine.com/licensing>
18* Redistributions in source code must retain this top-level comment block.
19* Plagiarizing this software to sidestep the license obligations is illegal.
21* Contact information:
22* <www.state-machine.com>
23* <info@state-machine.com>
39#define QP_IMPL /* this is QP implementation */
40#include "qf_port.h" /* QF port */
41#include "qf_pkg.h" /* QF package-scope interface */
58void QActive_ctor(QActive * const me, QStateHandler initial) {
59 static QActiveVtable const vtable = { /* QActive virtual table */
60 { &QHsm_init_,
62#ifdef Q_SPY
65 },
69 };
70 /* clear the whole QActive object, so that the framework can start
71 * correctly even if the startup code fails to clear the uninitialized
72 * data (as is required by the C Standard).
73 */
74 QF_bzero(me, sizeof(*me));
76 QHsm_ctor(&me->super, initial); /* explicitly call superclass' ctor */
77 me->super.vptr = &vtable.super; /* hook the vptr to QActive vtable */
QState(* QStateHandler)(void *const me, QEvt const *const e)
Definition: qep.h:176
Internal (package scope) QF/C interface.
Definition: qf.h:107
void QActive_ctor(QActive *const me, QStateHandler initial)
Definition: qf_qact.c:58
bool QActive_post_(QActive *const me, QEvt const *const e, uint_fast16_t const margin, void const *const sender)
Definition: qf_actq.c:83
QHsm super
Definition: qf.h:108
void QActive_postLIFO_(QActive *const me, QEvt const *const e)
Definition: qf_actq.c:221
void QActive_start_(QActive *const me, uint_fast8_t prio, QEvt const **const qSto, uint_fast16_t const qLen, void *const stkSto, uint_fast16_t const stkSize, void const *const par)
Definition: qutest.c:87
struct QHsmVtable super
Definition: qf.h:158
void QF_bzero(void *const start, uint_fast16_t len)
Definition: qf_act.c:129
struct QHsmVtable const * vptr
Definition: qep.h:254
void QHsm_ctor(QHsm *const me, QStateHandler initial)
Definition: qep_hsm.c:139
void QHsm_init_(QHsm *const me, void const *const e, uint_fast8_t const qs_id)
Definition: qep_hsm.c:167
QStateHandler QHsm_getStateHandler_(QHsm *const me)
Definition: qep_hsm.c:605
void QHsm_dispatch_(QHsm *const me, QEvt const *const e, uint_fast8_t const qs_id)
Definition: qep_hsm.c:286