QP/C++  7.0.1
Real-Time Embedded Framework
qs_pkg.hpp File Reference

Internal (package scope) QS/C++ interface. More...

Go to the source code of this file.

Namespaces

namespace  QP
 namespace associated with the QP/C++ framework
 

Macros

#define QS_INSERT_BYTE_(b_)
 Internal QS macro to insert an un-escaped byte into the QS buffer. More...
 
#define QS_INSERT_ESC_BYTE_(b_)
 Internal QS macro to insert an escaped byte into the QS buffer. More...
 
#define QS_BEGIN_PRE_(rec_, qs_id_)
 Internal QS macro to begin a predefined QS record with critical section. More...
 
#define QS_END_PRE_()
 Internal QS macro to end a predefined QS record with critical section. More...
 
#define QS_BEGIN_NOCRIT_PRE_(rec_, qs_id_)
 Internal QS macro to begin a predefined QS record without critical section. More...
 
#define QS_END_NOCRIT_PRE_()
 Internal QS macro to end a predefiend QS record without critical section. More...
 
#define QS_U8_PRE_(data_)    (QP::QS::u8_raw_(static_cast<std::uint8_t>(data_)))
 Internal QS macro to output an unformatted uint8_t data element. More...
 
#define QS_2U8_PRE_(data1_, data2_)
 Internal QS macro to output 2 unformatted uint8_t data elements. More...
 
#define QS_U16_PRE_(data_)    (QP::QS::u16_raw_(static_cast<std::uint16_t>(data_)))
 Internal QS macro to output an unformatted uint16_t data element. More...
 
#define QS_U32_PRE_(data_)    (QP::QS::u32_raw_(static_cast<std::uint32_t>(data_)))
 Internal QS macro to output an unformatted uint32_t data element. More...
 
#define QS_STR_PRE_(msg_)   (QP::QS::str_raw_(msg_))
 Internal QS macro to output a zero-terminated ASCII string data element. More...
 
#define QS_OBJ_PRE_(obj_)   (QP::QS::obj_raw_(obj_))
 Internal QS macro to output object pointer data element. More...
 
#define QS_FUN_PRE_(fun_)    (QP::QS::u32_raw_(reinterpret_cast<std::uint32_t>(fun_)))
 Internal QS macro to output an unformatted function pointer data element. More...
 
#define QS_EQC_PRE_(ctr_)    QS::u8_raw_(static_cast<std::uint8_t>(ctr_))
 Internal QS macro to output an unformatted event queue counter data element. More...
 
#define QS_EVS_PRE_(size_)    QS::u8_raw_(static_cast<std::uint8_t>(size_))
 Internal QS macro to output an unformatted event size data element. More...
 
#define QS_MPS_PRE_(size_)    QS::u8_raw_(static_cast<std::uint8_t>(size_))
 Internal QS macro to output an unformatted memory pool block-size data element. More...
 
#define QS_MPC_PRE_(ctr_)    QS::u8_raw_(static_cast<std::uint8_t>(ctr_))
 Internal QS macro to output an unformatted memory pool block-counter data element. More...
 
#define QS_TEC_PRE_(ctr_)    QS::u8_raw_(static_cast<std::uint8_t>(ctr_))
 Internal QS macro to output an unformatted time event tick-counter data element. More...
 
#define QS_REC_NUM_(enum_)   (static_cast<std::uint_fast8_t>(enum_))
 Internal QS macro to cast enumerated QS record number to uint8_t. More...
 

Enumerations

enum  QSpyRxRecords : std::uint8_t {
  QS_RX_INFO , QS_RX_COMMAND , QS_RX_RESET , QS_RX_TICK ,
  QS_RX_PEEK , QS_RX_POKE , QS_RX_FILL , QS_RX_TEST_SETUP ,
  QS_RX_TEST_TEARDOWN , QS_RX_TEST_PROBE , QS_RX_GLB_FILTER , QS_RX_LOC_FILTER ,
  QS_RX_AO_FILTER , QS_RX_CURR_OBJ , QS_RX_TEST_CONTINUE , QS_RX_QUERY_CURR ,
  QS_RX_EVENT
}
 QS received record types (RX channel) More...
 

Functions

void QS_target_info_ (std::uint8_t const isReset) noexcept
 send the Target info (object sizes, build time-stamp, QP version) More...
 

Variables

constexpr std::uint8_t QS_FRAME = 0x7EU
 Frame character of the QS output protocol. More...
 
constexpr std::uint8_t QS_ESC = 0x7DU
 Escape character of the QS output protocol. More...
 
constexpr std::uint8_t QS_ESC_XOR = 0x20U
 Escape modifier of the QS output protocol. More...
 
constexpr std::uint8_t QS_GOOD_CHKSUM = 0xFFU
 Escape character of the QS output protocol. More...
 

Detailed Description

Date
Last updated on: 2021-12-23
Version
Last updated for: Version 7.0.0, 2022-04-30

Definition in file qs_pkg.hpp.

Macro Definition Documentation

◆ QS_INSERT_BYTE_

#define QS_INSERT_BYTE_ (   b_)
Value:
buf_[head_] = (b_); \
++head_; \
if (head_ == end_) { \
head_ = 0U; \
}

Definition at line 84 of file qs_pkg.hpp.

◆ QS_INSERT_ESC_BYTE_

#define QS_INSERT_ESC_BYTE_ (   b_)
Value:
chksum_ += (b_); \
if (((b_) != QS_FRAME) && ((b_) != QS_ESC)) { \
QS_INSERT_BYTE_(b_) \
} \
else { \
QS_INSERT_BYTE_(QS_ESC) \
QS_INSERT_BYTE_(static_cast<std::uint8_t>((b_) ^ QS_ESC_XOR)) \
priv_.used = (priv_.used + 1U); \
}
constexpr std::uint8_t QS_ESC
Escape character of the QS output protocol.
Definition: qs_pkg.hpp:64
constexpr std::uint8_t QS_ESC_XOR
Escape modifier of the QS output protocol.
Definition: qs_pkg.hpp:70
constexpr std::uint8_t QS_FRAME
Frame character of the QS output protocol.
Definition: qs_pkg.hpp:61

Definition at line 92 of file qs_pkg.hpp.

◆ QS_BEGIN_PRE_

#define QS_BEGIN_PRE_ (   rec_,
  qs_id_ 
)
Value:
if (QS_GLB_CHECK_(rec_) && QS_LOC_CHECK_(qs_id_)) { \
QS_CRIT_E_(); \
QP::QS::beginRec_(static_cast<std::uint_fast8_t>(rec_));
static void beginRec_(std::uint_fast8_t const rec) noexcept
Mark the begin of a QS record rec.
Definition: qs.cpp:407
#define QS_LOC_CHECK_(qs_id_)
helper macro for checking the local QS filter
Definition: qs.hpp:713
#define QS_GLB_CHECK_(rec_)
helper macro for checking the global QS filter
Definition: qs.hpp:706
Note
This macro is intended to use only inside QP components and NOT at the application level.
See also
QS_BEGIN_ID()

Definition at line 109 of file qs_pkg.hpp.

◆ QS_END_PRE_

#define QS_END_PRE_ ( )
Value:
QS_CRIT_X_(); \
}
static void endRec_(void) noexcept
Mark the end of a QS record rec.
Definition: qs.cpp:433
Note
This macro is intended to use only inside QP components and NOT at the application level.
See also
QS_END()

Definition at line 120 of file qs_pkg.hpp.

◆ QS_BEGIN_NOCRIT_PRE_

#define QS_BEGIN_NOCRIT_PRE_ (   rec_,
  qs_id_ 
)
Value:
if (QS_GLB_CHECK_(rec_) && QS_LOC_CHECK_(qs_id_)) { \
QP::QS::beginRec_(static_cast<std::uint_fast8_t>(rec_));
Note
This macro is intended to use only inside QP components and NOT at the application level.
See also
QS_BEGIN_NOCRIT_PRE_()

Definition at line 130 of file qs_pkg.hpp.

◆ QS_END_NOCRIT_PRE_

#define QS_END_NOCRIT_PRE_ ( )
Value:
Note
This macro is intended to use only inside QP components and NOT at the application level.
See also
QS_END_NOCRIT

Definition at line 138 of file qs_pkg.hpp.

◆ QS_U8_PRE_

#define QS_U8_PRE_ (   data_)     (QP::QS::u8_raw_(static_cast<std::uint8_t>(data_)))

Definition at line 157 of file qs_pkg.hpp.

◆ QS_2U8_PRE_

#define QS_2U8_PRE_ (   data1_,
  data2_ 
)
Value:
(QP::QS::u8u8_raw_(static_cast<std::uint8_t>(data1_), \
static_cast<std::uint8_t>(data2_)))
static void u8u8_raw_(std::uint8_t const d1, std::uint8_t const d2) noexcept
output two std::uint8_t data elements without format information
Definition: qs.cpp:735

Definition at line 161 of file qs_pkg.hpp.

◆ QS_U16_PRE_

#define QS_U16_PRE_ (   data_)     (QP::QS::u16_raw_(static_cast<std::uint16_t>(data_)))

Definition at line 166 of file qs_pkg.hpp.

◆ QS_U32_PRE_

#define QS_U32_PRE_ (   data_)     (QP::QS::u32_raw_(static_cast<std::uint32_t>(data_)))

Definition at line 170 of file qs_pkg.hpp.

◆ QS_STR_PRE_

#define QS_STR_PRE_ (   msg_)    (QP::QS::str_raw_(msg_))

Definition at line 175 of file qs_pkg.hpp.

◆ QS_OBJ_PRE_

#define QS_OBJ_PRE_ (   obj_)    (QP::QS::obj_raw_(obj_))

Definition at line 178 of file qs_pkg.hpp.

◆ QS_FUN_PRE_

#define QS_FUN_PRE_ (   fun_)     (QP::QS::u32_raw_(reinterpret_cast<std::uint32_t>(fun_)))
Note
The size of the pointer depends on the macro QS_FUN_PTR_SIZE. If the size is not defined the size of pointer is assumed 4-bytes.

Definition at line 199 of file qs_pkg.hpp.

◆ QS_EQC_PRE_

#define QS_EQC_PRE_ (   ctr_)     QS::u8_raw_(static_cast<std::uint8_t>(ctr_))
Note
the counter size depends on the macro #QF_EQUEUE_CTR_SIZE.

Definition at line 208 of file qs_pkg.hpp.

◆ QS_EVS_PRE_

#define QS_EVS_PRE_ (   size_)     QS::u8_raw_(static_cast<std::uint8_t>(size_))
Note
the event size depends on the macro #QF_EVENT_SIZ_SIZE.

Definition at line 226 of file qs_pkg.hpp.

◆ QS_MPS_PRE_

#define QS_MPS_PRE_ (   size_)     QS::u8_raw_(static_cast<std::uint8_t>(size_))
Note
the block-size depends on the macro #QF_MPOOL_SIZ_SIZE.

Definition at line 242 of file qs_pkg.hpp.

◆ QS_MPC_PRE_

#define QS_MPC_PRE_ (   ctr_)     QS::u8_raw_(static_cast<std::uint8_t>(ctr_))
Note
the counter size depends on the macro #QF_MPOOL_CTR_SIZE.

Definition at line 257 of file qs_pkg.hpp.

◆ QS_TEC_PRE_

#define QS_TEC_PRE_ (   ctr_)     QS::u8_raw_(static_cast<std::uint8_t>(ctr_))
Note
the counter size depends on the macro #QF_TIMEEVT_CTR_SIZE.

Definition at line 273 of file qs_pkg.hpp.

◆ QS_REC_NUM_

#define QS_REC_NUM_ (   enum_)    (static_cast<std::uint_fast8_t>(enum_))
Note
Casting from enum to unsigned char violates the MISRA-C++ 2008 rules 5-2-7, 5-2-8 and 5-2-9. Encapsulating this violation in a macro allows to selectively suppress this specific deviation.

Definition at line 288 of file qs_pkg.hpp.