QP/C++  8.0.3
Real-Time Event Framework
Loading...
Searching...
No Matches
qf_qmact.cpp
Go to the documentation of this file.
1//============================================================================
2// QP/C++ Real-Time Event Framework (RTEF)
3//
4// Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved.
5//
6// Q u a n t u m L e a P s
7// ------------------------
8// Modern Embedded Software
9//
10// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial
11//
12// This software is dual-licensed under the terms of the open-source GNU
13// General Public License (GPL) or under the terms of one of the closed-
14// source Quantum Leaps commercial licenses.
15//
16// Redistributions in source code must retain this top-level comment block.
17// Plagiarizing this software to sidestep the license obligations is illegal.
18//
19// NOTE:
20// The GPL does NOT permit the incorporation of this code into proprietary
21// programs. Please contact Quantum Leaps for commercial licensing options,
22// which expressly supersede the GPL and are designed explicitly for
23// closed-source distribution.
24//
25// Quantum Leaps contact information:
26// <www.state-machine.com/licensing>
27// <info@state-machine.com>
28//============================================================================
29#define QP_IMPL // this is QP implementation
30#include "qp_port.hpp" // QP port
31#include "qp_pkg.hpp" // QP package-scope interface
32#include "qsafe.h" // QP Functional Safety (FuSa) Subsystem
33#ifdef Q_SPY // QS software tracing enabled?
34 #include "qs_port.hpp" // QS port
35 #include "qs_pkg.hpp" // QS facilities for pre-defined trace records
36#else
37 #include "qs_dummy.hpp" // disable the QS software tracing
38#endif // Q_SPY
39
40// unnamed namespace for local definitions with internal linkage
41namespace {
42//Q_DEFINE_THIS_MODULE("qf_qmact")
43} // unnamed namespace
44
45namespace QP {
46
47//............................................................................
48QMActive::QMActive(QStateHandler const initial) noexcept
49 : QActive(initial)
50{
51 m_state.obj = reinterpret_cast<QMsm *>(this)->topQMState();
52 m_temp.fun = initial;
53}
54
55} // namespace QP
QActive(QStateHandler const initial) noexcept
Definition qp.hpp:597
QAsmAttr m_temp
Temporary storage for target/act-table etc.
Definition qp.hpp:181
QAsmAttr m_state
Current state (pointer to the current state-handler function)
Definition qp.hpp:180
QMActive(QStateHandler const initial) noexcept
Constructor of QP::QMActive class.
Definition qf_qmact.cpp:48
Hierarchical State Machine class (QMsm-style state machine implementation strategy)
Definition qp.hpp:360
QP/C++ framework.
Definition qequeue.hpp:36
QState(*)(void *const me, QEvt const *const e) QStateHandler
Pointer to a state-handler function.
Definition qp.hpp:150
Internal (package scope) QP/C++ interface.
Sample QP/C++ port.
QS/C++ dummy public interface.
Sample QS/C++ port.
QP Functional Safety (FuSa) Subsystem.