mirror of
https://github.com/QuantumLeaps/qpcpp.git
synced 2025-01-14 05:42:57 +08:00
6.9.2rc1
This commit is contained in:
parent
7da15c3281
commit
8ec913a86d
@ -3,8 +3,8 @@
|
||||
/// @ingroup qep
|
||||
/// @cond
|
||||
///***************************************************************************
|
||||
/// Last updated for version 6.9.1
|
||||
/// Last updated on 2020-10-11
|
||||
/// Last updated for version 6.9.2
|
||||
/// Last updated on 2020-12-17
|
||||
///
|
||||
/// Q u a n t u m L e a P s
|
||||
/// ------------------------
|
||||
@ -43,15 +43,15 @@
|
||||
//! The current QP version as a decimal constant XXYZ, where XX is a 2-digit
|
||||
// major version number, Y is a 1-digit minor version number, and Z is
|
||||
// a 1-digit release number.
|
||||
#define QP_VERSION 691U
|
||||
#define QP_VERSION 692U
|
||||
|
||||
//! The current QP version number string of the form XX.Y.Z, where XX is
|
||||
// a 2-digit major version number, Y is a 1-digit minor version number,
|
||||
// and Z is a 1-digit release number.
|
||||
#define QP_VERSION_STR "6.9.1"
|
||||
#define QP_VERSION_STR "6.9.2"
|
||||
|
||||
//! Encrypted current QP release (6.9.1) and date (2020-09-22)
|
||||
#define QP_RELEASE 0x883DB9ACU
|
||||
//! Encrypted current QP release (6.9.2) and date (2020-12-22)
|
||||
#define QP_RELEASE 0x880FF2EBU
|
||||
|
||||
|
||||
//****************************************************************************
|
||||
@ -311,43 +311,43 @@ protected:
|
||||
public:
|
||||
// facilities for the QHsm implementation strategy...
|
||||
//! event passed to the superstate to handle
|
||||
static constexpr QState Q_RET_SUPER {0};
|
||||
static constexpr QState Q_RET_SUPER {static_cast<QState>(0)};
|
||||
|
||||
//! event passed to submachine superstate
|
||||
static constexpr QState Q_RET_SUPER_SUB {1};
|
||||
static constexpr QState Q_RET_SUPER_SUB {static_cast<QState>(1)};
|
||||
|
||||
//! event unhandled due to a guard evaluating to 'false'
|
||||
static constexpr QState Q_RET_UNHANDLED {2};
|
||||
static constexpr QState Q_RET_UNHANDLED {static_cast<QState>(2)};
|
||||
|
||||
//! event handled (internal transition)
|
||||
static constexpr QState Q_RET_HANDLED {3};
|
||||
static constexpr QState Q_RET_HANDLED {static_cast<QState>(3)};
|
||||
|
||||
//! event silently ignored (bubbled up to top)
|
||||
static constexpr QState Q_RET_IGNORED {4};
|
||||
static constexpr QState Q_RET_IGNORED {static_cast<QState>(4)};
|
||||
|
||||
//! state entry action executed
|
||||
static constexpr QState Q_RET_ENTRY {5};
|
||||
static constexpr QState Q_RET_ENTRY {static_cast<QState>(5)};
|
||||
|
||||
//! state exit action executed
|
||||
static constexpr QState Q_RET_EXIT {6};
|
||||
static constexpr QState Q_RET_EXIT {static_cast<QState>(6)};
|
||||
|
||||
//! return value without any effect
|
||||
static constexpr QState Q_RET_NULL {7};
|
||||
static constexpr QState Q_RET_NULL {static_cast<QState>(7)};
|
||||
|
||||
//! regular transition taken
|
||||
static constexpr QState Q_RET_TRAN {8};
|
||||
static constexpr QState Q_RET_TRAN {static_cast<QState>(8)};
|
||||
|
||||
//! initial transition taken
|
||||
static constexpr QState Q_RET_TRAN_INIT {9};
|
||||
static constexpr QState Q_RET_TRAN_INIT {static_cast<QState>(9)};
|
||||
|
||||
//! entry-point transition into a submachine
|
||||
static constexpr QState Q_RET_TRAN_EP {10};
|
||||
static constexpr QState Q_RET_TRAN_EP {static_cast<QState>(10)};
|
||||
|
||||
//! transition to history of a given state
|
||||
static constexpr QState Q_RET_TRAN_HIST {11};
|
||||
static constexpr QState Q_RET_TRAN_HIST {static_cast<QState>(11)};
|
||||
|
||||
//! exit-point transition out of a submachine
|
||||
static constexpr QState Q_RET_TRAN_XP {12};
|
||||
static constexpr QState Q_RET_TRAN_XP {static_cast<QState>(12)};
|
||||
|
||||
protected:
|
||||
//! Helper function to specify a state transition
|
||||
@ -428,6 +428,9 @@ protected:
|
||||
m_temp.obj = s;
|
||||
return Q_RET_EXIT;
|
||||
}
|
||||
|
||||
//! Get the current state handler of the HSM
|
||||
virtual QStateHandler getStateHandler() noexcept;
|
||||
#else
|
||||
//! Helper function to specify a state entry in a QM state-handler
|
||||
QState qm_entry(QMState const * const s) noexcept {
|
||||
@ -524,20 +527,25 @@ protected:
|
||||
//! Protected constructor
|
||||
explicit QMsm(QStateHandler const initial) noexcept;
|
||||
|
||||
#ifdef Q_SPY
|
||||
//! Get the current state handler of the QMsm
|
||||
QStateHandler getStateHandler() noexcept override;
|
||||
#endif
|
||||
|
||||
private:
|
||||
//! disallow the inhertited isIn() function in QP::QMsm and subclasses
|
||||
//! disallow inhertited isIn() function in QP::QMsm and subclasses
|
||||
//! @sa QP::QMsm::isInState()
|
||||
bool isIn(QStateHandler const s) noexcept = delete;
|
||||
|
||||
//! disallow the inhertited state() function in QP::QMsm and subclasses
|
||||
//! disallow inhertited state() function in QP::QMsm and subclasses
|
||||
//! @sa QP::QMsm::stateObj()
|
||||
QStateHandler state(void) const noexcept = delete;
|
||||
|
||||
//! disallow the inhertited childState() function in QP::QMsm and subclasses
|
||||
//! disallow inhertited childState() function in QP::QMsm and subclasses
|
||||
//! @sa QP::QMsm::childStateObj()
|
||||
QStateHandler childState(QStateHandler const parent) noexcept = delete;
|
||||
|
||||
//! disallow the inhertited top() function in QP::QMsm and subclasses
|
||||
//! disallow inhertited top() function in QP::QMsm and subclasses
|
||||
//! @sa QP::QMsm::msm_top_s
|
||||
static QState top(void * const me, QEvt const * const e) noexcept = delete;
|
||||
|
||||
|
@ -3,8 +3,8 @@
|
||||
/// @ingroup qf
|
||||
/// @cond
|
||||
///***************************************************************************
|
||||
/// Last updated for version 6.9.1
|
||||
/// Last updated on 2020-09-17
|
||||
/// Last updated for version 6.9.2
|
||||
/// Last updated on 2020-12-17
|
||||
///
|
||||
/// Q u a n t u m L e a P s
|
||||
/// ------------------------
|
||||
@ -336,6 +336,11 @@ public:
|
||||
void dispatch(QEvt const * const e,
|
||||
std::uint_fast8_t const qs_id) override;
|
||||
|
||||
#ifdef Q_SPY
|
||||
//! Get the current state handler of the QMsm
|
||||
QStateHandler getStateHandler() noexcept override;
|
||||
#endif
|
||||
|
||||
//! Tests if a given state is part of the active state configuration
|
||||
bool isInState(QMState const * const st) const noexcept;
|
||||
|
||||
|
@ -1,11 +1,11 @@
|
||||
|
||||
// ---------------------------------------------------------------------
|
||||
// This file is provided by Gimpel Software (www.gimpel.com) for use with
|
||||
// PC-lint Plus.
|
||||
// ---------------------------------------------------------------------------
|
||||
// Copyright Gimpel Software LLC 2020. All rights reserved.
|
||||
//
|
||||
// Redistribution and use of this file, with or without modification, is
|
||||
// permitted provided that any such redistribution retains this notice.
|
||||
// ---------------------------------------------------------------------
|
||||
// This file is provided by Gimpel Software LLC (https://www.gimpel.com) for
|
||||
// use with PC-lint Plus. Redistribution is permitted but any redistribution
|
||||
// must preserve this notice and, if the redistributed file has been modified,
|
||||
// provide notice that the file has been modified from the original.
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
|
||||
// au-autosar.lnt -- Author options - AUTOSAR C++
|
||||
@ -25,8 +25,8 @@
|
||||
|
||||
*/
|
||||
|
||||
/* version check */ -cond('%PCLP_NO_LNT_VERSION_CHECK%' != '1' && (%LINT_MAJOR_VERSION% != 1 || %LINT_MINOR_VERSION% != 3),
|
||||
+fatal_error(This configuration file is intended for PC-lint Plus 1.3.
|
||||
/* version check */ -cond('%PCLP_NO_LNT_VERSION_CHECK%' != '1' && (%LINT_MAJOR_VERSION% != 1 || %LINT_MINOR_VERSION% != 4),
|
||||
+fatal_error(This configuration file is intended for PC-lint Plus 1.4.
|
||||
You are attempting to use it with PC-lint Plus %LINT_MAJOR_VERSION%.%LINT_MINOR_VERSION%.
|
||||
It is recommended that you use configuration files intended
|
||||
for PC-lint Plus %LINT_MAJOR_VERSION%.%LINT_MINOR_VERSION%.)
|
||||
@ -1172,10 +1172,15 @@
|
||||
|
||||
/* Rule M6-2-2 (required, implementation, partially automated) */
|
||||
|
||||
/* 9137 - testing floating point values for equality (exact) */
|
||||
+e9137
|
||||
+elib(9137)
|
||||
-append(9137,[AUTOSAR Rule M6-2-2])
|
||||
/* 777 - testing floating point values for equality */
|
||||
+e777
|
||||
+elib(777)
|
||||
-append(777,[AUTOSAR Rule M6-2-2])
|
||||
|
||||
/* 9252 - testing floating point for equality using exact value */
|
||||
+e9252
|
||||
+elib(9252)
|
||||
-append(9252,[AUTOSAR Rule M6-2-2])
|
||||
|
||||
/* Rule M6-2-3 (required, implementation, automated) */
|
||||
|
||||
@ -2447,6 +2452,13 @@
|
||||
-append(829(locale.h),[AUTOSAR Rule A18-0-3])
|
||||
-append(829(clocale),[AUTOSAR Rule A18-0-3])
|
||||
|
||||
/* 586 - function is deprecated */
|
||||
+e586
|
||||
+elib(586)
|
||||
|
||||
-deprecate(function,setlocale,[AUTOSAR Rule A18-0-3])
|
||||
-deprecate(function,std::setlocale,[AUTOSAR Rule A18-0-3])
|
||||
|
||||
/* Rule A18-1-1 (advisory, implementation, automated) */
|
||||
|
||||
/* 9436 - symbol has array type */
|
||||
|
@ -3,8 +3,8 @@
|
||||
/// @ingroup qep
|
||||
/// @cond
|
||||
///***************************************************************************
|
||||
/// Last updated for version 6.9.1
|
||||
/// Last updated on 2020-10-11
|
||||
/// Last updated for version 6.9.2
|
||||
/// Last updated on 2020-12-17
|
||||
///
|
||||
/// Q u a n t u m L e a P s
|
||||
/// ------------------------
|
||||
@ -534,6 +534,13 @@ std::int_fast8_t QHsm::hsm_tran(QStateHandler (&path)[MAX_NEST_DEPTH_],
|
||||
return ip;
|
||||
}
|
||||
|
||||
//****************************************************************************
|
||||
#ifdef Q_SPY
|
||||
QStateHandler QHsm::getStateHandler() noexcept {
|
||||
return m_state.fun;
|
||||
}
|
||||
#endif
|
||||
|
||||
//****************************************************************************
|
||||
/// @description
|
||||
/// Tests if a state machine derived from QHsm is-in a given state.
|
||||
|
@ -3,8 +3,8 @@
|
||||
/// @ingroup qep
|
||||
/// @cond
|
||||
///***************************************************************************
|
||||
/// Last updated for version 6.9.1
|
||||
/// Last updated on 2020-09-17
|
||||
/// Last updated for version 6.9.2
|
||||
/// Last updated on 2020-12-17
|
||||
///
|
||||
/// Q u a n t u m L e a P s
|
||||
/// ------------------------
|
||||
@ -313,6 +313,16 @@ void QMsm::dispatch(QEvt const * const e, std::uint_fast8_t const qs_id) {
|
||||
static_cast<void>(qs_id); // unused parameter (if Q_SPY not defined)
|
||||
}
|
||||
|
||||
//****************************************************************************
|
||||
#ifdef Q_SPY
|
||||
/// @description
|
||||
/// Helper function to get the current state handler of QMsm.
|
||||
///
|
||||
QStateHandler QMsm::getStateHandler() noexcept {
|
||||
return m_state.obj->stateHandler;
|
||||
}
|
||||
#endif
|
||||
|
||||
//****************************************************************************
|
||||
/// @description
|
||||
/// Helper function to execute transition sequence in a tran-action table.
|
||||
|
@ -2,8 +2,8 @@
|
||||
/// @brief QMActive::QMActive() and virtual functions
|
||||
/// @cond
|
||||
///***************************************************************************
|
||||
/// Last updated for version 6.9.1
|
||||
/// Last updated on 2020-09-17
|
||||
/// Last updated for version 6.9.2
|
||||
/// Last updated on 2020-12-17
|
||||
///
|
||||
/// Q u a n t u m L e a P s
|
||||
/// ------------------------
|
||||
@ -77,6 +77,7 @@ void QMActive::init(std::uint_fast8_t const qs_id) {
|
||||
void QMActive::dispatch(QEvt const * const e, std::uint_fast8_t const qs_id) {
|
||||
QF_QMACTIVE_TO_QMSM_CAST_(this)->QMsm::dispatch(e, qs_id);
|
||||
}
|
||||
|
||||
//............................................................................
|
||||
bool QMActive::isInState(QMState const * const st) const noexcept {
|
||||
return QF_QMACTIVE_TO_QMSM_CONST_CAST_(this)->QMsm::isInState(st);
|
||||
@ -88,5 +89,12 @@ QMState const *QMActive::childStateObj(QMState const * const parent)
|
||||
return QF_QMACTIVE_TO_QMSM_CONST_CAST_(this)->QMsm::childStateObj(parent);
|
||||
}
|
||||
|
||||
//............................................................................
|
||||
#ifdef Q_SPY
|
||||
QStateHandler QMActive::getStateHandler() noexcept {
|
||||
return QF_QMACTIVE_TO_QMSM_CAST_(this)->QMsm::getStateHandler();
|
||||
}
|
||||
#endif
|
||||
|
||||
} // namespace QP
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
/// @cond
|
||||
///***************************************************************************
|
||||
/// Last updated for version 6.9.2
|
||||
/// Last updated on 2020-12-14
|
||||
/// Last updated on 2020-12-17
|
||||
///
|
||||
/// Q u a n t u m L e a P s
|
||||
/// ------------------------
|
||||
@ -327,7 +327,7 @@ void QS::queryCurrObj(std::uint8_t obj_kind) noexcept {
|
||||
case AO_OBJ:
|
||||
QS_FUN_PRE_(
|
||||
reinterpret_cast<QHsm *>(
|
||||
QS::rxPriv_.currObj[obj_kind])->m_state.fun);
|
||||
QS::rxPriv_.currObj[obj_kind])->getStateHandler());
|
||||
break;
|
||||
case QS::MP_OBJ:
|
||||
QS_MPC_PRE_(reinterpret_cast<QMPool *>(
|
||||
|
Loading…
x
Reference in New Issue
Block a user