QTools  6.1.1
qs_copy.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 /****************************************************************************/
66  /* [0] QS session (not maskable) */
69  /* [1] QEP records */
80  /* [10] QF records */
122  /* [50] built-in scheduler records */
129  /* [55] Additional QEP records */
134  /* [58] Miscellaneous QS records (not maskable) */
148  /* [70] Application-specific (User) QS records */
150 };
151 
168 };
169 
176 };
177 
178 #ifndef QS_TIME_SIZE
179 
189  #define QS_TIME_SIZE 4
190 #endif
191 
192 #if (QS_TIME_SIZE == 1)
193  typedef uint8_t QSTimeCtr;
194  #define QS_TIME_() (QS_u8_(QS_onGetTime()))
195 #elif (QS_TIME_SIZE == 2)
196  typedef uint16_t QSTimeCtr;
197  #define QS_TIME_() (QS_u16_(QS_onGetTime()))
198 #elif (QS_TIME_SIZE == 4)
199 
202  typedef uint32_t QSTimeCtr;
203 
205  #define QS_TIME_() (QS_u32_(QS_onGetTime()))
206 #else
207  #error "QS_TIME_SIZE defined incorrectly, expected 1, 2, or 4"
208 #endif
209 
216 #define QS_PTR_AT_(base_, i_) (base_[i_])
217 
218 
219 /****************************************************************************/
220 /* QS services. */
221 
223 void QS_initBuf(uint8_t sto[], uint_fast16_t stoSize);
224 
226 void QS_filterOn(uint_fast8_t rec);
227 
229 void QS_filterOff(uint_fast8_t rec);
230 
232 void QS_beginRec(uint_fast8_t rec);
233 
235 void QS_endRec(void);
236 
237 /* unformatted data elements output ........................................*/
238 void QS_u8_(uint8_t d);
239 
241 void QS_u8u8_(uint8_t d1, uint8_t d2);
242 
244 void QS_u16_(uint16_t d);
245 
247 void QS_u32_(uint32_t d);
248 
250 void QS_str_(char_t const *s);
251 
252 /* formatted data elements output ..........................................*/
254 void QS_u8(uint8_t format, uint8_t d);
255 
257 void QS_u16(uint8_t format, uint16_t d);
258 
260 void QS_u32(uint8_t format, uint32_t d);
261 
263 void QS_f32(uint8_t format, float32_t f);
264 
266 void QS_f64(uint8_t format, float64_t d);
267 
269 void QS_str(char_t const *s);
270 
272 void QS_mem(uint8_t const *blk, uint8_t size);
273 
274 #if (QS_OBJ_PTR_SIZE == 8) || (QS_FUN_PTR_SIZE == 8)
275 
276  void QS_u64_(uint64_t d);
277 
279  void QS_u64(uint8_t format, uint64_t d);
280 #endif
281 
283 void QS_sig_dict(enum_t const sig, void const * const obj,
284  char_t const *name);
285 
287 void QS_obj_dict(void const * const obj,
288  char_t const *name);
289 
291 void QS_fun_dict(void (* const fun)(void),
292  char_t const *name);
293 
295 void QS_usr_dict(enum_t const rec,
296  char_t const * const name);
297 
298 /* QS buffer access *********************************************************/
300 uint16_t QS_getByte(void);
301 
303 #define QS_EOD ((uint16_t)0xFFFF)
304 
306 uint8_t const *QS_getBlock(uint16_t *pNbytes);
307 
308 
309 /* platform-specific callback functions, need to be implemented by clients */
310 
328 uint8_t QS_onStartup(void const *arg);
329 
338 void QS_onCleanup(void);
339 
348 void QS_onFlush(void);
349 
368 QSTimeCtr QS_onGetTime(void);
369 
370 /****************************************************************************/
371 /* Macros for adding QS instrumentation to the client code */
372 
380 #define QS_INIT(arg_) (QS_onStartup(arg_))
381 
389 #define QS_EXIT() (QS_onCleanup())
390 
400 #define QS_FILTER_ON(rec_) (QS_filterOn((uint_fast8_t)(rec_)))
401 
413 #define QS_FILTER_OFF(rec_) (QS_filterOff((uint_fast8_t)(rec_)))
414 
441 #define QS_FILTER_SM_OBJ(obj_) (QS_priv_.locFilter[SM_OBJ] = (obj_))
442 
462 #define QS_FILTER_AO_OBJ(obj_) (QS_priv_.locFilter[AO_OBJ] = (obj_))
463 
482 #define QS_FILTER_MP_OBJ(obj_) (QS_priv_.locFilter[MP_OBJ] = (obj_))
483 
502 #define QS_FILTER_EQ_OBJ(obj_) (QS_priv_.locFilter[EQ_OBJ] = (obj_))
503 
523 #define QS_FILTER_TE_OBJ(obj_) (QS_priv_.locFilter[TE_OBJ] = (obj_))
524 
540 #define QS_FILTER_AP_OBJ(obj_) (QS_priv_.locFilter[AP_OBJ] = (obj_))
541 
542 /****************************************************************************/
543 /* Macros to generate user QS records */
544 
546 #define QS_BEGIN_NOCRIT(rec_, obj_) \
547  if ((((uint_fast8_t)QS_priv_.glbFilter[(uint8_t)(rec_) >> 3] \
548  & (uint_fast8_t)(1U << ((uint8_t)(rec_) & (uint8_t)7))) \
549  != (uint_fast8_t)0) \
550  && ((QS_priv_.locFilter[AP_OBJ] == (void *)0) \
551  || (QS_priv_.locFilter[AP_OBJ] == (obj_)))) \
552  { \
553  QS_beginRec((uint_fast8_t)(rec_)); \
554  QS_TIME_(); {
555 
557 #define QS_END_NOCRIT() } \
558  QS_END_NOCRIT_()
559 
560 #ifndef QS_REC_DONE
561 
562  #define QS_REC_DONE() ((void)0)
563 #endif /* QS_REC_DONE */
564 
565 /* QS-specific critical section *********************************************/
566 #ifdef QS_CRIT_ENTRY /* separate QS critical section defined? */
567 
568 #ifndef QS_CRIT_STAT_TYPE
569  #define QS_CRIT_STAT_
570  #define QS_CRIT_ENTRY_() QS_CRIT_ENTRY(dummy)
571  #define QS_CRIT_EXIT_() QS_CRIT_EXIT(dummy); QS_REC_DONE()
572 #else
573  #define QS_CRIT_STAT_ QS_CRIT_STAT_TYPE critStat_;
574  #define QS_CRIT_ENTRY_() QS_CRIT_ENTRY(critStat_)
575  #define QS_CRIT_EXIT_() QS_CRIT_EXIT(critStat_); QS_REC_DONE()
576 #endif /* QS_CRIT_STAT_TYPE */
577 
578 #else /* separate QS critical section not defined--use the QF definition */
579 
580 #ifndef QF_CRIT_STAT_TYPE
581 
592  #define QS_CRIT_STAT_
593 
604  #define QS_CRIT_ENTRY_() QF_CRIT_ENTRY(dummy)
605 
616  #define QS_CRIT_EXIT_() QF_CRIT_EXIT(dummy); QS_REC_DONE()
617 
618 #else /* simple unconditional interrupt disabling used */
619  #define QS_CRIT_STAT_ QF_CRIT_STAT_TYPE critStat_;
620  #define QS_CRIT_ENTRY_() QF_CRIT_ENTRY(critStat_)
621  #define QS_CRIT_EXIT_() QF_CRIT_EXIT(critStat_); QS_REC_DONE()
622 #endif /* simple unconditional interrupt disabling used */
623 
624 #endif /* separate QS critical section not defined */
625 
635 #define QS_BEGIN(rec_, obj_) \
636  if ((((uint_fast8_t)QS_priv_.glbFilter[(uint8_t)(rec_) >> 3] \
637  & (uint_fast8_t)((uint_fast8_t)1 << ((uint8_t)(rec_) & (uint8_t)7))) \
638  != (uint_fast8_t)0) \
639  && ((QS_priv_.locFilter[AP_OBJ] == (void *)0) \
640  || (QS_priv_.locFilter[AP_OBJ] == (obj_)))) \
641  { \
642  QS_CRIT_STAT_ \
643  QS_CRIT_ENTRY_(); \
644  QS_beginRec((uint_fast8_t)(rec_)); \
645  QS_TIME_(); {
646 
651 #define QS_END() } \
652  QS_END_()
653 
654 /****************************************************************************/
655 
661 #define QS_BEGIN_(rec_, objFilter_, obj_) \
662  if ((((uint_fast8_t)QS_priv_.glbFilter[(uint8_t)(rec_) >> 3] \
663  & (uint_fast8_t)((uint_fast8_t)1 << ((uint8_t)(rec_) & (uint8_t)7))) \
664  != (uint_fast8_t)0) \
665  && (((objFilter_) == (void *)0) \
666  || ((objFilter_) == (obj_)))) \
667  { \
668  QS_CRIT_ENTRY_(); \
669  QS_beginRec((uint_fast8_t)(rec_));
670 
676 #define QS_END_() \
677  QS_endRec(); \
678  QS_CRIT_EXIT_(); \
679  }
680 
686 #define QS_BEGIN_NOCRIT_(rec_, objFilter_, obj_) \
687  if ((((uint_fast8_t)QS_priv_.glbFilter[(uint8_t)(rec_) >> 3] \
688  & (uint_fast8_t)((uint_fast8_t)1 << ((uint8_t)(rec_) & (uint8_t)7))) \
689  != (uint_fast8_t)0) \
690  && (((objFilter_) == (void *)0) \
691  || ((objFilter_) == (obj_)))) \
692  { \
693  QS_beginRec((uint_fast8_t)(rec_));
694 
700 #define QS_END_NOCRIT_() \
701  QS_endRec(); \
702  }
703 
705 #define QS_U8_(data_) (QS_u8_((uint8_t)(data_)))
706 
708 #define QS_2U8_(data1_, data2_) (QS_u8u8_((data1_), (data2_)))
709 
711 #define QS_U16_(data_) (QS_u16_((uint16_t)(data_)))
712 
714 #define QS_U32_(data_) (QS_u32_((uint32_t)(data_)))
715 
716 
717 #if (Q_SIGNAL_SIZE == 1)
718 
722  #define QS_SIG_(sig_) (QS_u8_(sig_))
723 #elif (Q_SIGNAL_SIZE == 2)
724  #define QS_SIG_(sig_) (QS_u16_(sig_))
725 #elif (Q_SIGNAL_SIZE == 4)
726  #define QS_SIG_(sig_) (QS_u32_(sig_))
727 #endif
728 
729 
730 #if (QS_OBJ_PTR_SIZE == 1)
731  #define QS_OBJ_(obj_) (QS_u8_((uint8_t)(obj_)))
732 #elif (QS_OBJ_PTR_SIZE == 2)
733  #define QS_OBJ_(obj_) (QS_u16_((uint16_t)(obj_)))
734 #elif (QS_OBJ_PTR_SIZE == 4)
735  #define QS_OBJ_(obj_) (QS_u32_((uint32_t)(obj_)))
736 #elif (QS_OBJ_PTR_SIZE == 8)
737  #define QS_OBJ_(obj_) (QS_u64_((uint64_t)(obj_)))
738 #else
739 
744  #define QS_OBJ_(obj_) (QS_u32_((uint32_t)(obj_))
745 #endif
746 
747 
748 #if (QS_FUN_PTR_SIZE == 1)
749  #define QS_FUN_(fun_) (QS_u8_((uint8_t)(fun_)))
750 #elif (QS_FUN_PTR_SIZE == 2)
751  #define QS_FUN_(fun_) (QS_u16_((uint16_t)(fun_)))
752 #elif (QS_FUN_PTR_SIZE == 4)
753  #define QS_FUN_(fun_) (QS_u32_((uint32_t)(fun_)))
754 #elif (QS_FUN_PTR_SIZE == 8)
755  #define QS_FUN_(fun_) (QS_u64_((uint64_t)(fun_)))
756 #else
757 
762  #define QS_FUN_(fun_) (QS_u32_((uint32_t)(fun_)))
763 #endif
764 
765 
767 #define QS_STR_(msg_) (QS_str_((msg_)))
768 
769 /* Macros for use in the client code .......................................*/
770 
777 enum {
794 };
795 
797 #define QS_I8(width_, data_) \
798  (QS_u8((uint8_t)(((width_) << 4)) | (uint8_t)QS_I8_T, (data_)))
799 
801 #define QS_U8(width_, data_) \
802  (QS_u8((uint8_t)(((width_) << 4)) | (uint8_t)QS_U8_T, (data_)))
803 
805 #define QS_I16(width_, data_) \
806  (QS_u16((uint8_t)(((width_) << 4)) | (uint8_t)QS_I16_T, (data_)))
807 
809 #define QS_U16(width_, data_) \
810  (QS_u16((uint8_t)(((width_) << 4)) | (uint8_t)QS_U16_T, (data_)))
811 
813 #define QS_I32(width_, data_) \
814  (QS_u32((uint8_t)(((width_) << 4)) | (uint8_t)QS_I32_T, (data_)))
815 
817 #define QS_U32(width_, data_) \
818  (QS_u32((uint8_t)(((width_) << 4)) | (uint8_t)QS_U32_T, (data_)))
819 
821 #define QS_F32(width_, data_) \
822  (QS_f32((uint8_t)(((width_) << 4)) | (uint8_t)QS_F32_T, (data_)))
823 
825 #define QS_F64(width_, data_) \
826  (QS_f64((uint8_t)(((width_) << 4)) | (uint8_t)QS_F64_T, (data_)))
827 
829 #define QS_I64(width_, data_) \
830  (QS_u64((uint8_t)(((width_) << 4)) | (uint8_t)QS_I64_T, (data_)))
831 
833 #define QS_U64(width_, data_) \
834  (QS_u64((uint8_t)(((width_) << 4)) | (uint8_t)QS_U64_T, (data_)))
835 
837 #define QS_U32_HEX(width_, data_) \
838  (QS_u32((uint8_t)(((width_) << 4)) | (uint8_t)QS_U32_HEX_T, (data_)))
839 
841 #define QS_STR(str_) (QS_str((str_)))
842 
844 #define QS_MEM(mem_, size_) (QS_mem((mem_), (size_)))
845 
846 
847 #if (QS_OBJ_PTR_SIZE == 1)
848  #define QS_OBJ(obj_) (QS_u8(QS_OBJ_T, (uint8_t)(obj_)))
849 #elif (QS_OBJ_PTR_SIZE == 2)
850  #define QS_OBJ(obj_) (QS_u16(QS_OBJ_T, (uint16_t)(obj_)))
851 #elif (QS_OBJ_PTR_SIZE == 4)
852  #define QS_OBJ(obj_) (QS_u32(QS_OBJ_T, (uint32_t)(obj_)))
853 #elif (QS_OBJ_PTR_SIZE == 8)
854  #define QS_OBJ(obj_) (QS_u64(QS_OBJ_T, (uint64_t)(obj_)))
855 #else
856 
857  #define QS_OBJ(obj_) (QS_u32(QS_OBJ_T, (uint32_t)(obj_)))
858 #endif
859 
860 
861 #if (QS_FUN_PTR_SIZE == 1)
862  #define QS_FUN(fun_) (QS_u8(QS_FUN_T, (uint8_t)(fun_)))
863 #elif (QS_FUN_PTR_SIZE == 2)
864  #define QS_FUN(fun_) (QS_u16(QS_FUN_T, (uint16_t)(fun_)))
865 #elif (QS_FUN_PTR_SIZE == 4)
866  #define QS_FUN(fun_) (QS_u32(QS_FUN_T, (uint32_t)(fun_)))
867 #elif (QS_FUN_PTR_SIZE == 8)
868  #define QS_FUN(fun_) (QS_u64(QS_FUN_T, (uint64_t)(fun_)))
869 #else
870 
872  #define QS_FUN(fun_) (QS_u32(QS_FUN_T, (uint32_t)(fun_)))
873 #endif
874 
875 
876 #if (Q_SIGNAL_SIZE == 1)
877 
881  #define QS_SIG(sig_, obj_) \
882  QS_u8(QS_SIG_T, (sig_)); \
883  QS_OBJ_(obj_)
884 #elif (Q_SIGNAL_SIZE == 2)
885  #define QS_SIG(sig_, obj_) \
886  QS_u16(QS_SIG_T, (sig_)); \
887  QS_OBJ_(obj_)
888 #elif (Q_SIGNAL_SIZE == 4)
889  #define QS_SIG(sig_, obj_) \
890  QS_u32(QS_SIG_T, (sig_)); \
891  QS_OBJ_(obj_)
892 #endif
893 
894 /****************************************************************************/
895 /* Dictionary records */
896 
938 #define QS_SIG_DICTIONARY(sig_, obj_) do { \
939  static char_t const sig_name_[] = #sig_; \
940  QS_sig_dict((sig_), (obj_), &sig_name_[0]); \
941 } while (0)
942 
957 #define QS_OBJ_DICTIONARY(obj_) do { \
958  static char_t const obj_name_[] = #obj_; \
959  QS_obj_dict((obj_), &obj_name_[0]); \
960 } while (0)
961 
975 #define QS_FUN_DICTIONARY(fun_) do { \
976  static char_t const fun_name_[] = #fun_; \
977  QS_fun_dict((void (*)(void))(fun_), &fun_name_[0]); \
978 } while (0)
979 
986 #define QS_USR_DICTIONARY(rec_) do { \
987  static char_t const usr_name_[] = #rec_; \
988  QS_usr_dict((rec_), &usr_name_[0]); \
989 } while (0)
990 
996 #define QS_ASSERTION(module_, loc_, delay_) do { \
997  uint32_t volatile delay_ctr_; \
998  QS_BEGIN_NOCRIT_(QS_ASSERT_FAIL, (void *)0, (void *)0) \
999  QS_TIME_(); \
1000  QS_U16_((uint16_t)(loc_)); \
1001  QS_STR_(((module_) != (char_t *)0) ? (module_) : "?"); \
1002  QS_END_NOCRIT_() \
1003  QS_onFlush(); \
1004  for (delay_ctr_ = (delay_); delay_ctr_ > (uint32_t)0; --delay_ctr_) {} \
1005 } while (0)
1006 
1015 #define QS_FLUSH() (QS_onFlush())
1016 
1018 #define QF_QS_CRIT_ENTRY() \
1019  QS_BEGIN_NOCRIT_(QS_QF_CRIT_ENTRY, (void *)0, (void *)0) \
1020  QS_TIME_(); \
1021  QS_U8_(++QS_priv_.critNest); \
1022  QS_END_NOCRIT_()
1023 
1025 #define QF_QS_CRIT_EXIT() \
1026  QS_BEGIN_NOCRIT_(QS_QF_CRIT_EXIT, (void *)0, (void *)0) \
1027  QS_TIME_(); \
1028  QS_U8_(QS_priv_.critNest--); \
1029  QS_END_NOCRIT_()
1030 
1032 #define QF_QS_ISR_ENTRY(isrnest_, prio_) \
1033  QS_BEGIN_NOCRIT_(QS_QF_ISR_ENTRY, (void *)0, (void *)0) \
1034  QS_TIME_(); \
1035  QS_2U8_(isrnest_, prio_); \
1036  QS_END_NOCRIT_()
1037 
1039 #define QF_QS_ISR_EXIT(isrnest_, prio_) \
1040  QS_BEGIN_NOCRIT_(QS_QF_ISR_EXIT, (void *)0, (void *)0) \
1041  QS_TIME_(); \
1042  QS_2U8_(isrnest_, prio_); \
1043  QS_END_NOCRIT_()
1044 
1046 #define QF_QS_ACTION(act_) (act_)
1047 
1049 #define QS_getVersion() (QP_versionStr)
1050 
1051 /****************************************************************************/
1052 /* QS private data (the transmit channel) */
1053 typedef uint_fast16_t QSCtr;
1064 };
1065 
1067 typedef struct {
1068  uint8_t glbFilter[16];
1069  void const *locFilter[MAX_OBJ];
1070  uint8_t *buf;
1075  uint8_t seq;
1076  uint8_t chksum;
1078  uint8_t critNest;
1079 } QSPriv;
1080 
1081 extern QSPriv QS_priv_;
1082 
1083 
1084 /****************************************************************************/
1085 /* QS receive channel */
1086 
1110 };
1111 
1113 void QS_rxInitBuf(uint8_t sto[], uint16_t stoSize);
1114 
1116 void QS_rxParse(void);
1117 
1119 typedef struct {
1120  void *currObj[MAX_OBJ];
1121  uint8_t *buf;
1125  bool inTestLoop;
1126 } QSrxPriv;
1127 
1128 extern QSrxPriv QS_rxPriv_;
1129 
1131 #define QS_RX_PUT(b_) do { \
1132  if (QS_rxPriv_.head != (QSCtr)0) { \
1133  if ((QS_rxPriv_.head - QS_rxPriv_.tail) != (QSCtr)1) { \
1134  QS_PTR_AT_(QS_rxPriv_.buf, QS_rxPriv_.head) = (uint8_t)(b_); \
1135  --QS_rxPriv_.head; \
1136  } \
1137  } \
1138  else { \
1139  if (QS_rxPriv_.tail != QS_rxPriv_.end) { \
1140  QS_PTR_AT_(QS_rxPriv_.buf, 0) = (uint8_t)(b_); \
1141  QS_rxPriv_.head = QS_rxPriv_.end; \
1142  } \
1143  } \
1144 } while (0)
1145 
1147 uint16_t QS_rxGetNfree(void);
1148 
1150 void QS_onReset(void);
1151 
1153 void QS_onCommand(uint8_t cmdId, uint32_t param1,
1154  uint32_t param2, uint32_t param3);
1155 
1156 #ifdef Q_UTEST
1157 
1158  void QS_onTestSetup(void);
1159 
1161  void QS_onTestTeardown(void);
1162 
1164  void QS_onTestLoop(void);
1165 
1167  void QS_onTestEvt(QEvt *e);
1168 
1170  uint32_t QS_getTestProbe_(void (* const api)(void));
1171 
1173  #define QS_TEST_PROBE_DEF(fun_) \
1174  uint32_t const qs_tp_ = QS_getTestProbe_((void (*)(void))(fun_));
1175 
1177  #define QS_TEST_PROBE(code_) \
1178  if (qs_tp_ != (uint32_t)0) { code_ }
1179 
1181  #define QS_TEST_PROBE_ID(id_, code_) \
1182  if (qs_tp_ == (uint32_t)(id_)) { code_ }
1183 
1185  #define QS_TEST_PAUSE() do { \
1186  QS_beginRec((uint_fast8_t)QS_TEST_PAUSED); \
1187  QS_endRec(); \
1188  QS_onTestLoop(); \
1189  } while (0)
1190 
1191 #else
1192  /* dummy definitions when not building for QUTEST */
1193  #define QS_TEST_PROBE_DEF(fun_)
1194  #define QS_TEST_PROBE(code_)
1195  #define QS_TEST_PROBE_ID(id_, code_)
1196  #define QS_TEST_PAUSE() ((void)0)
1197 #endif /* Q_UTEST */
1198 
1199 #endif /* qs_h */
garbage collection
Definition: qs_copy.h:101
the top-most initial transition was taken
Definition: qs_copy.h:73
a time event expired and was disarmed
Definition: qs_copy.h:104
state machine object for QEP
Definition: qs_copy.h:1057
void QS_rxInitBuf(uint8_t sto[], uint16_t stoSize)
Initialize the QS RX data buffer.
void QS_u32(uint8_t format, uint32_t d)
Output uint32_t data element with format information.
unsigned 64-bit integer format
Definition: qs_copy.h:792
function pointer format
Definition: qs_copy.h:790
uint_fast16_t QSCtr
QS ring buffer counter and offset type.
Definition: qs_copy.h:1053
set the "current-object" in the Target
Definition: qs_copy.h:1106
a mutex was locked
Definition: qs_copy.h:119
a regular transition was taken
Definition: qs_copy.h:75
User Group 80-89 records.
Definition: qs_copy.h:163
uint32_t QS_getTestProbe_(void(*const api)(void))
QS internal function to get the Test-Probe for a given API.
scheduler resumed previous task (not idle)
Definition: qs_copy.h:127
User Group 110-124 records.
Definition: qs_copy.h:166
void QS_f64(uint8_t format, float64_t d)
Output 64-bit floating point data element with format information.
a tran to history was taken
Definition: qs_copy.h:130
Private QS data to keep track of the filters and the trace buffer.
Definition: qs_copy.h:1067
uint16_t QS_getByte(void)
Byte-oriented interface to the QS data buffer.
event signal format
Definition: qs_copy.h:788
reports the Target information
Definition: qs_copy.h:141
scheduler was locked
Definition: qs_copy.h:123
QSCtr end
offset of the end of the ring buffer
Definition: qs_copy.h:1122
a tran to exit point out of a submachine
Definition: qs_copy.h:132
void QS_u16(uint8_t format, uint16_t d)
output uint16_t data element with format information
void QS_mem(uint8_t const *blk, uint8_t size)
Output memory block of up to 255-bytes with format information.
uint8_t * buf
pointer to the start of the ring buffer
Definition: qs_copy.h:1121
object pointer format
Definition: qs_copy.h:789
interrupts were enabled
Definition: qs_copy.h:115
a memory pool was initialized
Definition: qs_copy.h:94
QSpyRecordGroups
QS record groups for QS_FILTER_ON() and QS_FILTER_OFF()
Definition: qs_copy.h:153
attempt to post an evt to QEQueue failed
Definition: qs_copy.h:117
QSpyRecords
Quantum Spy record types.
Definition: qs_copy.h:65
void QS_u8(uint8_t format, uint8_t d)
Output uint8_t data element with format information.
peek Target memory
Definition: qs_copy.h:1097
continue a test after QS_TEST_PAUSE()
Definition: qs_copy.h:1107
void QS_endRec(void)
Mark the end of a QS record rec.
uint8_t critNest
critical section nesting level
Definition: qs_copy.h:1078
get the last event from the queue
Definition: qs_copy.h:93
QF QS records.
Definition: qs_copy.h:160
void QS_fun_dict(void(*const fun)(void), char_t const *name)
Output function dictionary record.
uint8_t chksum
the checksum of the current record
Definition: qs_copy.h:1076
AO got an event and its queue is empty.
Definition: qs_copy.h:88
QSCtr head
offset to where next byte will be inserted
Definition: qs_copy.h:1123
void QS_obj_dict(void const *const obj, char_t const *name)
Output object dictionary record.
reports that Test-Probe has been used
Definition: qs_copy.h:136
an initial transition was taken in a state
Definition: qs_copy.h:72
void QS_rxParse(void)
Parse all bytes present in the QS RX data buffer.
reports QS data receive status
Definition: qs_copy.h:143
scheduler was unlocked
Definition: qs_copy.h:124
fill Target memory
Definition: qs_copy.h:1099
uint16_t QS_rxGetNfree(void)
Obtain the number of free bytes in the QS RX data buffer.
uint8_t * buf
pointer to the start of the ring buffer
Definition: qs_copy.h:1070
reserved for future use
Definition: qs_copy.h:1108
set a Test-Probe in the Target
Definition: qs_copy.h:1102
event pool object
Definition: qs_copy.h:1059
32-bit floating point format
Definition: qs_copy.h:784
scheduler found next task to execute
Definition: qs_copy.h:125
zero-terminated ASCII string format
Definition: qs_copy.h:786
attempt to get a memory block failed
Definition: qs_copy.h:118
a state was entered
Definition: qs_copy.h:70
unsigned 32-bit integer format
Definition: qs_copy.h:783
void QS_sig_dict(enum_t const sig, void const *const obj, char_t const *name)
Output signal dictionary record.
scheduler became idle
Definition: qs_copy.h:126
reset the Target
Definition: qs_copy.h:1095
test has been paused
Definition: qs_copy.h:135
get an event and queue still not empty
Definition: qs_copy.h:92
QSpyRxRecords
Quantum Spy Receive (RX) record types:
Definition: qs_copy.h:1092
a time event counter was requested
Definition: qs_copy.h:109
void QS_u16_(uint16_t d)
Output uint16_t data element without format information.
Scheduler QS records.
Definition: qs_copy.h:161
an ISR was exited
Definition: qs_copy.h:113
active object
Definition: qs_copy.h:1058
test teardown
Definition: qs_copy.h:1101
QSCtr tail
offset of where next byte will be extracted
Definition: qs_copy.h:1073
void QS_str(char_t const *s)
Output zero-terminated ASCII string element with format information.
all maskable QS records
Definition: qs_copy.h:154
attempt to disarm a disarmed QTimeEvt
Definition: qs_copy.h:105
call QF_TICK_X() in the Target
Definition: qs_copy.h:1096
function dictionary entry
Definition: qs_copy.h:139
AO got an event and its queue is not empty.
Definition: qs_copy.h:87
a time event was armed
Definition: qs_copy.h:103
QSpyUserRecords
QS user record group offsets.
Definition: qs_copy.h:171
void QS_u32_(uint32_t d)
Output uint32_t data element without format information.
signed 8-bit integer format
Definition: qs_copy.h:778
QSPriv QS_priv_
void QS_u8u8_(uint8_t d1, uint8_t d2)
output two uint8_t data elements without format information
QSCtr head
offset to where next byte will be inserted
Definition: qs_copy.h:1072
user QS record dictionary entry
Definition: qs_copy.h:140
unsigned 32-bit integer in hex format
Definition: qs_copy.h:793
a memory block was returned to memory pool
Definition: qs_copy.h:96
a state was exited
Definition: qs_copy.h:71
QSCtr end
offset of the end of the ring buffer
Definition: qs_copy.h:1071
void QS_initBuf(uint8_t sto[], uint_fast16_t stoSize)
Initialize the QS data buffer.
a tran to entry point into a submachine
Definition: qs_copy.h:131
an event was posted (LIFO) to a raw queue
Definition: qs_copy.h:91
inject an event to the Target
Definition: qs_copy.h:1109
a memory block was removed from memory pool
Definition: qs_copy.h:95
an event was posted (FIFO) to a raw queue
Definition: qs_copy.h:90
void QS_u8_(uint8_t d)
an internal transition was taken
Definition: qs_copy.h:74
offset for User Group 3
Definition: qs_copy.h:175
void QS_onCleanup(void)
Callback to cleanup the QS facility.
QF_tickX() was called.
Definition: qs_copy.h:102
up to 255-bytes memory block format
Definition: qs_copy.h:787
Time Events QS records.
Definition: qs_copy.h:159
offset for User Group 2
Definition: qs_copy.h:174
unsigned 8-bit integer format
Definition: qs_copy.h:779
an ISR was entered
Definition: qs_copy.h:112
set global filters in the Target
Definition: qs_copy.h:1103
Event Queues QS records.
Definition: qs_copy.h:157
State Machine QS records.
Definition: qs_copy.h:155
set local AO filter in the Target
Definition: qs_copy.h:1105
Active Object QS records.
Definition: qs_copy.h:156
set local filters in the Target
Definition: qs_copy.h:1104
uint8_t QS_onStartup(void const *arg)
Callback to startup the QS facility.
void QS_f32(uint8_t format, float32_t f)
Output 32-bit floating point data element with format information.
signal dictionary entry
Definition: qs_copy.h:137
Private QS-RX data to keep track of the lock-free buffer.
Definition: qs_copy.h:1119
uint8_t const * QS_getBlock(uint16_t *pNbytes)
Block-oriented interface to the QS data buffer.
QSTimeCtr QS_onGetTime(void)
Callback to obtain a timestamp for a QS record.
garbage collection attempt
Definition: qs_copy.h:100
QSpyObjKind
Kinds of objects used in QS.
Definition: qs_copy.h:1056
time event object
Definition: qs_copy.h:1061
the first record available to QS users
Definition: qs_copy.h:149
an event was published
Definition: qs_copy.h:97
poke Target memory
Definition: qs_copy.h:1098
void QS_onReset(void)
callback function to reset the Target (to be implemented in the BSP)
assertion failed in the code
Definition: qs_copy.h:146
uint8_t seq
the record sequence number
Definition: qs_copy.h:1075
a time event posted itself directly to an AO
Definition: qs_copy.h:108
true disarming of an armed time event
Definition: qs_copy.h:106
offset for User Group 1
Definition: qs_copy.h:173
an event was posted (FIFO) directly to AO
Definition: qs_copy.h:85
raw queue object
Definition: qs_copy.h:1060
User Group 70-79 records.
Definition: qs_copy.h:162
test setup
Definition: qs_copy.h:1100
a mutex was unlocked
Definition: qs_copy.h:120
new event creation
Definition: qs_copy.h:99
void QS_onTestLoop(void)
callback to run the test loop
void QS_filterOff(uint_fast8_t rec)
Turn the global Filter off for a given record type rec.
User Group 100-109 records.
Definition: qs_copy.h:165
QSCtr tail
offset of where next byte will be extracted
Definition: qs_copy.h:1124
rearming of a time event
Definition: qs_copy.h:107
QSrxPriv QS_rxPriv_
signed 32-bit integer format
Definition: qs_copy.h:782
QS record for cleanly starting a session.
Definition: qs_copy.h:67
void QS_onTestEvt(QEvt *e)
callback to "massage" the test event, if neccessary
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)
object dictionary entry
Definition: qs_copy.h:138
void QS_str_(char_t const *s)
Output zero-terminated ASCII string element without format information.
void QS_onFlush(void)
Callback to flush the QS trace data to the host.
an event was ignored (silently discarded)
Definition: qs_copy.h:76
signed 64-bit integer format
Definition: qs_copy.h:791
Memory Pools QS records.
Definition: qs_copy.h:158
execute a user-defined command in the Target
Definition: qs_copy.h:1094
attempt to post an evt to AO failed
Definition: qs_copy.h:116
an AO has been added to QF (started)
Definition: qs_copy.h:81
signed 16-bit integer format
Definition: qs_copy.h:780
void QS_onTestSetup(void)
callback to setup a unit test inside the Target
void QS_beginRec(uint_fast8_t rec)
Mark the begin of a QS record rec.
an event queue was initialized
Definition: qs_copy.h:89
User Group 90-99 records.
Definition: qs_copy.h:164
reports completion of a user callback
Definition: qs_copy.h:142
an AO subscribed to an event
Definition: qs_copy.h:83
void QS_usr_dict(enum_t const rec, char_t const *const name)
Output user dictionary record.
64-bit floating point format
Definition: qs_copy.h:785
an event was posted (LIFO) directly to AO
Definition: qs_copy.h:86
query Target info (ver, config, tstamp)
Definition: qs_copy.h:1093
bool inTestLoop
QUTest event loop is running.
Definition: qs_copy.h:1125
All User records.
Definition: qs_copy.h:167
interrupts were disabled
Definition: qs_copy.h:114
critical section was exited
Definition: qs_copy.h:111
an AO has been removed from QF (stopped)
Definition: qs_copy.h:82
void QS_onTestTeardown(void)
callback to teardown after a unit test inside the Target
uint32_t QSTimeCtr
The type of the QS time stamp.
Definition: qs_copy.h:202
critical section was entered
Definition: qs_copy.h:110
generic Application-specific object
Definition: qs_copy.h:1062
an AO unsubscribed to an event
Definition: qs_copy.h:84
reports the data from the PEEK query
Definition: qs_copy.h:145
unsigned 16-bit integer format
Definition: qs_copy.h:781
QSCtr used
number of bytes currently in the ring buffer
Definition: qs_copy.h:1074
an event was dispatched (begin of RTC step)
Definition: qs_copy.h:77
offset for User Group 0
Definition: qs_copy.h:172
an event was unhandled due to a guard
Definition: qs_copy.h:78
void QS_filterOn(uint_fast8_t rec)
Turn the global Filter on for a given record type rec.