From 8ec913a86d1bdf2320072d86a4e5574f57c7ef05 Mon Sep 17 00:00:00 2001 From: QL Date: Thu, 17 Dec 2020 11:39:14 -0500 Subject: [PATCH] 6.9.2rc1 --- include/qep.hpp | 54 +++++++++++++++++++--------------- include/qf.hpp | 9 ++++-- ports/lint-plus/au-autosar.lnt | 38 ++++++++++++++++-------- src/qf/qep_hsm.cpp | 11 +++++-- src/qf/qep_msm.cpp | 14 +++++++-- src/qf/qf_qmact.cpp | 12 ++++++-- src/qs/qs_rx.cpp | 4 +-- 7 files changed, 96 insertions(+), 46 deletions(-) diff --git a/include/qep.hpp b/include/qep.hpp index d477a770..e77b856d 100644 --- a/include/qep.hpp +++ b/include/qep.hpp @@ -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(0)}; //! event passed to submachine superstate - static constexpr QState Q_RET_SUPER_SUB {1}; + static constexpr QState Q_RET_SUPER_SUB {static_cast(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(2)}; //! event handled (internal transition) - static constexpr QState Q_RET_HANDLED {3}; + static constexpr QState Q_RET_HANDLED {static_cast(3)}; //! event silently ignored (bubbled up to top) - static constexpr QState Q_RET_IGNORED {4}; + static constexpr QState Q_RET_IGNORED {static_cast(4)}; //! state entry action executed - static constexpr QState Q_RET_ENTRY {5}; + static constexpr QState Q_RET_ENTRY {static_cast(5)}; //! state exit action executed - static constexpr QState Q_RET_EXIT {6}; + static constexpr QState Q_RET_EXIT {static_cast(6)}; //! return value without any effect - static constexpr QState Q_RET_NULL {7}; + static constexpr QState Q_RET_NULL {static_cast(7)}; //! regular transition taken - static constexpr QState Q_RET_TRAN {8}; + static constexpr QState Q_RET_TRAN {static_cast(8)}; //! initial transition taken - static constexpr QState Q_RET_TRAN_INIT {9}; + static constexpr QState Q_RET_TRAN_INIT {static_cast(9)}; //! entry-point transition into a submachine - static constexpr QState Q_RET_TRAN_EP {10}; + static constexpr QState Q_RET_TRAN_EP {static_cast(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(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(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; diff --git a/include/qf.hpp b/include/qf.hpp index 0b773087..b9c85a36 100644 --- a/include/qf.hpp +++ b/include/qf.hpp @@ -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; diff --git a/ports/lint-plus/au-autosar.lnt b/ports/lint-plus/au-autosar.lnt index 3101edc2..66bd3110 100644 --- a/ports/lint-plus/au-autosar.lnt +++ b/ports/lint-plus/au-autosar.lnt @@ -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 */ diff --git a/src/qf/qep_hsm.cpp b/src/qf/qep_hsm.cpp index e066c51a..b72f71ca 100644 --- a/src/qf/qep_hsm.cpp +++ b/src/qf/qep_hsm.cpp @@ -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. diff --git a/src/qf/qep_msm.cpp b/src/qf/qep_msm.cpp index 7851facf..909e33e8 100644 --- a/src/qf/qep_msm.cpp +++ b/src/qf/qep_msm.cpp @@ -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(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. diff --git a/src/qf/qf_qmact.cpp b/src/qf/qf_qmact.cpp index f2fdace6..54c11aad 100644 --- a/src/qf/qf_qmact.cpp +++ b/src/qf/qf_qmact.cpp @@ -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 diff --git a/src/qs/qs_rx.cpp b/src/qs/qs_rx.cpp index 3a01cc7a..ceb98d37 100644 --- a/src/qs/qs_rx.cpp +++ b/src/qs/qs_rx.cpp @@ -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( - QS::rxPriv_.currObj[obj_kind])->m_state.fun); + QS::rxPriv_.currObj[obj_kind])->getStateHandler()); break; case QS::MP_OBJ: QS_MPC_PRE_(reinterpret_cast(