QTools  7.3.0
Collection of Host-Based Tools
Loading...
Searching...
No Matches
qpc_qs.h
Go to the documentation of this file.
1//$file${include::qs.h} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
2//
3// Model: qpc.qm
4// File: ${include::qs.h}
5//
6// This code has been generated by QM 5.3.0 <www.state-machine.com/qm>.
7// DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost.
8//
9// This code is covered by the following QP license:
10// License # : LicenseRef-QL-dual
11// Issued to : Any user of the QP/C real-time embedded framework
12// Framework(s) : qpc
13// Support ends : 2024-12-31
14// License scope:
15//
16// Copyright (C) 2005 Quantum Leaps, LLC <state-machine.com>.
17//
18// Q u a n t u m L e a P s
19// ------------------------
20// Modern Embedded Software
21//
22// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial
23//
24// This software is dual-licensed under the terms of the open source GNU
25// General Public License version 3 (or any later version), or alternatively,
26// under the terms of one of the closed source Quantum Leaps commercial
27// licenses.
28//
29// The terms of the open source GNU General Public License version 3
30// can be found at: <www.gnu.org/licenses/gpl-3.0>
31//
32// The terms of the closed source Quantum Leaps commercial licenses
33// can be found at: <www.state-machine.com/licensing>
34//
35// Redistributions in source code must retain this top-level comment block.
36// Plagiarizing this software to sidestep the license obligations is illegal.
37//
38// Contact information:
39// <www.state-machine.com/licensing>
40// <info@state-machine.com>
41//
42//$endhead${include::qs.h} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
43#ifndef QS_H_
44#define QS_H_
45
46#ifndef Q_SPY
47#error "Q_SPY must be defined to include qs.h"
48#endif
49
50//============================================================================
51//! @cond INTERNAL
52
53#ifndef QS_CTR_SIZE
54#define QS_CTR_SIZE 2U
55#endif
56
57#ifndef QS_TIME_SIZE
58#define QS_TIME_SIZE 4U
59#endif
60
61//! @endcond
62//============================================================================
63
64//$declare${QS::types} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
65
66//${QS::types::QS} ...........................................................
67//! @class QS
68typedef struct QS {
69 //! @cond INTERNAL
70 uint8_t dummy;
71 //! @endcond
72} QS;
73
74//${QS::types::QSpyPre} ......................................................
75//! @static @public @memberof QS
76//! pre-defined QS record IDs
77enum QSpyPre {
78 // [0] QS session (not maskable)
79 QS_EMPTY, //!< QS record for cleanly starting a session
80
81 // [1] SM records
82 QS_QEP_STATE_ENTRY, //!< a state was entered
83 QS_QEP_STATE_EXIT, //!< a state was exited
84 QS_QEP_STATE_INIT, //!< an initial transition was taken in a state
85 QS_QEP_INIT_TRAN, //!< the top-most initial transition was taken
86 QS_QEP_INTERN_TRAN, //!< an internal transition was taken
87 QS_QEP_TRAN, //!< a regular transition was taken
88 QS_QEP_IGNORED, //!< an event was ignored (silently discarded)
89 QS_QEP_DISPATCH, //!< an event was dispatched (begin of RTC step)
90 QS_QEP_UNHANDLED, //!< an event was un-handled due to a guard
91
92 // [10] Active Object (AO) records
93 QS_QF_ACTIVE_DEFER, //!< AO deferred an event
94 QS_QF_ACTIVE_RECALL, //!< AO recalled an event
95 QS_QF_ACTIVE_SUBSCRIBE, //!< an AO subscribed to an event
96 QS_QF_ACTIVE_UNSUBSCRIBE, //!< an AO unsubscribed to an event
97 QS_QF_ACTIVE_POST, //!< an event was posted (FIFO) directly to AO
98 QS_QF_ACTIVE_POST_LIFO, //!< an event was posted (LIFO) directly to AO
99 QS_QF_ACTIVE_GET, //!< AO got an event and its queue is not empty
100 QS_QF_ACTIVE_GET_LAST,//!< AO got an event and its queue is empty
101 QS_QF_ACTIVE_RECALL_ATTEMPT, //!< AO attempted to recall an event
102
103 // [19] Event Queue (EQ) records
104 QS_QF_EQUEUE_POST, //!< an event was posted (FIFO) to a raw queue
105 QS_QF_EQUEUE_POST_LIFO, //!< an event was posted (LIFO) to a raw queue
106 QS_QF_EQUEUE_GET, //!< get an event and queue still not empty
107 QS_QF_EQUEUE_GET_LAST,//!< get the last event from the queue
108
109 // [23] Framework (QF) records
110 QS_QF_NEW_ATTEMPT, //!< an attempt to allocate an event failed
111
112 // [24] Memory Pool (MP) records
113 QS_QF_MPOOL_GET, //!< a memory block was removed from memory pool
114 QS_QF_MPOOL_PUT, //!< a memory block was returned to memory pool
115
116 // [26] Additional Framework (QF) records
117 QS_QF_PUBLISH, //!< an event was published to active objects
118 QS_QF_NEW_REF, //!< new event reference was created
119 QS_QF_NEW, //!< new event was created
120 QS_QF_GC_ATTEMPT, //!< garbage collection attempt
121 QS_QF_GC, //!< garbage collection
122 QS_QF_TICK, //!< QTimeEvt tick was called
123
124 // [32] Time Event (TE) records
125 QS_QF_TIMEEVT_ARM, //!< a time event was armed
126 QS_QF_TIMEEVT_AUTO_DISARM, //!< a time event expired and was disarmed
127 QS_QF_TIMEEVT_DISARM_ATTEMPT,//!< attempt to disarm a disarmed QTimeEvt
128 QS_QF_TIMEEVT_DISARM, //!< true disarming of an armed time event
129 QS_QF_TIMEEVT_REARM, //!< rearming of a time event
130 QS_QF_TIMEEVT_POST, //!< a time event posted itself directly to an AO
131
132 // [38] Additional Framework (QF) records
133 QS_QF_DELETE_REF, //!< an event reference is about to be deleted
134 QS_QF_CRIT_ENTRY, //!< critical section was entered
135 QS_QF_CRIT_EXIT, //!< critical section was exited
136 QS_QF_ISR_ENTRY, //!< an ISR was entered
137 QS_QF_ISR_EXIT, //!< an ISR was exited
138 QS_QF_INT_DISABLE, //!< interrupts were disabled
139 QS_QF_INT_ENABLE, //!< interrupts were enabled
140
141 // [45] Additional Active Object (AO) records
142 QS_QF_ACTIVE_POST_ATTEMPT,//!< attempt to post an evt to AO failed
143
144 // [46] Additional Event Queue (EQ) records
145 QS_QF_EQUEUE_POST_ATTEMPT,//!< attempt to post evt to QEQueue failed
146
147 // [47] Additional Memory Pool (MP) records
148 QS_QF_MPOOL_GET_ATTEMPT, //!< attempt to get a memory block failed
149
150 // [48] Scheduler (SC) records
151 QS_SCHED_PREEMPT, //!< scheduler asynchronously preempted a task
152 QS_SCHED_RESTORE, //!< scheduler restored preempted task
153 QS_SCHED_LOCK, //!< scheduler was locked
154 QS_SCHED_UNLOCK, //!< scheduler was unlocked
155 QS_SCHED_NEXT, //!< scheduler started next task
156 QS_SCHED_IDLE, //!< scheduler restored the idle task
157
158 // [54] Miscellaneous QS records (not maskable)
159 QS_ENUM_DICT, //!< enumeration dictionary entry
160
161 // [55] Additional QEP records
162 QS_QEP_TRAN_HIST, //!< a tran to history was taken
163 QS_QEP_TRAN_EP, //!< a tran to entry point into a submachine
164 QS_QEP_TRAN_XP, //!< a tran to exit point out of a submachine
165
166 // [58] Miscellaneous QS records (not maskable)
167 QS_TEST_PAUSED, //!< test has been paused
168 QS_TEST_PROBE_GET, //!< reports that Test-Probe has been used
169 QS_SIG_DICT, //!< signal dictionary entry
170 QS_OBJ_DICT, //!< object dictionary entry
171 QS_FUN_DICT, //!< function dictionary entry
172 QS_USR_DICT, //!< user QS record dictionary entry
173 QS_TARGET_INFO, //!< reports the Target information
174 QS_TARGET_DONE, //!< reports completion of a user callback
175 QS_RX_STATUS, //!< reports QS data receive status
176 QS_QUERY_DATA, //!< reports the data from "current object" query
177 QS_PEEK_DATA, //!< reports the data from the PEEK query
178 QS_ASSERT_FAIL, //!< assertion failed in the code
179 QS_QF_RUN, //!< QF_run() was entered
180
181 // [71] Semaphore (SEM) records
182 QS_SEM_TAKE, //!< a semaphore was taken by a thread
183 QS_SEM_BLOCK, //!< a semaphore blocked a thread
184 QS_SEM_SIGNAL, //!< a semaphore was signaled
185 QS_SEM_BLOCK_ATTEMPT, //!< a semaphore blocked was attempted
186
187 // [75] Mutex (MTX) records
188 QS_MTX_LOCK, //!< a mutex was locked
189 QS_MTX_BLOCK, //!< a mutex blocked a thread
190 QS_MTX_UNLOCK, //!< a mutex was unlocked
191 QS_MTX_LOCK_ATTEMPT, //!< a mutex lock was attempted
192 QS_MTX_BLOCK_ATTEMPT, //!< a mutex blocking was attempted
193 QS_MTX_UNLOCK_ATTEMPT,//!< a mutex unlock was attempted
194
195 // [81]
196 QS_PRE_MAX //!< the # predefined signals
198
199//${QS::types::QSpyGroups} ...................................................
200//! @static @public @memberof QS
201//! QS-TX record groups for QS_GLB_FILTER()
203 QS_ALL_RECORDS = 0xF0,//!< all maskable QS records
204 QS_SM_RECORDS, //!< State Machine QS records
205 QS_AO_RECORDS, //!< Active Object QS records
206 QS_EQ_RECORDS, //!< Event Queues QS records
207 QS_MP_RECORDS, //!< Memory Pools QS records
208 QS_TE_RECORDS, //!< Time Events QS records
209 QS_QF_RECORDS, //!< QF QS records
210 QS_SC_RECORDS, //!< Scheduler QS records
211 QS_SEM_RECORDS, //!< Semaphore QS records
212 QS_MTX_RECORDS, //!< Mutex QS records
213 QS_U0_RECORDS, //!< User Group 100-104 records
214 QS_U1_RECORDS, //!< User Group 105-109 records
215 QS_U2_RECORDS, //!< User Group 110-114 records
216 QS_U3_RECORDS, //!< User Group 115-119 records
217 QS_U4_RECORDS, //!< User Group 120-124 records
218 QS_UA_RECORDS //!< All User records
220
221//${QS::types::QSpyUserOffsets} ..............................................
222//! @static @public @memberof QS
223//! QS user record group offsets for QS_GLB_FILTER()
225 QS_USER = 100, //!< the first record available to QS users
226 QS_USER0 = QS_USER, //!< offset for User Group 0
227 QS_USER1 = (enum_t)QS_USER0 + 5, //!< offset for User Group 1
228 QS_USER2 = (enum_t)QS_USER1 + 5, //!< offset for User Group 2
229 QS_USER3 = (enum_t)QS_USER2 + 5, //!< offset for User Group 3
230 QS_USER4 = (enum_t)QS_USER3 + 5 //!< offset for User Group 4
232
233//${QS::types::QSpyIdOffsets} ................................................
234//! @static @public @memberof QS
235//! QS ID offsets for QS_LOC_FILTER()
237 QS_AO_ID = 0, //!< offset for AO priorities
238 QS_EP_ID = 64, //!< offset for event-pool IDs
239 QS_EQ_ID = 80, //!< offset for event-queue IDs
240 QS_AP_ID = 96 //!< offset for Application-specific IDs
242
243//${QS::types::QSpyIdGroups} .................................................
244//! @static @public @memberof QS
245//! QS ID groups for QS_LOC_FILTER()
247 QS_ALL_IDS = 0xF0, //!< all QS IDs
248 QS_AO_IDS = 0x80 + (enum_t)QS_AO_ID, //!< AO IDs (priorities)
249 QS_EP_IDS = 0x80 + (enum_t)QS_EP_ID, //!< event-pool IDs
250 QS_EQ_IDS = 0x80 + (enum_t)QS_EQ_ID, //!< event-queue IDs
251 QS_AP_IDS = 0x80 + (enum_t)QS_AP_ID //!< Application-specific IDs
253
254//${QS::types::QSpyId} .......................................................
255//! @struct QSpyId
256typedef struct { uint8_t prio; } QSpyId;
257
258//${QS::types::QSpyFunPtr} ...................................................
259//! @static @private @memberof QS
260typedef void (* QSpyFunPtr )(void);
261
262//${QS::types::QSCtr} ........................................................
263#if (QS_CTR_SIZE == 2U)
264typedef uint16_t QSCtr;
265#endif // (QS_CTR_SIZE == 2U)
266
267//${QS::types::QSCtr} ........................................................
268#if (QS_CTR_SIZE == 4U)
269typedef uint32_t QSCtr;
270#endif // (QS_CTR_SIZE == 4U)
271
272//${QS::types::QSTimeCtr} ....................................................
273#if (QS_TIME_SIZE == 2U)
274typedef uint16_t QSTimeCtr;
275#endif // (QS_TIME_SIZE == 2U)
276
277//${QS::types::QSTimeCtr} ....................................................
278#if (QS_TIME_SIZE == 4U)
279typedef uint32_t QSTimeCtr;
280#endif // (QS_TIME_SIZE == 4U)
281
282//${QS::types::QSFun} ........................................................
283#if (QS_FUN_PTR_SIZE == 2U)
284typedef uint16_t QSFun;
285#endif // (QS_FUN_PTR_SIZE == 2U)
286
287//${QS::types::QSFun} ........................................................
288#if (QS_FUN_PTR_SIZE == 4U)
289typedef uint32_t QSFun;
290#endif // (QS_FUN_PTR_SIZE == 4U)
291
292//${QS::types::QSFun} ........................................................
293#if (QS_FUN_PTR_SIZE == 8U)
294typedef uint64_t QSFun;
295#endif // (QS_FUN_PTR_SIZE == 8U)
296//$enddecl${QS::types} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
297//$declare${QS::filters} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
298
299//${QS::filters::Filter} .....................................................
300//! @struct QS_Filter
301typedef struct {
302// public:
303 uint8_t glb[16];
304 uint8_t loc[16];
305} QS_Filter;
306
307//${QS::filters::filt_} ......................................................
308//! @static @private @memberof QS
310//$enddecl${QS::filters} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
311//$declare${QS-macros} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
312
313//${QS-macros::QS_INIT} ......................................................
314#define QS_INIT(arg_) (QS_onStartup(arg_))
315
316//${QS-macros::QS_EXIT} ......................................................
317#define QS_EXIT() (QS_onCleanup())
318
319//${QS-macros::QS_OUTPUT} ....................................................
320#define QS_OUTPUT() (QS_output())
321
322//${QS-macros::QS_RX_INPUT} ..................................................
323#define QS_RX_INPUT() (QS_rx_input())
324
325//${QS-macros::QS_GLB_FILTER} ................................................
326#define QS_GLB_FILTER(rec_) (QS_glbFilter_((int_fast16_t)(rec_)))
327
328//${QS-macros::QS_LOC_FILTER} ................................................
329#define QS_LOC_FILTER(qs_id_) (QS_locFilter_((int_fast16_t)(qs_id_)))
330
331//${QS-macros::QS_BEGIN_ID} ..................................................
332#define QS_BEGIN_ID(rec_, qs_id_) \
333if (QS_GLB_CHECK_(rec_) && QS_LOC_CHECK_(qs_id_)) { \
334 QS_CRIT_STAT \
335 QS_CRIT_ENTRY(); \
336 QS_MEM_SYS(); \
337 QS_beginRec_((uint_fast8_t)(rec_)); \
338 QS_TIME_PRE_(); {
339
340//${QS-macros::QS_END} .......................................................
341#define QS_END() } \
342 QS_endRec_(); \
343 QS_MEM_APP(); \
344 QS_CRIT_EXIT(); \
345}
346
347//${QS-macros::QS_FLUSH} .....................................................
348#define QS_FLUSH() (QS_onFlush())
349
350//${QS-macros::QS_BEGIN_INCRIT} ..............................................
351#define QS_BEGIN_INCRIT(rec_, qs_id_) \
352if (QS_GLB_CHECK_(rec_) && QS_LOC_CHECK_(qs_id_)) { \
353 QS_beginRec_((uint_fast8_t)(rec_)); \
354 QS_TIME_PRE_(); {
355
356//${QS-macros::QS_END_INCRIT} ................................................
357#define QS_END_INCRIT() } \
358 QS_endRec_(); \
359}
360
361//${QS-macros::QS_GLB_CHECK_} ................................................
362#define QS_GLB_CHECK_(rec_) \
363 (((uint_fast8_t)QS_filt_.glb[(uint_fast8_t)(rec_) >> 3U] \
364 & ((uint_fast8_t)1U << ((uint_fast8_t)(rec_) & 7U))) != 0U)
365
366//${QS-macros::QS_LOC_CHECK_} ................................................
367#define QS_LOC_CHECK_(qs_id_) \
368 (((uint_fast8_t)QS_filt_.loc[(uint_fast8_t)(qs_id_) >> 3U] \
369 & ((uint_fast8_t)1U << ((uint_fast8_t)(qs_id_) & 7U))) != 0U)
370
371//${QS-macros::QS_REC_DONE} ..................................................
372#ifndef QS_REC_DONE
373#define QS_REC_DONE() ((void)0)
374#endif // ndef QS_REC_DONE
375
376//${QS-macros::QS_I8} ........................................................
377#define QS_I8(width_, data_) \
378 (QS_u8_fmt_((uint8_t)(((width_) << 4U) & 0x7U) | (uint8_t)QS_I8_ENUM_T, \
379 (data_)))
380
381//${QS-macros::QS_U8} ........................................................
382#define QS_U8(width_, data_) \
383 (QS_u8_fmt_((uint8_t)(((width_) << 4)) | (uint8_t)QS_U8_T, (data_)))
384
385//${QS-macros::QS_I16} .......................................................
386#define QS_I16(width_, data_) \
387 (QS_u16_fmt_((uint8_t)(((width_) << 4)) | (uint8_t)QS_I16_T, (data_)))
388
389//${QS-macros::QS_U16} .......................................................
390#define QS_U16(width_, data_) \
391 (QS_u16_fmt_((uint8_t)(((width_) << 4)) | (uint8_t)QS_U16_T, (data_)))
392
393//${QS-macros::QS_I32} .......................................................
394#define QS_I32(width_, data_) \
395 (QS_u32_fmt_((uint8_t)(((width_) << 4)) | (uint8_t)QS_I32_T, (data_)))
396
397//${QS-macros::QS_U32} .......................................................
398#define QS_U32(width_, data_) \
399 (QS_u32_fmt_((uint8_t)(((width_) << 4)) | (uint8_t)QS_U32_T, (data_)))
400
401//${QS-macros::QS_I64} .......................................................
402#define QS_I64(width_, data_) \
403 (QS_u64_fmt_((uint8_t)(((width_) << 4)) | (uint8_t)QS_I64_T, (data_)))
404
405//${QS-macros::QS_U64} .......................................................
406#define QS_U64(width_, data_) \
407 (QS_u64_fmt_((uint8_t)(((width_) << 4)) | (uint8_t)QS_U64_T, (data_)))
408
409//${QS-macros::QS_F32} .......................................................
410#define QS_F32(width_, data_) \
411 (QS_f32_fmt_((uint8_t)(((width_) << 4)) | (uint8_t)QS_F32_T, (data_)))
412
413//${QS-macros::QS_F64} .......................................................
414#define QS_F64(width_, data_) \
415 (QS_f64_fmt_((uint8_t)(((width_) << 4)) | (uint8_t)QS_F64_T, (data_)))
416
417//${QS-macros::QS_STR} .......................................................
418#define QS_STR(str_) (QS_str_fmt_((str_)))
419
420//${QS-macros::QS_MEM} .......................................................
421#define QS_MEM(mem_, size_) (QS_mem_fmt_((mem_), (size_)))
422
423//${QS-macros::QS_ENUM} ......................................................
424#define QS_ENUM(group_, value_) \
425 (QS_u8_fmt_((uint8_t)(0x80U | ((group_) << 4U)) | (uint8_t)QS_I8_ENUM_T,\
426 (uint8_t)(value_)))
427
428//${QS-macros::QS_TIME_PRE_} .................................................
429#if (QS_TIME_SIZE == 2U)
430#define QS_TIME_PRE_() (QS_u16_raw_(QS_onGetTime()))
431#endif // (QS_TIME_SIZE == 2U)
432
433//${QS-macros::QS_TIME_PRE_} .................................................
434#if (QS_TIME_SIZE == 4U)
435#define QS_TIME_PRE_() (QS_u32_raw_(QS_onGetTime()))
436#endif // (QS_TIME_SIZE == 4U)
437
438//${QS-macros::QS_OBJ} .......................................................
439#if (QS_OBJ_PTR_SIZE == 2U)
440#define QS_OBJ(obj_) (QS_u16_fmt_(QS_OBJ_T, (uint16_t)(obj_)))
441#endif // (QS_OBJ_PTR_SIZE == 2U)
442
443//${QS-macros::QS_OBJ} .......................................................
444#if (QS_OBJ_PTR_SIZE == 4U)
445#define QS_OBJ(obj_) (QS_u32_fmt_(QS_OBJ_T, (uint32_t)(obj_)))
446#endif // (QS_OBJ_PTR_SIZE == 4U)
447
448//${QS-macros::QS_OBJ} .......................................................
449#if (QS_OBJ_PTR_SIZE == 8U)
450#define QS_OBJ(obj_) (QS_u64_fmt_(QS_OBJ_T, (uint64_t)(obj_)))
451#endif // (QS_OBJ_PTR_SIZE == 8U)
452
453//${QS-macros::QS_FUN} .......................................................
454#if (QS_FUN_PTR_SIZE == 2U)
455#define QS_FUN(fun_) (QS_u16_fmt_(QS_FUN_T, (uint16_t)(fun_)))
456#endif // (QS_FUN_PTR_SIZE == 2U)
457
458//${QS-macros::QS_FUN} .......................................................
459#if (QS_FUN_PTR_SIZE == 4U)
460#define QS_FUN(fun_) (QS_u32_fmt_(QS_FUN_T, (uint32_t)(fun_)))
461#endif // (QS_FUN_PTR_SIZE == 4U)
462
463//${QS-macros::QS_FUN} .......................................................
464#if (QS_FUN_PTR_SIZE == 8U)
465#define QS_FUN(fun_) (QS_u64_fmt_(QS_FUN_T, (uint64_t)(fun_)))
466#endif // (QS_FUN_PTR_SIZE == 8U)
467
468//${QS-macros::QS_SIG} .......................................................
469#if (Q_SIGNAL_SIZE == 1U)
470#define QS_SIG(sig_, obj_) \
471 QS_u8_fmt_(QS_SIG_T, (sig_)); \
472 QS_obj_raw_(obj_)
473#endif // (Q_SIGNAL_SIZE == 1U)
474
475//${QS-macros::QS_SIG} .......................................................
476#if (Q_SIGNAL_SIZE == 2U)
477#define QS_SIG(sig_, obj_) \
478 QS_u16_fmt_(QS_SIG_T, (sig_)); \
479 QS_obj_raw_(obj_)
480#endif // (Q_SIGNAL_SIZE == 2U)
481
482//${QS-macros::QS_SIG} .......................................................
483#if (Q_SIGNAL_SIZE == 4U)
484#define QS_SIG(sig_, obj_) \
485 QS_u32_fmt_(QS_SIG_T, (sig_)); \
486 QS_obj_raw_(obj_)
487#endif // (Q_SIGNAL_SIZE == 4U)
488
489//${QS-macros::QS_SIG_DICTIONARY} ............................................
490#define QS_SIG_DICTIONARY(sig_, obj_) \
491 (QS_sig_dict_pre_((QSignal)(sig_), (obj_), #sig_))
492
493//${QS-macros::QS_OBJ_DICTIONARY} ............................................
494#define QS_OBJ_DICTIONARY(obj_) \
495 (QS_obj_dict_pre_((obj_), #obj_))
496
497//${QS-macros::QS_OBJ_ARR_DICTIONARY} ........................................
498#define QS_OBJ_ARR_DICTIONARY(obj_, idx_) \
499 (QS_obj_arr_dict_pre_((obj_), (idx_), #obj_))
500
501//${QS-macros::QS_FUN_DICTIONARY} ............................................
502#define QS_FUN_DICTIONARY(fun_) \
503 (QS_fun_dict_pre_((void (*)(void))(fun_), #fun_))
504
505//${QS-macros::QS_USR_DICTIONARY} ............................................
506#define QS_USR_DICTIONARY(rec_) \
507 (QS_usr_dict_pre_((rec_), #rec_))
508
509//${QS-macros::QS_ENUM_DICTIONARY} ...........................................
510#define QS_ENUM_DICTIONARY(value_, group_) \
511 (QS_enum_dict_pre_((value_), (group_), #value_))
512
513//${QS-macros::QS_RX_PUT} ....................................................
514#define QS_RX_PUT(b_) (QS_rxPut((b_)))
515
516//${QS-macros::QS_TR_CRIT_ENTRY} .............................................
517#define QS_TR_CRIT_ENTRY()
518
519//${QS-macros::QS_TR_CRIT_EXIT} ..............................................
520#define QS_TR_CRIT_EXIT()
521
522//${QS-macros::QS_TR_ISR_ENTRY} ..............................................
523#define QS_TR_ISR_ENTRY(isrnest, prio) do { \
524 QS_BEGIN_PRE_(QS_QF_ISR_ENTRY, 0U) \
525 QS_TIME_PRE_(); \
526 QS_2u8_raw_(isrnest, prio); \
527 QS_END_PRE_() \
528}
529
530//${QS-macros::QS_TR_ISR_EXIT} ...............................................
532 uint_fast8_t isrnest,
533 uint_fast8_t prio);
534
535//${QS-macros::QS_ONLY} ......................................................
536#define QS_ONLY(code_) (code_)
537
538//${QS-macros::QS_ASSERTION} .................................................
539#define QS_ASSERTION(module_, id_, delay_) \
540 (QS_assertion_pre_((module_), (id_), (delay_)))
541
542//${QS-macros::QS_EOD} .......................................................
543#define QS_EOD ((uint16_t)0xFFFFU)
544
545//${QS-macros::QS_CMD} .......................................................
546#define QS_CMD ((uint8_t)7U)
547
548//${QS-macros::QS_HEX_FMT} ...................................................
549#define QS_HEX_FMT ((uint8_t)0x0FU)
550
551//${QS-macros::QS_CRIT_STAT} .................................................
552#ifndef QS_CRIT_STAT
553#define QS_CRIT_STAT QF_CRIT_STAT
554#endif // ndef QS_CRIT_STAT
555
556//${QS-macros::QS_CRIT_ENTRY} ................................................
557#ifndef QS_CRIT_ENTRY
558#define QS_CRIT_ENTRY() QF_CRIT_ENTRY()
559#endif // ndef QS_CRIT_ENTRY
560
561//${QS-macros::QS_CRIT_EXIT} .................................................
562#ifndef QS_CRIT_EXIT
563#define QS_CRIT_EXIT() QF_CRIT_EXIT()
564#endif // ndef QS_CRIT_EXIT
565
566//${QS-macros::QS_MEM_SYS} ...................................................
567#ifndef QS_MEM_SYS
568#define QS_MEM_SYS() QF_MEM_SYS()
569#endif // ndef QS_MEM_SYS
570
571//${QS-macros::QS_MEM_APP} ...................................................
572#ifndef QS_MEM_APP
573#define QS_MEM_APP() QF_MEM_APP()
574#endif // ndef QS_MEM_APP
575//$enddecl${QS-macros} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
576
577//============================================================================
578//! @cond INTERNAL
579
580typedef struct {
581 void const * locFilter_AP; //!< @deprecated
582 uint8_t * buf;
583 QSCtr end;
584 QSCtr volatile head;
585 QSCtr volatile tail;
586 QSCtr volatile used;
587 uint8_t volatile seq;
588 uint8_t volatile chksum;
589 uint8_t volatile critNest;
590 uint8_t flags;
591} QS_Attr;
592
593extern QS_Attr QS_priv_;
594
595void QS_glbFilter_(int_fast16_t const filter);
596void QS_locFilter_(int_fast16_t const filter);
597
598void QS_beginRec_(uint_fast8_t const rec);
599void QS_endRec_(void);
600
601void QS_u8_raw_(uint8_t const d);
602void QS_2u8_raw_(
603 uint8_t const d1,
604 uint8_t const d2);
605void QS_u16_raw_(uint16_t const d);
606void QS_u32_raw_(uint32_t const d);
607void QS_u64_raw_(uint64_t const d);
608void QS_obj_raw_(void const * const obj);
609void QS_str_raw_(char const * const str);
610
611void QS_u8_fmt_(
612 uint8_t const format,
613 uint8_t const d);
614void QS_u16_fmt_(
615 uint8_t const format,
616 uint16_t const d);
617void QS_u32_fmt_(
618 uint8_t const format,
619 uint32_t const d);
620void QS_u64_fmt_(
621 uint8_t const format,
622 uint64_t const d);
623void QS_f32_fmt_(
624 uint8_t const format,
625 float32_t const f);
626void QS_f64_fmt_(
627 uint8_t const format,
628 float64_t const d);
629void QS_str_fmt_(char const * const str);
630void QS_mem_fmt_(
631 uint8_t const * const blk,
632 uint8_t const size);
633
634void QS_sig_dict_pre_(
635 QSignal const sig,
636 void const * const obj,
637 char const * const name);
638void QS_obj_dict_pre_(
639 void const * const obj,
640 char const * const name);
641void QS_obj_arr_dict_pre_(
642 void const * const obj,
643 uint_fast16_t const idx,
644 char const * const name);
645void QS_fun_dict_pre_(
646 QSpyFunPtr const fun,
647 char const * const name);
648void QS_usr_dict_pre_(
649 enum_t const rec,
650 char const * const name);
651void QS_enum_dict_pre_(
652 enum_t const value,
653 uint8_t const group,
654 char const * const name);
655
656void QS_assertion_pre_(
657 char const * const module,
658 int_t const id,
659 uint32_t const delay);
660
661void QS_target_info_pre_(uint8_t const isReset);
662
663//! @endcond
664//============================================================================
665
666//$declare${QS::QS-TX} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
667
668//${QS::QS-TX::preType} ......................................................
669//! Enumerates data elements for app-specific trace records
671 QS_I8_ENUM_T, //!< signed 8-bit integer or enum format
672 QS_U8_T, //!< unsigned 8-bit integer format
673 QS_I16_T, //!< signed 16-bit integer format
674 QS_U16_T, //!< unsigned 16-bit integer format
675 QS_I32_T, //!< signed 32-bit integer format
676 QS_U32_T, //!< unsigned 32-bit integer format
677 QS_F32_T, //!< 32-bit floating point format
678 QS_F64_T, //!< 64-bit floating point format
679 QS_STR_T, //!< zero-terminated ASCII string format
680 QS_MEM_T, //!< up to 255-bytes memory block format
681 QS_SIG_T, //!< event signal format
682 QS_OBJ_T, //!< object pointer format
683 QS_FUN_T, //!< function pointer format
684 QS_I64_T, //!< signed 64-bit integer format
685 QS_U64_T //!< unsigned 64-bit integer format
687
688//${QS::QS-TX::initBuf} ......................................................
689//! @static @public @memberof QS
691 uint8_t * const sto,
692 uint_fast32_t const stoSize);
693
694//${QS::QS-TX::getByte} ......................................................
695//! @static @public @memberof QS
696uint16_t QS_getByte(void);
697
698//${QS::QS-TX::getBlock} .....................................................
699//! @static @public @memberof QS
700uint8_t const * QS_getBlock(uint16_t * const pNbytes);
701
702//${QS::QS-TX::doOutput} .....................................................
703//! @static @public @memberof QS
704void QS_doOutput(void);
705
706//${QS::QS-TX::onStartup} ....................................................
707//! @static @public @memberof QS
708uint8_t QS_onStartup(void const * arg);
709
710//${QS::QS-TX::onCleanup} ....................................................
711//! @static @public @memberof QS
712void QS_onCleanup(void);
713
714//${QS::QS-TX::onFlush} ......................................................
715//! @static @public @memberof QS
716void QS_onFlush(void);
717
718//${QS::QS-TX::onGetTime} ....................................................
719//! @static @public @memberof QS
720QSTimeCtr QS_onGetTime(void);
721//$enddecl${QS::QS-TX} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
722
723//============================================================================
724//! @cond INTERNAL
725
726typedef struct {
727 void * currObj[8];
728 uint8_t * buf;
729 QSCtr end;
730 QSCtr volatile head;
731 QSCtr volatile tail;
732#ifdef Q_UTEST
733 bool inTestLoop;
734#endif
735} QS_RxAttr;
736
737//! @static @private @memberof QS
738extern QS_RxAttr QS_rxPriv_;
739
740//! @endcond
741//============================================================================
742
743//$declare${QS::QS-RX} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
744
745//${QS::QS-RX::QSpyObjKind} ..................................................
746//! @static @public @memberof QS
747//! Kinds of objects used in QS-RX
749 SM_OBJ, //!< state machine object
750 AO_OBJ, //!< active object
751 MP_OBJ, //!< event pool object
752 EQ_OBJ, //!< raw queue object
753 TE_OBJ, //!< time event object
754 AP_OBJ, //!< generic Application-specific object
755 MAX_OBJ
757
758//${QS::QS-RX::OSpyObjComb} ..................................................
759//! @static @public @memberof QS
760//! Object combinations for QS-RX
762 SM_AO_OBJ = (enum_t)MAX_OBJ //!< combination of SM and AO
764
765//${QS::QS-RX::rxInitBuf} ....................................................
766//! @static @public @memberof QS
768 uint8_t * const sto,
769 uint16_t const stoSize);
770
771//${QS::QS-RX::rxPut} ........................................................
772//! @static @public @memberof QS
773static inline bool QS_rxPut(uint8_t const b) {
774 // NOTE: does not need critical section
775 // But requires system-level memory access (QF_MEM_SYS()).
776
777 QSCtr head = QS_rxPriv_.head + 1U;
778 if (head == QS_rxPriv_.end) {
779 head = 0U;
780 }
781 if (head != QS_rxPriv_.tail) { // buffer NOT full?
782 QS_rxPriv_.buf[QS_rxPriv_.head] = b;
783 QS_rxPriv_.head = head; // update the head to a *valid* index
784 return true; // byte placed in the buffer
785 }
786 else {
787 return false; // byte NOT placed in the buffer
788 }
789}
790
791//${QS::QS-RX::rxParse} ......................................................
792//! @static @public @memberof QS
793void QS_rxParse(void);
794
795//${QS::QS-RX::rxGetNfree} ...................................................
796//! @static @public @memberof QS
797uint16_t QS_rxGetNfree(void);
798
799//${QS::QS-RX::doInput} ......................................................
800//! @static @public @memberof QS
801void QS_doInput(void);
802
803//${QS::QS-RX::onReset} ......................................................
804//! @static @public @memberof QS
805void QS_onReset(void);
806
807//${QS::QS-RX::onCommand} ....................................................
808//! @static @public @memberof QS
810 uint8_t cmdId,
811 uint32_t param1,
812 uint32_t param2,
813 uint32_t param3);
814//$enddecl${QS::QS-RX} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
815
816//============================================================================
817#ifdef Q_UTEST
818
819//$declare${QS::QUTest} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
820
821//${QS::QUTest::TProbe} ......................................................
822// @struct TProbe
823struct QS_TProbe {
825 uint32_t data;
826 uint8_t idx;
827};
828
829//${QS::QUTest::onTestSetup} .................................................
830//! @static @public @memberof QS
831void QS_onTestSetup(void);
832
833//${QS::QUTest::onTestTeardown} ..............................................
834//! @static @public @memberof QS
836
837//${QS::QUTest::onTestEvt} ...................................................
838//! @static @public @memberof QS
839void QS_onTestEvt(QEvt * e);
840
841//${QS::QUTest::onTestPost} ..................................................
842//! @static @public @memberof QS
844 void const * sender,
845 QActive * recipient,
846 QEvt const * e,
847 bool status);
848
849//${QS::QUTest::onTestLoop} ..................................................
850//! @static @public @memberof QS
851void QS_onTestLoop(void);
852//$enddecl${QS::QUTest} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
853
854#define QUTEST_ON_POST 124
855
856//============================================================================
857//! @cond INTERNAL
858
859typedef struct {
860 struct QS_TProbe tpBuf[16];
861 uint8_t tpNum;
862 QSTimeCtr testTime;
863 QPSet readySet;
864 QPSet readySet_dis;
865 uint_fast8_t intLock;
866} QSTestAttr;
867
868extern QSTestAttr QS_tstPriv_;
869
870void QS_test_pause_(void);
871uint32_t QS_getTestProbe_(QSpyFunPtr const api);
872
873//! @endcond
874//============================================================================
875
876// QP-stub for QUTest
877// NOTE: The QP-stub is needed for unit testing QP applications,
878// but might NOT be needed for testing QP itself.
879#if (Q_UTEST != 0)
880
881//$declare${QS::QUTest-stub::QHsmDummy} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
882
883//${QS::QUTest-stub::QHsmDummy} ..............................................
884//! @class QHsmDummy
885//! @extends QHsm
886typedef struct {
887// protected:
888 QAsm super;
889} QHsmDummy;
890
891// public:
892
893//! @public @memberof QHsmDummy
894void QHsmDummy_ctor(QHsmDummy * const me);
895
896//! @private @memberof QHsmDummy
898 QAsm * const me,
899 void const * const par,
900 uint_fast8_t const qs_id);
901
902// private:
903
904//! @private @memberof QHsmDummy
906 QAsm * const me,
907 QEvt const * const e,
908 uint_fast8_t const qs_id);
909//$enddecl${QS::QUTest-stub::QHsmDummy} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
910//$declare${QS::QUTest-stub::QActiveDummy} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
911
912//${QS::QUTest-stub::QActiveDummy} ...........................................
913//! @class QActiveDummy
914//! @extends QActive
915typedef struct {
916// protected:
917 QActive super;
919
920// public:
921
922//! @public @memberof QActiveDummy
924
925// private:
926
927//! @private @memberof QActiveDummy
929 QAsm * const me,
930 void const * const par,
931 uint_fast8_t const qs_id);
932
933//! @private @memberof QActiveDummy
935 QAsm * const me,
936 QEvt const * const e,
937 uint_fast8_t const qs_id);
938
939//! @private @memberof QActiveDummy
941 QActive * const me,
942 QEvt const * const e,
943 uint_fast16_t const margin,
944 void const * const sender);
945
946//! @private @memberof QActiveDummy
948 QActive * const me,
949 QEvt const * const e);
950//$enddecl${QS::QUTest-stub::QActiveDummy} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
951
952#endif // Q_UTEST != 0
953
954#define QS_TEST_PROBE_DEF(fun_) \
955 uint32_t const qs_tp_ = QS_getTestProbe_((void (*)(void))(fun_));
956
957#define QS_TEST_PROBE(code_) \
958 if (qs_tp_ != 0U) { code_ }
959
960#define QS_TEST_PROBE_ID(id_, code_) \
961 if (qs_tp_ == (uint32_t)(id_)) { code_ }
962
963#define QS_TEST_PAUSE() (QS_test_pause_())
964
965#else // Q_UTEST not defined
966
967// dummy definitions when not building for QUTEST
968#define QS_TEST_PROBE_DEF(fun_)
969#define QS_TEST_PROBE(code_)
970#define QS_TEST_PROBE_ID(id_, code_)
971#define QS_TEST_PAUSE() ((void)0)
972
973#endif // Q_UTEST
974
975#endif // QS_H_
@ QS_ASSERT_FAIL
assertion failed in the code
Definition qpc_qs.h:178
@ QS_QF_TIMEEVT_AUTO_DISARM
a time event expired and was disarmed
Definition qpc_qs.h:126
@ QS_QF_INT_ENABLE
interrupts were enabled
Definition qpc_qs.h:139
@ QS_QF_RUN
QF_run() was entered.
Definition qpc_qs.h:179
@ QS_USER0
offset for User Group 0
Definition qpc_qs.h:226
@ QS_QF_MPOOL_GET_ATTEMPT
attempt to get a memory block failed
Definition qpc_qs.h:148
@ QS_U2_RECORDS
User Group 110-114 records.
Definition qpc_qs.h:215
@ QS_QF_DELETE_REF
an event reference is about to be deleted
Definition qpc_qs.h:133
@ QS_QF_ACTIVE_RECALL
AO recalled an event.
Definition qpc_qs.h:94
@ QS_QF_EQUEUE_GET_LAST
get the last event from the queue
Definition qpc_qs.h:107
@ QS_QF_TIMEEVT_DISARM
true disarming of an armed time event
Definition qpc_qs.h:128
@ QS_TEST_PROBE_GET
reports that Test-Probe has been used
Definition qpc_qs.h:168
@ QS_SEM_BLOCK
a semaphore blocked a thread
Definition qpc_qs.h:183
@ QS_QEP_STATE_INIT
an initial transition was taken in a state
Definition qpc_qs.h:84
@ QS_QEP_TRAN_HIST
a tran to history was taken
Definition qpc_qs.h:162
@ QS_ENUM_DICT
enumeration dictionary entry
Definition qpc_qs.h:159
@ QS_QF_TIMEEVT_REARM
rearming of a time event
Definition qpc_qs.h:129
@ QS_FUN_DICT
function dictionary entry
Definition qpc_qs.h:171
@ QS_USER3
offset for User Group 3
Definition qpc_qs.h:229
@ QS_MP_RECORDS
Memory Pools QS records.
Definition qpc_qs.h:207
@ QS_QF_PUBLISH
an event was published to active objects
Definition qpc_qs.h:117
@ QS_USER1
offset for User Group 1
Definition qpc_qs.h:227
@ QS_MTX_UNLOCK
a mutex was unlocked
Definition qpc_qs.h:190
QS_preType
Enumerates data elements for app-specific trace records.
Definition qpc_qs.h:670
@ QS_STR_T
zero-terminated ASCII string format
Definition qpc_qs.h:679
@ QS_U64_T
unsigned 64-bit integer format
Definition qpc_qs.h:685
@ QS_MEM_T
up to 255-bytes memory block format
Definition qpc_qs.h:680
@ QS_OBJ_T
object pointer format
Definition qpc_qs.h:682
@ QS_F32_T
32-bit floating point format
Definition qpc_qs.h:677
@ QS_SIG_T
event signal format
Definition qpc_qs.h:681
@ QS_I8_ENUM_T
signed 8-bit integer or enum format
Definition qpc_qs.h:671
@ QS_U8_T
unsigned 8-bit integer format
Definition qpc_qs.h:672
@ QS_I64_T
signed 64-bit integer format
Definition qpc_qs.h:684
@ QS_FUN_T
function pointer format
Definition qpc_qs.h:683
@ QS_F64_T
64-bit floating point format
Definition qpc_qs.h:678
@ QS_U32_T
unsigned 32-bit integer format
Definition qpc_qs.h:676
@ QS_I32_T
signed 32-bit integer format
Definition qpc_qs.h:675
@ QS_I16_T
signed 16-bit integer format
Definition qpc_qs.h:673
@ QS_U16_T
unsigned 16-bit integer format
Definition qpc_qs.h:674
@ QS_TE_RECORDS
Time Events QS records.
Definition qpc_qs.h:208
@ QS_MTX_BLOCK
a mutex blocked a thread
Definition qpc_qs.h:189
@ QS_SEM_BLOCK_ATTEMPT
a semaphore blocked was attempted
Definition qpc_qs.h:185
@ SM_OBJ
state machine object
Definition qpc_qs.h:749
@ QS_QF_ACTIVE_POST_LIFO
an event was posted (LIFO) directly to AO
Definition qpc_qs.h:98
@ QS_QEP_TRAN_EP
a tran to entry point into a submachine
Definition qpc_qs.h:163
@ QS_QEP_STATE_EXIT
a state was exited
Definition qpc_qs.h:83
@ EQ_OBJ
raw queue object
Definition qpc_qs.h:752
@ QS_TARGET_DONE
reports completion of a user callback
Definition qpc_qs.h:174
@ QS_EP_IDS
event-pool IDs
Definition qpc_qs.h:249
@ QS_USER
the first record available to QS users
Definition qpc_qs.h:225
@ QS_MTX_LOCK_ATTEMPT
a mutex lock was attempted
Definition qpc_qs.h:191
@ QS_QF_GC_ATTEMPT
garbage collection attempt
Definition qpc_qs.h:120
@ QS_QF_CRIT_ENTRY
critical section was entered
Definition qpc_qs.h:134
@ QS_QF_MPOOL_PUT
a memory block was returned to memory pool
Definition qpc_qs.h:114
@ QS_QF_EQUEUE_POST_ATTEMPT
attempt to post evt to QEQueue failed
Definition qpc_qs.h:145
@ QS_PRE_MAX
the # predefined signals
Definition qpc_qs.h:196
@ QS_QF_GC
garbage collection
Definition qpc_qs.h:121
@ QS_QF_ACTIVE_GET
AO got an event and its queue is not empty.
Definition qpc_qs.h:99
@ QS_AO_IDS
AO IDs (priorities)
Definition qpc_qs.h:248
@ AO_OBJ
active object
Definition qpc_qs.h:750
@ QS_QF_CRIT_EXIT
critical section was exited
Definition qpc_qs.h:135
@ QS_SM_RECORDS
State Machine QS records.
Definition qpc_qs.h:204
@ QS_QF_TIMEEVT_POST
a time event posted itself directly to an AO
Definition qpc_qs.h:130
@ QS_QF_INT_DISABLE
interrupts were disabled
Definition qpc_qs.h:138
@ QS_OBJ_DICT
object dictionary entry
Definition qpc_qs.h:170
@ QS_QF_MPOOL_GET
a memory block was removed from memory pool
Definition qpc_qs.h:113
@ QS_MTX_UNLOCK_ATTEMPT
a mutex unlock was attempted
Definition qpc_qs.h:193
@ QS_QF_TIMEEVT_DISARM_ATTEMPT
attempt to disarm a disarmed QTimeEvt
Definition qpc_qs.h:127
void QS_TR_ISR_EXIT(uint_fast8_t isrnest, uint_fast8_t prio)
@ QS_SEM_TAKE
a semaphore was taken by a thread
Definition qpc_qs.h:182
@ QS_U0_RECORDS
User Group 100-104 records.
Definition qpc_qs.h:213
@ QS_QF_ACTIVE_RECALL_ATTEMPT
AO attempted to recall an event.
Definition qpc_qs.h:101
@ QS_QEP_INIT_TRAN
the top-most initial transition was taken
Definition qpc_qs.h:85
@ QS_TARGET_INFO
reports the Target information
Definition qpc_qs.h:173
@ QS_QEP_INTERN_TRAN
an internal transition was taken
Definition qpc_qs.h:86
@ QS_SEM_SIGNAL
a semaphore was signaled
Definition qpc_qs.h:184
@ QS_QEP_TRAN_XP
a tran to exit point out of a submachine
Definition qpc_qs.h:164
@ QS_RX_STATUS
reports QS data receive status
Definition qpc_qs.h:175
@ QS_EQ_ID
offset for event-queue IDs
Definition qpc_qs.h:239
@ QS_U3_RECORDS
User Group 115-119 records.
Definition qpc_qs.h:216
@ QS_SCHED_IDLE
scheduler restored the idle task
Definition qpc_qs.h:156
@ QS_QF_EQUEUE_POST_LIFO
an event was posted (LIFO) to a raw queue
Definition qpc_qs.h:105
@ QS_QEP_STATE_ENTRY
a state was entered
Definition qpc_qs.h:82
@ QS_MTX_RECORDS
Mutex QS records.
Definition qpc_qs.h:212
@ QS_SCHED_PREEMPT
scheduler asynchronously preempted a task
Definition qpc_qs.h:151
@ QS_EP_ID
offset for event-pool IDs
Definition qpc_qs.h:238
@ QS_QEP_UNHANDLED
an event was un-handled due to a guard
Definition qpc_qs.h:90
@ QS_QF_ACTIVE_POST_ATTEMPT
attempt to post an evt to AO failed
Definition qpc_qs.h:142
@ QS_QEP_TRAN
a regular transition was taken
Definition qpc_qs.h:87
@ QS_U4_RECORDS
User Group 120-124 records.
Definition qpc_qs.h:217
@ QS_QF_EQUEUE_GET
get an event and queue still not empty
Definition qpc_qs.h:106
@ QS_QF_ISR_ENTRY
an ISR was entered
Definition qpc_qs.h:136
@ QS_AO_RECORDS
Active Object QS records.
Definition qpc_qs.h:205
@ QS_QF_NEW_ATTEMPT
an attempt to allocate an event failed
Definition qpc_qs.h:110
@ TE_OBJ
time event object
Definition qpc_qs.h:753
@ QS_QF_ISR_EXIT
an ISR was exited
Definition qpc_qs.h:137
@ QS_QF_TICK
QTimeEvt tick was called.
Definition qpc_qs.h:122
@ QS_SEM_RECORDS
Semaphore QS records.
Definition qpc_qs.h:211
@ QS_QF_ACTIVE_UNSUBSCRIBE
an AO unsubscribed to an event
Definition qpc_qs.h:96
@ QS_QEP_DISPATCH
an event was dispatched (begin of RTC step)
Definition qpc_qs.h:89
@ QS_QF_ACTIVE_DEFER
AO deferred an event.
Definition qpc_qs.h:93
@ QS_AP_ID
offset for Application-specific IDs
Definition qpc_qs.h:240
@ QS_SCHED_LOCK
scheduler was locked
Definition qpc_qs.h:153
@ MAX_OBJ
Definition qpc_qs.h:755
@ QS_QF_RECORDS
QF QS records.
Definition qpc_qs.h:209
@ QS_QF_NEW_REF
new event reference was created
Definition qpc_qs.h:118
@ QS_TEST_PAUSED
test has been paused
Definition qpc_qs.h:167
@ QS_SC_RECORDS
Scheduler QS records.
Definition qpc_qs.h:210
@ QS_SCHED_UNLOCK
scheduler was unlocked
Definition qpc_qs.h:154
@ QS_AO_ID
offset for AO priorities
Definition qpc_qs.h:237
@ AP_OBJ
generic Application-specific object
Definition qpc_qs.h:754
@ QS_EMPTY
QS record for cleanly starting a session.
Definition qpc_qs.h:79
@ QS_EQ_IDS
event-queue IDs
Definition qpc_qs.h:250
@ QS_ALL_IDS
all QS IDs
Definition qpc_qs.h:247
@ QS_USER2
offset for User Group 2
Definition qpc_qs.h:228
@ QS_QF_ACTIVE_POST
an event was posted (FIFO) directly to AO
Definition qpc_qs.h:97
@ QS_SIG_DICT
signal dictionary entry
Definition qpc_qs.h:169
@ SM_AO_OBJ
combination of SM and AO
Definition qpc_qs.h:762
@ QS_U1_RECORDS
User Group 105-109 records.
Definition qpc_qs.h:214
@ QS_EQ_RECORDS
Event Queues QS records.
Definition qpc_qs.h:206
@ QS_QUERY_DATA
reports the data from "current object" query
Definition qpc_qs.h:176
@ QS_QF_TIMEEVT_ARM
a time event was armed
Definition qpc_qs.h:125
@ QS_QEP_IGNORED
an event was ignored (silently discarded)
Definition qpc_qs.h:88
@ QS_USR_DICT
user QS record dictionary entry
Definition qpc_qs.h:172
@ QS_QF_NEW
new event was created
Definition qpc_qs.h:119
@ QS_QF_EQUEUE_POST
an event was posted (FIFO) to a raw queue
Definition qpc_qs.h:104
@ QS_QF_ACTIVE_GET_LAST
AO got an event and its queue is empty.
Definition qpc_qs.h:100
@ QS_ALL_RECORDS
all maskable QS records
Definition qpc_qs.h:203
@ QS_SCHED_NEXT
scheduler started next task
Definition qpc_qs.h:155
@ QS_PEEK_DATA
reports the data from the PEEK query
Definition qpc_qs.h:177
uint32_t QSFun
Definition qpc_qs.h:289
@ QS_MTX_LOCK
a mutex was locked
Definition qpc_qs.h:188
@ QS_SCHED_RESTORE
scheduler restored preempted task
Definition qpc_qs.h:152
@ QS_UA_RECORDS
All User records.
Definition qpc_qs.h:218
@ MP_OBJ
event pool object
Definition qpc_qs.h:751
@ QS_USER4
offset for User Group 4
Definition qpc_qs.h:230
@ QS_QF_ACTIVE_SUBSCRIBE
an AO subscribed to an event
Definition qpc_qs.h:95
@ QS_MTX_BLOCK_ATTEMPT
a mutex blocking was attempted
Definition qpc_qs.h:192
@ QS_AP_IDS
Application-specific IDs.
Definition qpc_qs.h:251
uint16_t QSignal
Definition qspy.h:48
void QActiveDummy_ctor(QActiveDummy *const me)
QActive super
Definition qpc_qs.h:917
void QActiveDummy_dispatch_(QAsm *const me, QEvt const *const e, uint_fast8_t const qs_id)
bool QActiveDummy_fakePost_(QActive *const me, QEvt const *const e, uint_fast16_t const margin, void const *const sender)
void QActiveDummy_init_(QAsm *const me, void const *const par, uint_fast8_t const qs_id)
void QActiveDummy_fakePostLIFO_(QActive *const me, QEvt const *const e)
void QHsmDummy_ctor(QHsmDummy *const me)
void QHsmDummy_init_(QAsm *const me, void const *const par, uint_fast8_t const qs_id)
QAsm super
Definition qpc_qs.h:888
void QHsmDummy_dispatch_(QAsm *const me, QEvt const *const e, uint_fast8_t const qs_id)
uint8_t idx
Definition qpc_qs.h:826
QSFun addr
Definition qpc_qs.h:824
uint32_t data
Definition qpc_qs.h:825
Definition qpc_qs.h:68
void QS_onReset(void)
void QS_doOutput(void)
void QS_onTestPost(void const *sender, QActive *recipient, QEvt const *e, bool status)
void QS_onCleanup(void)
QSpyIdOffsets
Definition qpc_qs.h:236
void QS_onTestSetup(void)
void QS_rxParse(void)
void QS_rxInitBuf(uint8_t *const sto, uint16_t const stoSize)
uint8_t const * QS_getBlock(uint16_t *const pNbytes)
void QS_onTestLoop(void)
static bool QS_rxPut(uint8_t const b)
Definition qpc_qs.h:773
QS_OSpyObjComb
Definition qpc_qs.h:761
QSTimeCtr QS_onGetTime(void)
QSpyUserOffsets
Definition qpc_qs.h:224
void QS_doInput(void)
QSpyPre
Definition qpc_qs.h:77
void QS_onFlush(void)
QS_Filter QS_filt_
Definition qpc_qs.h:309
uint8_t QS_onStartup(void const *arg)
void QS_onTestTeardown(void)
uint16_t QS_getByte(void)
void QS_onTestEvt(QEvt *e)
QSpyGroups
Definition qpc_qs.h:202
void QS_initBuf(uint8_t *const sto, uint_fast32_t const stoSize)
uint16_t QS_rxGetNfree(void)
void QS_onCommand(uint8_t cmdId, uint32_t param1, uint32_t param2, uint32_t param3)
QS_QSpyObjKind
Definition qpc_qs.h:748
QSpyIdGroups
Definition qpc_qs.h:246
uint8_t prio
Definition qpc_qs.h:256