Active object class (based on QMsm implementation strategy) More...
#include "qp.h"
Public Attributes | |
QActive | super |
Public Attributes inherited from QActive | |
QAsm | super |
Protected Member Functions | |
void | QMActive_ctor (QMActive *const me, QStateHandler const initial) |
Constructor of QMActive class. | |
Protected Member Functions inherited from QActive | |
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 | |
Protected Member Functions inherited from QAsm | |
void | QAsm_ctor (QAsm *const me) |
Constructor of the QAsm base class. | |
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) |
Publish event to all subscribers of a given signal e->sig | |
Protected Attributes inherited from QActive | |
uint8_t | prio |
QF-priority [1..QF_MAX_ACTIVE] of this AO. | |
uint8_t | pthre |
Preemption-threshold [1..QF_MAX_ACTIVE] of this AO. | |
QACTIVE_THREAD_TYPE | thread |
Port-dependent representation of the thread of the active object. | |
QACTIVE_OS_OBJ_TYPE | osObject |
Port-dependent per-thread object. | |
QACTIVE_EQUEUE_TYPE | eQueue |
Port-dependent event-queue type (often QEQueue) | |
uint8_t | prio_dis |
uint8_t | pthre_dis |
Protected Attributes inherited from QAsm | |
struct QAsmVtable const * | vptr |
Virtual pointer inherited by all QAsm subclasses (see also Object Orientation) | |
union QAsmAttr | state |
Current state (pointer to the current state-handler function) | |
union QAsmAttr | temp |
Temporary storage for target/act-table etc. | |
Active object class (based on QMsm implementation strategy)
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).
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.
|
protected |
Constructor of QMActive class.
Performs the first step of active object initialization by assigning the virtual pointer and calling the superclass constructor.
[in,out] | me | current instance pointer (see Object Orientation) |
[in] | initial | pointer to the event to be dispatched to the MSM |
Definition at line 68 of file qf_qmact.c.