QP/C  7.2.2
Real-Time Embedded Framework
Loading...
Searching...
No Matches
QEvt Class Reference

Event class. More...

#include "qep.h"

Inheritance diagram for QEvt:
QTimeEvt

Public Member Functions

void QEvt_ctor (QEvt *const me, enum_t const sig)
 

Public Attributes

QSignal sig
 

Static Private Member Functions

static void QEvt_refCtr_inc_ (QEvt const *me)
 
static void QEvt_refCtr_dec_ (QEvt const *me)
 

Private Attributes

uint8_t poolId_
 
uint8_t volatile refCtr_
 

Detailed Description

QEvt represents events without parameters and serves as the base class for derivation of events with parameters.

Traceability
Usage
The following example illustrates how to add an event parameter by derivation of the QEvt class. Please note that the QEvt member super is defined as the FIRST member of the derived struct.
typedef struct {
QEvt super; /* inherits QEvt */
uint8_t keyId; /* ID of the key depressed */
} CalcEvt;
Event class.
Definition: qep.h:167

Definition at line 167 of file qep.h.

Member Function Documentation

◆ QEvt_ctor()

void QEvt_ctor ( QEvt *const  me,
enum_t const  sig 
)

Custom event constructor

Note
Available only when the macro Q_EVT_CTOR is defined
Traceability

◆ QEvt_refCtr_inc_()

static void QEvt_refCtr_inc_ ( QEvt const *  me)
inlinestaticprivate

increment the refCtr of a const event (requires casting const away)

Traceability

Definition at line 181 of file qf_pkg.h.

◆ QEvt_refCtr_dec_()

static void QEvt_refCtr_dec_ ( QEvt const *  me)
inlinestaticprivate

decrement the refCtr of a const event (requires casting const away)

Traceability

Definition at line 191 of file qf_pkg.h.

Member Data Documentation

◆ sig

QSignal sig

Signal of the event.

Traceability

Definition at line 176 of file qep.h.

◆ poolId_

uint8_t poolId_
private

Pool ID (==0 for immutable event)

Traceability

Definition at line 186 of file qep.h.

◆ refCtr_

uint8_t volatile refCtr_
private

Reference counter (for mutable events)

Traceability

Definition at line 194 of file qep.h.


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