QTools  6.6.0
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] SM records */
80  /* [10] AO records */
91  /* [19] EQ records */
98 
99  /* [24] MP records */
103  /* [26] QF records */
111  /* [32] TE records */
119  /* [38] QF records */
128  /* [45] AO records */
131  /* [46] EQ records */
134  /* [47] MP records */
137  /* [48] SC records */
146  /* [55] QEP records */
151  /* [58] Miscellaneous QS records (not maskable) */
165  /* [70] Reserved QS records */
196 
197  /* [100] Application-specific (User) QS records */
199 };
200 
217 };
218 
226 };
227 
228 #ifndef QS_TIME_SIZE
229 
239  #define QS_TIME_SIZE 4
240 #endif
241 
242 #if (QS_TIME_SIZE == 1)
243  typedef uint8_t QSTimeCtr;
244  #define QS_TIME_() (QS_u8_(QS_onGetTime()))
245 #elif (QS_TIME_SIZE == 2)
246  typedef uint16_t QSTimeCtr;
247  #define QS_TIME_() (QS_u16_(QS_onGetTime()))
248 #elif (QS_TIME_SIZE == 4)
249 
252  typedef uint32_t QSTimeCtr;
253 
255  #define QS_TIME_() (QS_u32_(QS_onGetTime()))
256 #else
257  #error "QS_TIME_SIZE defined incorrectly, expected 1, 2, or 4"
258 #endif
259 
266 #define QS_PTR_AT_(base_, i_) (base_[i_])
267 
268 
269 /****************************************************************************/
270 /* QS services. */
271 
273 void QS_initBuf(uint8_t sto[], uint_fast16_t stoSize);
274 
276 void QS_filterOn(uint_fast8_t rec);
277 
279 void QS_filterOff(uint_fast8_t rec);
280 
282 void QS_beginRec(uint_fast8_t rec);
283 
285 void QS_endRec(void);
286 
287 /* unformatted data elements output ........................................*/
288 void QS_u8_(uint8_t d);
289 
291 void QS_u8u8_(uint8_t d1, uint8_t d2);
292 
294 void QS_u16_(uint16_t d);
295 
297 void QS_u32_(uint32_t d);
298 
300 void QS_str_(char_t const *s);
301 
302 /* formatted data elements output ..........................................*/
304 void QS_u8(uint8_t format, uint8_t d);
305 
307 void QS_u16(uint8_t format, uint16_t d);
308 
310 void QS_u32(uint8_t format, uint32_t d);
311 
313 void QS_f32(uint8_t format, float32_t f);
314 
316 void QS_f64(uint8_t format, float64_t d);
317 
319 void QS_str(char_t const *s);
320 
322 void QS_mem(uint8_t const *blk, uint8_t size);
323 
324 #if (QS_OBJ_PTR_SIZE == 8) || (QS_FUN_PTR_SIZE == 8)
325 
326  void QS_u64_(uint64_t d);
327 
329  void QS_u64(uint8_t format, uint64_t d);
330 #endif
331 
333 void QS_sig_dict(enum_t const sig, void const * const obj,
334  char_t const *name);
335 
337 void QS_obj_dict(void const * const obj,
338  char_t const *name);
339 
341 void QS_fun_dict(void (* const fun)(void),
342  char_t const *name);
343 
345 void QS_usr_dict(enum_t const rec,
346  char_t const * const name);
347 
348 /* QS buffer access *********************************************************/
350 uint16_t QS_getByte(void);
351 
353 #define QS_EOD ((uint16_t)0xFFFF)
354 
356 uint8_t const *QS_getBlock(uint16_t *pNbytes);
357 
358 
359 /* platform-specific callback functions, need to be implemented by clients */
360 
378 uint8_t QS_onStartup(void const *arg);
379 
388 void QS_onCleanup(void);
389 
398 void QS_onFlush(void);
399 
418 QSTimeCtr QS_onGetTime(void);
419 
420 /****************************************************************************/
421 /* Macros for adding QS instrumentation to the client code */
422 
430 #define QS_INIT(arg_) (QS_onStartup(arg_))
431 
439 #define QS_EXIT() (QS_onCleanup())
440 
450 #define QS_FILTER_ON(rec_) (QS_filterOn((uint_fast8_t)(rec_)))
451 
463 #define QS_FILTER_OFF(rec_) (QS_filterOff((uint_fast8_t)(rec_)))
464 
491 #define QS_FILTER_SM_OBJ(obj_) (QS_priv_.locFilter[SM_OBJ] = (obj_))
492 
513 #define QS_FILTER_AO_OBJ(obj_) (QS_priv_.locFilter[AO_OBJ] = (obj_))
514 
533 #define QS_FILTER_MP_OBJ(obj_) (QS_priv_.locFilter[MP_OBJ] = (obj_))
534 
553 #define QS_FILTER_EQ_OBJ(obj_) (QS_priv_.locFilter[EQ_OBJ] = (obj_))
554 
574 #define QS_FILTER_TE_OBJ(obj_) (QS_priv_.locFilter[TE_OBJ] = (obj_))
575 
591 #define QS_FILTER_AP_OBJ(obj_) (QS_priv_.locFilter[AP_OBJ] = (obj_))
592 
593 /****************************************************************************/
594 /* Macros to generate user QS records */
595 
597 #define QS_BEGIN_NOCRIT(rec_, obj_) \
598  if ((((uint_fast8_t)QS_priv_.glbFilter[(uint8_t)(rec_) >> 3] \
599  & (uint_fast8_t)(1U << ((uint8_t)(rec_) & (uint8_t)7))) \
600  != (uint_fast8_t)0) \
601  && ((QS_priv_.locFilter[AP_OBJ] == (void *)0) \
602  || (QS_priv_.locFilter[AP_OBJ] == (obj_)))) \
603  { \
604  QS_beginRec((uint_fast8_t)(rec_)); \
605  QS_TIME_(); {
606 
608 #define QS_END_NOCRIT() } \
609  QS_END_NOCRIT_()
610 
611 #ifndef QS_REC_DONE
612 
613  #define QS_REC_DONE() ((void)0)
614 #endif /* QS_REC_DONE */
615 
616 /* QS-specific critical section *********************************************/
617 #ifdef QS_CRIT_ENTRY /* separate QS critical section defined? */
618 
619 #ifndef QS_CRIT_STAT_TYPE
620  #define QS_CRIT_STAT_
621  #define QS_CRIT_ENTRY_() QS_CRIT_ENTRY(dummy)
622  #define QS_CRIT_EXIT_() QS_CRIT_EXIT(dummy); QS_REC_DONE()
623 #else
624  #define QS_CRIT_STAT_ QS_CRIT_STAT_TYPE critStat_;
625  #define QS_CRIT_ENTRY_() QS_CRIT_ENTRY(critStat_)
626  #define QS_CRIT_EXIT_() QS_CRIT_EXIT(critStat_); QS_REC_DONE()
627 #endif /* QS_CRIT_STAT_TYPE */
628 
629 #else /* separate QS critical section not defined--use the QF definition */
630 
631 #ifndef QF_CRIT_STAT_TYPE
632 
643  #define QS_CRIT_STAT_
644 
655  #define QS_CRIT_ENTRY_() QF_CRIT_ENTRY(dummy)
656 
667  #define QS_CRIT_EXIT_() QF_CRIT_EXIT(dummy); QS_REC_DONE()
668 
669 #else /* simple unconditional interrupt disabling used */
670  #define QS_CRIT_STAT_ QF_CRIT_STAT_TYPE critStat_;
671  #define QS_CRIT_ENTRY_() QF_CRIT_ENTRY(critStat_)
672  #define QS_CRIT_EXIT_() QF_CRIT_EXIT(critStat_); QS_REC_DONE()
673 #endif /* simple unconditional interrupt disabling used */
674 
675 #endif /* separate QS critical section not defined */
676 
686 #define QS_BEGIN(rec_, 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  && ((QS_priv_.locFilter[AP_OBJ] == (void *)0) \
691  || (QS_priv_.locFilter[AP_OBJ] == (obj_)))) \
692  { \
693  QS_CRIT_STAT_ \
694  QS_CRIT_ENTRY_(); \
695  QS_beginRec((uint_fast8_t)(rec_)); \
696  QS_TIME_(); {
697 
702 #define QS_END() } \
703  QS_END_()
704 
705 /****************************************************************************/
706 
712 #define QS_BEGIN_(rec_, objFilter_, obj_) \
713  if ((((uint_fast8_t)QS_priv_.glbFilter[(uint8_t)(rec_) >> 3] \
714  & (uint_fast8_t)((uint_fast8_t)1 << ((uint8_t)(rec_) & (uint8_t)7))) \
715  != (uint_fast8_t)0) \
716  && (((objFilter_) == (void *)0) \
717  || ((objFilter_) == (obj_)))) \
718  { \
719  QS_CRIT_ENTRY_(); \
720  QS_beginRec((uint_fast8_t)(rec_));
721 
727 #define QS_END_() \
728  QS_endRec(); \
729  QS_CRIT_EXIT_(); \
730  }
731 
737 #define QS_BEGIN_NOCRIT_(rec_, objFilter_, obj_) \
738  if ((((uint_fast8_t)QS_priv_.glbFilter[(uint8_t)(rec_) >> 3] \
739  & (uint_fast8_t)((uint_fast8_t)1 << ((uint8_t)(rec_) & (uint8_t)7))) \
740  != (uint_fast8_t)0) \
741  && (((objFilter_) == (void *)0) \
742  || ((objFilter_) == (obj_)))) \
743  { \
744  QS_beginRec((uint_fast8_t)(rec_));
745 
751 #define QS_END_NOCRIT_() \
752  QS_endRec(); \
753  }
754 
756 #define QS_U8_(data_) (QS_u8_((uint8_t)(data_)))
757 
759 #define QS_2U8_(data1_, data2_) (QS_u8u8_((data1_), (data2_)))
760 
762 #define QS_U16_(data_) (QS_u16_((uint16_t)(data_)))
763 
765 #define QS_U32_(data_) (QS_u32_((uint32_t)(data_)))
766 
768 #define QS_STR_(msg_) (QS_str_((msg_)))
769 
770 
771 #if (Q_SIGNAL_SIZE == 1)
772 
776  #define QS_SIG_(sig_) (QS_u8_(sig_))
777 #elif (Q_SIGNAL_SIZE == 2)
778  #define QS_SIG_(sig_) (QS_u16_(sig_))
779 #elif (Q_SIGNAL_SIZE == 4)
780  #define QS_SIG_(sig_) (QS_u32_(sig_))
781 #endif
782 
783 
784 #if (QS_OBJ_PTR_SIZE == 1)
785  #define QS_OBJ_(obj_) (QS_u8_((uint8_t)(obj_)))
786 #elif (QS_OBJ_PTR_SIZE == 2)
787  #define QS_OBJ_(obj_) (QS_u16_((uint16_t)(obj_)))
788 #elif (QS_OBJ_PTR_SIZE == 4)
789  #define QS_OBJ_(obj_) (QS_u32_((uint32_t)(obj_)))
790 #elif (QS_OBJ_PTR_SIZE == 8)
791  #define QS_OBJ_(obj_) (QS_u64_((uint64_t)(obj_)))
792 #else
793 
798  #define QS_OBJ_(obj_) (QS_u32_((uint32_t)(obj_))
799 #endif
800 
801 
802 #if (QS_FUN_PTR_SIZE == 1)
803  #define QS_FUN_(fun_) (QS_u8_((uint8_t)(fun_)))
804 #elif (QS_FUN_PTR_SIZE == 2)
805  #define QS_FUN_(fun_) (QS_u16_((uint16_t)(fun_)))
806 #elif (QS_FUN_PTR_SIZE == 4)
807  #define QS_FUN_(fun_) (QS_u32_((uint32_t)(fun_)))
808 #elif (QS_FUN_PTR_SIZE == 8)
809  #define QS_FUN_(fun_) (QS_u64_((uint64_t)(fun_)))
810 #else
811 
816  #define QS_FUN_(fun_) (QS_u32_((uint32_t)(fun_)))
817 #endif
818 
819 /****************************************************************************/
820 /* Macros for use in the client code */
821 
828 enum {
845 };
846 
848 #define QS_I8(width_, data_) \
849  (QS_u8((uint8_t)(((width_) << 4)) | (uint8_t)QS_I8_T, (data_)))
850 
852 #define QS_U8(width_, data_) \
853  (QS_u8((uint8_t)(((width_) << 4)) | (uint8_t)QS_U8_T, (data_)))
854 
856 #define QS_I16(width_, data_) \
857  (QS_u16((uint8_t)(((width_) << 4)) | (uint8_t)QS_I16_T, (data_)))
858 
860 #define QS_U16(width_, data_) \
861  (QS_u16((uint8_t)(((width_) << 4)) | (uint8_t)QS_U16_T, (data_)))
862 
864 #define QS_I32(width_, data_) \
865  (QS_u32((uint8_t)(((width_) << 4)) | (uint8_t)QS_I32_T, (data_)))
866 
868 #define QS_U32(width_, data_) \
869  (QS_u32((uint8_t)(((width_) << 4)) | (uint8_t)QS_U32_T, (data_)))
870 
872 #define QS_F32(width_, data_) \
873  (QS_f32((uint8_t)(((width_) << 4)) | (uint8_t)QS_F32_T, (data_)))
874 
876 #define QS_F64(width_, data_) \
877  (QS_f64((uint8_t)(((width_) << 4)) | (uint8_t)QS_F64_T, (data_)))
878 
880 #define QS_I64(width_, data_) \
881  (QS_u64((uint8_t)(((width_) << 4)) | (uint8_t)QS_I64_T, (data_)))
882 
884 #define QS_U64(width_, data_) \
885  (QS_u64((uint8_t)(((width_) << 4)) | (uint8_t)QS_U64_T, (data_)))
886 
888 #define QS_U32_HEX(width_, data_) \
889  (QS_u32((uint8_t)(((width_) << 4)) | (uint8_t)QS_U32_HEX_T, (data_)))
890 
892 #define QS_STR(str_) (QS_str((str_)))
893 
895 #define QS_MEM(mem_, size_) (QS_mem((mem_), (size_)))
896 
897 
898 #if (QS_OBJ_PTR_SIZE == 1)
899  #define QS_OBJ(obj_) (QS_u8(QS_OBJ_T, (uint8_t)(obj_)))
900 #elif (QS_OBJ_PTR_SIZE == 2)
901  #define QS_OBJ(obj_) (QS_u16(QS_OBJ_T, (uint16_t)(obj_)))
902 #elif (QS_OBJ_PTR_SIZE == 4)
903  #define QS_OBJ(obj_) (QS_u32(QS_OBJ_T, (uint32_t)(obj_)))
904 #elif (QS_OBJ_PTR_SIZE == 8)
905  #define QS_OBJ(obj_) (QS_u64(QS_OBJ_T, (uint64_t)(obj_)))
906 #else
907 
908  #define QS_OBJ(obj_) (QS_u32(QS_OBJ_T, (uint32_t)(obj_)))
909 #endif
910 
911 
912 #if (QS_FUN_PTR_SIZE == 1)
913  #define QS_FUN(fun_) (QS_u8(QS_FUN_T, (uint8_t)(fun_)))
914 #elif (QS_FUN_PTR_SIZE == 2)
915  #define QS_FUN(fun_) (QS_u16(QS_FUN_T, (uint16_t)(fun_)))
916 #elif (QS_FUN_PTR_SIZE == 4)
917  #define QS_FUN(fun_) (QS_u32(QS_FUN_T, (uint32_t)(fun_)))
918 #elif (QS_FUN_PTR_SIZE == 8)
919  #define QS_FUN(fun_) (QS_u64(QS_FUN_T, (uint64_t)(fun_)))
920 #else
921 
922  #define QS_FUN(fun_) (QS_u32(QS_FUN_T, (uint32_t)(fun_)))
923 #endif
924 
925 
926 #if (Q_SIGNAL_SIZE == 1)
927 
928  #define QS_SIG(sig_, obj_) \
929  QS_u8(QS_SIG_T, (sig_)); \
930  QS_OBJ_(obj_)
931 
932 #elif (Q_SIGNAL_SIZE == 2)
933 
934  #define QS_SIG(sig_, obj_) \
935  QS_u16(QS_SIG_T, (sig_)); \
936  QS_OBJ_(obj_)
937 
938 #elif (Q_SIGNAL_SIZE == 4)
939 
940  #define QS_SIG(sig_, obj_) \
941  QS_u32(QS_SIG_T, (sig_)); \
942  QS_OBJ_(obj_)
943 
944 #else
945 
948  #define QS_SIG(sig_, obj_) \
949  QS_u16(QS_SIG_T, (sig_)); \
950  QS_OBJ_(obj_)
951 
952 #endif
953 
954 /****************************************************************************/
955 /* Dictionary records */
956 
998 #define QS_SIG_DICTIONARY(sig_, obj_) do { \
999  static char_t const sig_name_[] = #sig_; \
1000  QS_sig_dict((sig_), (obj_), &sig_name_[0]); \
1001 } while (0)
1002 
1017 #define QS_OBJ_DICTIONARY(obj_) do { \
1018  static char_t const obj_name_[] = #obj_; \
1019  QS_obj_dict((obj_), &obj_name_[0]); \
1020 } while (0)
1021 
1035 #define QS_FUN_DICTIONARY(fun_) do { \
1036  static char_t const fun_name_[] = #fun_; \
1037  QS_fun_dict((void (*)(void))(fun_), &fun_name_[0]); \
1038 } while (0)
1039 
1046 #define QS_USR_DICTIONARY(rec_) do { \
1047  static char_t const usr_name_[] = #rec_; \
1048  QS_usr_dict((rec_), &usr_name_[0]); \
1049 } while (0)
1050 
1056 #define QS_ASSERTION(module_, loc_, delay_) do { \
1057  uint32_t volatile delay_ctr_; \
1058  QS_BEGIN_NOCRIT_(QS_ASSERT_FAIL, (void *)0, (void *)0) \
1059  QS_TIME_(); \
1060  QS_U16_((uint16_t)(loc_)); \
1061  QS_STR_(((module_) != (char_t *)0) ? (module_) : "?"); \
1062  QS_END_NOCRIT_() \
1063  QS_onFlush(); \
1064  for (delay_ctr_ = (delay_); delay_ctr_ > (uint32_t)0; --delay_ctr_) {} \
1065  QS_onCleanup(); \
1066 } while (0)
1067 
1076 #define QS_FLUSH() (QS_onFlush())
1077 
1079 #define QF_QS_CRIT_ENTRY() \
1080  QS_BEGIN_NOCRIT_(QS_QF_CRIT_ENTRY, (void *)0, (void *)0) \
1081  QS_TIME_(); \
1082  QS_U8_(++QS_priv_.critNest); \
1083  QS_END_NOCRIT_()
1084 
1086 #define QF_QS_CRIT_EXIT() \
1087  QS_BEGIN_NOCRIT_(QS_QF_CRIT_EXIT, (void *)0, (void *)0) \
1088  QS_TIME_(); \
1089  QS_U8_(QS_priv_.critNest--); \
1090  QS_END_NOCRIT_()
1091 
1093 #define QF_QS_ISR_ENTRY(isrnest_, prio_) \
1094  QS_BEGIN_NOCRIT_(QS_QF_ISR_ENTRY, (void *)0, (void *)0) \
1095  QS_TIME_(); \
1096  QS_2U8_(isrnest_, prio_); \
1097  QS_END_NOCRIT_()
1098 
1100 #define QF_QS_ISR_EXIT(isrnest_, prio_) \
1101  QS_BEGIN_NOCRIT_(QS_QF_ISR_EXIT, (void *)0, (void *)0) \
1102  QS_TIME_(); \
1103  QS_2U8_(isrnest_, prio_); \
1104  QS_END_NOCRIT_()
1105 
1107 #define QF_QS_ACTION(act_) (act_)
1108 
1110 #define QS_getVersion() (QP_versionStr)
1111 
1112 
1113 /****************************************************************************/
1114 /* QS private data (the transmit channel) */
1115 typedef uint_fast16_t QSCtr;
1126 };
1127 
1130 };
1131 
1133 typedef struct {
1134  uint8_t glbFilter[16];
1135  void const *locFilter[MAX_OBJ];
1136  uint8_t *buf;
1141  uint8_t seq;
1142  uint8_t chksum;
1144  uint8_t critNest;
1145 } QSPriv;
1146 
1147 extern QSPriv QS_priv_;
1148 
1149 
1150 /****************************************************************************/
1151 /* QS receive channel */
1152 
1176 };
1177 
1179 void QS_rxInitBuf(uint8_t sto[], uint16_t stoSize);
1180 
1182 void QS_rxParse(void);
1183 
1187 typedef struct {
1188  void *currObj[MAX_OBJ];
1189  uint8_t *buf;
1193 #ifdef Q_UTEST
1194  QPSet readySet;
1195  bool inTestLoop;
1196 #endif
1197 } QSrxPriv;
1198 
1199 extern QSrxPriv QS_rxPriv_;
1200 
1202 #define QS_RX_PUT(b_) do { \
1203  if (QS_rxPriv_.head != (QSCtr)0) { \
1204  if ((QS_rxPriv_.head - QS_rxPriv_.tail) != (QSCtr)1) { \
1205  QS_PTR_AT_(QS_rxPriv_.buf, QS_rxPriv_.head) = (uint8_t)(b_); \
1206  --QS_rxPriv_.head; \
1207  } \
1208  } \
1209  else { \
1210  if (QS_rxPriv_.tail != QS_rxPriv_.end) { \
1211  QS_PTR_AT_(QS_rxPriv_.buf, 0) = (uint8_t)(b_); \
1212  QS_rxPriv_.head = QS_rxPriv_.end; \
1213  } \
1214  } \
1215 } while (0)
1216 
1218 uint16_t QS_rxGetNfree(void);
1219 
1221 void QS_onReset(void);
1222 
1224 void QS_onCommand(uint8_t cmdId, uint32_t param1,
1225  uint32_t param2, uint32_t param3);
1226 
1230 #define QS_OUTPUT() (QS_output())
1231 
1235 #define QS_RX_INPUT() (QS_rx_input())
1236 
1237 /****************************************************************************/
1238 /* Facilities for use in QUTest only */
1239 #ifdef Q_UTEST
1240 
1241  void QS_onTestSetup(void);
1242 
1244  void QS_onTestTeardown(void);
1245 
1247  void QS_onTestLoop(void);
1248 
1250  void QS_onTestEvt(QEvt *e);
1251 
1253  void QS_onTestPost(void const *sender, QActive *recipient,
1254  QEvt const *e, bool status);
1255 
1257  void QS_processTestEvts_(void);
1258 
1260  void QS_tickX_(uint_fast8_t const tickRate, void const * const sender);
1261 
1263  uint32_t QS_getTestProbe_(void (* const api)(void));
1264 
1266  #define QS_TEST_PROBE_DEF(fun_) \
1267  uint32_t const qs_tp_ = QS_getTestProbe_((void (*)(void))(fun_));
1268 
1270  #define QS_TEST_PROBE(code_) \
1271  if (qs_tp_ != (uint32_t)0) { code_ }
1272 
1274  #define QS_TEST_PROBE_ID(id_, code_) \
1275  if (qs_tp_ == (uint32_t)(id_)) { code_ }
1276 
1278  #define QS_TEST_PAUSE() do { \
1279  QS_beginRec((uint_fast8_t)QS_TEST_PAUSED); \
1280  QS_endRec(); \
1281  QS_onTestLoop(); \
1282  } while (0)
1283 
1286  };
1287 
1288  /************************************************************************/
1295  typedef struct {
1296  QActive super; /* inherit QActive */
1297  } QActiveDummy;
1298 
1300  void QActiveDummy_ctor(QActiveDummy * const me);
1301 
1302 #else /* Q_UTEST not defined */
1303 
1304  /* dummy definitions when not building for QUTEST */
1305  #define QS_TEST_PROBE_DEF(fun_)
1306  #define QS_TEST_PROBE(code_)
1307  #define QS_TEST_PROBE_ID(id_, code_)
1308  #define QS_TEST_PAUSE() ((void)0)
1309 
1310 #endif /* Q_UTEST */
1311 
1312 #endif /* QS_H */
1313 
QS_TE_RECORDS
Time Events QS records.
Definition: qs_copy.h:208
QS_u16
void QS_u16(uint8_t format, uint16_t d)
output uint16_t data element with format information
AP_OBJ
generic Application-specific object
Definition: qs_copy.h:1124
QS_QF_GC
garbage collection
Definition: qs_copy.h:108
QS_SCHED_RESUME
scheduler resumed previous task (not idle)
Definition: qs_copy.h:144
QSCtr
uint_fast16_t QSCtr
QS ring buffer counter and offset type.
Definition: qs_copy.h:1115
QS_QF_ISR_EXIT
an ISR was exited
Definition: qs_copy.h:124
QS_RX_TICK
call QF_TICK_X() in the Target
Definition: qs_copy.h:1162
QS_EQ_RECORDS
Event Queues QS records.
Definition: qs_copy.h:206
QS_RESERVED_96
Definition: qs_copy.h:192
QS_QEP_DISPATCH
an event was dispatched (begin of RTC step)
Definition: qs_copy.h:77
QS_onTestSetup
void QS_onTestSetup(void)
callback to setup a unit test inside the Target
QS_getByte
uint16_t QS_getByte(void)
Byte-oriented interface to the QS data buffer.
QS_RESERVED_77
Definition: qs_copy.h:173
QS_RESERVED_79
Definition: qs_copy.h:175
QS_priv_
QSPriv QS_priv_
QS_RESERVED_98
Definition: qs_copy.h:194
QS_SM_RECORDS
State Machine QS records.
Definition: qs_copy.h:204
OSpyObjCombnation
OSpyObjCombnation
Definition: qs_copy.h:1128
QS_RESERVED_72
Definition: qs_copy.h:168
QS_TEST_PAUSED
test has been paused
Definition: qs_copy.h:152
QS_QF_ACTIVE_UNSUBSCRIBE
an AO unsubscribed to an event
Definition: qs_copy.h:84
QS_u16_
void QS_u16_(uint16_t d)
Output uint16_t data element without format information.
TE_OBJ
time event object
Definition: qs_copy.h:1123
QS_u32
void QS_u32(uint8_t format, uint32_t d)
Output uint32_t data element with format information.
QS_SCHED_UNLOCK
scheduler was unlocked
Definition: qs_copy.h:141
QS_RX_FILL
fill Target memory
Definition: qs_copy.h:1165
QS_RESERVED_92
Definition: qs_copy.h:188
QS_onTestEvt
void QS_onTestEvt(QEvt *e)
callback to "massage" the test event before dispatching/posting it
QS_ASSERT_FAIL
assertion failed in the code
Definition: qs_copy.h:163
QSPriv::tail
QSCtr tail
offset of where next byte will be extracted
Definition: qs_copy.h:1139
QS_usr_dict
void QS_usr_dict(enum_t const rec, char_t const *const name)
Output user dictionary record.
QSPriv::end
QSCtr end
offset of the end of the ring buffer
Definition: qs_copy.h:1137
QS_rxPriv_
QSrxPriv QS_rxPriv_
QS_RESERVED_97
Definition: qs_copy.h:193
QS_QF_PUBLISH
an event was published
Definition: qs_copy.h:104
QS_QEP_TRAN_EP
a tran to entry point into a submachine
Definition: qs_copy.h:148
QS_QF_ACTIVE_RECALL_ATTEMPT
AO attempted to recall an event.
Definition: qs_copy.h:89
QS_F32_T
32-bit floating point format
Definition: qs_copy.h:835
QS_U32_HEX_T
unsigned 32-bit integer in hex format
Definition: qs_copy.h:844
QS_u8_
void QS_u8_(uint8_t d)
QS_u8
void QS_u8(uint8_t format, uint8_t d)
Output uint8_t data element with format information.
QS_QF_GC_ATTEMPT
garbage collection attempt
Definition: qs_copy.h:107
QS_RESERVED_94
Definition: qs_copy.h:190
MP_OBJ
event pool object
Definition: qs_copy.h:1121
QSpyRecordGroups
QSpyRecordGroups
QS record groups for QS_FILTER_ON() and QS_FILTER_OFF()
Definition: qs_copy.h:202
QS_STR_T
zero-terminated ASCII string format
Definition: qs_copy.h:837
QS_RESERVED_88
Definition: qs_copy.h:184
QS_onReset
void QS_onReset(void)
callback function to reset the Target (to be implemented in the BSP)
QS_QEP_INTERN_TRAN
an internal transition was taken
Definition: qs_copy.h:74
QS_obj_dict
void QS_obj_dict(void const *const obj, char_t const *name)
Output object dictionary record.
QS_OBJ_T
object pointer format
Definition: qs_copy.h:840
QS_RESERVED_84
Definition: qs_copy.h:180
QS_U32_T
unsigned 32-bit integer format
Definition: qs_copy.h:834
QS_FUN_T
function pointer format
Definition: qs_copy.h:841
QSpyObjKind
QSpyObjKind
Kinds of objects used in QS.
Definition: qs_copy.h:1118
QS_QF_CRIT_ENTRY
critical section was entered
Definition: qs_copy.h:121
QS_f64
void QS_f64(uint8_t format, float64_t d)
Output 64-bit floating point data element with format information.
QS_USER0
offset for User Group 0
Definition: qs_copy.h:221
QS_RESERVED_81
Definition: qs_copy.h:177
QS_USER
the first record available to QS users
Definition: qs_copy.h:198
QSPriv::buf
uint8_t * buf
pointer to the start of the ring buffer
Definition: qs_copy.h:1136
QS_RX_TEST_CONTINUE
continue a test after QS_TEST_PAUSE()
Definition: qs_copy.h:1173
QS_SIG_DICT
signal dictionary entry
Definition: qs_copy.h:154
QS_rxGetNfree
uint16_t QS_rxGetNfree(void)
Obtain the number of free bytes in the QS RX data buffer.
QS_SC_RECORDS
Scheduler QS records.
Definition: qs_copy.h:210
QS_U4_RECORDS
User Group 120-124 records.
Definition: qs_copy.h:215
QS_I32_T
signed 32-bit integer format
Definition: qs_copy.h:833
QS_sig_dict
void QS_sig_dict(enum_t const sig, void const *const obj, char_t const *name)
Output signal dictionary record.
QS_endRec
void QS_endRec(void)
Mark the end of a QS record rec.
QS_OBJ_DICT
object dictionary entry
Definition: qs_copy.h:155
SM_AO_OBJ
combination of SM and AO
Definition: qs_copy.h:1129
QS_QEP_TRAN_HIST
a tran to history was taken
Definition: qs_copy.h:147
QS_RESERVED_80
Definition: qs_copy.h:176
QS_USER1
offset for User Group 1
Definition: qs_copy.h:222
QSrxPriv::readySet
QPSet readySet
QUTEST ready-set of active objects.
Definition: qs_copy.h:1194
QSPriv::used
QSCtr used
number of bytes currently in the ring buffer
Definition: qs_copy.h:1140
QS_TARGET_DONE
reports completion of a user callback
Definition: qs_copy.h:159
QS_QF_TIMEEVT_DISARM
true disarming of an armed time event
Definition: qs_copy.h:115
QS_USER2
offset for User Group 2
Definition: qs_copy.h:223
QS_QEP_UNHANDLED
an event was unhandled due to a guard
Definition: qs_copy.h:78
QS_AO_RECORDS
Active Object QS records.
Definition: qs_copy.h:205
SM_OBJ
state machine object
Definition: qs_copy.h:1119
QS_MP_RECORDS
Memory Pools QS records.
Definition: qs_copy.h:207
QS_RX_TEST_PROBE
set a Test-Probe in the Target
Definition: qs_copy.h:1168
QS_QF_ACTIVE_GET_LAST
AO got an event and its queue is empty.
Definition: qs_copy.h:88
QS_F64_T
64-bit floating point format
Definition: qs_copy.h:836
QS_QEP_STATE_EXIT
a state was exited
Definition: qs_copy.h:71
QSpyUserRecords
QSpyUserRecords
QS user record group offsets.
Definition: qs_copy.h:220
QS_RESERVED_75
Definition: qs_copy.h:171
QS_EMPTY
QS record for cleanly starting a session.
Definition: qs_copy.h:67
QS_onTestTeardown
void QS_onTestTeardown(void)
callback to teardown after a unit test inside the Target
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_QF_EQUEUE_GET
get an event and queue still not empty
Definition: qs_copy.h:94
QS_RESERVED_73
Definition: qs_copy.h:169
QS_QF_ACTIVE_RECALL
AO recalled an event.
Definition: qs_copy.h:82
QS_RESERVED_85
Definition: qs_copy.h:181
QS_mem
void QS_mem(uint8_t const *blk, uint8_t size)
Output memory block of up to 255-bytes with format information.
QS_QF_TIMEEVT_DISARM_ATTEMPT
attempt to disarm a disarmed QTimeEvt
Definition: qs_copy.h:114
QS_QF_MPOOL_PUT
a memory block was returned to memory pool
Definition: qs_copy.h:101
QS_PEEK_DATA
reports the data from the PEEK query
Definition: qs_copy.h:162
QS_QEP_INIT_TRAN
the top-most initial transition was taken
Definition: qs_copy.h:73
QS_QF_DELETE_REF
an event reference is about to be deleted
Definition: qs_copy.h:120
QS_RESERVED_95
Definition: qs_copy.h:191
QS_QF_RESERVED2
Definition: qs_copy.h:97
QS_RX_STATUS
reports QS data receive status
Definition: qs_copy.h:160
QS_RX_TEST_SETUP
test setup
Definition: qs_copy.h:1166
QS_beginRec
void QS_beginRec(uint_fast8_t rec)
Mark the begin of a QS record rec.
QS_QF_ACTIVE_SUBSCRIBE
an AO subscribed to an event
Definition: qs_copy.h:83
QS_TARGET_INFO
reports the Target information
Definition: qs_copy.h:158
QS_U2_RECORDS
User Group 110-114 records.
Definition: qs_copy.h:213
QS_u8u8_
void QS_u8u8_(uint8_t d1, uint8_t d2)
output two uint8_t data elements without format information
QS_MUTEX_UNLOCK
a mutex was unlocked
Definition: qs_copy.h:139
QS_QF_ACTIVE_DEFER
AO deferred an event.
Definition: qs_copy.h:81
QSPriv::seq
uint8_t seq
the record sequence number
Definition: qs_copy.h:1141
QS_RX_LOC_FILTER
set local filters in the Target
Definition: qs_copy.h:1170
QS_RESERVED_82
Definition: qs_copy.h:178
QS_QF_INT_ENABLE
interrupts were enabled
Definition: qs_copy.h:126
QS_USER3
offset for User Group 3
Definition: qs_copy.h:224
QS_QF_MPOOL_GET
a memory block was removed from memory pool
Definition: qs_copy.h:100
QS_QEP_STATE_ENTRY
a state was entered
Definition: qs_copy.h:70
QS_RESERVED_93
Definition: qs_copy.h:189
QS_QF_NEW_REF
new event reference was created
Definition: qs_copy.h:105
QS_rxInitBuf
void QS_rxInitBuf(uint8_t sto[], uint16_t stoSize)
Initialize the QS RX data buffer.
QS_QF_ACTIVE_POST_ATTEMPT
attempt to post an evt to AO failed
Definition: qs_copy.h:129
QS_fun_dict
void QS_fun_dict(void(*const fun)(void), char_t const *name)
Output function dictionary record.
QS_QEP_IGNORED
an event was ignored (silently discarded)
Definition: qs_copy.h:76
QS_filterOn
void QS_filterOn(uint_fast8_t rec)
Turn the global Filter on for a given record type rec.
QS_RESERVED_70
Definition: qs_copy.h:166
QS_ALL_RECORDS
all maskable QS records
Definition: qs_copy.h:203
QS_FUN_DICT
function dictionary entry
Definition: qs_copy.h:156
QS_RX_QUERY_CURR
query the "current object" in the Target
Definition: qs_copy.h:1174
QS_USER4
offset for User Group 4
Definition: qs_copy.h:225
QS_TEST_PROBE_GET
reports that Test-Probe has been used
Definition: qs_copy.h:153
AO_OBJ
active object
Definition: qs_copy.h:1120
QS_RESERVED_91
Definition: qs_copy.h:187
QS_QF_ACTIVE_GET
AO got an event and its queue is not empty.
Definition: qs_copy.h:87
QS_RX_TEST_TEARDOWN
test teardown
Definition: qs_copy.h:1167
QS_RESERVED_87
Definition: qs_copy.h:183
QS_str_
void QS_str_(char_t const *s)
Output zero-terminated ASCII string element without format information.
QActiveDummy
QActiveDummy Object class.
Definition: qs_copy.h:1295
QSpyRecords
QSpyRecords
Quantum Spy record types.
Definition: qs_copy.h:65
QS_QF_NEW
new event was created
Definition: qs_copy.h:106
QS_QF_TICK
QF_tickX() was called.
Definition: qs_copy.h:109
QS_QF_EQUEUE_POST_FIFO
an event was posted (FIFO) to a raw queue
Definition: qs_copy.h:92
QS_rxParse
void QS_rxParse(void)
Parse all bytes present in the QS RX data buffer.
QSTimeCtr
uint32_t QSTimeCtr
The type of the QS time stamp.
Definition: qs_copy.h:252
QUTestUserRecords
QUTestUserRecords
Definition: qs_copy.h:1284
QS_onTestLoop
void QS_onTestLoop(void)
callback to run the test loop
QS_QF_MPOOL_GET_ATTEMPT
attempt to get a memory block failed
Definition: qs_copy.h:135
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_str
void QS_str(char_t const *s)
Output zero-terminated ASCII string element with format information.
QS_SIG_T
event signal format
Definition: qs_copy.h:839
QS_RESERVED_78
Definition: qs_copy.h:174
QS_initBuf
void QS_initBuf(uint8_t sto[], uint_fast16_t stoSize)
Initialize the QS data buffer.
QS_MEM_T
up to 255-bytes memory block format
Definition: qs_copy.h:838
QS_onStartup
uint8_t QS_onStartup(void const *arg)
Callback to startup the QS facility.
QS_QF_EQUEUE_POST_LIFO
an event was posted (LIFO) to a raw queue
Definition: qs_copy.h:93
QS_QUERY_DATA
reports the data from "current object" query
Definition: qs_copy.h:161
QS_RESERVED_71
Definition: qs_copy.h:167
QS_onGetTime
QSTimeCtr QS_onGetTime(void)
Callback to obtain a timestamp for a QS record.
QS_onFlush
void QS_onFlush(void)
Callback to flush the QS trace data to the host.
QS_RESERVED_76
Definition: qs_copy.h:172
QUTEST_ON_POST
Definition: qs_copy.h:1285
QS_filterOff
void QS_filterOff(uint_fast8_t rec)
Turn the global Filter off for a given record type rec.
QS_RX_POKE
poke Target memory
Definition: qs_copy.h:1164
QS_QF_RECORDS
QF QS records.
Definition: qs_copy.h:209
QS_U8_T
unsigned 8-bit integer format
Definition: qs_copy.h:830
EQ_OBJ
raw queue object
Definition: qs_copy.h:1122
QS_RX_INFO
query Target info (ver, config, tstamp)
Definition: qs_copy.h:1159
QS_QF_TIMEEVT_POST
a time event posted itself directly to an AO
Definition: qs_copy.h:117
QS_RESERVED_90
Definition: qs_copy.h:186
QS_I16_T
signed 16-bit integer format
Definition: qs_copy.h:831
MAX_OBJ
Definition: qs_copy.h:1125
QSrxPriv::inTestLoop
bool inTestLoop
QUTEST event loop is running.
Definition: qs_copy.h:1195
QS_QEP_STATE_INIT
an initial transition was taken in a state
Definition: qs_copy.h:72
QS_RESERVED_89
Definition: qs_copy.h:185
QS_U0_RECORDS
User Group 100-104 records.
Definition: qs_copy.h:211
QS_MUTEX_LOCK
a mutex was locked
Definition: qs_copy.h:138
QS_SCHED_NEXT
scheduler found next task to execute
Definition: qs_copy.h:142
QS_tickX_
void QS_tickX_(uint_fast8_t const tickRate, void const *const sender)
internal function to process armed time events during test
QS_onCleanup
void QS_onCleanup(void)
Callback to cleanup the QS facility.
QS_getTestProbe_
uint32_t QS_getTestProbe_(void(*const api)(void))
QS internal function to get the Test-Probe for a given API.
QS_processTestEvts_
void QS_processTestEvts_(void)
QS internal function to process posted events during test.
QS_QF_TIMEEVT_AUTO_DISARM
a time event expired and was disarmed
Definition: qs_copy.h:113
QS_RX_GLB_FILTER
set global filters in the Target
Definition: qs_copy.h:1169
QS_QF_INT_DISABLE
interrupts were disabled
Definition: qs_copy.h:125
QS_RX_COMMAND
execute a user-defined command in the Target
Definition: qs_copy.h:1160
QS_SCHED_IDLE
scheduler became idle
Definition: qs_copy.h:143
QS_U3_RECORDS
User Group 115-119 records.
Definition: qs_copy.h:214
QS_QF_CRIT_EXIT
critical section was exited
Definition: qs_copy.h:122
QS_U16_T
unsigned 16-bit integer format
Definition: qs_copy.h:832
QS_RX_EVENT
inject an event to the Target
Definition: qs_copy.h:1175
QS_QF_EQUEUE_POST_ATTEMPT
attempt to post an evt to QEQueue failed
Definition: qs_copy.h:132
QSPriv
Private QS data to keep track of the filters and the trace buffer.
Definition: qs_copy.h:1133
QS_QF_TIMEEVT_REARM
rearming of a time event
Definition: qs_copy.h:116
QS_QF_EQUEUE_GET_LAST
get the last event from the queue
Definition: qs_copy.h:95
QS_f32
void QS_f32(uint8_t format, float32_t f)
Output 32-bit floating point data element with format information.
QS_RESERVED_86
Definition: qs_copy.h:182
QS_QEP_TRAN
a regular transition was taken
Definition: qs_copy.h:75
QSrxPriv
Private QS-RX data to keep track of the current objects and the lock-free RX buffer.
Definition: qs_copy.h:1187
QS_USR_DICT
user QS record dictionary entry
Definition: qs_copy.h:157
QS_I64_T
signed 64-bit integer format
Definition: qs_copy.h:842
QS_RX_PEEK
peek Target memory
Definition: qs_copy.h:1163
QS_RX_CURR_OBJ
set the "current-object" in the Target
Definition: qs_copy.h:1172
QS_QF_ACTIVE_POST_LIFO
an event was posted (LIFO) directly to AO
Definition: qs_copy.h:86
QSPriv::critNest
uint8_t critNest
critical section nesting level
Definition: qs_copy.h:1144
QS_U1_RECORDS
User Group 105-109 records.
Definition: qs_copy.h:212
QS_RX_AO_FILTER
set local AO filter in the Target
Definition: qs_copy.h:1171
QS_QF_ISR_ENTRY
an ISR was entered
Definition: qs_copy.h:123
QS_RESERVED_99
Definition: qs_copy.h:195
QS_QEP_TRAN_XP
a tran to exit point out of a submachine
Definition: qs_copy.h:149
QS_SCHED_LOCK
scheduler was locked
Definition: qs_copy.h:140
QS_RESERVED_74
Definition: qs_copy.h:170
QActiveDummy_ctor
void QActiveDummy_ctor(QActiveDummy *const me)
Constructor of the QActiveDummy Active Object class.
QSPriv::head
QSCtr head
offset to where next byte will be inserted
Definition: qs_copy.h:1138
QS_U64_T
unsigned 64-bit integer format
Definition: qs_copy.h:843
QS_QF_ACTIVE_POST_FIFO
an event was posted (FIFO) directly to AO
Definition: qs_copy.h:85
QS_QF_TIMEEVT_ARM
a time event was armed
Definition: qs_copy.h:112
QS_u32_
void QS_u32_(uint32_t d)
Output uint32_t data element without format information.
QSpyRxRecords
QSpyRxRecords
Quantum Spy Receive (RX) record types:
Definition: qs_copy.h:1158
QS_RESERVED_83
Definition: qs_copy.h:179
QActiveDummy::super
QActive super
Definition: qs_copy.h:1296
QSPriv::chksum
uint8_t chksum
the checksum of the current record
Definition: qs_copy.h:1142
QS_I8_T
signed 8-bit integer format
Definition: qs_copy.h:829
QS_UA_RECORDS
All User records.
Definition: qs_copy.h:216
QS_getBlock
const uint8_t * QS_getBlock(uint16_t *pNbytes)
Block-oriented interface to the QS data buffer.
QS_RX_RESET
reset the Target
Definition: qs_copy.h:1161