Active object class (based on QMsm implementation strategy)
More...
#include "qp.h"
|
void | QActive_setAttr (QActive *const me, uint32_t attr1, void const *attr2) |
|
void | QActive_start (QActive *const me, QPrioSpec const prioSpec, QEvtPtr *const qSto, uint_fast16_t const qLen, void *const stkSto, uint_fast16_t const stkSize, void const *const par) |
| Starts execution of an active object and registers the object with the framework.
|
|
void | QActive_psInit (QSubscrList *const subscrSto, enum_t const maxSignal) |
| Publish event to all subscribers of a given signal e->sig
|
|
uint_fast16_t | QActive_getQueueMin (uint_fast8_t const prio) |
| This function returns the minimum of free entries of the given event queue.
|
|
static void | QAsm_ctor (QAsm *const me) |
| Constructor of the QAsm base class.
|
|
Active object class (based on QMsm implementation strategy)
- Details
- 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.
- Backward Traceability
- SRS_QP_SM_21: QP Framework should provide a State Machine Implementation Strategy optimized for "automatic code generation"
- SDS_QP_QF: QF Active Object Framework
- SDS_QP_QMActive
- QMsm: Hierarchical State Machine class (QMsm-style state machine implementation strategy)
- 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 SAS_QP_OO). Please also note the call to the QMActive_ctor() in the Blinky subclass' constructor. typedef struct {
} Blinky;
. . .
void Blinky_ctor(Blinky * const me) {
QTimeEvt_ctorX(&me->timeEvt, &me->super, TIMEOUT_SIG, 0U);
}
#define Q_STATE_CAST(handler_)
Perform cast to QStateHandler.
Active object class (based on QMsm implementation strategy)
void QMActive_ctor(QMActive *const me, QStateHandler const initial)
Constructor of QMActive class.
Definition at line 618 of file qp.h.
◆ QMActive_ctor()
Constructor of QMActive class.
- Details
- Performs the first step of active object initialization by assigning the virtual pointer and calling the superclass constructor.
- Parameters
-
[in,out] | me | current instance pointer (see SAS_QP_OO) |
[in] | initial | pointer to the event to be dispatched to the MSM |
- Note
- Must be called only ONCE before QASM_INIT().
- Backward Traceability
- QMActive: Active object class (based on QMsm implementation strategy)
Definition at line 44 of file qf_qmact.c.
◆ super
Definition at line 619 of file qp.h.
The documentation for this class was generated from the following files: