Active object class (based on QMsm implementation strategy)
More...
#include "qp.h"
|
void | QMActive_ctor (QMActive *const me, QStateHandler const initial) |
| Constructor of QMActive class.
|
|
void | QActive_ctor (QActive *const me, QStateHandler const initial) |
| QActive constructor (abstract base class)
|
|
void | QActive_stop (QActive *const me) |
| Stops execution of an active object and removes it from the framework's supervision.
|
|
void | QActive_subscribe (QActive const *const me, enum_t const sig) |
| Subscribes for delivery of signal sig to the active object.
|
|
void | QActive_unsubscribe (QActive const *const me, enum_t const sig) |
| Unsubscribes from the delivery of signal sig to the active object.
|
|
void | QActive_unsubscribeAll (QActive const *const me) |
| Unsubscribes from the delivery of all signals to the active object.
|
|
bool | QActive_defer (QActive const *const me, struct QEQueue *const eq, QEvt const *const e) |
| Defer an event to a given separate event queue.
|
|
bool | QActive_recall (QActive *const me, struct QEQueue *const eq) |
| Recall a deferred event from a given event queue.
|
|
uint_fast16_t | QActive_flushDeferred (QActive const *const me, struct QEQueue *const eq, uint_fast16_t const num) |
| Flush the specified number of events from the deferred queue eq
|
|
void | QAsm_ctor (QAsm *const me) |
| Constructor of the QAsm base class.
|
|
QState | QHsm_top (QHsm const *const me, QEvt const *const e) |
|
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/C 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 Object Orientation). 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 929 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 Object Orientation) |
[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 60 of file qf_qmact.c.
◆ super
Definition at line 931 of file qp.h.
The documentation for this class was generated from the following files: