QTools  6.9.4
Collection of Host-Based Tools
qs_copy.h File Reference

QS/C platform-independent public interface. More...

Go to the source code of this file.

Classes

struct  QSPrivAttr
 
struct  QActiveDummy
 

Macros

#define QS_TIME_SIZE   4U
 
#define QS_TIME_PRE_()   (QS_u32_raw_(QS_onGetTime()))
 
#define QS_EOD   ((uint16_t)0xFFFFU)
 
#define QS_INIT(arg_)   (QS_onStartup(arg_))
 
#define QS_EXIT()   (QS_onCleanup())
 
#define QS_FLUSH()   (QS_onFlush())
 
#define QS_GLB_FILTER(rec_)   (QS_glbFilter_((int_fast16_t)(rec_)))
 
#define QS_LOC_FILTER(qs_id_)   (QS_locFilter_((int_fast16_t)(qs_id_)))
 
#define QS_CRIT_STAT_
 
#define QS_CRIT_E_()   QF_CRIT_ENTRY(dummy)
 
#define QS_CRIT_X_()   QF_CRIT_EXIT(dummy); QS_REC_DONE()
 
#define QS_BEGIN_NOCRIT(rec_, qs_id_)
 
#define QS_END_NOCRIT()
 
#define QS_REC_DONE()   ((void)0)
 
#define QS_GLB_CHECK_(rec_)
 
#define QS_LOC_CHECK_(qs_id_)
 
#define QS_BEGIN_ID(rec_, qs_id_)
 
#define QS_END()
 
#define QS_I8(width_, data_)    (QS_u8_fmt_((uint8_t)(((width_) << 4)) | (uint8_t)QS_I8_T, (data_)))
 
#define QS_U8(width_, data_)    (QS_u8_fmt_((uint8_t)(((width_) << 4)) | (uint8_t)QS_U8_T, (data_)))
 
#define QS_I16(width_, data_)    (QS_u16_fmt_((uint8_t)(((width_) << 4)) | (uint8_t)QS_I16_T, (data_)))
 
#define QS_U16(width_, data_)    (QS_u16_fmt_((uint8_t)(((width_) << 4)) | (uint8_t)QS_U16_T, (data_)))
 
#define QS_I32(width_, data_)    (QS_u32_fmt_((uint8_t)(((width_) << 4)) | (uint8_t)QS_I32_T, (data_)))
 
#define QS_U32(width_, data_)    (QS_u32_fmt_((uint8_t)(((width_) << 4)) | (uint8_t)QS_U32_T, (data_)))
 
#define QS_F32(width_, data_)    (QS_f32_fmt_((uint8_t)(((width_) << 4)) | (uint8_t)QS_F32_T, (data_)))
 
#define QS_F64(width_, data_)    (QS_f64_fmt_((uint8_t)(((width_) << 4)) | (uint8_t)QS_F64_T, (data_)))
 
#define QS_I64(width_, data_)    (QS_u64_fmt_((uint8_t)(((width_) << 4)) | (uint8_t)QS_I64_T, (data_)))
 
#define QS_U64(width_, data_)    (QS_u64_fmt_((uint8_t)(((width_) << 4)) | (uint8_t)QS_U64_T, (data_)))
 
#define QS_STR(str_)   (QS_str_fmt_((str_)))
 
#define QS_MEM(mem_, size_)   (QS_mem_fmt_((mem_), (size_)))
 
#define QS_OBJ(obj_)   (QS_u32_fmt_(QS_OBJ_T, (uint32_t)(obj_)))
 
#define QS_FUN(fun_)   (QS_u32_fmt_(QS_FUN_T, (uint32_t)(fun_)))
 
#define QS_SIG(sig_, obj_)
 
#define QS_SIG_DICTIONARY(sig_, obj_)    (QS_sig_dict_pre_((sig_), (obj_), #sig_))
 
#define QS_OBJ_DICTIONARY(obj_)    (QS_obj_dict_pre_((obj_), #obj_))
 
#define QS_FUN_DICTIONARY(fun_)    (QS_fun_dict_pre_((void (*)(void))(fun_), #fun_))
 
#define QS_USR_DICTIONARY(rec_)    (QS_usr_dict_pre_((rec_), #rec_))
 
#define QF_QS_ACTION(act_)   (act_)
 
#define QS_OUTPUT()   (QS_output())
 
#define QS_RX_INPUT()   (QS_rx_input())
 
#define QS_TEST_PROBE_DEF(fun_)    uint32_t const qs_tp_ = QS_getTestProbe_((void (*)(void))(fun_));
 
#define QS_TEST_PROBE(code_)    if (qs_tp_ != 0U) { code_ }
 
#define QS_TEST_PROBE_ID(id_, code_)    if (qs_tp_ == (uint32_t)(id_)) { code_ }
 
#define QS_TEST_PAUSE()
 

Typedefs

typedef uint32_t QSTimeCtr
 
typedef uint_fast16_t QSCtr
 

Enumerations

enum  QSpyRecords {
  QS_EMPTY , QS_QEP_STATE_ENTRY , QS_QEP_STATE_EXIT , QS_QEP_STATE_INIT ,
  QS_QEP_INIT_TRAN , QS_QEP_INTERN_TRAN , QS_QEP_TRAN , QS_QEP_IGNORED ,
  QS_QEP_DISPATCH , QS_QEP_UNHANDLED , QS_QF_ACTIVE_DEFER , QS_QF_ACTIVE_RECALL ,
  QS_QF_ACTIVE_SUBSCRIBE , QS_QF_ACTIVE_UNSUBSCRIBE , QS_QF_ACTIVE_POST , QS_QF_ACTIVE_POST_LIFO ,
  QS_QF_ACTIVE_GET , QS_QF_ACTIVE_GET_LAST , QS_QF_ACTIVE_RECALL_ATTEMPT , QS_QF_EQUEUE_POST ,
  QS_QF_EQUEUE_POST_LIFO , QS_QF_EQUEUE_GET , QS_QF_EQUEUE_GET_LAST , QS_QF_NEW_ATTEMPT ,
  QS_QF_MPOOL_GET , QS_QF_MPOOL_PUT , QS_QF_PUBLISH , QS_QF_NEW_REF ,
  QS_QF_NEW , QS_QF_GC_ATTEMPT , QS_QF_GC , QS_QF_TICK ,
  QS_QF_TIMEEVT_ARM , QS_QF_TIMEEVT_AUTO_DISARM , QS_QF_TIMEEVT_DISARM_ATTEMPT , QS_QF_TIMEEVT_DISARM ,
  QS_QF_TIMEEVT_REARM , QS_QF_TIMEEVT_POST , QS_QF_DELETE_REF , QS_QF_CRIT_ENTRY ,
  QS_QF_CRIT_EXIT , QS_QF_ISR_ENTRY , QS_QF_ISR_EXIT , QS_QF_INT_DISABLE ,
  QS_QF_INT_ENABLE , QS_QF_ACTIVE_POST_ATTEMPT , QS_QF_EQUEUE_POST_ATTEMPT , QS_QF_MPOOL_GET_ATTEMPT ,
  QS_MUTEX_LOCK , QS_MUTEX_UNLOCK , QS_SCHED_LOCK , QS_SCHED_UNLOCK ,
  QS_SCHED_NEXT , QS_SCHED_IDLE , QS_SCHED_RESUME , QS_QEP_TRAN_HIST ,
  QS_QEP_TRAN_EP , QS_QEP_TRAN_XP , QS_TEST_PAUSED , QS_TEST_PROBE_GET ,
  QS_SIG_DICT , QS_OBJ_DICT , QS_FUN_DICT , QS_USR_DICT ,
  QS_TARGET_INFO , QS_TARGET_DONE , QS_RX_STATUS , QS_QUERY_DATA ,
  QS_PEEK_DATA , QS_ASSERT_FAIL , QS_QF_RUN , QS_RESERVED_71 ,
  QS_RESERVED_72 , QS_RESERVED_73 , QS_RESERVED_74 , QS_RESERVED_75 ,
  QS_RESERVED_76 , QS_RESERVED_77 , QS_RESERVED_78 , QS_RESERVED_79 ,
  QS_RESERVED_80 , QS_RESERVED_81 , QS_RESERVED_82 , QS_RESERVED_83 ,
  QS_RESERVED_84 , QS_RESERVED_85 , QS_RESERVED_86 , QS_RESERVED_87 ,
  QS_RESERVED_88 , QS_RESERVED_89 , QS_RESERVED_90 , QS_RESERVED_91 ,
  QS_RESERVED_92 , QS_RESERVED_93 , QS_RESERVED_94 , QS_RESERVED_95 ,
  QS_RESERVED_96 , QS_RESERVED_97 , QS_RESERVED_98 , QS_RESERVED_99 ,
  QS_USER
}
 
enum  QSpyRecordGroups {
  QS_ALL_RECORDS = 0xF0 , QS_SM_RECORDS , QS_AO_RECORDS , QS_EQ_RECORDS ,
  QS_MP_RECORDS , QS_TE_RECORDS , QS_QF_RECORDS , QS_SC_RECORDS ,
  QS_U0_RECORDS , QS_U1_RECORDS , QS_U2_RECORDS , QS_U3_RECORDS ,
  QS_U4_RECORDS , QS_UA_RECORDS
}
 
enum  QSpyUserOffsets {
  QS_USER0 = (enum_t)QS_USER , QS_USER1 = (enum_t)QS_USER0 + 5 , QS_USER2 = (enum_t)QS_USER1 + 5 , QS_USER3 = (enum_t)QS_USER2 + 5 ,
  QS_USER4 = (enum_t)QS_USER3 + 5
}
 
enum  QSpyIdOffsets { QS_AO_ID = 0 , QS_EP_ID = 64 , QS_EQ_ID = 80 , QS_AP_ID = 96 }
 
enum  QSpyIdGroups {
  QS_ALL_IDS = 0xF0 , QS_AO_IDS = (0x80 + (enum_t)QS_AO_ID) , QS_EP_IDS = (0x80 + (enum_t)QS_EP_ID) , QS_EQ_IDS = (0x80 + (enum_t)QS_EQ_ID) ,
  QS_AP_IDS = (0x80 + (enum_t)QS_AP_ID)
}
 
enum  {
  QS_I8_T , QS_U8_T , QS_I16_T , QS_U16_T ,
  QS_I32_T , QS_U32_T , QS_F32_T , QS_F64_T ,
  QS_STR_T , QS_MEM_T , QS_SIG_T , QS_OBJ_T ,
  QS_FUN_T , QS_I64_T , QS_U64_T , QS_HEX_FMT
}
 
enum  QSpyObjKind {
  SM_OBJ , AO_OBJ , MP_OBJ , EQ_OBJ ,
  TE_OBJ , AP_OBJ , MAX_OBJ
}
 
enum  OSpyObjCombnation { SM_AO_OBJ = (enum_t)MAX_OBJ }
 
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
}
 
enum  QUTestUserRecords { QUTEST_ON_POST = 124 }
 

Functions

void QS_initBuf (uint8_t sto[], uint_fast16_t stoSize)
 
void QS_glbFilter_ (int_fast16_t const filter)
 
void QS_locFilter_ (int_fast16_t const filter)
 
void QS_beginRec_ (uint_fast8_t rec)
 
void QS_endRec_ (void)
 
void QS_u8_raw_ (uint8_t d)
 
void QS_2u8_raw_ (uint8_t d1, uint8_t d2)
 
void QS_u16_raw_ (uint16_t d)
 
void QS_u32_raw_ (uint32_t d)
 
void QS_str_raw_ (char_t const *str)
 
void QS_u8_fmt_ (uint8_t format, uint8_t d)
 
void QS_u16_fmt_ (uint8_t format, uint16_t d)
 
void QS_u32_fmt_ (uint8_t format, uint32_t d)
 
void QS_f32_fmt_ (uint8_t format, float32_t f)
 
void QS_f64_fmt_ (uint8_t format, float64_t d)
 
void QS_obj_raw_ (void const *const obj)
 
void QS_str_fmt_ (char_t const *str)
 
void QS_mem_fmt_ (uint8_t const *blk, uint8_t size)
 
void QS_u64_raw_ (uint64_t d)
 
void QS_u64_fmt_ (uint8_t format, uint64_t d)
 
uint16_t QS_getByte (void)
 
uint8_t const * QS_getBlock (uint16_t *pNbytes)
 
uint8_t QS_onStartup (void const *arg)
 
void QS_onCleanup (void)
 
void QS_onFlush (void)
 
QSTimeCtr QS_onGetTime (void)
 
void QS_sig_dict_pre_ (enum_t const sig, void const *const obj, char_t const *name)
 
void QS_obj_dict_pre_ (void const *const obj, char_t const *name)
 
void QS_fun_dict_pre_ (void(*const fun)(void), char_t const *name)
 
void QS_usr_dict_pre_ (enum_t const rec, char_t const *const name)
 
void QS_ASSERTION (char_t const *const module, int_t const loc, uint32_t delay)
 
void QF_QS_CRIT_ENTRY (void)
 
void QF_QS_CRIT_EXIT (void)
 
void QF_QS_ISR_ENTRY (uint8_t const isrnest, uint8_t const prio)
 
void QF_QS_ISR_EXIT (uint8_t const isrnest, uint8_t const prio)
 
void QS_rxInitBuf (uint8_t sto[], uint16_t stoSize)
 
void QS_rxParse (void)
 
bool QS_RX_PUT (uint8_t const b)
 
uint16_t QS_rxGetNfree (void)
 
void QS_setCurrObj (uint8_t obj_kind, void *obj_ptr)
 
void QS_queryCurrObj (uint8_t obj_kind)
 
void QS_onReset (void)
 
void QS_onCommand (uint8_t cmdId, uint32_t param1, uint32_t param2, uint32_t param3)
 
void QS_onTestSetup (void)
 
void QS_onTestTeardown (void)
 
void QS_onTestLoop (void)
 
void QS_onTestEvt (QEvt *e)
 
void QS_onTestPost (void const *sender, QActive *recipient, QEvt const *e, bool status)
 
void QS_processTestEvts_ (void)
 
void QS_tickX_ (uint_fast8_t const tickRate, void const *const sender)
 
uint32_t QS_getTestProbe_ (void(*const api)(void))
 
void QActiveDummy_ctor (QActiveDummy *const me)
 

Variables

QSPrivAttr QS_priv_
 
uint8_t volatile QF_intNest
 

Detailed Description

QS/C platform-independent public interface.

Definition in file qs_copy.h.


Class Documentation

◆ QSPrivAttr

struct QSPrivAttr

Private QS attributes to keep track of the filters and the trace buffer

Definition at line 872 of file qs_copy.h.

Class Members
uint8_t glbFilter[16]

global on/off QS filter

uint8_t locFilter[16]

local QS filters

void const * locFilter_AP

deprecated local QS filter

uint8_t * buf

pointer to the start of the ring buffer

QSCtr end

offset of the end of the ring buffer

QSCtr head

offset to where next byte will be inserted

QSCtr tail

offset of where next byte will be extracted

QSCtr used

number of bytes currently in the ring buffer

uint8_t seq

the record sequence number

uint8_t chksum

the checksum of the current record

uint8_t critNest

critical section nesting level

◆ QActiveDummy

struct QActiveDummy

QActiveDummy Object class

Description
QActiveDummy is a test double for the role of collaborating active objects in QUTest unit testing.

Definition at line 1010 of file qs_copy.h.

Class Members
QActive super

Macro Definition Documentation

◆ QS_TIME_SIZE

#define QS_TIME_SIZE   4U

The size [bytes] of the QS time stamp. Valid values: 1U, 2U, or 4U; default 4U.

Description
This macro can be defined in the QS port file (qs_port.h) to configure the QSTimeCtr type. Here the macro is not defined so the default of 4 byte is chosen.

Definition at line 254 of file qs_copy.h.

◆ QS_TIME_PRE_

#define QS_TIME_PRE_ ( )    (QS_u32_raw_(QS_onGetTime()))

Internal macro to output time stamp to a QS record

Definition at line 270 of file qs_copy.h.

◆ QS_EOD

#define QS_EOD   ((uint16_t)0xFFFFU)

Constant for End-Of-Data condition returned from QS_getByte()

Definition at line 346 of file qs_copy.h.

◆ QS_INIT

#define QS_INIT (   arg_)    (QS_onStartup(arg_))

Initialize the QS facility.

Description
This macro provides an indirection layer to invoke the QS initialization routine if Q_SPY is defined, or do nothing if Q_SPY is not defined.
See also
QS_onStartup(), example of setting up a QS filter in QS_GLB_FILTER()

Definition at line 424 of file qs_copy.h.

◆ QS_EXIT

#define QS_EXIT ( )    (QS_onCleanup())

Cleanup the QS facility.

Description
This macro provides an indirection layer to invoke the QS cleanup routine if Q_SPY is defined, or do nothing if Q_SPY is not defined.
See also
QS_onCleanup()

Definition at line 433 of file qs_copy.h.

◆ QS_FLUSH

#define QS_FLUSH ( )    (QS_onFlush())

Flush the QS trace data to the host

Description
This macro invokes the QS_flush() platform-dependent callback function to flush the QS trace buffer to the host. The function typically busy-waits until all the data in the buffer is sent to the host. This is acceptable only in the initial transient.

Definition at line 443 of file qs_copy.h.

◆ QS_GLB_FILTER

#define QS_GLB_FILTER (   rec_)    (QS_glbFilter_((int_fast16_t)(rec_)))

Global Filter for a given record type rec.

Description
This macro provides an indirection layer to call QS_glbFilter_() if Q_SPY is defined, or do nothing if Q_SPY is not defined.

The following example shows how to use QS filters:

Definition at line 454 of file qs_copy.h.

◆ QS_LOC_FILTER

#define QS_LOC_FILTER (   qs_id_)    (QS_locFilter_((int_fast16_t)(qs_id_)))

Local Filter for a given object-id qs_id.

Description
This macro provides an indirection layer to call QS_locFilter_() if Q_SPY is defined, or do nothing if Q_SPY is not defined.

The following example shows how to use QS filters:

Definition at line 465 of file qs_copy.h.

◆ QS_CRIT_STAT_

#define QS_CRIT_STAT_

This is an internal macro for defining the critical section status type.

Description
The purpose of this macro is to enable writing the same code for the case when critical section status type is defined and when it is not. If the macro #QF_CRIT_STAT_TYPE is defined, this internal macro provides the definition of the critical section status variable. Otherwise this macro is empty.
See also
#QF_CRIT_STAT_TYPE

Definition at line 498 of file qs_copy.h.

◆ QS_CRIT_E_

#define QS_CRIT_E_ ( )    QF_CRIT_ENTRY(dummy)

This is an internal macro for entering a critical section.

Description
The purpose of this macro is to enable writing the same code for the case when critical section status type is defined and when it is not. If the macro #QF_CRIT_STAT_TYPE is defined, this internal macro invokes QF_CRIT_ENTRY() passing the key variable as the parameter. Otherwise QF_CRIT_ENTRY() is invoked with a dummy parameter.
See also
QF_CRIT_ENTRY()

Definition at line 510 of file qs_copy.h.

◆ QS_CRIT_X_

#define QS_CRIT_X_ ( )    QF_CRIT_EXIT(dummy); QS_REC_DONE()

This is an internal macro for exiting a critical section.

Description
The purpose of this macro is to enable writing the same code for the case when critical section status type is defined and when it is not. If the macro #QF_CRIT_STAT_TYPE is defined, this internal macro invokes QF_CRIT_EXIT() passing the key variable as the parameter. Otherwise QF_CRIT_EXIT() is invoked with a dummy parameter.
See also
QF_CRIT_EXIT()

Definition at line 522 of file qs_copy.h.

◆ QS_BEGIN_NOCRIT

#define QS_BEGIN_NOCRIT (   rec_,
  qs_id_ 
)
Value:
if (QS_GLB_CHECK_(rec_) && QS_LOC_CHECK_(qs_id_)) { \
QS_beginRec_((uint_fast8_t)(rec_)); \
QS_TIME_PRE_(); {
#define QS_LOC_CHECK_(qs_id_)
Definition: qs_copy.h:560
#define QS_GLB_CHECK_(rec_)
Definition: qs_copy.h:555

Begin a QS user record without entering critical section.

Definition at line 539 of file qs_copy.h.

◆ QS_END_NOCRIT

#define QS_END_NOCRIT ( )
Value:
} \
QS_endRec_(); \
}

End a QS user record without exiting critical section.

Definition at line 545 of file qs_copy.h.

◆ QS_REC_DONE

#define QS_REC_DONE ( )    ((void)0)

macro to hook up user code when a QS record is produced

Definition at line 551 of file qs_copy.h.

◆ QS_GLB_CHECK_

#define QS_GLB_CHECK_ (   rec_)
Value:
(((uint_fast8_t)QS_priv_.glbFilter[(uint_fast8_t)(rec_) >> 3U] \
& ((uint_fast8_t)1U << ((uint_fast8_t)(rec_) & 7U))) != 0U)
QSPrivAttr QS_priv_
uint8_t glbFilter[16]
Definition: qs_copy.h:873

helper macro for checking the global QS filter

Definition at line 555 of file qs_copy.h.

◆ QS_LOC_CHECK_

#define QS_LOC_CHECK_ (   qs_id_)
Value:
(((uint_fast8_t)QS_priv_.locFilter[(uint_fast8_t)(qs_id_) >> 3U] \
& ((uint_fast8_t)1U << ((uint_fast8_t)(qs_id_) & 7U))) != 0U)
uint8_t locFilter[16]
Definition: qs_copy.h:874

helper macro for checking the local QS filter

Definition at line 560 of file qs_copy.h.

◆ QS_BEGIN_ID

#define QS_BEGIN_ID (   rec_,
  qs_id_ 
)
Value:
if (QS_GLB_CHECK_(rec_) && QS_LOC_CHECK_(qs_id_)) { \
QS_beginRec_((uint_fast8_t)(rec_)); \
QS_TIME_PRE_(); {
#define QS_CRIT_E_()
Definition: qs_copy.h:510

Begin an application-specific (user) QS record with object-id for the local filter.

Usage
The following example shows how to build a user QS record using the macros QS_BEGIN_ID(), QS_END(), and the formatted output macros: QS_U8(), QS_STR(), etc..
enum UserSpyRecords {
. . .
PHILO_STAT = QS_USER, /* define a user QS record types */
. . .
};
void displyPhilStat(uint8_t n, char const *stat) {
. . .
/* application-specific record */
QS_BEGIN_ID(PHILO_STAT, AO_Philo[n]->prio);
QS_U8(0, n); /* Philosopher number */
QS_STR(stat); /* Philosopher status */
QS_U8(QS_HEX_FMT, 0xABU); /* test */
QS_U16(QS_HEX_FMT, 0xDEADU); /* test */
QS_U32(QS_HEX_FMT, 0xDEADBEEFU); /* test */
QS_U64(QS_HEX_FMT, 0xDEADBEEF12345678LL); /* test */
QS_END();
}
QSPY ouptut produced:
4294954639 PHILO_STAT 3 thinking 0xAB 0xDEAD 0xDEADBEEF 0xDEADBEEF12345678
@ QS_HEX_FMT
Definition: qs_copy.h:612
#define QS_U8(width_, data_)
Definition: qs_copy.h:620
#define QS_U32(width_, data_)
Definition: qs_copy.h:636
#define QS_END()
Definition: qs_copy.h:585
#define QS_U16(width_, data_)
Definition: qs_copy.h:628
#define QS_BEGIN_ID(rec_, qs_id_)
Definition: qs_copy.h:574
#define QS_STR(str_)
Definition: qs_copy.h:656
#define QS_U64(width_, data_)
Definition: qs_copy.h:652
@ QS_USER
Definition: qs_copy.h:196
Note
Must always be used in pair with QS_END()

Definition at line 574 of file qs_copy.h.

◆ QS_END

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

End a QS record with exiting critical section.

See also
example for QS_BEGIN_ID()
Note
Must always be used in pair with QS_BEGIN_ID()

Definition at line 585 of file qs_copy.h.

◆ QS_I8

#define QS_I8 (   width_,
  data_ 
)     (QS_u8_fmt_((uint8_t)(((width_) << 4)) | (uint8_t)QS_I8_T, (data_)))

Output formatted int8_t to the QS record

Definition at line 616 of file qs_copy.h.

◆ QS_U8

#define QS_U8 (   width_,
  data_ 
)     (QS_u8_fmt_((uint8_t)(((width_) << 4)) | (uint8_t)QS_U8_T, (data_)))

Output formatted uint8_t to the QS record

Definition at line 620 of file qs_copy.h.

◆ QS_I16

#define QS_I16 (   width_,
  data_ 
)     (QS_u16_fmt_((uint8_t)(((width_) << 4)) | (uint8_t)QS_I16_T, (data_)))

Output formatted int16_t to the QS record

Definition at line 624 of file qs_copy.h.

◆ QS_U16

#define QS_U16 (   width_,
  data_ 
)     (QS_u16_fmt_((uint8_t)(((width_) << 4)) | (uint8_t)QS_U16_T, (data_)))

Output formatted uint16_t to the QS record

Definition at line 628 of file qs_copy.h.

◆ QS_I32

#define QS_I32 (   width_,
  data_ 
)     (QS_u32_fmt_((uint8_t)(((width_) << 4)) | (uint8_t)QS_I32_T, (data_)))

Output formatted int32_t to the QS record

Definition at line 632 of file qs_copy.h.

◆ QS_U32

#define QS_U32 (   width_,
  data_ 
)     (QS_u32_fmt_((uint8_t)(((width_) << 4)) | (uint8_t)QS_U32_T, (data_)))

Output formatted uint32_t to the QS record

Definition at line 636 of file qs_copy.h.

◆ QS_F32

#define QS_F32 (   width_,
  data_ 
)     (QS_f32_fmt_((uint8_t)(((width_) << 4)) | (uint8_t)QS_F32_T, (data_)))

Output formatted 32-bit floating point number to the QS record

Definition at line 640 of file qs_copy.h.

◆ QS_F64

#define QS_F64 (   width_,
  data_ 
)     (QS_f64_fmt_((uint8_t)(((width_) << 4)) | (uint8_t)QS_F64_T, (data_)))

Output formatted 64-bit floating point number to the QS record

Definition at line 644 of file qs_copy.h.

◆ QS_I64

#define QS_I64 (   width_,
  data_ 
)     (QS_u64_fmt_((uint8_t)(((width_) << 4)) | (uint8_t)QS_I64_T, (data_)))

Output formatted int64_t to the QS record

Definition at line 648 of file qs_copy.h.

◆ QS_U64

#define QS_U64 (   width_,
  data_ 
)     (QS_u64_fmt_((uint8_t)(((width_) << 4)) | (uint8_t)QS_U64_T, (data_)))

Output formatted uint64_t to the QS record

Definition at line 652 of file qs_copy.h.

◆ QS_STR

#define QS_STR (   str_)    (QS_str_fmt_((str_)))

Output formatted zero-terminated ASCII string to the QS record

Definition at line 656 of file qs_copy.h.

◆ QS_MEM

#define QS_MEM (   mem_,
  size_ 
)    (QS_mem_fmt_((mem_), (size_)))

Output formatted memory block of up to 255 bytes to the QS record

Definition at line 659 of file qs_copy.h.

◆ QS_OBJ

#define QS_OBJ (   obj_)    (QS_u32_fmt_(QS_OBJ_T, (uint32_t)(obj_)))

Output formatted object pointer to the QS record

Definition at line 672 of file qs_copy.h.

◆ QS_FUN

#define QS_FUN (   fun_)    (QS_u32_fmt_(QS_FUN_T, (uint32_t)(fun_)))

Output formatted function pointer to the QS record

Definition at line 686 of file qs_copy.h.

◆ QS_SIG

#define QS_SIG (   sig_,
  obj_ 
)
Value:
QS_u16_fmt_(QS_SIG_T, (sig_)); \
QS_obj_raw_(obj_)
@ QS_SIG_T
Definition: qs_copy.h:607
void QS_u16_fmt_(uint8_t format, uint16_t d)

Output formatted event signal (of type ::QSignal) and the state machine object to the user QS record

Definition at line 711 of file qs_copy.h.

◆ QS_SIG_DICTIONARY

#define QS_SIG_DICTIONARY (   sig_,
  obj_ 
)     (QS_sig_dict_pre_((sig_), (obj_), #sig_))

Output signal dictionary record

Description
A signal dictionary record associates the numerical value of the signal and the binary address of the state machine that consumes that signal with the human-readable name of the signal.

Providing a signal dictionary QS record can vastly improve readability of the QS log, because instead of dealing with cryptic machine addresses the QSpy host utility can display human-readable names.

A signal dictionary entry is associated with both the signal value sig_ and the state machine obj_, because signals are required to be unique only within a given state machine and therefore the same numerical values can represent different signals in different state machines.

For the "global" signals that have the same meaning in all state machines (such as globally published signals), you can specify a signal dictionary entry with the obj_ parameter set to NULL.

The following example shows the definition of signal dictionary entries in the initial transition of the Table active object. Please note that signals HUNGRY_SIG and DONE_SIG are associated with the Table state machine only ("me" obj_ pointer). The EAT_SIG signal, on the other hand, is global (0 obj_ pointer):

Note
The QSpy log utility must capture the signal dictionary record in order to use the human-readable information. You need to connect to the target before the dictionary entries have been transmitted.

The following QSpy log example shows the signal dictionary records generated from the Table initial transition and subsequent records that show human-readable names of the signals:

The following QSpy log example shows the same sequence of records, but with dictionary records removed. The human-readable signal names are not available.

Definition at line 762 of file qs_copy.h.

◆ QS_OBJ_DICTIONARY

#define QS_OBJ_DICTIONARY (   obj_)     (QS_obj_dict_pre_((obj_), #obj_))

Output object dictionary record

Description
An object dictionary record associates the binary address of an object in the target's memory with the human-readable name of the object.

Providing an object dictionary QS record can vastly improve readability of the QS log, because instead of dealing with cryptic machine addresses the QSpy host utility can display human-readable object names.

The following example shows the definition of object dictionary entry for the Table active object:

Definition at line 779 of file qs_copy.h.

◆ QS_FUN_DICTIONARY

#define QS_FUN_DICTIONARY (   fun_)     (QS_fun_dict_pre_((void (*)(void))(fun_), #fun_))

Output function dictionary record

Description
A function dictionary record associates the binary address of a function in the target's memory with the human-readable name of the function.

Providing a function dictionary QS record can vastly improve readability of the QS log, because instead of dealing with cryptic machine addresses the QSpy host utility can display human-readable function names.

The example from QS_SIG_DICTIONARY() shows the definition of a function dictionary.

Definition at line 795 of file qs_copy.h.

◆ QS_USR_DICTIONARY

#define QS_USR_DICTIONARY (   rec_)     (QS_usr_dict_pre_((rec_), #rec_))

Output user QS-record dictionary record

Description
A user QS-record dictionary record associates the numerical value of a user record with the human-readable identifier.

Definition at line 804 of file qs_copy.h.

◆ QF_QS_ACTION

#define QF_QS_ACTION (   act_)    (act_)

Execute an action that is only necessary for QS output

Definition at line 849 of file qs_copy.h.

◆ QS_OUTPUT

#define QS_OUTPUT ( )    (QS_output())

Macro to handle the QS output from the application NOTE: if this macro is used, the application must define QS_output().

Definition at line 942 of file qs_copy.h.

◆ QS_RX_INPUT

#define QS_RX_INPUT ( )    (QS_rx_input())

Macro to handle the QS-RX input to the application NOTE: if this macro is used, the application must define QS_rx_input().

Definition at line 947 of file qs_copy.h.

◆ QS_TEST_PROBE_DEF

#define QS_TEST_PROBE_DEF (   fun_)     uint32_t const qs_tp_ = QS_getTestProbe_((void (*)(void))(fun_));

QS macro to define the Test-Probe for a given fun_

Definition at line 978 of file qs_copy.h.

◆ QS_TEST_PROBE

#define QS_TEST_PROBE (   code_)     if (qs_tp_ != 0U) { code_ }

QS macro to apply a Test-Probe

Definition at line 982 of file qs_copy.h.

◆ QS_TEST_PROBE_ID

#define QS_TEST_PROBE_ID (   id_,
  code_ 
)     if (qs_tp_ == (uint32_t)(id_)) { code_ }

QS macro to apply a Test-Probe

Definition at line 986 of file qs_copy.h.

◆ QS_TEST_PAUSE

#define QS_TEST_PAUSE ( )
Value:
do { \
QS_beginRec_((uint_fast8_t)QS_TEST_PAUSED); \
QS_endRec_(); \
QS_onTestLoop(); \
} while (false)
@ QS_TEST_PAUSED
Definition: qs_copy.h:150

QS macro to pause test execution and enter the test event loop

Definition at line 990 of file qs_copy.h.

Typedef Documentation

◆ QSTimeCtr

typedef uint32_t QSTimeCtr

The type of the QS time stamp. This type determines the dynamic range of QS time stamps

Definition at line 267 of file qs_copy.h.

◆ QSCtr

typedef uint_fast16_t QSCtr

QS ring buffer counter and offset type

Definition at line 854 of file qs_copy.h.

Enumeration Type Documentation

◆ QSpyRecords

Quantum Spy record types.

Description
This enumeration specifies the record types used in the QP components. You can specify your own record types starting from QS_USER offset. Currently, the maximum of all records cannot exceed 125.
Note
The QS records labeled as "not maskable" are always enabled and cannot be turend off with the QS_GLB_FILTER() macro. Other QS trace records can be disabled by means of the "global filters"
See also
QS_GLB_FILTER() macro
Enumerator
QS_EMPTY 

QS record for cleanly starting a session

QS_QEP_STATE_ENTRY 

a state was entered

QS_QEP_STATE_EXIT 

a state was exited

QS_QEP_STATE_INIT 

an initial transition was taken in a state

QS_QEP_INIT_TRAN 

the top-most initial transition was taken

QS_QEP_INTERN_TRAN 

an internal transition was taken

QS_QEP_TRAN 

a regular transition was taken

QS_QEP_IGNORED 

an event was ignored (silently discarded)

QS_QEP_DISPATCH 

an event was dispatched (begin of RTC step)

QS_QEP_UNHANDLED 

an event was unhandled due to a guard

QS_QF_ACTIVE_DEFER 

AO deferred an event

QS_QF_ACTIVE_RECALL 

AO recalled an event

QS_QF_ACTIVE_SUBSCRIBE 

an AO subscribed to an event

QS_QF_ACTIVE_UNSUBSCRIBE 

an AO unsubscribed to an event

QS_QF_ACTIVE_POST 

an event was posted (FIFO) directly to AO

QS_QF_ACTIVE_POST_LIFO 

an event was posted (LIFO) directly to AO

QS_QF_ACTIVE_GET 

AO got an event and its queue is not empty

QS_QF_ACTIVE_GET_LAST 

AO got an event and its queue is empty

QS_QF_ACTIVE_RECALL_ATTEMPT 

AO attempted to recall an event

QS_QF_EQUEUE_POST 

an event was posted (FIFO) to a raw queue

QS_QF_EQUEUE_POST_LIFO 

an event was posted (LIFO) to a raw queue

QS_QF_EQUEUE_GET 

get an event and queue still not empty

QS_QF_EQUEUE_GET_LAST 

get the last event from the queue

QS_QF_NEW_ATTEMPT 

an attempt to allocate an event failed

QS_QF_MPOOL_GET 

a memory block was removed from memory pool

QS_QF_MPOOL_PUT 

a memory block was returned to memory pool

QS_QF_PUBLISH 

an event was published

QS_QF_NEW_REF 

new event reference was created

QS_QF_NEW 

new event was created

QS_QF_GC_ATTEMPT 

garbage collection attempt

QS_QF_GC 

garbage collection

QS_QF_TICK 

QF_tickX() was called

QS_QF_TIMEEVT_ARM 

a time event was armed

QS_QF_TIMEEVT_AUTO_DISARM 

a time event expired and was disarmed

QS_QF_TIMEEVT_DISARM_ATTEMPT 

attempt to disarm a disarmed QTimeEvt

QS_QF_TIMEEVT_DISARM 

true disarming of an armed time event

QS_QF_TIMEEVT_REARM 

rearming of a time event

QS_QF_TIMEEVT_POST 

a time event posted itself directly to an AO

QS_QF_DELETE_REF 

an event reference is about to be deleted

QS_QF_CRIT_ENTRY 

critical section was entered

QS_QF_CRIT_EXIT 

critical section was exited

QS_QF_ISR_ENTRY 

an ISR was entered

QS_QF_ISR_EXIT 

an ISR was exited

QS_QF_INT_DISABLE 

interrupts were disabled

QS_QF_INT_ENABLE 

interrupts were enabled

QS_QF_ACTIVE_POST_ATTEMPT 

attempt to post an evt to AO failed

QS_QF_EQUEUE_POST_ATTEMPT 

attempt to post an evt to QEQueue failed

QS_QF_MPOOL_GET_ATTEMPT 

attempt to get a memory block failed

QS_MUTEX_LOCK 

a mutex was locked

QS_MUTEX_UNLOCK 

a mutex was unlocked

QS_SCHED_LOCK 

scheduler was locked

QS_SCHED_UNLOCK 

scheduler was unlocked

QS_SCHED_NEXT 

scheduler found next task to execute

QS_SCHED_IDLE 

scheduler became idle

QS_SCHED_RESUME 

scheduler resumed previous task (not idle)

QS_QEP_TRAN_HIST 

a tran to history was taken

QS_QEP_TRAN_EP 

a tran to entry point into a submachine

QS_QEP_TRAN_XP 

a tran to exit point out of a submachine

QS_TEST_PAUSED 

test has been paused

QS_TEST_PROBE_GET 

reports that Test-Probe has been used

QS_SIG_DICT 

signal dictionary entry

QS_OBJ_DICT 

object dictionary entry

QS_FUN_DICT 

function dictionary entry

QS_USR_DICT 

user QS record dictionary entry

QS_TARGET_INFO 

reports the Target information

QS_TARGET_DONE 

reports completion of a user callback

QS_RX_STATUS 

reports QS data receive status

QS_QUERY_DATA 

reports the data from "current object" query

QS_PEEK_DATA 

reports the data from the PEEK query

QS_ASSERT_FAIL 

assertion failed in the code

QS_QF_RUN 

QF_run() was entered

QS_RESERVED_71 
QS_RESERVED_72 
QS_RESERVED_73 
QS_RESERVED_74 
QS_RESERVED_75 
QS_RESERVED_76 
QS_RESERVED_77 
QS_RESERVED_78 
QS_RESERVED_79 
QS_RESERVED_80 
QS_RESERVED_81 
QS_RESERVED_82 
QS_RESERVED_83 
QS_RESERVED_84 
QS_RESERVED_85 
QS_RESERVED_86 
QS_RESERVED_87 
QS_RESERVED_88 
QS_RESERVED_89 
QS_RESERVED_90 
QS_RESERVED_91 
QS_RESERVED_92 
QS_RESERVED_93 
QS_RESERVED_94 
QS_RESERVED_95 
QS_RESERVED_96 
QS_RESERVED_97 
QS_RESERVED_98 
QS_RESERVED_99 
QS_USER 

the first record available to QS users

Definition at line 62 of file qs_copy.h.

◆ QSpyRecordGroups

QS record groups for QS_GLB_FILTER()

Enumerator
QS_ALL_RECORDS 

all maskable QS records

QS_SM_RECORDS 

State Machine QS records

QS_AO_RECORDS 

Active Object QS records

QS_EQ_RECORDS 

Event Queues QS records

QS_MP_RECORDS 

Memory Pools QS records

QS_TE_RECORDS 

Time Events QS records

QS_QF_RECORDS 

QF QS records

QS_SC_RECORDS 

Scheduler QS records

QS_U0_RECORDS 

User Group 100-104 records

QS_U1_RECORDS 

User Group 105-109 records

QS_U2_RECORDS 

User Group 110-114 records

QS_U3_RECORDS 

User Group 115-119 records

QS_U4_RECORDS 

User Group 120-124 records

QS_UA_RECORDS 

All User records

Definition at line 200 of file qs_copy.h.

◆ QSpyUserOffsets

QS user record group offsets for QS_GLB_FILTER()

Enumerator
QS_USER0 

offset for User Group 0

QS_USER1 

offset for User Group 1

QS_USER2 

offset for User Group 2

QS_USER3 

offset for User Group 3

QS_USER4 

offset for User Group 4

Definition at line 218 of file qs_copy.h.

◆ QSpyIdOffsets

QS ID offsets for QS_LOC_FILTER()

Enumerator
QS_AO_ID 

offset for AO priorities

QS_EP_ID 

offset for event-pool IDs

QS_EQ_ID 

offset for event-queue IDs

QS_AP_ID 

offset for Application-specific IDs

Definition at line 227 of file qs_copy.h.

◆ QSpyIdGroups

QS ID groups for QS_LOC_FILTER()

Enumerator
QS_ALL_IDS 

all QS IDs

QS_AO_IDS 

AO IDs (priorities)

QS_EP_IDS 

event-pool IDs

QS_EQ_IDS 

event-queue IDs

QS_AP_IDS 

Application-specific IDs

Definition at line 235 of file qs_copy.h.

◆ anonymous enum

anonymous enum

formats for application-specific data elements

Description
QS uses this enumeration is used only internally for the formatted user data elements.
Enumerator
QS_I8_T 

signed 8-bit integer format

QS_U8_T 

unsigned 8-bit integer format

QS_I16_T 

signed 16-bit integer format

QS_U16_T 

unsigned 16-bit integer format

QS_I32_T 

signed 32-bit integer format

QS_U32_T 

unsigned 32-bit integer format

QS_F32_T 

32-bit floating point format

QS_F64_T 

64-bit floating point format

QS_STR_T 

zero-terminated ASCII string format

QS_MEM_T 

up to 255-bytes memory block format

QS_SIG_T 

event signal format

QS_OBJ_T 

object pointer format

QS_FUN_T 

function pointer format

QS_I64_T 

signed 64-bit integer format

QS_U64_T 

unsigned 64-bit integer format

QS_HEX_FMT 

HEX format for the "width" filed

Definition at line 596 of file qs_copy.h.

◆ QSpyObjKind

Kinds of objects used in QS.

Enumerator
SM_OBJ 

state machine object

AO_OBJ 

active object

MP_OBJ 

event pool object

EQ_OBJ 

raw queue object

TE_OBJ 

time event object

AP_OBJ 

generic Application-specific object

MAX_OBJ 

Definition at line 857 of file qs_copy.h.

◆ OSpyObjCombnation

Enumerator
SM_AO_OBJ 

combination of SM and AO

Definition at line 867 of file qs_copy.h.

◆ QSpyRxRecords

Enumeration for the received Qs record types (RX 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 QF_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 894 of file qs_copy.h.

◆ QUTestUserRecords

Enumerator
QUTEST_ON_POST 

Definition at line 996 of file qs_copy.h.

Function Documentation

◆ QS_initBuf()

void QS_initBuf ( uint8_t  sto[],
uint_fast16_t  stoSize 
)

Initialize the QS data buffer.

◆ QS_glbFilter_()

void QS_glbFilter_ ( int_fast16_t const  filter)

Set/clear the global Filter for a given QS record or group of records.

◆ QS_locFilter_()

void QS_locFilter_ ( int_fast16_t const  filter)

Set/clear the local Filter for a given object-id or group of object-ids.

◆ QS_beginRec_()

void QS_beginRec_ ( uint_fast8_t  rec)

Mark the begin of a QS record rec

◆ QS_endRec_()

void QS_endRec_ ( void  )

Mark the end of a QS record rec

◆ QS_u8_raw_()

void QS_u8_raw_ ( uint8_t  d)

output raw uint8_t data element (without format information)

◆ QS_2u8_raw_()

void QS_2u8_raw_ ( uint8_t  d1,
uint8_t  d2 
)

output two raw uint8_t data elements (without format information)

◆ QS_u16_raw_()

void QS_u16_raw_ ( uint16_t  d)

Output raw uint16_t data element (without format information)

◆ QS_u32_raw_()

void QS_u32_raw_ ( uint32_t  d)

Output raw uint32_t data element (without format information)

◆ QS_str_raw_()

void QS_str_raw_ ( char_t const *  str)

Output raw zero-terminated string element (without format information)

◆ QS_u8_fmt_()

void QS_u8_fmt_ ( uint8_t  format,
uint8_t  d 
)

Output uint8_t data element with format information

◆ QS_u16_fmt_()

void QS_u16_fmt_ ( uint8_t  format,
uint16_t  d 
)

output uint16_t data element with format information

◆ QS_u32_fmt_()

void QS_u32_fmt_ ( uint8_t  format,
uint32_t  d 
)

Output uint32_t data element with format information

◆ QS_f32_fmt_()

void QS_f32_fmt_ ( uint8_t  format,
float32_t  f 
)

Output 32-bit floating point data element with format information

◆ QS_f64_fmt_()

void QS_f64_fmt_ ( uint8_t  format,
float64_t  d 
)

Output 64-bit floating point data element with format information

◆ QS_obj_raw_()

void QS_obj_raw_ ( void const *const  obj)

Output obj pointer data element without format information

◆ QS_str_fmt_()

void QS_str_fmt_ ( char_t const *  str)

Output zero-terminated ASCII string element with format information

◆ QS_mem_fmt_()

void QS_mem_fmt_ ( uint8_t const *  blk,
uint8_t  size 
)

Output memory block of up to 255-bytes with format information

◆ QS_u64_raw_()

void QS_u64_raw_ ( uint64_t  d)

Output raw uint64_t data element without format information

◆ QS_u64_fmt_()

void QS_u64_fmt_ ( uint8_t  format,
uint64_t  d 
)

Output uint64_t data element with format information

◆ QS_getByte()

uint16_t QS_getByte ( void  )

Byte-oriented interface to the QS data buffer.

◆ QS_getBlock()

uint8_t const* QS_getBlock ( uint16_t *  pNbytes)

Block-oriented interface to the QS data buffer.

◆ QS_onStartup()

uint8_t QS_onStartup ( void const *  arg)

Callback to startup the QS facility

Description
This is a platform-dependent "callback" function invoked through the macro QS_INIT(). You need to implement this function in your application. At a minimum, the function must configure the QS buffer by calling QS_initBuf(). Typically, you will also want to open/configure the QS output channel, such as a serial port, or a data file. The void* argument arg can be used to pass parameter(s) needed to configure the output channel.
Returns
the staus of initialization. Typically 1 (true) when the QS initialization was successful, or 0 (false) when it failed.
Usage
The following example illustrates an implementation of QS_onStartup():

◆ QS_onCleanup()

void QS_onCleanup ( void  )

Callback to cleanup the QS facility

Description
This is a platform-dependent "callback" function invoked through the macro QS_EXIT(). You need to implement this function in your application. The main purpose of this function is to close the QS output channel, if necessary.

◆ QS_onFlush()

void QS_onFlush ( void  )

Callback to flush the QS trace data to the host

Description
This is a platform-dependent "callback" function to flush the QS trace buffer to the host. The function typically busy-waits until all the data in the buffer is sent to the host. This is acceptable only in the initial transient.

◆ QS_onGetTime()

QSTimeCtr QS_onGetTime ( void  )

Callback to obtain a timestamp for a QS record.

Description
This is a platform-dependent "callback" function invoked from the macro QS_TIME_PRE_() to add the time stamp to a QS record.
Note
Some of the predefined QS records from QP do not output the time stamp. However, ALL user records do output the time stamp.
QS_onGetTime() is called in a critical section and should not exit the critical section.
Returns
the current timestamp.
Usage
The following example shows using a system call to implement QS time stamping:

◆ QS_sig_dict_pre_()

void QS_sig_dict_pre_ ( enum_t const  sig,
void const *const  obj,
char_t const *  name 
)

Output predefined signal-dictionary record

◆ QS_obj_dict_pre_()

void QS_obj_dict_pre_ ( void const *const  obj,
char_t const *  name 
)

Output predefined object-dictionary record

◆ QS_fun_dict_pre_()

void QS_fun_dict_pre_ ( void(*)(void)  fun,
char_t const *  name 
)

Output predefined function-dictionary record

◆ QS_usr_dict_pre_()

void QS_usr_dict_pre_ ( enum_t const  rec,
char_t const *const  name 
)

Output predefined user-dictionary record

◆ QS_ASSERTION()

void QS_ASSERTION ( char_t const *const  module,
int_t const  loc,
uint32_t  delay 
)

Output the assertion failure trace record

Description
This trace record is intended to use from the Q_onAssert() callback.

◆ QF_QS_CRIT_ENTRY()

void QF_QS_CRIT_ENTRY ( void  )

Output the critical section entry

◆ QF_QS_CRIT_EXIT()

void QF_QS_CRIT_EXIT ( void  )

Output the critical section exit

◆ QF_QS_ISR_ENTRY()

void QF_QS_ISR_ENTRY ( uint8_t const  isrnest,
uint8_t const  prio 
)

Output the interrupt entry record

◆ QF_QS_ISR_EXIT()

void QF_QS_ISR_EXIT ( uint8_t const  isrnest,
uint8_t const  prio 
)

Output the interrupt exit record

◆ QS_rxInitBuf()

void QS_rxInitBuf ( uint8_t  sto[],
uint16_t  stoSize 
)

Initialize the QS RX data buffer.

◆ QS_rxParse()

void QS_rxParse ( void  )

Parse all bytes present in the QS RX data buffer

◆ QS_RX_PUT()

bool QS_RX_PUT ( uint8_t const  b)

Put one byte into the QS RX lock-free buffer

◆ QS_rxGetNfree()

uint16_t QS_rxGetNfree ( void  )

Obtain the number of free bytes in the QS RX data buffer

◆ QS_setCurrObj()

void QS_setCurrObj ( uint8_t  obj_kind,
void *  obj_ptr 
)

Set the "current object" in the Target

◆ QS_queryCurrObj()

void QS_queryCurrObj ( uint8_t  obj_kind)

Query the "current object" in the Target

◆ QS_onReset()

void QS_onReset ( void  )

Callback function to reset the Target (to be implemented in the BSP)

◆ QS_onCommand()

void QS_onCommand ( uint8_t  cmdId,
uint32_t  param1,
uint32_t  param2,
uint32_t  param3 
)

Callback function to execute user commands (to be implemented in BSP)

◆ QS_onTestSetup()

void QS_onTestSetup ( void  )

callback to setup a unit test inside the Target

◆ QS_onTestTeardown()

void QS_onTestTeardown ( void  )

callback to teardown after a unit test inside the Target

◆ QS_onTestLoop()

void QS_onTestLoop ( void  )

callback to run the test loop

◆ QS_onTestEvt()

void QS_onTestEvt ( QEvt *  e)

callback to "massage" the test event before dispatching/posting it

◆ QS_onTestPost()

void QS_onTestPost ( void const *  sender,
QActive *  recipient,
QEvt const *  e,
bool  status 
)

callback to examine an event that is about to be posted

◆ QS_processTestEvts_()

void QS_processTestEvts_ ( void  )

QS internal function to process posted events during test

◆ QS_tickX_()

void QS_tickX_ ( uint_fast8_t const  tickRate,
void const *const  sender 
)

internal function to process armed time events during test

◆ QS_getTestProbe_()

uint32_t QS_getTestProbe_ ( void(*)(void)  api)

QS internal function to get the Test-Probe for a given API

◆ QActiveDummy_ctor()

void QActiveDummy_ctor ( QActiveDummy *const  me)

Constructor of the QActiveDummy Active Object class

Variable Documentation

◆ QS_priv_

QSPrivAttr QS_priv_
extern

◆ QF_intNest

uint8_t volatile QF_intNest
extern