qpcpp/include/qs_dummy.hpp

124 lines
5.3 KiB
C++
Raw Normal View History

2015-05-14 16:05:04 -04:00
/// @file
2015-09-29 11:34:38 -04:00
/// @brief Dummy definitions of the QS macros that avoid code generation from
/// the QS instrumentation.
2019-12-31 15:56:23 -05:00
/// @ingroup qs qpspy
2015-05-14 16:05:04 -04:00
/// @cond
2014-04-13 21:35:34 -04:00
///***************************************************************************
2020-10-01 12:50:17 -04:00
/// Last updated for version 6.9.1
/// Last updated on 2020-09-30
2014-04-13 21:35:34 -04:00
///
2018-10-25 11:13:01 -04:00
/// Q u a n t u m L e a P s
/// ------------------------
/// Modern Embedded Software
2014-04-13 21:35:34 -04:00
///
2020-03-17 21:33:58 -04:00
/// Copyright (C) 2005-2020 Quantum Leaps. All rights reserved.
2014-04-13 21:35:34 -04:00
///
/// This program is open source software: you can redistribute it and/or
/// modify it under the terms of the GNU General Public License as published
/// by the Free Software Foundation, either version 3 of the License, or
/// (at your option) any later version.
///
/// Alternatively, this program may be distributed and modified under the
/// terms of Quantum Leaps commercial licenses, which expressly supersede
/// the GNU General Public License and are specifically designed for
/// licensees interested in retaining the proprietary status of their code.
///
/// This program is distributed in the hope that it will be useful,
/// but WITHOUT ANY WARRANTY; without even the implied warranty of
/// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
/// GNU General Public License for more details.
///
/// You should have received a copy of the GNU General Public License
2019-10-27 12:26:31 -04:00
/// along with this program. If not, see <www.gnu.org/licenses>.
2014-04-13 21:35:34 -04:00
///
/// Contact information:
2019-12-31 15:56:23 -05:00
/// <www.state-machine.com/licensing>
2019-10-27 12:26:31 -04:00
/// <info@state-machine.com>
2014-04-13 21:35:34 -04:00
///***************************************************************************
2015-05-14 16:05:04 -04:00
/// @endcond
2014-04-13 21:35:34 -04:00
2019-10-27 12:26:31 -04:00
#ifndef QS_DUMMY_HPP
#define QS_DUMMY_HPP
2012-08-14 18:00:48 -04:00
#ifdef Q_SPY
2019-10-27 12:26:31 -04:00
#error "Q_SPY must NOT be defined to include qs_dummy.hpp"
2012-08-14 18:00:48 -04:00
#endif
#define QS_INIT(arg_) (true)
2020-10-01 12:50:17 -04:00
#define QS_EXIT() static_cast<void>(0)
#define QS_DUMP() static_cast<void>(0)
#define QS_GLB_FILTER(rec_) static_cast<void>(0)
#define QS_LOC_FILTER(qs_id_) static_cast<void>(0)
2012-08-14 18:00:48 -04:00
2020-03-17 21:33:58 -04:00
#define QS_GET_BYTE(pByte_) (0xFFFFU)
#define QS_GET_BLOCK(pSize_) (nullptr)
2012-08-14 18:00:48 -04:00
2020-10-01 12:50:17 -04:00
#define QS_BEGIN_ID(rec_, qs_id_) if (false) {
2012-08-14 18:00:48 -04:00
#define QS_END() }
2020-10-01 12:50:17 -04:00
#define QS_BEGIN_NOCRIT(rec_, qs_id_) if (false) {
2012-08-14 18:00:48 -04:00
#define QS_END_NOCRIT() }
2020-10-01 12:50:17 -04:00
#define QS_I8(width_, data_) static_cast<void>(0)
#define QS_U8(width_, data_) static_cast<void>(0)
#define QS_I16(width_, data_) static_cast<void>(0)
#define QS_U16(width_, data_) static_cast<void>(0)
#define QS_I32(width_, data_) static_cast<void>(0)
#define QS_U32(width_, data_) static_cast<void>(0)
#define QS_F32(width_, data_) static_cast<void>(0)
#define QS_F64(width_, data_) static_cast<void>(0)
#define QS_U64(width_, data_) static_cast<void>(0)
#define QS_STR(str_) static_cast<void>(0)
#define QS_MEM(mem_, size_) static_cast<void>(0)
#define QS_SIG(sig_, obj_) static_cast<void>(0)
#define QS_OBJ(obj_) static_cast<void>(0)
#define QS_FUN(fun_) static_cast<void>(0)
2012-08-14 18:00:48 -04:00
2020-10-01 12:50:17 -04:00
#define QS_SIG_DICTIONARY(sig_, obj_) static_cast<void>(0)
#define QS_OBJ_DICTIONARY(obj_) static_cast<void>(0)
#define QS_FUN_DICTIONARY(fun_) static_cast<void>(0)
#define QS_USR_DICTIONARY(rec_) static_cast<void>(0)
#define QS_ASSERTION(module_, loc_, delay_) static_cast<void>(0)
#define QS_FLUSH() static_cast<void>(0)
2012-08-14 18:00:48 -04:00
2017-05-17 13:15:09 -04:00
#define QS_TEST_PROBE_DEF(fun_)
#define QS_TEST_PROBE(code_)
#define QS_TEST_PROBE_ID(id_, code_)
2020-10-01 12:50:17 -04:00
#define QS_TEST_PAUSE() static_cast<void>(0)
2017-05-17 13:15:09 -04:00
2020-10-01 12:50:17 -04:00
#define QS_OUTPUT() static_cast<void>(0)
#define QS_RX_INPUT() static_cast<void>(0)
2018-10-25 11:13:01 -04:00
2015-09-29 11:34:38 -04:00
//****************************************************************************
// internal QS macros used only in the QP components
2012-08-14 18:00:48 -04:00
2018-10-25 11:13:01 -04:00
#ifdef QP_IMPL
2019-12-31 15:56:23 -05:00
// predefined QS trace records
2020-10-01 12:50:17 -04:00
#define QS_BEGIN_PRE_(rec_, qs_id_) if (false) {
2019-12-31 15:56:23 -05:00
#define QS_END_PRE_() }
2020-10-01 12:50:17 -04:00
#define QS_BEGIN_NOCRIT_PRE_(rec_, qs_id_) if (false) {
2019-12-31 15:56:23 -05:00
#define QS_END_NOCRIT_PRE_() }
2020-10-01 12:50:17 -04:00
#define QS_U8_PRE_(data_) static_cast<void>(0)
#define QS_2U8_PRE_(data1_, data2_) static_cast<void>(0)
#define QS_U16_PRE_(data_) static_cast<void>(0)
#define QS_U32_PRE_(data_) static_cast<void>(0)
#define QS_TIME_PRE_() static_cast<void>(0)
#define QS_SIG_PRE_(sig_) static_cast<void>(0)
#define QS_EVS_PRE_(size_) static_cast<void>(0)
#define QS_OBJ_PRE_(obj_) static_cast<void>(0)
#define QS_FUN_PRE_(fun_) static_cast<void>(0)
#define QS_EQC_PRE_(ctr_) static_cast<void>(0)
#define QS_MPC_PRE_(ctr_) static_cast<void>(0)
#define QS_MPS_PRE_(size_) static_cast<void>(0)
#define QS_TEC_PRE_(ctr_) static_cast<void>(0)
2018-10-25 11:13:01 -04:00
2019-12-31 15:56:23 -05:00
#define QS_CRIT_STAT_
2020-10-01 12:50:17 -04:00
#define QF_QS_CRIT_ENTRY() static_cast<void>(0)
#define QF_QS_CRIT_EXIT() static_cast<void>(0)
#define QF_QS_ISR_ENTRY(isrnest_, prio_) static_cast<void>(0)
#define QF_QS_ISR_EXIT(isrnest_, prio_) static_cast<void>(0)
#define QF_QS_ACTION(act_) static_cast<void>(0)
2018-10-25 11:13:01 -04:00
#endif // QP_IMPL
2012-08-14 18:00:48 -04:00
2019-10-27 12:26:31 -04:00
#endif // QS_DUMMY_HPP
2018-03-19 14:51:26 -04:00