QP/C 6.9.1
qs.h
Go to the documentation of this file.
1 
40 #ifndef QS_H
41 #define QS_H
42 
43 #ifndef Q_SPY
44  #error "Q_SPY must be defined to include qs.h"
45 #endif
46 
47 /****************************************************************************/
63  /* [0] QS session (not maskable) */
66  /* [1] SM records */
77  /* [10] Active Object (AO) records */
88  /* [19] Event Queue (EQ) records */
94  /* [23] Framework (QF) records */
97  /* [24] Memory Pool (MP) records */
101  /* [26] Additional Framework (QF) records */
109  /* [32] Time Event (TE) records */
117  /* [38] Additional Framework (QF) records */
126  /* [45] Additional Active Object (AO) records */
129  /* [46] Additional Event Queue (EQ) records */
132  /* [47] Additional Memory Pool (MP) records */
135  /* [48] Scheduler (SC) records */
144  /* [55] Additional QEP records */
149  /* [58] Miscellaneous QS records (not maskable) */
164  /* [71] Reserved QS records */
194 
195  /* [100] Application-specific (User) QS records */
196  QS_USER
197 };
198 
215 };
216 
223  QS_USER4 = (enum_t)QS_USER3 + 5
224 };
225 
228  QS_AO_ID = 0,
229  QS_EP_ID = 64,
230  QS_EQ_ID = 80,
231  QS_AP_ID = 96,
232 };
233 
236  QS_ALL_IDS = 0xF0,
237  QS_AO_IDS = (0x80 + (enum_t)QS_AO_ID),
238  QS_EP_IDS = (0x80 + (enum_t)QS_EP_ID),
239  QS_EQ_IDS = (0x80 + (enum_t)QS_EQ_ID),
240  QS_AP_IDS = (0x80 + (enum_t)QS_AP_ID),
241 };
242 
243 #ifndef QS_TIME_SIZE
244 
254  #define QS_TIME_SIZE 4U
255 #endif
256 
257 #if (QS_TIME_SIZE == 1U)
259  #define QS_TIME_PRE_() (QS_u8_raw_(QS_onGetTime()))
260 #elif (QS_TIME_SIZE == 2U)
261  typedef uint16_t QSTimeCtr;
262  #define QS_TIME_PRE_() (QS_u16_raw_(QS_onGetTime()))
263 #elif (QS_TIME_SIZE == 4U)
264 
267  typedef uint32_t QSTimeCtr;
268 
270  #define QS_TIME_PRE_() (QS_u32_raw_(QS_onGetTime()))
271 #else
272  #error "QS_TIME_SIZE defined incorrectly, expected 1, 2, or 4"
273 #endif
274 
275 
276 /****************************************************************************/
277 /* QS services. */
278 
280 void QS_initBuf(uint8_t sto[], uint_fast16_t stoSize);
281 
283 void QS_glbFilter_(int_fast16_t const filter);
284 
286 void QS_locFilter_(int_fast16_t const filter);
287 
289 void QS_beginRec_(uint_fast8_t rec);
290 
292 void QS_endRec_(void);
293 
294 /* unformatted (raw) data elements output ..................................*/
296 void QS_u8_raw_(uint8_t d);
297 
299 void QS_2u8_raw_(uint8_t d1, uint8_t d2);
300 
302 void QS_u16_raw_(uint16_t d);
303 
305 void QS_u32_raw_(uint32_t d);
306 
308 void QS_str_raw_(char_t const *str);
309 
310 /* formatted data elements output ..........................................*/
312 void QS_u8_fmt_(uint8_t format, uint8_t d);
313 
315 void QS_u16_fmt_(uint8_t format, uint16_t d);
316 
318 void QS_u32_fmt_(uint8_t format, uint32_t d);
319 
321 void QS_f32_fmt_(uint8_t format, float32_t f);
322 
324 void QS_f64_fmt_(uint8_t format, float64_t d);
325 
327 void QS_obj_raw_(void const * const obj);
328 
330 void QS_str_fmt_(char_t const *str);
331 
333 void QS_mem_fmt_(uint8_t const *blk, uint8_t size);
334 
336 void QS_u64_raw_(uint64_t d);
337 
339 void QS_u64_fmt_(uint8_t format, uint64_t d);
340 
341 /* QS buffer access *********************************************************/
343 uint16_t QS_getByte(void);
344 
346 #define QS_EOD ((uint16_t)0xFFFFU)
347 
349 uint8_t const *QS_getBlock(uint16_t *pNbytes);
350 
351 
352 /* platform-specific callback functions, need to be implemented by clients */
353 
371 uint8_t QS_onStartup(void const *arg);
372 
381 void QS_onCleanup(void);
382 
391 void QS_onFlush(void);
392 
411 QSTimeCtr QS_onGetTime(void);
412 
413 
414 /****************************************************************************/
415 /* Macros for adding QS instrumentation to the client code */
416 
424 #define QS_INIT(arg_) (QS_onStartup(arg_))
425 
433 #define QS_EXIT() (QS_onCleanup())
434 
443 #define QS_FLUSH() (QS_onFlush())
444 
454 #define QS_GLB_FILTER(rec_) (QS_glbFilter_((int_fast16_t)(rec_)))
455 
465 #define QS_LOC_FILTER(qs_id_) (QS_locFilter_((int_fast16_t)(qs_id_)))
466 
467 
468 /****************************************************************************/
469 /* Facilities for QS ciritical section */
470 
471 /* QS-specific critical section */
472 #ifdef QS_CRIT_ENTRY /* separate QS critical section defined? */
473 
474 #ifndef QS_CRIT_STAT_TYPE
475  #define QS_CRIT_STAT_
476  #define QS_CRIT_E_() QS_CRIT_ENTRY(dummy)
477  #define QS_CRIT_X_() QS_CRIT_EXIT(dummy); QS_REC_DONE()
478 #else
479  #define QS_CRIT_STAT_ QS_CRIT_STAT_TYPE critStat_;
480  #define QS_CRIT_E_() QS_CRIT_ENTRY(critStat_)
481  #define QS_CRIT_X_() QS_CRIT_EXIT(critStat_); QS_REC_DONE()
482 #endif /* QS_CRIT_STAT_TYPE */
483 
484 #else /* separate QS critical section not defined--use the QF definition */
485 
486 #ifndef QF_CRIT_STAT_TYPE
487 
498  #define QS_CRIT_STAT_
499 
510  #define QS_CRIT_E_() QF_CRIT_ENTRY(dummy)
511 
522  #define QS_CRIT_X_() QF_CRIT_EXIT(dummy); QS_REC_DONE()
523 
524 #elif (!defined QS_CRIT_STAT_)
525 
526  #define QS_CRIT_STAT_ QF_CRIT_STAT_TYPE critStat_;
527  #define QS_CRIT_E_() QF_CRIT_ENTRY(critStat_)
528  #define QS_CRIT_X_() QF_CRIT_EXIT(critStat_); QS_REC_DONE()
529 
530 #endif /* simple unconditional interrupt disabling used */
531 
532 #endif /* separate QS critical section not defined */
533 
534 
535 /****************************************************************************/
536 /* Macros to generate application-specific (user) QS records */
537 
539 #define QS_BEGIN_NOCRIT(rec_, qs_id_) \
540  if (QS_GLB_CHECK_(rec_) && QS_LOC_CHECK_(qs_id_)) { \
541  QS_beginRec_((uint_fast8_t)(rec_)); \
542  QS_TIME_PRE_(); {
543 
545 #define QS_END_NOCRIT() } \
546  QS_endRec_(); \
547  }
548 
549 #ifndef QS_REC_DONE
550 
551  #define QS_REC_DONE() ((void)0)
552 #endif /* QS_REC_DONE */
553 
555 #define QS_GLB_CHECK_(rec_) \
556  (((uint_fast8_t)QS_priv_.glbFilter[(uint_fast8_t)(rec_) >> 3U] \
557  & ((uint_fast8_t)1U << ((uint_fast8_t)(rec_) & 7U))) != 0U)
558 
560 #define QS_LOC_CHECK_(qs_id_) \
561  (((uint_fast8_t)QS_priv_.locFilter[(uint_fast8_t)(qs_id_) >> 3U] \
562  & ((uint_fast8_t)1U << ((uint_fast8_t)(qs_id_) & 7U))) != 0U)
563 
574 #define QS_BEGIN_ID(rec_, qs_id_) \
575  if (QS_GLB_CHECK_(rec_) && QS_LOC_CHECK_(qs_id_)) { \
576  QS_CRIT_STAT_ \
577  QS_CRIT_E_(); \
578  QS_beginRec_((uint_fast8_t)(rec_)); \
579  QS_TIME_PRE_(); {
580 
585 #define QS_END() } \
586  QS_endRec_(); \
587  QS_CRIT_X_(); \
588  }
589 
596 enum {
612  QS_HEX_FMT
613 };
614 
616 #define QS_I8(width_, data_) \
617  (QS_u8_fmt_((uint8_t)(((width_) << 4)) | (uint8_t)QS_I8_T, (data_)))
618 
620 #define QS_U8(width_, data_) \
621  (QS_u8_fmt_((uint8_t)(((width_) << 4)) | (uint8_t)QS_U8_T, (data_)))
622 
624 #define QS_I16(width_, data_) \
625  (QS_u16_fmt_((uint8_t)(((width_) << 4)) | (uint8_t)QS_I16_T, (data_)))
626 
628 #define QS_U16(width_, data_) \
629  (QS_u16_fmt_((uint8_t)(((width_) << 4)) | (uint8_t)QS_U16_T, (data_)))
630 
632 #define QS_I32(width_, data_) \
633  (QS_u32_fmt_((uint8_t)(((width_) << 4)) | (uint8_t)QS_I32_T, (data_)))
634 
636 #define QS_U32(width_, data_) \
637  (QS_u32_fmt_((uint8_t)(((width_) << 4)) | (uint8_t)QS_U32_T, (data_)))
638 
640 #define QS_F32(width_, data_) \
641  (QS_f32_fmt_((uint8_t)(((width_) << 4)) | (uint8_t)QS_F32_T, (data_)))
642 
644 #define QS_F64(width_, data_) \
645  (QS_f64_fmt_((uint8_t)(((width_) << 4)) | (uint8_t)QS_F64_T, (data_)))
646 
648 #define QS_I64(width_, data_) \
649  (QS_u64_fmt_((uint8_t)(((width_) << 4)) | (uint8_t)QS_I64_T, (data_)))
650 
652 #define QS_U64(width_, data_) \
653  (QS_u64_fmt_((uint8_t)(((width_) << 4)) | (uint8_t)QS_U64_T, (data_)))
654 
656 #define QS_STR(str_) (QS_str_fmt_((str_)))
657 
659 #define QS_MEM(mem_, size_) (QS_mem_fmt_((mem_), (size_)))
660 
661 
662 #if (QS_OBJ_PTR_SIZE == 1U)
663  #define QS_OBJ(obj_) (QS_u8_fmt_(QS_OBJ_T, (uint8_t)(obj_)))
664 #elif (QS_OBJ_PTR_SIZE == 2U)
665  #define QS_OBJ(obj_) (QS_u16_fmt_(QS_OBJ_T, (uint16_t)(obj_)))
666 #elif (QS_OBJ_PTR_SIZE == 4U)
667  #define QS_OBJ(obj_) (QS_u32_fmt_(QS_OBJ_T, (uint32_t)(obj_)))
668 #elif (QS_OBJ_PTR_SIZE == 8U)
669  #define QS_OBJ(obj_) (QS_u64(QS_OBJ_T, (uint64_t)(obj_)))
670 #else
671 
672  #define QS_OBJ(obj_) (QS_u32_fmt_(QS_OBJ_T, (uint32_t)(obj_)))
673 #endif
674 
675 
676 #if (QS_FUN_PTR_SIZE == 1U)
677  #define QS_FUN(fun_) (QS_u8_fmt_(QS_FUN_T, (uint8_t)(fun_)))
678 #elif (QS_FUN_PTR_SIZE == 2U)
679  #define QS_FUN(fun_) (QS_u16_fmt_(QS_FUN_T, (uint16_t)(fun_)))
680 #elif (QS_FUN_PTR_SIZE == 4U)
681  #define QS_FUN(fun_) (QS_u32_fmt_(QS_FUN_T, (uint32_t)(fun_)))
682 #elif (QS_FUN_PTR_SIZE == 8U)
683  #define QS_FUN(fun_) (QS_u64_fmt_(QS_FUN_T, (uint64_t)(fun_)))
684 #else
685 
686  #define QS_FUN(fun_) (QS_u32_fmt_(QS_FUN_T, (uint32_t)(fun_)))
687 #endif
688 
689 #if (Q_SIGNAL_SIZE == 1)
690 
691  #define QS_SIG(sig_, obj_) \
692  QS_u8_fmt_(QS_SIG_T, (sig_)); \
693  QS_obj_raw_(obj_)
694 
695 #elif (Q_SIGNAL_SIZE == 2)
696 
697  #define QS_SIG(sig_, obj_) \
698  QS_u16_fmt_(QS_SIG_T, (sig_)); \
699  QS_obj_raw_(obj_)
700 
701 #elif (Q_SIGNAL_SIZE == 4)
702 
703  #define QS_SIG(sig_, obj_) \
704  QS_u32_fmt_(QS_SIG_T, (sig_)); \
705  QS_obj_raw_(obj_)
706 
707 #else
708 
711  #define QS_SIG(sig_, obj_) \
712  QS_u16_fmt_(QS_SIG_T, (sig_)); \
713  QS_obj_raw_(obj_)
714 
715 #endif
716 
717 
718 /****************************************************************************/
719 /* Dictionary trace records */
720 
762 #define QS_SIG_DICTIONARY(sig_, obj_) \
763  (QS_sig_dict_pre_((sig_), (obj_), #sig_))
764 
779 #define QS_OBJ_DICTIONARY(obj_) \
780  (QS_obj_dict_pre_((obj_), #obj_))
781 
795 #define QS_FUN_DICTIONARY(fun_) \
796  (QS_fun_dict_pre_((void (*)(void))(fun_), #fun_))
797 
804 #define QS_USR_DICTIONARY(rec_) \
805  (QS_usr_dict_pre_((rec_), #rec_))
806 
808 void QS_sig_dict_pre_(enum_t const sig, void const * const obj,
809  char_t const *name);
810 
812 void QS_obj_dict_pre_(void const * const obj,
813  char_t const *name);
814 
816 void QS_fun_dict_pre_(void (* const fun)(void),
817  char_t const *name);
818 
820 void QS_usr_dict_pre_(enum_t const rec,
821  char_t const * const name);
822 
823 
824 /****************************************************************************/
825 /* Miscellaneous pre-formatted trace records used in applications */
826 
832 void QS_ASSERTION(char_t const * const module,
833  int_t const loc,
834  uint32_t delay);
835 
837 void QF_QS_CRIT_ENTRY(void);
838 
840 void QF_QS_CRIT_EXIT(void);
841 
843 void QF_QS_ISR_ENTRY(uint8_t const isrnest, uint8_t const prio);
844 
846 void QF_QS_ISR_EXIT(uint8_t const isrnest, uint8_t const prio);
847 
849 #define QF_QS_ACTION(act_) (act_)
850 
851 
852 /****************************************************************************/
853 /* QS private data (the TX channel) */
864  MAX_OBJ
865 };
866 
869 };
870 
872 typedef struct {
873  uint8_t glbFilter[16];
874  uint8_t locFilter[16];
875  void const *locFilter_AP;
885 } QSPrivAttr;
886 
887 extern QSPrivAttr QS_priv_;
888 
889 
890 /****************************************************************************/
891 /* QS receive channel */
892 
911  QS_RX_EVENT
912 };
913 
915 void QS_rxInitBuf(uint8_t sto[], uint16_t stoSize);
916 
918 void QS_rxParse(void);
919 
921 void QS_RX_PUT(uint8_t const b);
922 
924 uint16_t QS_rxGetNfree(void);
925 
927 void QS_onReset(void);
928 
930 void QS_onCommand(uint8_t cmdId, uint32_t param1,
931  uint32_t param2, uint32_t param3);
932 
936 #define QS_OUTPUT() (QS_output())
937 
941 #define QS_RX_INPUT() (QS_rx_input())
942 
943 /****************************************************************************/
944 /* Facilities for use in QUTest only */
945 #ifdef Q_UTEST
946 
947  void QS_onTestSetup(void);
948 
950  void QS_onTestTeardown(void);
951 
953  void QS_onTestLoop(void);
954 
956  void QS_onTestEvt(QEvt *e);
957 
959  void QS_onTestPost(void const *sender, QActive *recipient,
960  QEvt const *e, bool status);
961 
963  void QS_processTestEvts_(void);
964 
966  void QS_tickX_(uint_fast8_t const tickRate, void const * const sender);
967 
969  uint32_t QS_getTestProbe_(void (* const api)(void));
970 
972  #define QS_TEST_PROBE_DEF(fun_) \
973  uint32_t const qs_tp_ = QS_getTestProbe_((void (*)(void))(fun_));
974 
976  #define QS_TEST_PROBE(code_) \
977  if (qs_tp_ != 0U) { code_ }
978 
980  #define QS_TEST_PROBE_ID(id_, code_) \
981  if (qs_tp_ == (uint32_t)(id_)) { code_ }
982 
984  #define QS_TEST_PAUSE() do { \
985  QS_beginRec_((uint_fast8_t)QS_TEST_PAUSED); \
986  QS_endRec_(); \
987  QS_onTestLoop(); \
988  } while (false)
989 
991  QUTEST_ON_POST = 124
992  };
993 
994  /* interrupt nesting up-down counter */
995  extern uint8_t volatile QF_intNest;
996 
997  /************************************************************************/
1004  typedef struct {
1005  QActive super; /*< inherit QActive */
1006  } QActiveDummy;
1007 
1009  void QActiveDummy_ctor(QActiveDummy * const me);
1010 
1011 #else /* Q_UTEST not defined */
1012 
1013  /* dummy definitions when not building for QUTEST */
1014  #define QS_TEST_PROBE_DEF(fun_)
1015  #define QS_TEST_PROBE(code_)
1016  #define QS_TEST_PROBE_ID(id_, code_)
1017  #define QS_TEST_PAUSE() ((void)0)
1018 
1019 #endif /* Q_UTEST */
1020 
1021 #endif /* QS_H */
1022 
QSPrivAttr::tail
QSCtr tail
offset of where next byte will be extracted
Definition: qs.h:879
QS_RESERVED_95
@ QS_RESERVED_95
Definition: qs.h:189
QS_U16_T
@ QS_U16_T
unsigned 16-bit integer format
Definition: qs.h:600
QS_u8_raw_
void QS_u8_raw_(uint8_t d)
output raw uint8_t data element (without format information)
Definition: qs.c:617
QF_intNest
uint8_t volatile QF_intNest
Definition: qutest.c:53
QS_QEP_STATE_INIT
@ QS_QEP_STATE_INIT
an initial transition was taken in a state
Definition: qs.h:69
QS_QF_TIMEEVT_AUTO_DISARM
@ QS_QF_TIMEEVT_AUTO_DISARM
a time event expired and was disarmed
Definition: qs.h:111
QSPrivAttr::locFilter_AP
void const * locFilter_AP
deprecated local QS filter
Definition: qs.h:875
uint8_t
unsigned char uint8_t
exact-width 8-bit unsigned int
Definition: 16bit/stdint.h:29
QS_QEP_TRAN_EP
@ QS_QEP_TRAN_EP
a tran to entry point into a submachine
Definition: qs.h:146
QS_onStartup
uint8_t QS_onStartup(void const *arg)
Callback to startup the QS facility.
QS_ASSERTION
void QS_ASSERTION(char_t const *const module, int_t const loc, uint32_t delay)
Output the assertion failure trace record.
Definition: qs.c:948
QS_QF_EQUEUE_GET_LAST
@ QS_QF_EQUEUE_GET_LAST
get the last event from the queue
Definition: qs.h:92
QS_endRec_
void QS_endRec_(void)
Mark the end of a QS record rec.
Definition: qs.c:403
SM_OBJ
@ SM_OBJ
state machine object
Definition: qs.h:858
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_onCleanup
void QS_onCleanup(void)
Callback to cleanup the QS facility.
QS_RX_RESET
@ QS_RX_RESET
reset the Target
Definition: qs.h:897
QS_QEP_UNHANDLED
@ QS_QEP_UNHANDLED
an event was unhandled due to a guard
Definition: qs.h:75
QS_u16_fmt_
void QS_u16_fmt_(uint8_t format, uint16_t d)
output uint16_t data element with format information
Definition: qs.c:568
QS_usr_dict_pre_
void QS_usr_dict_pre_(enum_t const rec, char_t const *const name)
Output predefined user-dictionary record.
Definition: qs.c:875
QS_u64_fmt_
void QS_u64_fmt_(uint8_t format, uint64_t d)
Output uint64_t data element with format information.
Definition: qs_64bit.c:70
QS_QEP_STATE_EXIT
@ QS_QEP_STATE_EXIT
a state was exited
Definition: qs.h:68
QS_U4_RECORDS
@ QS_U4_RECORDS
User Group 120-124 records.
Definition: qs.h:213
QS_QF_NEW_ATTEMPT
@ QS_QF_NEW_ATTEMPT
an attempt to allocate an event failed
Definition: qs.h:95
QS_onGetTime
QSTimeCtr QS_onGetTime(void)
Callback to obtain a timestamp for a QS record.
Definition: qs_rx.c:1294
QS_QEP_INTERN_TRAN
@ QS_QEP_INTERN_TRAN
an internal transition was taken
Definition: qs.h:71
QS_RX_EVENT
@ QS_RX_EVENT
inject an event to the Target
Definition: qs.h:911
QS_tickX_
void QS_tickX_(uint_fast8_t const tickRate, void const *const sender)
internal function to process armed time events during test
Definition: qutest.c:329
QS_TE_RECORDS
@ QS_TE_RECORDS
Time Events QS records.
Definition: qs.h:206
QSTimeCtr
uint8_t QSTimeCtr
Definition: qs.h:258
QS_QEP_DISPATCH
@ QS_QEP_DISPATCH
an event was dispatched (begin of RTC step)
Definition: qs.h:74
QS_QF_EQUEUE_GET
@ QS_QF_EQUEUE_GET
get an event and queue still not empty
Definition: qs.h:91
QS_EP_IDS
@ QS_EP_IDS
event-pool IDs
Definition: qs.h:238
QS_ASSERT_FAIL
@ QS_ASSERT_FAIL
assertion failed in the code
Definition: qs.h:161
QS_QF_ACTIVE_DEFER
@ QS_QF_ACTIVE_DEFER
AO deferred an event.
Definition: qs.h:78
QS_onTestEvt
void QS_onTestEvt(QEvt *e)
callback to "massage" the test event before dispatching/posting it
QS_QF_INT_ENABLE
@ QS_QF_INT_ENABLE
interrupts were enabled
Definition: qs.h:124
QS_getTestProbe_
uint32_t QS_getTestProbe_(void(*const api)(void))
QS internal function to get the Test-Probe for a given API.
Definition: qs_rx.c:1261
QS_onTestTeardown
void QS_onTestTeardown(void)
callback to teardown after a unit test inside the Target
QS_rxParse
void QS_rxParse(void)
Parse all bytes present in the QS RX data buffer.
Definition: qs_rx.c:324
QSpyIdGroups
QSpyIdGroups
QS ID groups for QS_LOC_FILTER()
Definition: qs.h:235
QS_U32_T
@ QS_U32_T
unsigned 32-bit integer format
Definition: qs.h:602
QS_RESERVED_80
@ QS_RESERVED_80
Definition: qs.h:174
QS_QF_DELETE_REF
@ QS_QF_DELETE_REF
an event reference is about to be deleted
Definition: qs.h:118
AP_OBJ
@ AP_OBJ
generic Application-specific object
Definition: qs.h:863
QS_RESERVED_87
@ QS_RESERVED_87
Definition: qs.h:181
QS_QF_TICK
@ QS_QF_TICK
QF_tickX() was called.
Definition: qs.h:107
QS_onTestLoop
void QS_onTestLoop(void)
callback to run the test loop
OSpyObjCombnation
OSpyObjCombnation
Definition: qs.h:867
QS_initBuf
void QS_initBuf(uint8_t sto[], uint_fast16_t stoSize)
Initialize the QS data buffer.
Definition: qs.c:76
QActiveDummy_ctor
void QActiveDummy_ctor(QActiveDummy *const me)
Constructor of the QActiveDummy Active Object class.
Definition: qutest.c:126
QS_STR_T
@ QS_STR_T
zero-terminated ASCII string format
Definition: qs.h:605
QActiveDummy::super
QActive super
Definition: qs.h:1005
QS_QF_MPOOL_GET
@ QS_QF_MPOOL_GET
a memory block was removed from memory pool
Definition: qs.h:98
QSpyUserOffsets
QSpyUserOffsets
QS user record group offsets for QS_GLB_FILTER()
Definition: qs.h:218
QS_QF_TIMEEVT_DISARM
@ QS_QF_TIMEEVT_DISARM
true disarming of an armed time event
Definition: qs.h:113
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.
Definition: qs.c:314
MP_OBJ
@ MP_OBJ
event pool object
Definition: qs.h:860
QS_RESERVED_82
@ QS_RESERVED_82
Definition: qs.h:176
QS_RESERVED_73
@ QS_RESERVED_73
Definition: qs.h:167
QS_RX_TEST_TEARDOWN
@ QS_RX_TEST_TEARDOWN
test teardown
Definition: qs.h:903
QS_U64_T
@ QS_U64_T
unsigned 64-bit integer format
Definition: qs.h:611
QSPrivAttr::seq
uint8_t seq
the record sequence number
Definition: qs.h:881
QF_QS_CRIT_EXIT
void QF_QS_CRIT_EXIT(void)
Output the critical section exit.
Definition: qs.c:976
QS_RESERVED_71
@ QS_RESERVED_71
Definition: qs.h:165
QS_QEP_IGNORED
@ QS_QEP_IGNORED
an event was ignored (silently discarded)
Definition: qs.h:73
uint64_t
unsigned long long uint64_t
exact-width 64-bit unsigned int
Definition: 16bit/stdint.h:32
QS_U2_RECORDS
@ QS_U2_RECORDS
User Group 110-114 records.
Definition: qs.h:211
QS_RESERVED_84
@ QS_RESERVED_84
Definition: qs.h:178
QS_RX_CURR_OBJ
@ QS_RX_CURR_OBJ
set the "current-object" in the Target
Definition: qs.h:908
QS_f64_fmt_
void QS_f64_fmt_(uint8_t format, float64_t d)
Output 64-bit floating point data element with format information.
Definition: qs_fp.c:81
QS_AP_IDS
@ QS_AP_IDS
Application-specific IDs.
Definition: qs.h:240
QS_EMPTY
@ QS_EMPTY
QS record for cleanly starting a session.
Definition: qs.h:64
QS_RESERVED_97
@ QS_RESERVED_97
Definition: qs.h:191
QS_QF_ACTIVE_GET
@ QS_QF_ACTIVE_GET
AO got an event and its queue is not empty.
Definition: qs.h:84
QS_EQ_ID
@ QS_EQ_ID
offset for event-queue IDs
Definition: qs.h:230
QS_QF_ACTIVE_RECALL
@ QS_QF_ACTIVE_RECALL
AO recalled an event.
Definition: qs.h:79
QS_QF_EQUEUE_POST_ATTEMPT
@ QS_QF_EQUEUE_POST_ATTEMPT
attempt to post an evt to QEQueue failed
Definition: qs.h:130
QS_I32_T
@ QS_I32_T
signed 32-bit integer format
Definition: qs.h:601
QS_2u8_raw_
void QS_2u8_raw_(uint8_t d1, uint8_t d2)
output two raw uint8_t data elements (without format information)
Definition: qs.c:634
MAX_OBJ
@ MAX_OBJ
Definition: qs.h:864
QS_RESERVED_99
@ QS_RESERVED_99
Definition: qs.h:193
QS_QEP_STATE_ENTRY
@ QS_QEP_STATE_ENTRY
a state was entered
Definition: qs.h:67
QS_RESERVED_90
@ QS_RESERVED_90
Definition: qs.h:184
uint16_t
unsigned int uint16_t
exact-width 16-bit unsigned int
Definition: 16bit/stdint.h:30
QS_rxGetNfree
uint16_t QS_rxGetNfree(void)
Obtain the number of free bytes in the QS RX data buffer.
Definition: qs_rx.c:308
QS_QUERY_DATA
@ QS_QUERY_DATA
reports the data from "current object" query
Definition: qs.h:159
QS_AO_IDS
@ QS_AO_IDS
AO IDs (priorities)
Definition: qs.h:237
QS_AO_RECORDS
@ QS_AO_RECORDS
Active Object QS records.
Definition: qs.h:203
QS_MP_RECORDS
@ QS_MP_RECORDS
Memory Pools QS records.
Definition: qs.h:205
QSCtr
uint_fast16_t QSCtr
QS ring buffer counter and offset type.
Definition: qs.h:854
QActive
Active Object base class (based on QHsm implementation)
Definition: qf.h:116
QS_UA_RECORDS
@ QS_UA_RECORDS
All User records.
Definition: qs.h:214
QS_RX_PUT
void QS_RX_PUT(uint8_t const b)
put one byte into the QS RX lock-free buffer
Definition: qs_rx.c:284
QS_getByte
uint16_t QS_getByte(void)
Byte-oriented interface to the QS data buffer.
Definition: qs.c:747
QS_RESERVED_86
@ QS_RESERVED_86
Definition: qs.h:180
QS_RESERVED_74
@ QS_RESERVED_74
Definition: qs.h:168
float64_t
double float64_t
IEEE 754 64-bit floating point number, MISRA-C 2004 rule 6.3(req)
Definition: qep.h:97
QSpyObjKind
QSpyObjKind
Kinds of objects used in QS.
Definition: qs.h:857
uint_fast8_t
unsigned int uint_fast8_t
fast at-least 8-bit unsigned int
Definition: 16bit/stdint.h:36
QS_RESERVED_91
@ QS_RESERVED_91
Definition: qs.h:185
QS_QF_RECORDS
@ QS_QF_RECORDS
QF QS records.
Definition: qs.h:207
QF_QS_ISR_ENTRY
void QF_QS_ISR_ENTRY(uint8_t const isrnest, uint8_t const prio)
Output the interrupt entry record.
Definition: qs.c:987
QS_RX_LOC_FILTER
@ QS_RX_LOC_FILTER
set local filters in the Target
Definition: qs.h:906
QS_RX_COMMAND
@ QS_RX_COMMAND
execute a user-defined command in the Target
Definition: qs.h:896
QS_USR_DICT
@ QS_USR_DICT
user QS record dictionary entry
Definition: qs.h:155
QS_QF_NEW_REF
@ QS_QF_NEW_REF
new event reference was created
Definition: qs.h:103
QS_RESERVED_79
@ QS_RESERVED_79
Definition: qs.h:173
QS_USER0
@ QS_USER0
offset for User Group 0
Definition: qs.h:219
QS_QF_GC_ATTEMPT
@ QS_QF_GC_ATTEMPT
garbage collection attempt
Definition: qs.h:105
QS_u32_raw_
void QS_u32_raw_(uint32_t d)
Output raw uint32_t data element (without format information)
Definition: qs.c:674
QS_SCHED_NEXT
@ QS_SCHED_NEXT
scheduler found next task to execute
Definition: qs.h:140
QS_QF_CRIT_ENTRY
@ QS_QF_CRIT_ENTRY
critical section was entered
Definition: qs.h:119
QS_QF_CRIT_EXIT
@ QS_QF_CRIT_EXIT
critical section was exited
Definition: qs.h:120
QS_rxInitBuf
void QS_rxInitBuf(uint8_t sto[], uint16_t stoSize)
Initialize the QS RX data buffer.
Definition: qs_rx.c:252
QS_QEP_INIT_TRAN
@ QS_QEP_INIT_TRAN
the top-most initial transition was taken
Definition: qs.h:70
QS_RX_QUERY_CURR
@ QS_RX_QUERY_CURR
query the "current object" in the Target
Definition: qs.h:910
QS_RESERVED_83
@ QS_RESERVED_83
Definition: qs.h:177
QSPrivAttr::chksum
uint8_t chksum
the checksum of the current record
Definition: qs.h:882
QS_RX_TICK
@ QS_RX_TICK
call QF_TICK_X() in the Target
Definition: qs.h:898
QS_RESERVED_85
@ QS_RESERVED_85
Definition: qs.h:179
QS_ALL_IDS
@ QS_ALL_IDS
all QS IDs
Definition: qs.h:236
QS_u16_raw_
void QS_u16_raw_(uint16_t d)
Output raw uint16_t data element (without format information)
Definition: qs.c:653
QS_RESERVED_96
@ QS_RESERVED_96
Definition: qs.h:190
QS_I64_T
@ QS_I64_T
signed 64-bit integer format
Definition: qs.h:610
QS_QF_ACTIVE_RECALL_ATTEMPT
@ QS_QF_ACTIVE_RECALL_ATTEMPT
AO attempted to recall an event.
Definition: qs.h:86
QS_obj_dict_pre_
void QS_obj_dict_pre_(void const *const obj, char_t const *name)
Output predefined object-dictionary record.
Definition: qs.c:843
QS_RESERVED_98
@ QS_RESERVED_98
Definition: qs.h:192
QEvt
Event class.
Definition: qep.h:151
float32_t
float float32_t
IEEE 754 32-bit floating point number, MISRA-C 2004 rule 6.3(req)
Definition: qep.h:88
QS_QF_NEW
@ QS_QF_NEW
new event was created
Definition: qs.h:104
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.
Definition: qs.c:825
QS_QF_ACTIVE_POST
@ QS_QF_ACTIVE_POST
an event was posted (FIFO) directly to AO
Definition: qs.h:82
QS_ALL_RECORDS
@ QS_ALL_RECORDS
all maskable QS records
Definition: qs.h:201
QS_USER4
@ QS_USER4
offset for User Group 4
Definition: qs.h:223
QS_onFlush
void QS_onFlush(void)
Callback to flush the QS trace data to the host.
QS_RESERVED_89
@ QS_RESERVED_89
Definition: qs.h:183
QS_QF_MPOOL_PUT
@ QS_QF_MPOOL_PUT
a memory block was returned to memory pool
Definition: qs.h:99
QS_USER3
@ QS_USER3
offset for User Group 3
Definition: qs.h:222
QS_RESERVED_93
@ QS_RESERVED_93
Definition: qs.h:187
QS_SIG_T
@ QS_SIG_T
event signal format
Definition: qs.h:607
TE_OBJ
@ TE_OBJ
time event object
Definition: qs.h:862
QS_SCHED_RESUME
@ QS_SCHED_RESUME
scheduler resumed previous task (not idle)
Definition: qs.h:142
QS_QF_TIMEEVT_DISARM_ATTEMPT
@ QS_QF_TIMEEVT_DISARM_ATTEMPT
attempt to disarm a disarmed QTimeEvt
Definition: qs.h:112
QS_u32_fmt_
void QS_u32_fmt_(uint8_t format, uint32_t d)
Output uint32_t data element with format information.
Definition: qs.c:591
QS_RX_INFO
@ QS_RX_INFO
query Target info (ver, config, tstamp)
Definition: qs.h:895
QSPrivAttr::critNest
uint8_t critNest
critical section nesting level
Definition: qs.h:884
AO_OBJ
@ AO_OBJ
active object
Definition: qs.h:859
QUTEST_ON_POST
@ QUTEST_ON_POST
Definition: qs.h:991
QSpyIdOffsets
QSpyIdOffsets
QS ID offsets for QS_LOC_FILTER()
Definition: qs.h:227
QS_onReset
void QS_onReset(void)
callback function to reset the Target (to be implemented in the BSP)
SM_AO_OBJ
@ SM_AO_OBJ
combination of SM and AO
Definition: qs.h:868
QSpyRecordGroups
QSpyRecordGroups
QS record groups for QS_GLB_FILTER()
Definition: qs.h:200
QS_QF_RUN
@ QS_QF_RUN
QF_run() was entered.
Definition: qs.h:162
QS_AO_ID
@ QS_AO_ID
offset for AO priorities
Definition: qs.h:228
QS_MEM_T
@ QS_MEM_T
up to 255-bytes memory block format
Definition: qs.h:606
QS_SCHED_UNLOCK
@ QS_SCHED_UNLOCK
scheduler was unlocked
Definition: qs.h:139
QS_F64_T
@ QS_F64_T
64-bit floating point format
Definition: qs.h:604
QF_QS_ISR_EXIT
void QF_QS_ISR_EXIT(uint8_t const isrnest, uint8_t const prio)
Output the interrupt exit record.
Definition: qs.c:994
QS_processTestEvts_
void QS_processTestEvts_(void)
QS internal function to process posted events during test.
Definition: qutest.c:294
QS_QF_EQUEUE_POST_LIFO
@ QS_QF_EQUEUE_POST_LIFO
an event was posted (LIFO) to a raw queue
Definition: qs.h:90
QS_FUN_DICT
@ QS_FUN_DICT
function dictionary entry
Definition: qs.h:154
QS_QEP_TRAN_XP
@ QS_QEP_TRAN_XP
a tran to exit point out of a submachine
Definition: qs.h:147
QS_MUTEX_UNLOCK
@ QS_MUTEX_UNLOCK
a mutex was unlocked
Definition: qs.h:137
QS_QF_EQUEUE_POST
@ QS_QF_EQUEUE_POST
an event was posted (FIFO) to a raw queue
Definition: qs.h:89
QActiveDummy
QActiveDummy Object class.
Definition: qs.h:1004
QS_EQ_RECORDS
@ QS_EQ_RECORDS
Event Queues QS records.
Definition: qs.h:204
char_t
char char_t
typedef for character strings.
Definition: qassert.h:77
QS_fun_dict_pre_
void QS_fun_dict_pre_(void(*const fun)(void), char_t const *name)
Output predefined function-dictionary record.
Definition: qs.c:860
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_RX_TEST_PROBE
@ QS_RX_TEST_PROBE
set a Test-Probe in the Target
Definition: qs.h:904
QS_SCHED_LOCK
@ QS_SCHED_LOCK
scheduler was locked
Definition: qs.h:138
QS_RESERVED_94
@ QS_RESERVED_94
Definition: qs.h:188
QS_RESERVED_92
@ QS_RESERVED_92
Definition: qs.h:186
QS_U8_T
@ QS_U8_T
unsigned 8-bit integer format
Definition: qs.h:598
QSPrivAttr::used
QSCtr used
number of bytes currently in the ring buffer
Definition: qs.h:880
QS_beginRec_
void QS_beginRec_(uint_fast8_t rec)
Mark the begin of a QS record rec.
Definition: qs.c:376
QS_glbFilter_
void QS_glbFilter_(int_fast16_t const filter)
Set/clear the global Filter for a given QS record or group of records.
Definition: qs.c:119
QS_SC_RECORDS
@ QS_SC_RECORDS
Scheduler QS records.
Definition: qs.h:208
QS_str_fmt_
void QS_str_fmt_(char_t const *str)
Output zero-terminated ASCII string element with format information.
Definition: qs.c:922
QS_QEP_TRAN_HIST
@ QS_QEP_TRAN_HIST
a tran to history was taken
Definition: qs.h:145
QS_USER
@ QS_USER
the first record available to QS users
Definition: qs.h:196
QS_U0_RECORDS
@ QS_U0_RECORDS
User Group 100-104 records.
Definition: qs.h:209
EQ_OBJ
@ EQ_OBJ
raw queue object
Definition: qs.h:861
QS_RESERVED_78
@ QS_RESERVED_78
Definition: qs.h:172
QS_RX_TEST_SETUP
@ QS_RX_TEST_SETUP
test setup
Definition: qs.h:902
QS_I8_T
@ QS_I8_T
signed 8-bit integer format
Definition: qs.h:597
QS_QF_ACTIVE_SUBSCRIBE
@ QS_QF_ACTIVE_SUBSCRIBE
an AO subscribed to an event
Definition: qs.h:80
QS_U1_RECORDS
@ QS_U1_RECORDS
User Group 105-109 records.
Definition: qs.h:210
QS_RX_PEEK
@ QS_RX_PEEK
peek Target memory
Definition: qs.h:899
QS_RESERVED_72
@ QS_RESERVED_72
Definition: qs.h:166
int_fast16_t
signed int int_fast16_t
fast at-least 16-bit signed int
Definition: 16bit/stdint.h:37
QS_PEEK_DATA
@ QS_PEEK_DATA
reports the data from the PEEK query
Definition: qs.h:160
QS_getBlock
uint8_t const * QS_getBlock(uint16_t *pNbytes)
Block-oriented interface to the QS data buffer.
Definition: qs.c:789
QS_QF_TIMEEVT_REARM
@ QS_QF_TIMEEVT_REARM
rearming of a time event
Definition: qs.h:114
QS_AP_ID
@ QS_AP_ID
offset for Application-specific IDs
Definition: qs.h:231
QS_QF_ACTIVE_GET_LAST
@ QS_QF_ACTIVE_GET_LAST
AO got an event and its queue is empty.
Definition: qs.h:85
QS_F32_T
@ QS_F32_T
32-bit floating point format
Definition: qs.h:603
QS_RESERVED_75
@ QS_RESERVED_75
Definition: qs.h:169
QS_RX_STATUS
@ QS_RX_STATUS
reports QS data receive status
Definition: qs.h:158
QS_onTestSetup
void QS_onTestSetup(void)
callback to setup a unit test inside the Target
QS_RX_FILL
@ QS_RX_FILL
fill Target memory
Definition: qs.h:901
QSPrivAttr::buf
uint8_t * buf
pointer to the start of the ring buffer
Definition: qs.h:876
QS_OBJ_T
@ QS_OBJ_T
object pointer format
Definition: qs.h:608
QSPrivAttr::head
QSCtr head
offset to where next byte will be inserted
Definition: qs.h:878
QS_OBJ_DICT
@ QS_OBJ_DICT
object dictionary entry
Definition: qs.h:153
QS_USER2
@ QS_USER2
offset for User Group 2
Definition: qs.h:221
QS_priv_
QSPrivAttr QS_priv_
Definition: qs.c:49
QS_SIG_DICT
@ QS_SIG_DICT
signal dictionary entry
Definition: qs.h:152
QS_U3_RECORDS
@ QS_U3_RECORDS
User Group 115-119 records.
Definition: qs.h:212
QSPrivAttr::end
QSCtr end
offset of the end of the ring buffer
Definition: qs.h:877
QS_USER1
@ QS_USER1
offset for User Group 1
Definition: qs.h:220
QS_QF_ACTIVE_POST_LIFO
@ QS_QF_ACTIVE_POST_LIFO
an event was posted (LIFO) directly to AO
Definition: qs.h:83
QS_u8_fmt_
void QS_u8_fmt_(uint8_t format, uint8_t d)
Output uint8_t data element with format information.
Definition: qs.c:547
QS_HEX_FMT
@ QS_HEX_FMT
HEX format for the "width" filed.
Definition: qs.h:612
QS_TARGET_DONE
@ QS_TARGET_DONE
reports completion of a user callback
Definition: qs.h:157
enum_t
int enum_t
typedef for enumerations used for event signals
Definition: qep.h:79
QS_QF_ACTIVE_POST_ATTEMPT
@ QS_QF_ACTIVE_POST_ATTEMPT
attempt to post an evt to AO failed
Definition: qs.h:127
int_t
int int_t
typedef for assertions-ids and line numbers in assertions.
Definition: qassert.h:86
QS_RX_TEST_CONTINUE
@ QS_RX_TEST_CONTINUE
continue a test after QS_TEST_PAUSE()
Definition: qs.h:909
QSPrivAttr
Private QS attributes to keep track of the filters and the trace buffer.
Definition: qs.h:872
QS_RX_POKE
@ QS_RX_POKE
poke Target memory
Definition: qs.h:900
QS_I16_T
@ QS_I16_T
signed 16-bit integer format
Definition: qs.h:599
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.
Definition: qs.c:893
QUTestUserRecords
QUTestUserRecords
Definition: qs.h:990
QS_RESERVED_77
@ QS_RESERVED_77
Definition: qs.h:171
QS_QF_ISR_ENTRY
@ QS_QF_ISR_ENTRY
an ISR was entered
Definition: qs.h:121
QS_QF_MPOOL_GET_ATTEMPT
@ QS_QF_MPOOL_GET_ATTEMPT
attempt to get a memory block failed
Definition: qs.h:133
QS_f32_fmt_
void QS_f32_fmt_(uint8_t format, float32_t f)
Output 32-bit floating point data element with format information.
Definition: qs_fp.c:49
QSpyRecords
QSpyRecords
Quantum Spy record types.
Definition: qs.h:62
QS_RX_GLB_FILTER
@ QS_RX_GLB_FILTER
set global filters in the Target
Definition: qs.h:905
QS_MUTEX_LOCK
@ QS_MUTEX_LOCK
a mutex was locked
Definition: qs.h:136
QS_str_raw_
void QS_str_raw_(char_t const *str)
Output raw zero-terminated string element (without format information)
Definition: qs.c:715
QS_TEST_PAUSED
@ QS_TEST_PAUSED
test has been paused
Definition: qs.h:150
QS_RESERVED_88
@ QS_RESERVED_88
Definition: qs.h:182
QS_RESERVED_81
@ QS_RESERVED_81
Definition: qs.h:175
QS_TEST_PROBE_GET
@ QS_TEST_PROBE_GET
reports that Test-Probe has been used
Definition: qs.h:151
QF_QS_CRIT_ENTRY
void QF_QS_CRIT_ENTRY(void)
Output the critical section entry.
Definition: qs.c:968
QSpyRxRecords
QSpyRxRecords
Enumeration for the received Qs record types (RX channel).
Definition: qs.h:894
QS_QEP_TRAN
@ QS_QEP_TRAN
a regular transition was taken
Definition: qs.h:72
QS_EQ_IDS
@ QS_EQ_IDS
event-queue IDs
Definition: qs.h:239
QS_QF_INT_DISABLE
@ QS_QF_INT_DISABLE
interrupts were disabled
Definition: qs.h:123
QS_QF_GC
@ QS_QF_GC
garbage collection
Definition: qs.h:106
QS_FUN_T
@ QS_FUN_T
function pointer format
Definition: qs.h:609
QS_SM_RECORDS
@ QS_SM_RECORDS
State Machine QS records.
Definition: qs.h:202
QS_obj_raw_
void QS_obj_raw_(void const *const obj)
Output obj pointer data element without format information.
Definition: qs.c:696
QS_RESERVED_76
@ QS_RESERVED_76
Definition: qs.h:170
QS_RX_AO_FILTER
@ QS_RX_AO_FILTER
set local AO filter in the Target
Definition: qs.h:907
QS_u64_raw_
void QS_u64_raw_(uint64_t d)
Output raw uint64_t data element without format information.
Definition: qs_64bit.c:49
QS_EP_ID
@ QS_EP_ID
offset for event-pool IDs
Definition: qs.h:229
QS_QF_TIMEEVT_POST
@ QS_QF_TIMEEVT_POST
a time event posted itself directly to an AO
Definition: qs.h:115
QS_QF_ISR_EXIT
@ QS_QF_ISR_EXIT
an ISR was exited
Definition: qs.h:122
QS_SCHED_IDLE
@ QS_SCHED_IDLE
scheduler became idle
Definition: qs.h:141
uint32_t
unsigned long int uint32_t
exact-width 32-bit unsigned int
Definition: 16bit/stdint.h:31
uint_fast16_t
unsigned int uint_fast16_t
fast at-least 16-bit unsigned int
Definition: 16bit/stdint.h:38
QS_TARGET_INFO
@ QS_TARGET_INFO
reports the Target information
Definition: qs.h:156
QS_QF_PUBLISH
@ QS_QF_PUBLISH
an event was published
Definition: qs.h:102
QS_QF_ACTIVE_UNSUBSCRIBE
@ QS_QF_ACTIVE_UNSUBSCRIBE
an AO unsubscribed to an event
Definition: qs.h:81
QS_QF_TIMEEVT_ARM
@ QS_QF_TIMEEVT_ARM
a time event was armed
Definition: qs.h:110