QP/C  7.2.2
Real-Time Embedded Framework
Loading...
Searching...
No Matches
qs_pkg.h File Reference

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

Go to the source code of this file.

Macros

#define QS_FRAME   (0x7EU)
 
#define QS_ESC   (0x7DU)
 
#define QS_GOOD_CHKSUM   (0xFFU)
 
#define QS_ESC_XOR   (0x20U)
 
#define QS_BEGIN_PRE_(rec_, qs_id_)
 
#define QS_END_PRE_()
 
#define QS_BEGIN_NOCRIT_PRE_(rec_, qs_id_)
 
#define QS_END_NOCRIT_PRE_()   QS_endRec_(); }
 
#define QS_U8_PRE_(data_)   (QS_u8_raw_((uint8_t)(data_)))
 
#define QS_2U8_PRE_(data1_, data2_)    (QS_2u8_raw_((uint8_t)(data1_), (uint8_t)(data2_)))
 
#define QS_U16_PRE_(data_)   (QS_u16_raw_((uint16_t)(data_)))
 
#define QS_U32_PRE_(data_)   (QS_u32_raw_((uint32_t)(data_)))
 
#define QS_STR_PRE_(msg_)   (QS_str_raw_((msg_)))
 
#define QS_SIG_PRE_(sig_)   (QS_u8_raw_((uint8_t)sig_))
 
#define QS_OBJ_PRE_(obj_)   (QS_obj_raw_(obj_))
 
#define QS_FUN_PRE_(fun_)   (QS_u8_raw_((uint8_t)(fun_)))
 
#define QS_EQC_PRE_(ctr_)   QS_u16_raw_((uint16_t)(ctr_))
 
#define QS_EVS_PRE_(size_)   QS_u16_raw_((uint16_t)(size_))
 
#define QS_MPS_PRE_(size_)   QS_u16_raw_((uint16_t)(size_))
 
#define QS_MPC_PRE_(ctr_)   QS_u16_raw_((uint16_t)(ctr_))
 
#define QS_TEC_PRE_(ctr_)   QS_u32_raw_((uint32_t)(ctr_))
 
#define QS_INSERT_BYTE_(b_)
 
#define QS_INSERT_ESC_BYTE_(b_)
 

Enumerations

enum  QSpyRxRecords {
  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
}
 

Macro Definition Documentation

◆ QS_FRAME

#define QS_FRAME   (0x7EU)

Frame character of the QS output protocol

Definition at line 73 of file qs_pkg.h.

◆ QS_ESC

#define QS_ESC   (0x7DU)

Escape character of the QS output protocol

Definition at line 76 of file qs_pkg.h.

◆ QS_GOOD_CHKSUM

#define QS_GOOD_CHKSUM   (0xFFU)

The expected checksum value over a correct QS record

Definition at line 79 of file qs_pkg.h.

◆ QS_ESC_XOR

#define QS_ESC_XOR   (0x20U)

Escape modifier of the QS output protocol

The escaped byte is XOR-ed with the escape modifier before it is inserted into the QS buffer.

Definition at line 87 of file qs_pkg.h.

◆ QS_BEGIN_PRE_

#define QS_BEGIN_PRE_ (   rec_,
  qs_id_ 
)
Value:
if (QS_GLB_CHECK_(rec_) && QS_LOC_CHECK_(qs_id_)) { \
QS_CRIT_E_(); \
QS_beginRec_((uint_fast8_t)(rec_));
#define QS_LOC_CHECK_(qs_id_)
Definition: qs.h:1122
#define QS_GLB_CHECK_(rec_)
Definition: qs.h:1116

Internal QS macro to begin a predefined QS record with entering critical section.

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 97 of file qs_pkg.h.

◆ QS_END_PRE_

#define QS_END_PRE_ ( )
Value:
QS_endRec_(); \
QS_CRIT_X_(); \
}

Internal QS macro to end a predefined QS record with exiting critical section.

Note
This macro is intended to use only inside QP components and NOT at the application level.
See also
QS_END()

Definition at line 109 of file qs_pkg.h.

◆ QS_BEGIN_NOCRIT_PRE_

#define QS_BEGIN_NOCRIT_PRE_ (   rec_,
  qs_id_ 
)
Value:
if (QS_GLB_CHECK_(rec_) && QS_LOC_CHECK_(qs_id_)) { \
QS_beginRec_((uint_fast8_t)(rec_));

Internal macro to begin a predefined QS record without entering critical section.

Note
This macro is intended to use only inside QP components and NOT at the application level.
See also
QS_BEGIN_NOCRIT()

Definition at line 121 of file qs_pkg.h.

◆ QS_END_NOCRIT_PRE_

#define QS_END_NOCRIT_PRE_ ( )    QS_endRec_(); }

Internal QS macro to end a predefined QS record without exiting critical section

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 131 of file qs_pkg.h.

◆ QS_U8_PRE_

#define QS_U8_PRE_ (   data_)    (QS_u8_raw_((uint8_t)(data_)))

Internal QS macro to output a predefined uint8_t data element

Definition at line 134 of file qs_pkg.h.

◆ QS_2U8_PRE_

#define QS_2U8_PRE_ (   data1_,
  data2_ 
)     (QS_2u8_raw_((uint8_t)(data1_), (uint8_t)(data2_)))

Internal QS macro to output 2 predefined uint8_t data elements

Definition at line 137 of file qs_pkg.h.

◆ QS_U16_PRE_

#define QS_U16_PRE_ (   data_)    (QS_u16_raw_((uint16_t)(data_)))

Internal QS macro to output an predefined uint16_t data element

Definition at line 141 of file qs_pkg.h.

◆ QS_U32_PRE_

#define QS_U32_PRE_ (   data_)    (QS_u32_raw_((uint32_t)(data_)))

Internal QS macro to output a predefined uint32_t data element

Definition at line 144 of file qs_pkg.h.

◆ QS_STR_PRE_

#define QS_STR_PRE_ (   msg_)    (QS_str_raw_((msg_)))

Internal QS macro to output a predefined zero-terminated string element

Definition at line 147 of file qs_pkg.h.

◆ QS_SIG_PRE_

#define QS_SIG_PRE_ (   sig_)    (QS_u8_raw_((uint8_t)sig_))

Internal macro to output an unformatted event signal data element

Note
the size of the pointer depends on the macro Q_SIGNAL_SIZE.

Definition at line 154 of file qs_pkg.h.

◆ QS_OBJ_PRE_

#define QS_OBJ_PRE_ (   obj_)    (QS_obj_raw_(obj_))

Definition at line 161 of file qs_pkg.h.

◆ QS_FUN_PRE_

#define QS_FUN_PRE_ (   fun_)    (QS_u8_raw_((uint8_t)(fun_)))

Definition at line 164 of file qs_pkg.h.

◆ QS_EQC_PRE_

#define QS_EQC_PRE_ (   ctr_)    QS_u16_raw_((uint16_t)(ctr_))

Definition at line 189 of file qs_pkg.h.

◆ QS_EVS_PRE_

#define QS_EVS_PRE_ (   size_)    QS_u16_raw_((uint16_t)(size_))

Definition at line 203 of file qs_pkg.h.

◆ QS_MPS_PRE_

#define QS_MPS_PRE_ (   size_)    QS_u16_raw_((uint16_t)(size_))

Definition at line 217 of file qs_pkg.h.

◆ QS_MPC_PRE_

#define QS_MPC_PRE_ (   ctr_)    QS_u16_raw_((uint16_t)(ctr_))

Definition at line 231 of file qs_pkg.h.

◆ QS_TEC_PRE_

#define QS_TEC_PRE_ (   ctr_)    QS_u32_raw_((uint32_t)(ctr_))

Definition at line 247 of file qs_pkg.h.

◆ QS_INSERT_BYTE_

#define QS_INSERT_BYTE_ (   b_)
Value:
buf[head] = (b_); \
++head; \
if (head == end) { \
head = 0U; \
}

Internal QS macro to insert an un-escaped byte into the QS buffer

Definition at line 252 of file qs_pkg.h.

◆ QS_INSERT_ESC_BYTE_

#define QS_INSERT_ESC_BYTE_ (   b_)
Value:
chksum = (uint8_t)(chksum + (b_)); \
if (((b_) != QS_FRAME) && ((b_) != QS_ESC)) { \
QS_INSERT_BYTE_(b_) \
} \
else { \
QS_INSERT_BYTE_(QS_ESC) \
QS_INSERT_BYTE_((uint8_t)((b_) ^ QS_ESC_XOR))\
}
QS_tx QS_priv_
#define QS_ESC
Definition: qs_pkg.h:76
#define QS_ESC_XOR
Definition: qs_pkg.h:87
#define QS_FRAME
Definition: qs_pkg.h:73
QSCtr volatile used
Definition: qs.h:381

Internal QS macro to insert an escaped byte into the QS buffer

Definition at line 260 of file qs_pkg.h.

Enumeration Type Documentation

◆ QSpyRxRecords

QS received record types (RX channel)

This enumeration specifies the record types for the QS receive channel

Enumerator
QS_RX_INFO 

query Target info (ver, config, tstamp)

QS_RX_COMMAND 

execute a user-defined command in the Target

QS_RX_RESET 

reset the Target

QS_RX_TICK 

call QTIMEEVT_TICK_X() in the Target

QS_RX_PEEK 

peek Target memory

QS_RX_POKE 

poke Target memory

QS_RX_FILL 

fill Target memory

QS_RX_TEST_SETUP 

test setup

QS_RX_TEST_TEARDOWN 

test teardown

QS_RX_TEST_PROBE 

set a Test-Probe in the Target

QS_RX_GLB_FILTER 

set global filters in the Target

QS_RX_LOC_FILTER 

set local filters in the Target

QS_RX_AO_FILTER 

set local AO filter in the Target

QS_RX_CURR_OBJ 

set the "current-object" in the Target

QS_RX_TEST_CONTINUE 

continue a test after QS_TEST_PAUSE()

QS_RX_QUERY_CURR 

query the "current object" in the Target

QS_RX_EVENT 

inject an event to the Target

Definition at line 51 of file qs_pkg.h.