QEP/C++ platform-independent public interface. More...
Go to the source code of this file.
Data Structures | |
struct | QEvt |
QEvt base class. More... | |
union | QHsmAttr |
Attribute of for the QHsm class (Hierarchical State Machine). More... | |
class | QHsm |
Hierarchical State Machine base class. More... | |
class | QMsm |
QM State Machine implementation strategy. More... | |
struct | QMState |
State object for the QP::QMsm class (QM State Machine). More... | |
struct | QMTranActTable |
Transition-Action Table for the QP::QMsm State Machine. More... | |
class | QEP |
Provides miscellaneous QEP services. More... | |
Namespaces | |
QP | |
namespace associated with the QP/C++ framework | |
Macros | |
#define | QP_VERSION 693U |
The current QP version as a decimal constant XXYZ, where XX is a 2-digit. More... | |
#define | QP_VERSION_STR "6.9.3" |
The current QP version number string of the form XX.Y.Z, where XX is. More... | |
#define | QP_RELEASE 0x8295AA8AU |
Encrypted current QP release (6.9.3) and date (2021-04-12) More... | |
#define | Q_SIGNAL_SIZE 2U |
The size (in bytes) of the signal of an event. Valid values: 1U, 2U, or 4U; default 2U. More... | |
#define | Q_EVT_CAST(class_) (static_cast<class_ const *>(e)) |
Perform downcast of an event onto a subclass of QEvt class_ . More... | |
#define | Q_UINT2PTR_CAST(type_, uint_) (reinterpret_cast<type_ *>(uint_)) |
Perform cast from unsigned integer uint_ to pointer of type type_ . More... | |
#define | QEVT_INITIALIZER(sig_) { static_cast<QP::QSignal>(sig_), 0U, 0U } |
Initializer of static constant QEvt instances. More... | |
#define | Q_STATE_DECL(state_) |
Macro to generate a declaration of a state-handler, state-caller and a state-object for a given state in a subclass of QP::QHsm. More... | |
#define | Q_STATE_DEF(subclass_, state_) |
Macro to generate a definition of a state-handler for a given state in a subclass of QP::QHsm. More... | |
#define | Q_HANDLED() (Q_RET_HANDLED) |
Macro to specify that the event was handled. More... | |
#define | Q_UNHANDLED() (Q_RET_UNHANDLED) |
Macro to specify that the event was NOT handled due to a guard condition evaluating to 'false'. More... | |
#define | Q_STATE_CAST(handler_) (reinterpret_cast<QP::QStateHandler>(handler_)) |
Macro to perform casting to QStateHandler. More... | |
#define | Q_ACTION_CAST(act_) (reinterpret_cast<QP::QActionHandler>(act_)) |
Macro to perform casting to QActionHandler. More... | |
#define | Q_ACTION_NULL (nullptr) |
Macro to provide strictly-typed zero-action to terminate action lists in the transition-action-tables. More... | |
#define | QM_STATE_DECL(state_) |
Macro to generate a declaration of a state-handler, state-caller and a state-object for a given state in a subclass of QP::QMsm. More... | |
#define | QM_SM_STATE_DECL(subm_, state_) |
Macro to generate a declaration of a state-handler, state-caller and a state-object for a given submachine state in a subclass of QP::QMsm. More... | |
#define | QM_ACTION_DECL(action_) |
Macro to generate a declaration of an action-handler and action-caller in a subclass of QP::QMsm. More... | |
#define | QM_STATE_DEF(subclass_, state_) |
Macro to generate a definition of a state-caller and state-handler for a given state in a subclass of QP::QMsm. More... | |
#define | QM_ACTION_DEF(subclass_, action_) |
Macro to generate a definition of an action-caller and action-handler in a subclass of QP::QMsm. More... | |
#define | QM_HANDLED() (Q_RET_HANDLED) |
Macro for a QM action-handler when it handles the event. More... | |
#define | QM_UNHANDLED() (Q_RET_UNHANDLED) |
Macro for a QM action-handler when it does not handle the event due to a guard condition evaluating to false. More... | |
#define | QM_SUPER() (Q_RET_SUPER) |
Macro for a QM action-handler when it passes the event to the superstate. More... | |
#define | QM_STATE_NULL (nullptr) |
Macro to provide strictly-typed zero-state to use for submachines. Applicable to suclasses of QP::QMsm. More... | |
Typedefs | |
using | char_t = char |
alias for characters and character strings. More... | |
using | int_t = int |
alias for line numbers in assertions and return from QF::run() More... | |
using | enum_t = int |
alias for enumerations used for event signals More... | |
using | float32_t = float |
alias for 32-bit IEEE 754 floating point numbers More... | |
using | float64_t = double |
alias for 64-bit IEEE 754 floating point numbers More... | |
using | QSignal = std::uint16_t |
QSignal represents the signal of an event. More... | |
using | QState = std::uint_fast8_t |
Type returned from state-handler functions. More... | |
using | QStateHandler = QState(*)(void *const me, QEvt const *const e) |
Pointer to state-handler function. More... | |
using | QActionHandler = QState(*)(void *const me) |
Pointer to an action-handler function. More... | |
using | QXThreadHandler = void(*)(QXThread *const me) |
Pointer to a thread-handler function. More... | |
Variables | |
constexpr char_t const | versionStr [] {QP_VERSION_STR} |
the current QP version number string based on QP_VERSION_STR More... | |
constexpr enum_t | Q_USER_SIG {4} |
Offset or the user signals. More... | |
QEP/C++ platform-independent public interface.
Definition in file qep.hpp.
union QP::QHsmAttr |
Attribute of for the QHsm class (Hierarchical State Machine).
Data Fields | ||
---|---|---|
QStateHandler | fun | pointer to a state handler function |
QActionHandler | act | pointer to an action-handler function |
QXThreadHandler | thr | pointer to an thread-handler function |
QMState const * | obj | pointer to QMState object |
QMTranActTable const * | tatbl | transition-action table |
struct QP::QMState |
State object for the QP::QMsm class (QM State Machine).
Data Fields | ||
---|---|---|
QMState const * | superstate | superstate of this state |
QStateHandler const | stateHandler | state handler function |
QActionHandler const | entryAction | entry action handler function |
QActionHandler const | exitAction | exit action handler function |
QActionHandler const | initAction | init action handler function |
struct QP::QMTranActTable |
Data Fields | ||
---|---|---|
QMState const * | target | |
QActionHandler const | act[1] |
#define QP_VERSION 693U |
#define QP_VERSION_STR "6.9.3" |
#define QP_RELEASE 0x8295AA8AU |
#define Q_SIGNAL_SIZE 2U |
The size (in bytes) of the signal of an event. Valid values: 1U, 2U, or 4U; default 2U.
#define Q_EVT_CAST | ( | class_ | ) | (static_cast<class_ const *>(e)) |
#define Q_UINT2PTR_CAST | ( | type_, | |
uint_ | |||
) | (reinterpret_cast<type_ *>(uint_)) |
Perform cast from unsigned integer uint_
to pointer of type type_
.
#define QEVT_INITIALIZER | ( | sig_ | ) | { static_cast<QP::QSignal>(sig_), 0U, 0U } |
#define Q_STATE_DECL | ( | state_ | ) |
Macro to generate a declaration of a state-handler, state-caller and a state-object for a given state in a subclass of QP::QHsm.
#define Q_STATE_DEF | ( | subclass_, | |
state_ | |||
) |
Macro to generate a definition of a state-handler for a given state in a subclass of QP::QHsm.
#define Q_HANDLED | ( | ) | (Q_RET_HANDLED) |
#define Q_UNHANDLED | ( | ) | (Q_RET_UNHANDLED) |
#define Q_STATE_CAST | ( | handler_ | ) | (reinterpret_cast<QP::QStateHandler>(handler_)) |
#define Q_ACTION_CAST | ( | act_ | ) | (reinterpret_cast<QP::QActionHandler>(act_)) |
#define Q_ACTION_NULL (nullptr) |
#define QM_STATE_DECL | ( | state_ | ) |
Macro to generate a declaration of a state-handler, state-caller and a state-object for a given state in a subclass of QP::QMsm.
#define QM_SM_STATE_DECL | ( | subm_, | |
state_ | |||
) |
Macro to generate a declaration of a state-handler, state-caller and a state-object for a given submachine state in a subclass of QP::QMsm.
#define QM_ACTION_DECL | ( | action_ | ) |
Macro to generate a declaration of an action-handler and action-caller in a subclass of QP::QMsm.
#define QM_STATE_DEF | ( | subclass_, | |
state_ | |||
) |
Macro to generate a definition of a state-caller and state-handler for a given state in a subclass of QP::QMsm.
#define QM_ACTION_DEF | ( | subclass_, | |
action_ | |||
) |
Macro to generate a definition of an action-caller and action-handler in a subclass of QP::QMsm.
#define QM_HANDLED | ( | ) | (Q_RET_HANDLED) |
#define QM_UNHANDLED | ( | ) | (Q_RET_UNHANDLED) |
#define QM_SUPER | ( | ) | (Q_RET_SUPER) |
#define QM_STATE_NULL (nullptr) |
using char_t = char |
using int_t = int |
using enum_t = int |
using float32_t = float |
alias for 32-bit IEEE 754 floating point numbers