QP/C  7.0.1
Real-Time Embedded Framework
QMActive Class Reference

Active object class (based on QMsm implementation strategy) More...

#include <qf.h>

Inheritance diagram for QMActive:
QActive QHsm

Public Attributes

QActive super
- Public Attributes inherited from QActive
QHsm super

Protected Member Functions

void QMActive_ctor (QMActive *const me, QStateHandler const initial)
- Protected Member Functions inherited from QActive
void QActive_ctor (QActive *const me, QStateHandler const initial)
void QActive_stop (QActive *const me)
bool QActive_defer (QActive const *const me, QEQueue *const eq, QEvt const *const e)
bool QActive_recall (QActive *const me, QEQueue *const eq)
uint_fast16_t QActive_flushDeferred (QActive const *const me, QEQueue *const eq)
void QActive_register_ (QActive *const me)
void QActive_unregister_ (QActive *const me)
- Protected Member Functions inherited from QHsm
void QHsm_ctor (QHsm *const me, QStateHandler initial)
QState QHsm_top (QHsm const *const me, QEvt const *const e)
void QHsm_init_ (QHsm *const me, void const *const e, uint_fast8_t const qs_id)
void QHsm_dispatch_ (QHsm *const me, QEvt const *const e, uint_fast8_t const qs_id)

Additional Inherited Members

- Public Member Functions inherited from QActive
void QActive_subscribe (QActive const *const me, enum_t const sig)
void QActive_unsubscribe (QActive const *const me, enum_t const sig)
void QActive_unsubscribeAll (QActive const *const me)
void QActive_setAttr (QActive *const me, uint32_t attr1, void const *attr2)
- Public Member Functions inherited from QHsm
bool QHsm_isIn (QHsm *const me, QStateHandler const state)
QStateHandler QHsm_state (QHsm *const me)
QStateHandler QHsm_childState (QHsm *const me, QStateHandler const parent)
- Static Public Member Functions inherited from QActive
void QActive_psInit (QSubscrList *const subscrSto, enum_t const maxSignal)
static uint_fast8_t QActive_getPrio (QActive const *const me)
static void QActive_setPrio (QActive *const me, uint_fast8_t const prio)

Detailed Description

QMActive represents an active object that uses the QMsm style state machine implementation strategy. This strategy requires the use of the QM modeling tool to generate state machine code automatically, but the code is faster than in the QHsm style implementation strategy and needs less run-time support (smaller event-processor).

QMActive is not intended to be instantiated directly, but rather serves as the base class for derivation of active objects in the application.
traces to: AQP214
The following example illustrates how to derive an active object from QMActive. Please note that the QActive member super is defined as the first member of the derived struct (see oop).
typedef struct {
QMActive super; /* inherits QMActive */
QTimeEvt timeEvt; /* to timeout the blinking */
} Blinky;
. . .
void Blinky_ctor(Blinky * const me) {
/* constructor of the superclass <--- */
QMActive_ctor(&me->super, Q_STATE_CAST(&Blinky_initial));
/* constructor(s) of the members */
QTimeEvt_ctorX(&me->timeEvt, &me->super, TIMEOUT_SIG, 0U);
#define Q_STATE_CAST(handler_)
Definition: qep.h:984
void QTimeEvt_ctorX(QTimeEvt *const me, QActive *const act, enum_t const sig, uint_fast8_t const tickRate)
Definition: qf_time.c:82
Active object class (based on QMsm implementation strategy)
Definition: qf.h:899
QActive super
Definition: qf.h:901
void QMActive_ctor(QMActive *const me, QStateHandler const initial)
Definition: qf_qmact.c:78
Time Event class.
Definition: qf.h:980

Definition at line 899 of file qf.h.

Member Function Documentation

◆ QMActive_ctor()

void QMActive_ctor ( QMActive *const  me,
QStateHandler const  initial 

Constructor of QMActive class.

Performs the first step of active object initialization by assigning the virtual pointer and calling the superclass constructor.

[in,out]mepointer (see oop)
[in]initialpointer to the event to be dispatched to the MSM
Must be called only ONCE before QHSM_INIT().
See also

Definition at line 78 of file qf_qmact.c.

Member Data Documentation

◆ super

QActive super

Definition at line 901 of file qf.h.

The documentation for this class was generated from the following file: