QP/C  7.3.4
Real-Time Embedded Framework
Loading...
Searching...
No Matches
QMActive Class Reference

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

#include "qp.h"

Inheritance diagram for QMActive:
QActive QAsm

Public Attributes

QActive super
 
- Public Attributes inherited from QActive
QAsm 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)
 
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)
 
bool QActive_defer (QActive const *const me, struct QEQueue *const eq, QEvt const *const e)
 
bool QActive_recall (QActive *const me, struct QEQueue *const eq)
 
uint_fast16_t QActive_flushDeferred (QActive const *const me, struct QEQueue *const eq, uint_fast16_t const num)
 
- Protected Member Functions inherited from QAsm
void QAsm_ctor (QAsm *const me)
 
QState QHsm_top (QHsm const *const me, QEvt const *const e)
 

Additional Inherited Members

- Public Member Functions inherited from QActive
void QActive_setAttr (QActive *const me, uint32_t attr1, void const *attr2)
 
- Static Public Member Functions inherited from QActive
void QActive_psInit (QSubscrList *const subscrSto, enum_t const maxSignal)
 
- Protected Attributes inherited from QActive
uint8_t prio
 
uint8_t pthre
 
QACTIVE_THREAD_TYPE thread
 
QACTIVE_OS_OBJ_TYPE osObject
 
QACTIVE_EQUEUE_TYPE eQueue
 
uint8_t prio_dis
 
uint8_t pthre_dis
 
- Protected Attributes inherited from QAsm
struct QAsmVtable const * vptr
 
union QAsmAttr state
 
union QAsmAttr temp
 

Detailed Description

Active object class (based on QMsm implementation strategy)

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).
Note
QMActive is not intended to be instantiated directly, but rather serves as the base class for derivation of active objects in the application.
Traceability
Usage
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 Object Orientation). Please also note the call to the QMActive_ctor() in the Blinky subclass' constructor.
typedef struct {
QMActive super; // <=== inherit 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 qp.h:526
Active object class (based on QMsm implementation strategy)
Definition qp.h:952
void QMActive_ctor(QMActive *const me, QStateHandler const initial)
Definition qf_qmact.c:69
QActive super
Definition qp.h:954
Time Event class.
Definition qp.h:969

Definition at line 952 of file qp.h.

Member Function Documentation

◆ QMActive_ctor()

QMActive::QMActive_ctor ( QMActive *const me,
QStateHandler const initial )
protected

Constructor of QMActive class.

Description
Performs the first step of active object initialization by assigning the virtual pointer and calling the superclass constructor.
Parameters
[in,out]mecurrent instance pointer (see Object Orientation)
[in]initialpointer to the event to be dispatched to the MSM
Note
Must be called only ONCE before QASM_INIT().

Definition at line 69 of file qf_qmact.c.

Member Data Documentation

◆ super

QActive QMActive::super

Definition at line 954 of file qp.h.


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