Event class.
More...
#include "qp.hpp"
|
static constexpr std::uint8_t | MARKER {0xE0U} |
|
Event class.
QP::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 QP::QEvt class. Please note that the QP::QEvt member super is defined as the FIRST member of the derived struct.
Definition at line 144 of file qp.hpp.
◆ DynEvt
◆ QEvt() [1/3]
Disallowed default event constructor.
The default event constructor is explicitly disallowed (= delete
), so that all subclasses of QP::QEvt must provide constructors.
◆ QEvt() [2/3]
|
inlineexplicitconstexprnoexcept |
Event constructor.
- Parameters
-
[in] | s | signal of the event to initialize (for non-dynamic events) |
- Traceability
-
- Usage
- The following example illustrates the use of the QEvt::QEvt(QP::QSignal) constructor for stack-allocated events:
Definition at line 159 of file qp.hpp.
◆ QEvt() [3/3]
QP::QEvt::QEvt |
( |
DynEvt |
dummy | ) |
|
|
inlineexplicitnoexcept |
Event constructor for dynamic event
- Parameters
-
[in] | dummy | dummy parameter on which to overload the constructor |
- Usage
- The following example illustrates the implicit use of the QEvt::QEvt(QEvt::DYNAMIC) constructor for dynamically allocated events. (When QEVT_DYN_CTOR is defined, the macro Q_NEW() calls the dynamic event constructor via placement
new
):
. . .
#define Q_NEW(evtT_, sig_,...)
Definition at line 166 of file qp.hpp.
◆ verify_()
QEvt::verify_ |
( |
QEvt const *const |
e | ) |
|
|
inlinestaticnoexcept |
Verify the provided event pointer is not nullptr and that the expected memory marker is present in the event (QP FuSa Subsystem)
- Returns
- 'true' if this event passes the integrity check and 'false' otherwise.
Definition at line 171 of file qp.hpp.
◆ getPoolId_()
QP::QEvt::getPoolId_ |
( |
| ) |
const |
|
inlinenoexcept |
Get the Pool-ID of the event.
- Returns
- Pool-ID of the event.
- Note
- The Pool-ID is zero for immutable (static) events.
Definition at line 175 of file qp.hpp.
◆ sig
Signal of the event.
- Traceability
-
Definition at line 146 of file qp.hpp.
◆ refCtr_
Reference counter (for mutable events)
- Traceability
-
Definition at line 147 of file qp.hpp.
◆ evtTag_
Pool ID indicating which event pool it came from plus event marker
- Description
- The 8-bit
evtTag_
member stores the event-pool number (in bits [0:3]) and the QEvt::MARKER memory marker for integrity checking (in bits [4:7]). In the special case of immutable events (not from event pools) the event-pool number bits [0:3] are 0.
- Traceability
-
Definition at line 148 of file qp.hpp.
◆ MARKER
The documentation for this class was generated from the following files: