Active object class (based on the QHsm implementation strategy) More...
#include "qp.h"
Public Member Functions | |
void | QActive_setAttr (QActive *const me, uint32_t attr1, void const *attr2) |
Static Public Member Functions | |
void | QActive_psInit (QSubscrList *const subscrSto, enum_t const maxSignal) |
Public Attributes | |
QAsm | super |
Protected Member Functions | |
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) |
![]() | |
void | QAsm_ctor (QAsm *const me) |
QState | QHsm_top (QHsm const *const me, QEvt const *const e) |
Private Member Functions | |
void | QActive_start_ (QActive *const me, QPrioSpec const prioSpec, QEvt const **const qSto, uint_fast16_t const qLen, void *const stkSto, uint_fast16_t const stkSize, void const *const par) |
void | QActive_register_ (QActive *const me) |
void | QActive_unregister_ (QActive *const me) |
bool | QActive_post_ (QActive *const me, QEvt const *const e, uint_fast16_t const margin, void const *const sender) |
void | QActive_postLIFO_ (QActive *const me, QEvt const *const e) |
QEvt const * | QActive_get_ (QActive *const me) |
void | QActive_evtLoop_ (QActive *const me) |
Static Private Member Functions | |
void | QActive_publish_ (QEvt const *const e, void const *const sender, uint_fast8_t const qs_id) |
Private Attributes | |
QACTIVE_EQUEUE_TYPE | eQueue |
QACTIVE_OS_OBJ_TYPE | osObject |
QACTIVE_THREAD_TYPE | thread |
uint8_t | prio |
uint8_t | pthre |
QActive * | QActive_registry_ [QF_MAX_ACTIVE+1U] |
QSubscrList * | QActive_subscrList_ |
enum_t | QActive_maxPubSignal_ |
Additional Inherited Members | |
![]() | |
struct QAsmVtable const * | vptr |
union QAsmAttr | state |
union QAsmAttr | temp |
Active object class (based on the QHsm implementation strategy)
Active objects are encapsulated tasks (each containing an event queue and a state machine) that communicate with one another asynchronously by sending and receiving events. Within an active object, events are processed in a run-to-completion (RTC) fashion, while QF encapsulates all the details of thread-safe event exchange and queuing.
QActive represents an active object that uses the QHsm-style implementation strategy for state machines. This strategy is tailored to manual coding, but it is also supported by the QM modeling tool. The resulting code is slower than in the QMsm-style implementation strategy.
|
protected |
void QActive_setAttr | ( | QActive *const | me, |
uint32_t | attr1, | ||
void const * | attr2 | ||
) |
|
private |
|
static |
|
staticprivate |
|
protected |
|
protected |
Definition at line 93 of file qf_defer.c.
Definition at line 154 of file qf_defer.c.
|
private |
|
private |
Port-dependent event-queue type (often QEQueue)
The type of the queue depends on the underlying operating system or a kernel. Many kernels support "message queues" that can be adapted to deliver QF events to the active object. Alternatively, QF provides a native event queue implementation that can be used as well.
|
private |
|
private |
Port-dependent representation of the thread of the active object
This data might be used in various ways, depending on the QF port. In some ports me->thread is used store the thread handle. In other ports me->thread can be a pointer to the Thread-Local-Storage (TLS).
|
private |
|
private |
Preemption-threshold [1..QF_MAX_ACTIVE] of this AO.
|
private |
|
private |
|
private |