QP/C  6.8.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 */
95 
96  /* [24] Memory Pool (MP) records */
100  /* [26] QF records */
108  /* [32] Time Event (TE) records */
116  /* [38] Additional QF records */
125  /* [45] Additional Active Object (AO) records */
128  /* [46] Additional Event Queue (EQ) records */
131  /* [47] Additional Memory Pool (MP) records */
134  /* [48] Scheduler (SC) records */
143  /* [55] Additional QEP records */
148  /* [58] Miscellaneous QS records (not maskable) */
162  /* [70] Reserved QS records */
193 
194  /* [100] Application-specific (User) QS records */
196 };
197 
214 };
215 
223 };
224 
225 #ifndef QS_TIME_SIZE
226 
236  #define QS_TIME_SIZE 4U
237 #endif
238 
239 #if (QS_TIME_SIZE == 1U)
241  #define QS_TIME_PRE_() (QS_u8_raw_(QS_onGetTime()))
242 #elif (QS_TIME_SIZE == 2U)
243  typedef uint16_t QSTimeCtr;
244  #define QS_TIME_PRE_() (QS_u16_raw_(QS_onGetTime()))
245 #elif (QS_TIME_SIZE == 4U)
246 
249  typedef uint32_t QSTimeCtr;
250 
252  #define QS_TIME_PRE_() (QS_u32_raw_(QS_onGetTime()))
253 #else
254  #error "QS_TIME_SIZE defined incorrectly, expected 1, 2, or 4"
255 #endif
256 
257 
258 /****************************************************************************/
259 /* QS services. */
260 
262 void QS_initBuf(uint8_t sto[], uint_fast16_t stoSize);
263 
265 void QS_filterOn_(uint_fast8_t rec);
266 
268 void QS_filterOff_(uint_fast8_t rec);
269 
271 void QS_beginRec_(uint_fast8_t rec);
272 
274 void QS_endRec_(void);
275 
276 /* unformatted (raw) data elements output ..................................*/
278 void QS_u8_raw_(uint8_t d);
279 
281 void QS_2u8_raw_(uint8_t d1, uint8_t d2);
282 
284 void QS_u16_raw_(uint16_t d);
285 
287 void QS_u32_raw_(uint32_t d);
288 
290 void QS_str_raw_(char_t const *str);
291 
292 /* formatted data elements output ..........................................*/
294 void QS_u8_fmt_(uint8_t format, uint8_t d);
295 
297 void QS_u16_fmt_(uint8_t format, uint16_t d);
298 
300 void QS_u32_fmt_(uint8_t format, uint32_t d);
301 
303 void QS_f32_fmt_(uint8_t format, float32_t f);
304 
306 void QS_f64_fmt_(uint8_t format, float64_t d);
307 
309 void QS_obj_raw_(void const * const obj);
310 
312 void QS_str_fmt_(char_t const *str);
313 
315 void QS_mem_fmt_(uint8_t const *blk, uint8_t size);
316 
317 #if (QS_OBJ_PTR_SIZE == 8U) || (QS_FUN_PTR_SIZE == 8U)
318 
319  void QS_u64_raw_(uint64_t d);
320 
322  void QS_u64_fmt_(uint8_t format, uint64_t d);
323 #endif
324 
325 /* QS buffer access *********************************************************/
327 uint16_t QS_getByte(void);
328 
330 #define QS_EOD ((uint16_t)0xFFFFU)
331 
333 uint8_t const *QS_getBlock(uint16_t *pNbytes);
334 
335 
336 /* platform-specific callback functions, need to be implemented by clients */
337 
355 uint8_t QS_onStartup(void const *arg);
356 
365 void QS_onCleanup(void);
366 
375 void QS_onFlush(void);
376 
395 QSTimeCtr QS_onGetTime(void);
396 
397 
398 /****************************************************************************/
399 /* Macros for adding QS instrumentation to the client code */
400 
408 #define QS_INIT(arg_) (QS_onStartup(arg_))
409 
417 #define QS_EXIT() (QS_onCleanup())
418 
427 #define QS_FLUSH() (QS_onFlush())
428 
438 #define QS_FILTER_ON(rec_) (QS_filterOn_((uint_fast8_t)(rec_)))
439 
451 #define QS_FILTER_OFF(rec_) (QS_filterOff_((uint_fast8_t)(rec_)))
452 
479 #define QS_FILTER_SM_OBJ(obj_) (QS_priv_.locFilter[SM_OBJ] = (obj_))
480 
501 #define QS_FILTER_AO_OBJ(obj_) (QS_priv_.locFilter[AO_OBJ] = (obj_))
502 
521 #define QS_FILTER_MP_OBJ(obj_) (QS_priv_.locFilter[MP_OBJ] = (obj_))
522 
541 #define QS_FILTER_EQ_OBJ(obj_) (QS_priv_.locFilter[EQ_OBJ] = (obj_))
542 
562 #define QS_FILTER_TE_OBJ(obj_) (QS_priv_.locFilter[TE_OBJ] = (obj_))
563 
579 #define QS_FILTER_AP_OBJ(obj_) (QS_priv_.locFilter[AP_OBJ] = (obj_))
580 
581 
582 /****************************************************************************/
583 /* Macros to generate application-specific (user) QS records */
584 
586 #define QS_BEGIN_NOCRIT(rec_, obj_) \
587  if ((((uint_fast8_t)QS_priv_.glbFilter[(uint8_t)(rec_) >> 3] \
588  & (uint_fast8_t)(1U << ((uint8_t)(rec_) & 7U))) != 0U) \
589  && ((QS_priv_.locFilter[AP_OBJ] == (void *)0) \
590  || (QS_priv_.locFilter[AP_OBJ] == (obj_)))) \
591  { \
592  QS_beginRec_((uint_fast8_t)(rec_)); \
593  QS_TIME_PRE_(); {
594 
596 #define QS_END_NOCRIT() } \
597  QS_endRec_(); \
598  }
599 
600 #ifndef QS_REC_DONE
601 
602  #define QS_REC_DONE() ((void)0)
603 #endif /* QS_REC_DONE */
604 
605 /* QS-specific critical section */
606 #ifdef QS_CRIT_ENTRY /* separate QS critical section defined? */
607 
608 #ifndef QS_CRIT_STAT_TYPE
609  #define QS_CRIT_STAT_
610  #define QS_CRIT_ENTRY_() QS_CRIT_ENTRY(dummy)
611  #define QS_CRIT_EXIT_() QS_CRIT_EXIT(dummy); QS_REC_DONE()
612 #else
613  #define QS_CRIT_STAT_ QS_CRIT_STAT_TYPE critStat_;
614  #define QS_CRIT_ENTRY_() QS_CRIT_ENTRY(critStat_)
615  #define QS_CRIT_EXIT_() QS_CRIT_EXIT(critStat_); QS_REC_DONE()
616 #endif /* QS_CRIT_STAT_TYPE */
617 
618 #else /* separate QS critical section not defined--use the QF definition */
619 
629 #define QS_BEGIN(rec_, obj_) \
630  if ((((uint_fast8_t)QS_priv_.glbFilter[(uint8_t)(rec_) >> 3] \
631  & (uint_fast8_t)(1U << ((uint8_t)(rec_) & 7U))) != 0U) \
632  && ((QS_priv_.locFilter[AP_OBJ] == (void *)0) \
633  || (QS_priv_.locFilter[AP_OBJ] == (obj_)))) \
634  { \
635  QS_CRIT_STAT_ \
636  QS_CRIT_ENTRY_(); \
637  QS_beginRec_((uint_fast8_t)(rec_)); \
638  QS_TIME_PRE_(); {
639 
644 #define QS_END() } \
645  QS_endRec_(); \
646  QS_CRIT_EXIT_(); \
647  }
648 
655 enum {
672 };
673 
675 #define QS_I8(width_, data_) \
676  (QS_u8_fmt_((uint8_t)(((width_) << 4)) | (uint8_t)QS_I8_T, (data_)))
677 
679 #define QS_U8(width_, data_) \
680  (QS_u8_fmt_((uint8_t)(((width_) << 4)) | (uint8_t)QS_U8_T, (data_)))
681 
683 #define QS_I16(width_, data_) \
684  (QS_u16_fmt_((uint8_t)(((width_) << 4)) | (uint8_t)QS_I16_T, (data_)))
685 
687 #define QS_U16(width_, data_) \
688  (QS_u16_fmt_((uint8_t)(((width_) << 4)) | (uint8_t)QS_U16_T, (data_)))
689 
691 #define QS_I32(width_, data_) \
692  (QS_u32_fmt_((uint8_t)(((width_) << 4)) | (uint8_t)QS_I32_T, (data_)))
693 
695 #define QS_U32(width_, data_) \
696  (QS_u32_fmt_((uint8_t)(((width_) << 4)) | (uint8_t)QS_U32_T, (data_)))
697 
699 #define QS_F32(width_, data_) \
700  (QS_f32_fmt_((uint8_t)(((width_) << 4)) | (uint8_t)QS_F32_T, (data_)))
701 
703 #define QS_F64(width_, data_) \
704  (QS_f64_fmt_((uint8_t)(((width_) << 4)) | (uint8_t)QS_F64_T, (data_)))
705 
707 #define QS_I64(width_, data_) \
708  (QS_u64_fmt_((uint8_t)(((width_) << 4)) | (uint8_t)QS_I64_T, (data_)))
709 
711 #define QS_U64(width_, data_) \
712  (QS_u64_fmt_((uint8_t)(((width_) << 4)) | (uint8_t)QS_U64_T, (data_)))
713 
715 #define QS_U32_HEX(width_, data_) \
716  (QS_u32_fmt_((uint8_t)(((width_) << 4)) | (uint8_t)QS_U32_HEX_T, (data_)))
717 
719 #define QS_STR(str_) (QS_str_fmt_((str_)))
720 
722 #define QS_MEM(mem_, size_) (QS_mem_fmt_((mem_), (size_)))
723 
724 
725 #if (QS_OBJ_PTR_SIZE == 1U)
726  #define QS_OBJ(obj_) (QS_u8_fmt_(QS_OBJ_T, (uint8_t)(obj_)))
727 #elif (QS_OBJ_PTR_SIZE == 2U)
728  #define QS_OBJ(obj_) (QS_u16_fmt_(QS_OBJ_T, (uint16_t)(obj_)))
729 #elif (QS_OBJ_PTR_SIZE == 4U)
730  #define QS_OBJ(obj_) (QS_u32_fmt_(QS_OBJ_T, (uint32_t)(obj_)))
731 #elif (QS_OBJ_PTR_SIZE == 8U)
732  #define QS_OBJ(obj_) (QS_u64(QS_OBJ_T, (uint64_t)(obj_)))
733 #else
734 
735  #define QS_OBJ(obj_) (QS_u32_fmt_(QS_OBJ_T, (uint32_t)(obj_)))
736 #endif
737 
738 
739 #if (QS_FUN_PTR_SIZE == 1U)
740  #define QS_FUN(fun_) (QS_u8_fmt_(QS_FUN_T, (uint8_t)(fun_)))
741 #elif (QS_FUN_PTR_SIZE == 2U)
742  #define QS_FUN(fun_) (QS_u16_fmt_(QS_FUN_T, (uint16_t)(fun_)))
743 #elif (QS_FUN_PTR_SIZE == 4U)
744  #define QS_FUN(fun_) (QS_u32_fmt_(QS_FUN_T, (uint32_t)(fun_)))
745 #elif (QS_FUN_PTR_SIZE == 8U)
746  #define QS_FUN(fun_) (QS_u64_fmt_(QS_FUN_T, (uint64_t)(fun_)))
747 #else
748 
749  #define QS_FUN(fun_) (QS_u32_fmt_(QS_FUN_T, (uint32_t)(fun_)))
750 #endif
751 
752 #if (Q_SIGNAL_SIZE == 1)
753 
754  #define QS_SIG(sig_, obj_) \
755  QS_u8_fmt_(QS_SIG_T, (sig_)); \
756  QS_obj_raw_(obj_)
757 
758 #elif (Q_SIGNAL_SIZE == 2)
759 
760  #define QS_SIG(sig_, obj_) \
761  QS_u16_fmt_(QS_SIG_T, (sig_)); \
762  QS_obj_raw_(obj_)
763 
764 #elif (Q_SIGNAL_SIZE == 4)
765 
766  #define QS_SIG(sig_, obj_) \
767  QS_u32_fmt_(QS_SIG_T, (sig_)); \
768  QS_obj_raw_(obj_)
769 
770 #else
771 
774  #define QS_SIG(sig_, obj_) \
775  QS_u16_fmt_(QS_SIG_T, (sig_)); \
776  QS_obj_raw_(obj_)
777 
778 #endif
779 
780 
781 /****************************************************************************/
782 /* Facilities for QS ciritical section */
783 
784 #ifndef QF_CRIT_STAT_TYPE
785 
796  #define QS_CRIT_STAT_
797 
808  #define QS_CRIT_ENTRY_() QF_CRIT_ENTRY(dummy)
809 
820  #define QS_CRIT_EXIT_() QF_CRIT_EXIT(dummy); QS_REC_DONE()
821 
822 #else /* simple unconditional interrupt disabling used */
823  #define QS_CRIT_STAT_ QF_CRIT_STAT_TYPE critStat_;
824  #define QS_CRIT_ENTRY_() QF_CRIT_ENTRY(critStat_)
825  #define QS_CRIT_EXIT_() QF_CRIT_EXIT(critStat_); QS_REC_DONE()
826 #endif /* simple unconditional interrupt disabling used */
827 
828 #endif /* separate QS critical section not defined */
829 
830 
831 /****************************************************************************/
832 /* Dictionary trace records */
833 
875 #define QS_SIG_DICTIONARY(sig_, obj_) \
876  (QS_sig_dict_pre_((sig_), (obj_), #sig_))
877 
892 #define QS_OBJ_DICTIONARY(obj_) \
893  (QS_obj_dict_pre_((obj_), #obj_))
894 
908 #define QS_FUN_DICTIONARY(fun_) \
909  (QS_fun_dict_pre_((void (*)(void))(fun_), #fun_))
910 
917 #define QS_USR_DICTIONARY(rec_) \
918  (QS_usr_dict_pre_((rec_), #rec_))
919 
921 void QS_sig_dict_pre_(enum_t const sig, void const * const obj,
922  char_t const *name);
923 
925 void QS_obj_dict_pre_(void const * const obj,
926  char_t const *name);
927 
929 void QS_fun_dict_pre_(void (* const fun)(void),
930  char_t const *name);
931 
933 void QS_usr_dict_pre_(enum_t const rec,
934  char_t const * const name);
935 
936 
937 /****************************************************************************/
938 /* Miscellaneous pre-formatted trace records used in applications */
939 
945 void QS_ASSERTION(char_t const * const module,
946  int_t const loc,
947  uint32_t delay);
948 
950 void QF_QS_CRIT_ENTRY(void);
951 
953 void QF_QS_CRIT_EXIT(void);
954 
956 void QF_QS_ISR_ENTRY(uint8_t const isrnest, uint8_t const prio);
957 
959 void QF_QS_ISR_EXIT(uint8_t const isrnest, uint8_t const prio);
960 
962 #define QF_QS_ACTION(act_) (act_)
963 
964 
965 /****************************************************************************/
966 /* QS private data (the TX channel) */
978 };
979 
982 };
983 
985 typedef struct {
986  uint8_t glbFilter[16];
987  void const *locFilter[MAX_OBJ];
997 } QSPrivAttr;
998 
999 extern QSPrivAttr QS_priv_;
1000 
1001 
1002 /****************************************************************************/
1003 /* QS receive channel */
1004 
1024 };
1025 
1027 void QS_rxInitBuf(uint8_t sto[], uint16_t stoSize);
1028 
1030 void QS_rxParse(void);
1031 
1033 void QS_RX_PUT(uint8_t const b);
1034 
1036 uint16_t QS_rxGetNfree(void);
1037 
1039 void QS_onReset(void);
1040 
1042 void QS_onCommand(uint8_t cmdId, uint32_t param1,
1043  uint32_t param2, uint32_t param3);
1044 
1048 #define QS_OUTPUT() (QS_output())
1049 
1053 #define QS_RX_INPUT() (QS_rx_input())
1054 
1055 /****************************************************************************/
1056 /* Facilities for use in QUTest only */
1057 #ifdef Q_UTEST
1058 
1059  void QS_onTestSetup(void);
1060 
1062  void QS_onTestTeardown(void);
1063 
1065  void QS_onTestLoop(void);
1066 
1068  void QS_onTestEvt(QEvt *e);
1069 
1071  void QS_onTestPost(void const *sender, QActive *recipient,
1072  QEvt const *e, bool status);
1073 
1075  void QS_processTestEvts_(void);
1076 
1078  void QS_tickX_(uint_fast8_t const tickRate, void const * const sender);
1079 
1081  uint32_t QS_getTestProbe_(void (* const api)(void));
1082 
1084  #define QS_TEST_PROBE_DEF(fun_) \
1085  uint32_t const qs_tp_ = QS_getTestProbe_((void (*)(void))(fun_));
1086 
1088  #define QS_TEST_PROBE(code_) \
1089  if (qs_tp_ != 0U) { code_ }
1090 
1092  #define QS_TEST_PROBE_ID(id_, code_) \
1093  if (qs_tp_ == (uint32_t)(id_)) { code_ }
1094 
1096  #define QS_TEST_PAUSE() do { \
1097  QS_beginRec_((uint_fast8_t)QS_TEST_PAUSED); \
1098  QS_endRec_(); \
1099  QS_onTestLoop(); \
1100  } while (false)
1101 
1104  };
1105 
1106  /************************************************************************/
1113  typedef struct {
1114  QActive super; /*< inherit QActive */
1115  } QActiveDummy;
1116 
1118  void QActiveDummy_ctor(QActiveDummy * const me);
1119 
1120 #else /* Q_UTEST not defined */
1121 
1122  /* dummy definitions when not building for QUTEST */
1123  #define QS_TEST_PROBE_DEF(fun_)
1124  #define QS_TEST_PROBE(code_)
1125  #define QS_TEST_PROBE_ID(id_, code_)
1126  #define QS_TEST_PAUSE() ((void)0)
1127 
1128 #endif /* Q_UTEST */
1129 
1130 #endif /* QS_H */
1131 
QSPrivAttr::tail
QSCtr tail
offset of where next byte will be extracted
Definition: qs.h:991
QS_RESERVED_95
@ QS_RESERVED_95
Definition: qs.h:188
QS_u8_raw_
void QS_u8_raw_(uint8_t d)
output raw uint8_t data element (without format information)
Definition: qs.c:519
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:110
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:145
QS_onStartup
uint8_t QS_onStartup(void const *arg)
Callback to startup the QS facility.
QS_USER1
@ QS_USER1
offset for User Group 1
Definition: qs.h:219
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:850
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:312
SM_OBJ
@ SM_OBJ
state machine object
Definition: qs.h:971
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:1009
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:470
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:777
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:212
QS_getBlock
const uint8_t * QS_getBlock(uint16_t *pNbytes)
Block-oriented interface to the QS data buffer.
Definition: qs.c:691
QS_onGetTime
QSTimeCtr QS_onGetTime(void)
Callback to obtain a timestamp for a QS record.
Definition: qs_rx.c:1268
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:1023
QS_QF_EQUEUE_POST_FIFO
@ QS_QF_EQUEUE_POST_FIFO
an event was posted (FIFO) to a raw queue
Definition: qs.h:89
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:306
QS_TE_RECORDS
@ QS_TE_RECORDS
Time Events QS records.
Definition: qs.h:205
QSTimeCtr
uint8_t QSTimeCtr
Definition: qs.h:240
QS_I16_T
@ QS_I16_T
signed 16-bit integer format
Definition: qs.h:658
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_ASSERT_FAIL
@ QS_ASSERT_FAIL
assertion failed in the code
Definition: qs.h:160
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:123
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:1241
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:325
QS_USER2
@ QS_USER2
offset for User Group 2
Definition: qs.h:220
QS_RESERVED_80
@ QS_RESERVED_80
Definition: qs.h:173
QS_QF_DELETE_REF
@ QS_QF_DELETE_REF
an event reference is about to be deleted
Definition: qs.h:117
AP_OBJ
@ AP_OBJ
generic Application-specific object
Definition: qs.h:976
QS_RESERVED_87
@ QS_RESERVED_87
Definition: qs.h:180
QS_QF_TICK
@ QS_QF_TICK
QF_tickX() was called.
Definition: qs.h:106
QS_onTestLoop
void QS_onTestLoop(void)
callback to run the test loop
OSpyObjCombnation
OSpyObjCombnation
Definition: qs.h:980
QS_initBuf
void QS_initBuf(uint8_t sto[], uint_fast16_t stoSize)
Initialize the QS data buffer.
Definition: qs.c:75
QActiveDummy_ctor
void QActiveDummy_ctor(QActiveDummy *const me)
Constructor of the QActiveDummy Active Object class.
Definition: qutest.c:119
QActiveDummy::super
QActive super
Definition: qs.h:1114
QS_QF_MPOOL_GET
@ QS_QF_MPOOL_GET
a memory block was removed from memory pool
Definition: qs.h:97
QS_QF_TIMEEVT_DISARM
@ QS_QF_TIMEEVT_DISARM
true disarming of an armed time event
Definition: qs.h:112
MP_OBJ
@ MP_OBJ
event pool object
Definition: qs.h:973
QS_RESERVED_82
@ QS_RESERVED_82
Definition: qs.h:175
QS_RESERVED_73
@ QS_RESERVED_73
Definition: qs.h:166
QS_RX_TEST_TEARDOWN
@ QS_RX_TEST_TEARDOWN
test teardown
Definition: qs.h:1015
QSPrivAttr::seq
uint8_t seq
the record sequence number
Definition: qs.h:993
QF_QS_CRIT_EXIT
void QF_QS_CRIT_EXIT(void)
Output the critical section exit.
Definition: qs.c:878
QS_RESERVED_71
@ QS_RESERVED_71
Definition: qs.h:164
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:210
QS_RESERVED_84
@ QS_RESERVED_84
Definition: qs.h:177
QS_RX_CURR_OBJ
@ QS_RX_CURR_OBJ
set the "current-object" in the Target
Definition: qs.h:1020
QEvt
Event structure.
Definition: qep.h:151
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_filterOn_
void QS_filterOn_(uint_fast8_t rec)
Turn the global Filter on for a given record type rec.
Definition: qs.c:121
QS_EMPTY
@ QS_EMPTY
QS record for cleanly starting a session.
Definition: qs.h:64
QS_RESERVED_97
@ QS_RESERVED_97
Definition: qs.h:190
QS_STR_T
@ QS_STR_T
zero-terminated ASCII string format
Definition: qs.h:664
QS_SIG_T
@ QS_SIG_T
event signal format
Definition: qs.h:666
QS_QF_ACTIVE_GET
@ QS_QF_ACTIVE_GET
AO got an event and its queue is not empty.
Definition: qs.h:84
QS_QF_ACTIVE_RECALL
@ QS_QF_ACTIVE_RECALL
AO recalled an event.
Definition: qs.h:79
QS_U64_T
@ QS_U64_T
unsigned 64-bit integer format
Definition: qs.h:670
QS_QF_EQUEUE_POST_ATTEMPT
@ QS_QF_EQUEUE_POST_ATTEMPT
attempt to post an evt to QEQueue failed
Definition: qs.h:129
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:536
MAX_OBJ
@ MAX_OBJ
Definition: qs.h:977
QS_USER0
@ QS_USER0
offset for User Group 0
Definition: qs.h:218
QS_RESERVED_99
@ QS_RESERVED_99
Definition: qs.h:192
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:183
uint16_t
unsigned int uint16_t
exact-width 16-bit unsigned int
Definition: 16bit/stdint.h:30
QS_U32_HEX_T
@ QS_U32_HEX_T
unsigned 32-bit integer in hex format
Definition: qs.h:671
QS_rxGetNfree
uint16_t QS_rxGetNfree(void)
Obtain the number of free bytes in the QS RX data buffer.
Definition: qs_rx.c:309
QS_RESERVED_70
@ QS_RESERVED_70
Definition: qs.h:163
QS_QUERY_DATA
@ QS_QUERY_DATA
reports the data from "current object" query
Definition: qs.h:158
QS_AO_RECORDS
@ QS_AO_RECORDS
Active Object QS records.
Definition: qs.h:202
QS_MP_RECORDS
@ QS_MP_RECORDS
Memory Pools QS records.
Definition: qs.h:204
QSCtr
uint_fast16_t QSCtr
QS ring buffer counter and offset type.
Definition: qs.h:967
QS_UA_RECORDS
@ QS_UA_RECORDS
All User records.
Definition: qs.h:213
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:285
QS_getByte
uint16_t QS_getByte(void)
Byte-oriented interface to the QS data buffer.
Definition: qs.c:649
QS_RESERVED_86
@ QS_RESERVED_86
Definition: qs.h:179
QS_RESERVED_74
@ QS_RESERVED_74
Definition: qs.h:167
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:970
uint_fast8_t
unsigned int uint_fast8_t
fast at-least 8-bit unsigned int
Definition: 16bit/stdint.h:36
QS_QF_RESERVED2
@ QS_QF_RESERVED2
Definition: qs.h:94
QS_RESERVED_91
@ QS_RESERVED_91
Definition: qs.h:184
QS_QF_RECORDS
@ QS_QF_RECORDS
QF QS records.
Definition: qs.h:206
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:889
QS_RX_LOC_FILTER
@ QS_RX_LOC_FILTER
set local filters in the Target
Definition: qs.h:1018
QS_RX_COMMAND
@ QS_RX_COMMAND
execute a user-defined command in the Target
Definition: qs.h:1008
QS_USR_DICT
@ QS_USR_DICT
user QS record dictionary entry
Definition: qs.h:154
QS_QF_NEW_REF
@ QS_QF_NEW_REF
new event reference was created
Definition: qs.h:102
QS_RESERVED_79
@ QS_RESERVED_79
Definition: qs.h:172
QS_U32_T
@ QS_U32_T
unsigned 32-bit integer format
Definition: qs.h:661
QS_QF_GC_ATTEMPT
@ QS_QF_GC_ATTEMPT
garbage collection attempt
Definition: qs.h:104
QS_u32_raw_
void QS_u32_raw_(uint32_t d)
Output raw uint32_t data element (without format information)
Definition: qs.c:576
QS_SCHED_NEXT
@ QS_SCHED_NEXT
scheduler found next task to execute
Definition: qs.h:139
QS_QF_CRIT_ENTRY
@ QS_QF_CRIT_ENTRY
critical section was entered
Definition: qs.h:118
QS_QF_CRIT_EXIT
@ QS_QF_CRIT_EXIT
critical section was exited
Definition: qs.h:119
QS_rxInitBuf
void QS_rxInitBuf(uint8_t sto[], uint16_t stoSize)
Initialize the QS RX data buffer.
Definition: qs_rx.c:253
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:1022
QS_RESERVED_83
@ QS_RESERVED_83
Definition: qs.h:176
QSPrivAttr::chksum
uint8_t chksum
the checksum of the current record
Definition: qs.h:994
QS_RX_TICK
@ QS_RX_TICK
call QF_TICK_X() in the Target
Definition: qs.h:1010
QS_U8_T
@ QS_U8_T
unsigned 8-bit integer format
Definition: qs.h:657
QS_I32_T
@ QS_I32_T
signed 32-bit integer format
Definition: qs.h:660
QS_RESERVED_85
@ QS_RESERVED_85
Definition: qs.h:178
QS_u16_raw_
void QS_u16_raw_(uint16_t d)
Output raw uint16_t data element (without format information)
Definition: qs.c:555
QS_RESERVED_96
@ QS_RESERVED_96
Definition: qs.h:189
QS_QF_ACTIVE_RECALL_ATTEMPT
@ QS_QF_ACTIVE_RECALL_ATTEMPT
AO attempted to recall an event.
Definition: qs.h:86
QS_F64_T
@ QS_F64_T
64-bit floating point format
Definition: qs.h:663
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:745
QS_RESERVED_98
@ QS_RESERVED_98
Definition: qs.h:191
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:103
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:727
QS_ALL_RECORDS
@ QS_ALL_RECORDS
all maskable QS records
Definition: qs.h:200
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:182
QS_QF_MPOOL_PUT
@ QS_QF_MPOOL_PUT
a memory block was returned to memory pool
Definition: qs.h:98
QS_RESERVED_93
@ QS_RESERVED_93
Definition: qs.h:186
TE_OBJ
@ TE_OBJ
time event object
Definition: qs.h:975
QS_SCHED_RESUME
@ QS_SCHED_RESUME
scheduler resumed previous task (not idle)
Definition: qs.h:141
QS_filterOff_
void QS_filterOff_(uint_fast8_t rec)
Turn the global Filter off for a given record type rec.
Definition: qs.c:202
QS_QF_TIMEEVT_DISARM_ATTEMPT
@ QS_QF_TIMEEVT_DISARM_ATTEMPT
attempt to disarm a disarmed QTimeEvt
Definition: qs.h:111
QS_F32_T
@ QS_F32_T
32-bit floating point format
Definition: qs.h:662
QS_u32_fmt_
void QS_u32_fmt_(uint8_t format, uint32_t d)
Output uint32_t data element with format information.
Definition: qs.c:493
QS_RX_INFO
@ QS_RX_INFO
query Target info (ver, config, tstamp)
Definition: qs.h:1007
QSPrivAttr::critNest
uint8_t critNest
critical section nesting level
Definition: qs.h:996
QS_USER3
@ QS_USER3
offset for User Group 3
Definition: qs.h:221
AO_OBJ
@ AO_OBJ
active object
Definition: qs.h:972
QS_I64_T
@ QS_I64_T
signed 64-bit integer format
Definition: qs.h:669
QUTEST_ON_POST
@ QUTEST_ON_POST
Definition: qs.h:1103
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:981
QSpyRecordGroups
QSpyRecordGroups
QS record groups for QS_FILTER_ON() and QS_FILTER_OFF()
Definition: qs.h:199
QS_SCHED_UNLOCK
@ QS_SCHED_UNLOCK
scheduler was unlocked
Definition: qs.h:138
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:896
QS_processTestEvts_
void QS_processTestEvts_(void)
QS internal function to process posted events during test.
Definition: qutest.c:271
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:153
QS_QEP_TRAN_XP
@ QS_QEP_TRAN_XP
a tran to exit point out of a submachine
Definition: qs.h:146
QS_MUTEX_UNLOCK
@ QS_MUTEX_UNLOCK
a mutex was unlocked
Definition: qs.h:136
QActiveDummy
QActiveDummy Object class.
Definition: qs.h:1113
QS_EQ_RECORDS
@ QS_EQ_RECORDS
Event Queues QS records.
Definition: qs.h:203
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:762
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:1016
QS_SCHED_LOCK
@ QS_SCHED_LOCK
scheduler was locked
Definition: qs.h:137
QS_QF_ACTIVE_POST_FIFO
@ QS_QF_ACTIVE_POST_FIFO
an event was posted (FIFO) directly to AO
Definition: qs.h:82
QS_RESERVED_94
@ QS_RESERVED_94
Definition: qs.h:187
QS_RESERVED_92
@ QS_RESERVED_92
Definition: qs.h:185
QS_I8_T
@ QS_I8_T
signed 8-bit integer format
Definition: qs.h:656
QSPrivAttr::used
QSCtr used
number of bytes currently in the ring buffer
Definition: qs.h:992
QS_beginRec_
void QS_beginRec_(uint_fast8_t rec)
Mark the begin of a QS record rec.
Definition: qs.c:285
QS_SC_RECORDS
@ QS_SC_RECORDS
Scheduler QS records.
Definition: qs.h:207
QS_str_fmt_
void QS_str_fmt_(char_t const *str)
Output zero-terminated ASCII string element with format information.
Definition: qs.c:824
QS_QEP_TRAN_HIST
@ QS_QEP_TRAN_HIST
a tran to history was taken
Definition: qs.h:144
QS_USER
@ QS_USER
the first record available to QS users
Definition: qs.h:195
QS_U0_RECORDS
@ QS_U0_RECORDS
User Group 100-104 records.
Definition: qs.h:208
EQ_OBJ
@ EQ_OBJ
raw queue object
Definition: qs.h:974
QS_RESERVED_78
@ QS_RESERVED_78
Definition: qs.h:171
QS_RX_TEST_SETUP
@ QS_RX_TEST_SETUP
test setup
Definition: qs.h:1014
QS_MEM_T
@ QS_MEM_T
up to 255-bytes memory block format
Definition: qs.h:665
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:209
QS_RX_PEEK
@ QS_RX_PEEK
peek Target memory
Definition: qs.h:1011
QS_RESERVED_72
@ QS_RESERVED_72
Definition: qs.h:165
QS_PEEK_DATA
@ QS_PEEK_DATA
reports the data from the PEEK query
Definition: qs.h:159
QS_QF_TIMEEVT_REARM
@ QS_QF_TIMEEVT_REARM
rearming of a time event
Definition: qs.h:113
QS_QF_ACTIVE_GET_LAST
@ QS_QF_ACTIVE_GET_LAST
AO got an event and its queue is empty.
Definition: qs.h:85
QS_RESERVED_75
@ QS_RESERVED_75
Definition: qs.h:168
QS_FUN_T
@ QS_FUN_T
function pointer format
Definition: qs.h:668
QS_RX_STATUS
@ QS_RX_STATUS
reports QS data receive status
Definition: qs.h:157
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:1013
QSPrivAttr::buf
uint8_t * buf
pointer to the start of the ring buffer
Definition: qs.h:988
QS_OBJ_T
@ QS_OBJ_T
object pointer format
Definition: qs.h:667
QSPrivAttr::head
QSCtr head
offset to where next byte will be inserted
Definition: qs.h:990
QS_OBJ_DICT
@ QS_OBJ_DICT
object dictionary entry
Definition: qs.h:152
QS_priv_
QSPrivAttr QS_priv_
Definition: qs.c:48
QS_SIG_DICT
@ QS_SIG_DICT
signal dictionary entry
Definition: qs.h:151
QS_U3_RECORDS
@ QS_U3_RECORDS
User Group 115-119 records.
Definition: qs.h:211
QSPrivAttr::end
QSCtr end
offset of the end of the ring buffer
Definition: qs.h:989
QS_U16_T
@ QS_U16_T
unsigned 16-bit integer format
Definition: qs.h:659
QS_QF_ACTIVE_POST_LIFO
@ QS_QF_ACTIVE_POST_LIFO
an event was posted (LIFO) directly to AO
Definition: qs.h:83
QSpyUserRecords
QSpyUserRecords
QS user record group offsets.
Definition: qs.h:217
QS_u8_fmt_
void QS_u8_fmt_(uint8_t format, uint8_t d)
Output uint8_t data element with format information.
Definition: qs.c:449
QS_TARGET_DONE
@ QS_TARGET_DONE
reports completion of a user callback
Definition: qs.h:156
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:126
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:1021
QSPrivAttr
Private QS attributes to keep track of the filters and the trace buffer.
Definition: qs.h:985
QS_RX_POKE
@ QS_RX_POKE
poke Target memory
Definition: qs.h:1012
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:795
QUTestUserRecords
QUTestUserRecords
Definition: qs.h:1102
QS_USER4
@ QS_USER4
offset for User Group 4
Definition: qs.h:222
QS_RESERVED_77
@ QS_RESERVED_77
Definition: qs.h:170
QS_QF_ISR_ENTRY
@ QS_QF_ISR_ENTRY
an ISR was entered
Definition: qs.h:120
QS_QF_MPOOL_GET_ATTEMPT
@ QS_QF_MPOOL_GET_ATTEMPT
attempt to get a memory block failed
Definition: qs.h:132
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:1017
QS_MUTEX_LOCK
@ QS_MUTEX_LOCK
a mutex was locked
Definition: qs.h:135
QS_str_raw_
void QS_str_raw_(char_t const *str)
Output raw zero-terminated string element (without format information)
Definition: qs.c:617
QS_TEST_PAUSED
@ QS_TEST_PAUSED
test has been paused
Definition: qs.h:149
QS_RESERVED_88
@ QS_RESERVED_88
Definition: qs.h:181
QS_RESERVED_81
@ QS_RESERVED_81
Definition: qs.h:174
QS_TEST_PROBE_GET
@ QS_TEST_PROBE_GET
reports that Test-Probe has been used
Definition: qs.h:150
QF_QS_CRIT_ENTRY
void QF_QS_CRIT_ENTRY(void)
Output the critical section entry.
Definition: qs.c:870
QSpyRxRecords
QSpyRxRecords
Enumeration for the received Qs record types (RX channel).
Definition: qs.h:1006
QS_QEP_TRAN
@ QS_QEP_TRAN
a regular transition was taken
Definition: qs.h:72
QS_QF_INT_DISABLE
@ QS_QF_INT_DISABLE
interrupts were disabled
Definition: qs.h:122
QS_QF_GC
@ QS_QF_GC
garbage collection
Definition: qs.h:105
QS_SM_RECORDS
@ QS_SM_RECORDS
State Machine QS records.
Definition: qs.h:201
QS_obj_raw_
void QS_obj_raw_(void const *const obj)
Output obj pointer data element without format information.
Definition: qs.c:598
QS_RESERVED_76
@ QS_RESERVED_76
Definition: qs.h:169
QS_RX_AO_FILTER
@ QS_RX_AO_FILTER
set local AO filter in the Target
Definition: qs.h:1019
QS_QF_TIMEEVT_POST
@ QS_QF_TIMEEVT_POST
a time event posted itself directly to an AO
Definition: qs.h:114
QActive
Active Object (based on QHsm implementation)
Definition: qf.h:114
QS_QF_ISR_EXIT
@ QS_QF_ISR_EXIT
an ISR was exited
Definition: qs.h:121
QS_SCHED_IDLE
@ QS_SCHED_IDLE
scheduler became idle
Definition: qs.h:140
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:155
QS_QF_PUBLISH
@ QS_QF_PUBLISH
an event was published
Definition: qs.h:101
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:109