QTools  7.4.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 6.1.1 <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::QSObj} ........................................................
259#if (QS_OBJ_PTR_SIZE == 2U)
260typedef uint16_t QSObj;
261#endif // (QS_OBJ_PTR_SIZE == 2U)
262
263//${QS::types::QSObj} ........................................................
264#if (QS_OBJ_PTR_SIZE == 4U)
265typedef uint32_t QSObj;
266#endif // (QS_OBJ_PTR_SIZE == 4U)
267
268//${QS::types::QSObj} ........................................................
269#if (QS_OBJ_PTR_SIZE == 8U)
270typedef uint64_t QSObj;
271#endif // (QS_OBJ_PTR_SIZE == 8U)
272
273//${QS::types::QSFun} ........................................................
274#if (QS_FUN_PTR_SIZE == 2U)
275typedef uint16_t QSFun;
276#endif // (QS_FUN_PTR_SIZE == 2U)
277
278//${QS::types::QSFun} ........................................................
279#if (QS_FUN_PTR_SIZE == 4U)
280typedef uint32_t QSFun;
281#endif // (QS_FUN_PTR_SIZE == 4U)
282
283//${QS::types::QSFun} ........................................................
284#if (QS_FUN_PTR_SIZE == 8U)
285typedef uint64_t QSFun;
286#endif // (QS_FUN_PTR_SIZE == 8U)
287
288//${QS::types::QSpyFunPtr} ...................................................
289//! @static @private @memberof QS
290typedef void (* QSpyFunPtr )(void);
291
292//${QS::types::QSCtr} ........................................................
293#if (QS_CTR_SIZE == 2U)
294typedef uint16_t QSCtr;
295#endif // (QS_CTR_SIZE == 2U)
296
297//${QS::types::QSCtr} ........................................................
298#if (QS_CTR_SIZE == 4U)
299typedef uint32_t QSCtr;
300#endif // (QS_CTR_SIZE == 4U)
301
302//${QS::types::QSTimeCtr} ....................................................
303#if (QS_TIME_SIZE == 2U)
304typedef uint16_t QSTimeCtr;
305#endif // (QS_TIME_SIZE == 2U)
306
307//${QS::types::QSTimeCtr} ....................................................
308#if (QS_TIME_SIZE == 4U)
309typedef uint32_t QSTimeCtr;
310#endif // (QS_TIME_SIZE == 4U)
311//$enddecl${QS::types} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
312//$declare${QS::filters} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
313
314//${QS::filters::Filter} .....................................................
315//! @struct QS_Filter
316typedef struct {
317// public:
318 uint8_t glb[16];
319 uint8_t loc[16];
320} QS_Filter;
321
322//${QS::filters::filt_} ......................................................
323//! @static @private @memberof QS
325//$enddecl${QS::filters} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
326//$declare${QS-macros} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
327
328//${QS-macros::QS_INIT} ......................................................
329#define QS_INIT(arg_) (QS_onStartup(arg_))
330
331//${QS-macros::QS_EXIT} ......................................................
332#define QS_EXIT() (QS_onCleanup())
333
334//${QS-macros::QS_OUTPUT} ....................................................
335#define QS_OUTPUT() (QS_output())
336
337//${QS-macros::QS_RX_INPUT} ..................................................
338#define QS_RX_INPUT() (QS_rx_input())
339
340//${QS-macros::QS_GLB_FILTER} ................................................
341#define QS_GLB_FILTER(rec_) (QS_glbFilter_((int_fast16_t)(rec_)))
342
343//${QS-macros::QS_LOC_FILTER} ................................................
344#define QS_LOC_FILTER(qsId_) (QS_locFilter_((int_fast16_t)(qsId_)))
345
346//${QS-macros::QS_BEGIN_ID} ..................................................
347#define QS_BEGIN_ID(rec_, qsId_) \
348if (QS_GLB_CHECK_(rec_) && QS_LOC_CHECK_(qsId_)) { \
349 QS_CRIT_STAT \
350 QS_CRIT_ENTRY(); \
351 QS_MEM_SYS(); \
352 QS_beginRec_((uint_fast8_t)(rec_)); \
353 QS_TIME_PRE_(); {
354
355//${QS-macros::QS_END} .......................................................
356#define QS_END() } \
357 QS_endRec_(); \
358 QS_MEM_APP(); \
359 QS_CRIT_EXIT(); \
360}
361
362//${QS-macros::QS_FLUSH} .....................................................
363#define QS_FLUSH() (QS_onFlush())
364
365//${QS-macros::QS_BEGIN_INCRIT} ..............................................
366#define QS_BEGIN_INCRIT(rec_, qsId_) \
367if (QS_GLB_CHECK_(rec_) && QS_LOC_CHECK_(qsId_)) { \
368 QS_beginRec_((uint_fast8_t)(rec_)); \
369 QS_TIME_PRE_(); {
370
371//${QS-macros::QS_END_INCRIT} ................................................
372#define QS_END_INCRIT() } \
373 QS_endRec_(); \
374}
375
376//${QS-macros::QS_GLB_CHECK_} ................................................
377#define QS_GLB_CHECK_(rec_) \
378 (((uint_fast8_t)QS_filt_.glb[(uint_fast8_t)(rec_) >> 3U] \
379 & ((uint_fast8_t)1U << ((uint_fast8_t)(rec_) & 7U))) != 0U)
380
381//${QS-macros::QS_LOC_CHECK_} ................................................
382#define QS_LOC_CHECK_(qsId_) \
383 (((uint_fast8_t)QS_filt_.loc[(uint_fast8_t)(qsId_) >> 3U] \
384 & ((uint_fast8_t)1U << ((uint_fast8_t)(qsId_) & 7U))) != 0U)
385
386//${QS-macros::QS_REC_DONE} ..................................................
387#ifndef QS_REC_DONE
388#define QS_REC_DONE() ((void)0)
389#endif // ndef QS_REC_DONE
390
391//${QS-macros::QS_I8} ........................................................
392#define QS_I8(width_, data_) \
393 (QS_u8_fmt_((uint8_t)(((width_) << 4U) & 0x7U) | (uint8_t)QS_I8_ENUM_T, \
394 (data_)))
395
396//${QS-macros::QS_U8} ........................................................
397#define QS_U8(width_, data_) \
398 (QS_u8_fmt_((uint8_t)(((width_) << 4)) | (uint8_t)QS_U8_T, (data_)))
399
400//${QS-macros::QS_I16} .......................................................
401#define QS_I16(width_, data_) \
402 (QS_u16_fmt_((uint8_t)(((width_) << 4)) | (uint8_t)QS_I16_T, (data_)))
403
404//${QS-macros::QS_U16} .......................................................
405#define QS_U16(width_, data_) \
406 (QS_u16_fmt_((uint8_t)(((width_) << 4)) | (uint8_t)QS_U16_T, (data_)))
407
408//${QS-macros::QS_I32} .......................................................
409#define QS_I32(width_, data_) \
410 (QS_u32_fmt_((uint8_t)(((width_) << 4)) | (uint8_t)QS_I32_T, (data_)))
411
412//${QS-macros::QS_U32} .......................................................
413#define QS_U32(width_, data_) \
414 (QS_u32_fmt_((uint8_t)(((width_) << 4)) | (uint8_t)QS_U32_T, (data_)))
415
416//${QS-macros::QS_I64} .......................................................
417#define QS_I64(width_, data_) \
418 (QS_u64_fmt_((uint8_t)(((width_) << 4)) | (uint8_t)QS_I64_T, (data_)))
419
420//${QS-macros::QS_U64} .......................................................
421#define QS_U64(width_, data_) \
422 (QS_u64_fmt_((uint8_t)(((width_) << 4)) | (uint8_t)QS_U64_T, (data_)))
423
424//${QS-macros::QS_F32} .......................................................
425#define QS_F32(width_, data_) \
426 (QS_f32_fmt_((uint8_t)(((width_) << 4)) | (uint8_t)QS_F32_T, (data_)))
427
428//${QS-macros::QS_F64} .......................................................
429#define QS_F64(width_, data_) \
430 (QS_f64_fmt_((uint8_t)(((width_) << 4)) | (uint8_t)QS_F64_T, (data_)))
431
432//${QS-macros::QS_STR} .......................................................
433#define QS_STR(str_) (QS_str_fmt_((str_)))
434
435//${QS-macros::QS_MEM} .......................................................
436#define QS_MEM(mem_, size_) (QS_mem_fmt_((mem_), (size_)))
437
438//${QS-macros::QS_ENUM} ......................................................
439#define QS_ENUM(group_, value_) \
440 (QS_u8_fmt_((uint8_t)(0x80U | ((group_) << 4U)) | (uint8_t)QS_I8_ENUM_T,\
441 (uint8_t)(value_)))
442
443//${QS-macros::QS_TIME_PRE_} .................................................
444#if (QS_TIME_SIZE == 2U)
445#define QS_TIME_PRE_() (QS_u16_raw_(QS_onGetTime()))
446#endif // (QS_TIME_SIZE == 2U)
447
448//${QS-macros::QS_TIME_PRE_} .................................................
449#if (QS_TIME_SIZE == 4U)
450#define QS_TIME_PRE_() (QS_u32_raw_(QS_onGetTime()))
451#endif // (QS_TIME_SIZE == 4U)
452
453//${QS-macros::QS_OBJ} .......................................................
454#if (QS_OBJ_PTR_SIZE == 2U)
455#define QS_OBJ(obj_) (QS_u16_fmt_(QS_OBJ_T, (uint16_t)(obj_)))
456#endif // (QS_OBJ_PTR_SIZE == 2U)
457
458//${QS-macros::QS_OBJ} .......................................................
459#if (QS_OBJ_PTR_SIZE == 4U)
460#define QS_OBJ(obj_) (QS_u32_fmt_(QS_OBJ_T, (uint32_t)(obj_)))
461#endif // (QS_OBJ_PTR_SIZE == 4U)
462
463//${QS-macros::QS_OBJ} .......................................................
464#if (QS_OBJ_PTR_SIZE == 8U)
465#define QS_OBJ(obj_) (QS_u64_fmt_(QS_OBJ_T, (uint64_t)(obj_)))
466#endif // (QS_OBJ_PTR_SIZE == 8U)
467
468//${QS-macros::QS_FUN} .......................................................
469#if (QS_FUN_PTR_SIZE == 2U)
470#define QS_FUN(fun_) (QS_u16_fmt_(QS_FUN_T, (uint16_t)(fun_)))
471#endif // (QS_FUN_PTR_SIZE == 2U)
472
473//${QS-macros::QS_FUN} .......................................................
474#if (QS_FUN_PTR_SIZE == 4U)
475#define QS_FUN(fun_) (QS_u32_fmt_(QS_FUN_T, (uint32_t)(fun_)))
476#endif // (QS_FUN_PTR_SIZE == 4U)
477
478//${QS-macros::QS_FUN} .......................................................
479#if (QS_FUN_PTR_SIZE == 8U)
480#define QS_FUN(fun_) (QS_u64_fmt_(QS_FUN_T, (uint64_t)(fun_)))
481#endif // (QS_FUN_PTR_SIZE == 8U)
482
483//${QS-macros::QS_SIG} .......................................................
484#if (Q_SIGNAL_SIZE == 1U)
485#define QS_SIG(sig_, obj_) \
486 QS_u8_fmt_(QS_SIG_T, (sig_)); \
487 QS_obj_raw_(obj_)
488#endif // (Q_SIGNAL_SIZE == 1U)
489
490//${QS-macros::QS_SIG} .......................................................
491#if (Q_SIGNAL_SIZE == 2U)
492#define QS_SIG(sig_, obj_) \
493 QS_u16_fmt_(QS_SIG_T, (sig_)); \
494 QS_obj_raw_(obj_)
495#endif // (Q_SIGNAL_SIZE == 2U)
496
497//${QS-macros::QS_SIG} .......................................................
498#if (Q_SIGNAL_SIZE == 4U)
499#define QS_SIG(sig_, obj_) \
500 QS_u32_fmt_(QS_SIG_T, (sig_)); \
501 QS_obj_raw_(obj_)
502#endif // (Q_SIGNAL_SIZE == 4U)
503
504//${QS-macros::QS_SIG_DICTIONARY} ............................................
505#define QS_SIG_DICTIONARY(sig_, obj_) \
506 (QS_sig_dict_pre_((QSignal)(sig_), (obj_), #sig_))
507
508//${QS-macros::QS_OBJ_DICTIONARY} ............................................
509#define QS_OBJ_DICTIONARY(obj_) \
510 (QS_obj_dict_pre_((obj_), #obj_))
511
512//${QS-macros::QS_OBJ_ARR_DICTIONARY} ........................................
513#define QS_OBJ_ARR_DICTIONARY(obj_, idx_) \
514 (QS_obj_arr_dict_pre_((obj_), (idx_), #obj_))
515
516//${QS-macros::QS_FUN_DICTIONARY} ............................................
517#define QS_FUN_DICTIONARY(fun_) \
518 (QS_fun_dict_pre_((void (*)(void))(fun_), #fun_))
519
520//${QS-macros::QS_USR_DICTIONARY} ............................................
521#define QS_USR_DICTIONARY(rec_) \
522 (QS_usr_dict_pre_((rec_), #rec_))
523
524//${QS-macros::QS_ENUM_DICTIONARY} ...........................................
525#define QS_ENUM_DICTIONARY(value_, group_) \
526 (QS_enum_dict_pre_((value_), (group_), #value_))
527
528//${QS-macros::QS_RX_PUT} ....................................................
529#define QS_RX_PUT(b_) (QS_rxPut((b_)))
530
531//${QS-macros::QS_TR_CRIT_ENTRY} .............................................
532#define QS_TR_CRIT_ENTRY()
533
534//${QS-macros::QS_TR_CRIT_EXIT} ..............................................
535#define QS_TR_CRIT_EXIT()
536
537//${QS-macros::QS_TR_ISR_ENTRY} ..............................................
538#define QS_TR_ISR_ENTRY(isrnest, prio) do { \
539 QS_BEGIN_PRE_(QS_QF_ISR_ENTRY, 0U) \
540 QS_TIME_PRE_(); \
541 QS_2u8_raw_(isrnest, prio); \
542 QS_END_PRE_() \
543}
544
545//${QS-macros::QS_TR_ISR_EXIT} ...............................................
547 uint_fast8_t isrnest,
548 uint_fast8_t prio);
549
550//${QS-macros::QS_ONLY} ......................................................
551#define QS_ONLY(code_) (code_)
552
553//${QS-macros::QS_ASSERTION} .................................................
554#define QS_ASSERTION(module_, id_, delay_) \
555 (QS_assertion_pre_((module_), (id_), (delay_)))
556
557//${QS-macros::QS_EOD} .......................................................
558#define QS_EOD ((uint16_t)0xFFFFU)
559
560//${QS-macros::QS_CMD} .......................................................
561#define QS_CMD ((uint8_t)7U)
562
563//${QS-macros::QS_HEX_FMT} ...................................................
564#define QS_HEX_FMT ((uint8_t)0x0FU)
565
566//${QS-macros::QS_CRIT_STAT} .................................................
567#ifndef QS_CRIT_STAT
568#define QS_CRIT_STAT QF_CRIT_STAT
569#endif // ndef QS_CRIT_STAT
570
571//${QS-macros::QS_CRIT_ENTRY} ................................................
572#ifndef QS_CRIT_ENTRY
573#define QS_CRIT_ENTRY() QF_CRIT_ENTRY()
574#endif // ndef QS_CRIT_ENTRY
575
576//${QS-macros::QS_CRIT_EXIT} .................................................
577#ifndef QS_CRIT_EXIT
578#define QS_CRIT_EXIT() QF_CRIT_EXIT()
579#endif // ndef QS_CRIT_EXIT
580
581//${QS-macros::QS_MEM_SYS} ...................................................
582#ifndef QS_MEM_SYS
583#define QS_MEM_SYS() QF_MEM_SYS()
584#endif // ndef QS_MEM_SYS
585
586//${QS-macros::QS_MEM_APP} ...................................................
587#ifndef QS_MEM_APP
588#define QS_MEM_APP() QF_MEM_APP()
589#endif // ndef QS_MEM_APP
590//$enddecl${QS-macros} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
591
592//============================================================================
593//! @cond INTERNAL
594
595typedef struct {
596 void const * locFilter_AP; //!< @deprecated
597 uint8_t * buf;
598 QSCtr end;
599 QSCtr volatile head;
600 QSCtr volatile tail;
601 QSCtr volatile used;
602 uint8_t volatile seq;
603 uint8_t volatile chksum;
604 uint8_t volatile critNest;
605 uint8_t flags;
606} QS_Attr;
607
608extern QS_Attr QS_priv_;
609
610void QS_glbFilter_(int_fast16_t const filter);
611void QS_locFilter_(int_fast16_t const filter);
612
613void QS_beginRec_(uint_fast8_t const rec);
614void QS_endRec_(void);
615
616void QS_u8_raw_(uint8_t const d);
617void QS_2u8_raw_(uint8_t const d1, uint8_t const d2);
618void QS_u16_raw_(uint16_t const d);
619void QS_u32_raw_(uint32_t const d);
620void QS_u64_raw_(uint64_t const d);
621void QS_obj_raw_(void const * const obj);
622void QS_str_raw_(char const * const str);
623
624void QS_u8_fmt_(uint8_t const format, uint8_t const d);
625void QS_u16_fmt_(uint8_t const format, uint16_t const d);
626void QS_u32_fmt_(uint8_t const format, uint32_t const d);
627void QS_u64_fmt_(uint8_t const format, uint64_t const d);
628void QS_f32_fmt_(uint8_t const format, float32_t const f);
629void QS_f64_fmt_(uint8_t const format, float64_t const d);
630void QS_str_fmt_(char const * const str);
631void QS_mem_fmt_(uint8_t const * const blk, uint8_t const size);
632
633void QS_sig_dict_pre_(QSignal const sig, void const * const obj,
634 char const * const name);
635void QS_obj_dict_pre_(void const * const obj, char const * const name);
636void QS_obj_arr_dict_pre_(void const * const obj, uint_fast16_t const idx,
637 char const * const name);
638void QS_fun_dict_pre_(QSpyFunPtr const fun, char const * const name);
639void QS_usr_dict_pre_(enum_t const rec, char const * const name);
640void QS_enum_dict_pre_(enum_t const value, uint8_t const group,
641 char const * const name);
642
643void QS_assertion_pre_(char const * const module, int_t const id,
644 uint32_t const delay);
645
646void QS_target_info_pre_(uint8_t const isReset);
647
648//! @endcond
649//============================================================================
650
651//$declare${QS::QS-TX} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
652
653//${QS::QS-TX::preType} ......................................................
654//! Enumerates data elements for app-specific trace records
656 QS_I8_ENUM_T, //!< signed 8-bit integer or enum format
657 QS_U8_T, //!< unsigned 8-bit integer format
658 QS_I16_T, //!< signed 16-bit integer format
659 QS_U16_T, //!< unsigned 16-bit integer format
660 QS_I32_T, //!< signed 32-bit integer format
661 QS_U32_T, //!< unsigned 32-bit integer format
662 QS_F32_T, //!< 32-bit floating point format
663 QS_F64_T, //!< 64-bit floating point format
664 QS_STR_T, //!< zero-terminated ASCII string format
665 QS_MEM_T, //!< up to 255-bytes memory block format
666 QS_SIG_T, //!< event signal format
667 QS_OBJ_T, //!< object pointer format
668 QS_FUN_T, //!< function pointer format
669 QS_I64_T, //!< signed 64-bit integer format
670 QS_U64_T //!< unsigned 64-bit integer format
672
673//${QS::QS-TX::initBuf} ......................................................
674//! @static @public @memberof QS
676 uint8_t * const sto,
677 uint_fast32_t const stoSize);
678
679//${QS::QS-TX::getByte} ......................................................
680//! @static @public @memberof QS
681uint16_t QS_getByte(void);
682
683//${QS::QS-TX::getBlock} .....................................................
684//! @static @public @memberof QS
685uint8_t const * QS_getBlock(uint16_t * const pNbytes);
686
687//${QS::QS-TX::doOutput} .....................................................
688//! @static @public @memberof QS
689void QS_doOutput(void);
690
691//${QS::QS-TX::onStartup} ....................................................
692//! @static @public @memberof QS
693uint8_t QS_onStartup(void const * arg);
694
695//${QS::QS-TX::onCleanup} ....................................................
696//! @static @public @memberof QS
697void QS_onCleanup(void);
698
699//${QS::QS-TX::onFlush} ......................................................
700//! @static @public @memberof QS
701void QS_onFlush(void);
702
703//${QS::QS-TX::onGetTime} ....................................................
704//! @static @public @memberof QS
705QSTimeCtr QS_onGetTime(void);
706//$enddecl${QS::QS-TX} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
707
708//============================================================================
709#ifdef Q_UTEST
710
711//$declare${QS::QUTest} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
712
713//${QS::QUTest::TProbe} ......................................................
714// @struct TProbe
715struct QS_TProbe {
717 uint32_t data;
718 uint8_t idx;
719};
720
721//${QS::QUTest::onTestSetup} .................................................
722//! @static @public @memberof QS
723void QS_onTestSetup(void);
724
725//${QS::QUTest::onTestTeardown} ..............................................
726//! @static @public @memberof QS
728
729//${QS::QUTest::onTestEvt} ...................................................
730//! @static @public @memberof QS
731void QS_onTestEvt(QEvt * e);
732
733//${QS::QUTest::onTestPost} ..................................................
734//! @static @public @memberof QS
736 void const * sender,
737 QActive * recipient,
738 QEvt const * e,
739 bool status);
740
741//${QS::QUTest::onTestLoop} ..................................................
742//! @static @public @memberof QS
743void QS_onTestLoop(void);
744//$enddecl${QS::QUTest} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
745
746#define QUTEST_ON_POST 124
747
748//============================================================================
749//! @cond INTERNAL
750
751typedef struct {
752 struct QS_TProbe tpBuf[16];
753 uint8_t tpNum;
754 QSTimeCtr testTime;
755 QPSet readySet;
756 QPSet readySet_dis;
757 uint_fast8_t intLock;
758} QSTestAttr;
759
760extern QSTestAttr QS_tstPriv_;
761
762void QS_test_pause_(void);
763uint32_t QS_getTestProbe_(QSpyFunPtr const api);
764
765//! @endcond
766//============================================================================
767
768// QP-stub for QUTest
769// NOTE: The QP-stub is needed for unit testing QP applications,
770// but might NOT be needed for testing QP itself.
771#if (Q_UTEST != 0)
772
773//$declare${QS::QUTest-stub::QHsmDummy} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
774
775//${QS::QUTest-stub::QHsmDummy} ..............................................
776//! @class QHsmDummy
777//! @extends QHsm
778typedef struct {
779// protected:
780 QAsm super;
781} QHsmDummy;
782
783// public:
784
785//! @public @memberof QHsmDummy
786void QHsmDummy_ctor(QHsmDummy * const me);
787
788//! @private @memberof QHsmDummy
790 QAsm * const me,
791 void const * const par,
792 uint_fast8_t const qsId);
793
794// private:
795
796//! @private @memberof QHsmDummy
798 QAsm * const me,
799 QEvt const * const e,
800 uint_fast8_t const qsId);
801//$enddecl${QS::QUTest-stub::QHsmDummy} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
802//$declare${QS::QUTest-stub::QActiveDummy} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
803
804//${QS::QUTest-stub::QActiveDummy} ...........................................
805//! @class QActiveDummy
806//! @extends QActive
807typedef struct {
808// protected:
809 QActive super;
811
812// public:
813
814//! @public @memberof QActiveDummy
816
817// private:
818
819//! @private @memberof QActiveDummy
821 QAsm * const me,
822 void const * const par,
823 uint_fast8_t const qsId);
824
825//! @private @memberof QActiveDummy
827 QAsm * const me,
828 QEvt const * const e,
829 uint_fast8_t const qsId);
830
831//! @private @memberof QActiveDummy
833 QActive * const me,
834 QEvt const * const e,
835 uint_fast16_t const margin,
836 void const * const sender);
837
838//! @private @memberof QActiveDummy
840 QActive * const me,
841 QEvt const * const e);
842//$enddecl${QS::QUTest-stub::QActiveDummy} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
843
844#endif // Q_UTEST != 0
845
846#define QS_TEST_PROBE_DEF(fun_) \
847 uint32_t const qs_tp_ = QS_getTestProbe_((void (*)(void))(fun_));
848
849#define QS_TEST_PROBE(code_) \
850 if (qs_tp_ != 0U) { code_ }
851
852#define QS_TEST_PROBE_ID(id_, code_) \
853 if (qs_tp_ == (uint32_t)(id_)) { code_ }
854
855#define QS_TEST_PAUSE() (QS_test_pause_())
856
857#else // Q_UTEST not defined
858
859// dummy definitions when not building for QUTEST
860#define QS_TEST_PROBE_DEF(fun_)
861#define QS_TEST_PROBE(code_)
862#define QS_TEST_PROBE_ID(id_, code_)
863#define QS_TEST_PAUSE() ((void)0)
864
865#endif // Q_UTEST
866
867//============================================================================
868//! @cond INTERNAL
869
870typedef struct {
871 uint32_t param1;
872 uint32_t param2;
873 uint32_t param3;
874 uint8_t idx;
875 uint8_t cmdId;
876} CmdVar;
877
878typedef struct {
879 uint_fast8_t rate;
880} TickVar;
881
882typedef struct {
883 uint16_t offs;
884 uint8_t size;
885 uint8_t num;
886 uint8_t idx;
887} PeekVar;
888
889typedef struct {
890 uint32_t data;
891 uint16_t offs;
892 uint8_t size;
893 uint8_t num;
894 uint8_t idx;
895 uint8_t fill;
896} PokeVar;
897
898typedef struct {
899 uint8_t data[16];
900 uint8_t idx;
901 int8_t recId; // global/local
902} FltVar;
903
904typedef struct {
905 QSObj addr;
906 uint8_t idx;
907 uint8_t kind; // see qs.h, enum QSpyObjKind
908 int8_t recId;
909} ObjVar;
910
911typedef struct {
912 QEvt *e;
913 uint8_t *p;
914 QSignal sig;
915 uint16_t len;
916 uint8_t prio;
917 uint8_t idx;
918} EvtVar;
919
920typedef struct {
921 void * currObj[8];
922 uint8_t * buf;
923 QSCtr end;
924 QSCtr volatile head;
925 QSCtr volatile tail;
926 uint8_t state;
927 uint8_t esc;
928 uint8_t seq;
929 uint8_t chksum;
930#ifdef Q_UTEST
931 bool inTestLoop;
932#endif
933 union Variant {
934 CmdVar cmd;
935 TickVar tick;
936 PeekVar peek;
937 PokeVar poke;
938 FltVar flt;
939 ObjVar obj;
940 EvtVar evt;
941#ifdef Q_UTEST
942 struct QS_TProbe tp;
943#endif // Q_UTEST
944 } var;
945} QS_RxAttr;
946
947//! @endcond
948
949//! @static @private @memberof QS
950extern QS_RxAttr QS_rxPriv_;
951
952//============================================================================
953
954//$declare${QS::QS-RX} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
955
956//${QS::QS-RX::QSpyObjKind} ..................................................
957//! @static @public @memberof QS
958//! Kinds of objects used in QS-RX
960 SM_OBJ, //!< state machine object
961 AO_OBJ, //!< active object
962 MP_OBJ, //!< event pool object
963 EQ_OBJ, //!< raw queue object
964 TE_OBJ, //!< time event object
965 AP_OBJ, //!< generic Application-specific object
966 MAX_OBJ
968
969//${QS::QS-RX::OSpyObjComb} ..................................................
970//! @static @public @memberof QS
971//! Object combinations for QS-RX
973 SM_AO_OBJ = (enum_t)MAX_OBJ //!< combination of SM and AO
975
976//${QS::QS-RX::rxInitBuf} ....................................................
977//! @static @public @memberof QS
979 uint8_t * const sto,
980 uint16_t const stoSize);
981
982//${QS::QS-RX::rxPut} ........................................................
983//! @static @public @memberof QS
984static inline bool QS_rxPut(uint8_t const b) {
985 // NOTE: does not need critical section
986 // But requires system-level memory access (QF_MEM_SYS()).
987
988 QSCtr head = QS_rxPriv_.head + 1U;
989 if (head == QS_rxPriv_.end) {
990 head = 0U;
991 }
992 if (head != QS_rxPriv_.tail) { // buffer NOT full?
993 QS_rxPriv_.buf[QS_rxPriv_.head] = b;
994 QS_rxPriv_.head = head; // update the head to a *valid* index
995 return true; // byte placed in the buffer
996 }
997 else {
998 return false; // byte NOT placed in the buffer
999 }
1000}
1001
1002//${QS::QS-RX::rxParse} ......................................................
1003//! @static @public @memberof QS
1004void QS_rxParse(void);
1005
1006//${QS::QS-RX::setCurrObj} ...................................................
1007//! @static @public @memberof QS
1009 uint8_t const obj_kind,
1010 void * const obj_ptr);
1011
1012//${QS::QS-RX::rxGetNfree} ...................................................
1013//! @static @public @memberof QS
1014uint16_t QS_rxGetNfree(void);
1015
1016//${QS::QS-RX::doInput} ......................................................
1017//! @static @public @memberof QS
1018void QS_doInput(void);
1019
1020//${QS::QS-RX::onReset} ......................................................
1021//! @static @public @memberof QS
1022void QS_onReset(void);
1023
1024//${QS::QS-RX::onCommand} ....................................................
1025//! @static @public @memberof QS
1027 uint8_t cmdId,
1028 uint32_t param1,
1029 uint32_t param2,
1030 uint32_t param3);
1031//$enddecl${QS::QS-RX} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1032
1033#endif // QS_H_
tick(tick_rate=0)
trigger system clock tick in the Target
peek(offset, size, num)
peeks data in the Target
fill(offset, size, num, item=0)
fills data into the Target.
poke(offset, size, data)
pokes data into the Target.
@ 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:655
@ QS_STR_T
zero-terminated ASCII string format
Definition qpc_qs.h:664
@ QS_U64_T
unsigned 64-bit integer format
Definition qpc_qs.h:670
@ QS_MEM_T
up to 255-bytes memory block format
Definition qpc_qs.h:665
@ QS_OBJ_T
object pointer format
Definition qpc_qs.h:667
@ QS_F32_T
32-bit floating point format
Definition qpc_qs.h:662
@ QS_SIG_T
event signal format
Definition qpc_qs.h:666
@ QS_I8_ENUM_T
signed 8-bit integer or enum format
Definition qpc_qs.h:656
@ QS_U8_T
unsigned 8-bit integer format
Definition qpc_qs.h:657
@ QS_I64_T
signed 64-bit integer format
Definition qpc_qs.h:669
@ QS_FUN_T
function pointer format
Definition qpc_qs.h:668
@ QS_F64_T
64-bit floating point format
Definition qpc_qs.h:663
@ QS_U32_T
unsigned 32-bit integer format
Definition qpc_qs.h:661
@ QS_I32_T
signed 32-bit integer format
Definition qpc_qs.h:660
@ QS_I16_T
signed 16-bit integer format
Definition qpc_qs.h:658
@ QS_U16_T
unsigned 16-bit integer format
Definition qpc_qs.h:659
@ 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:960
@ 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:963
@ 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:961
@ 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:964
@ 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:966
@ 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:965
@ 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:973
@ 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:280
@ 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:962
@ 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
uint32_t QSObj
Definition qpc_qs.h:265
@ 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:53
void QActiveDummy_ctor(QActiveDummy *const me)
void QActiveDummy_dispatch_(QAsm *const me, QEvt const *const e, uint_fast8_t const qsId)
void QActiveDummy_init_(QAsm *const me, void const *const par, uint_fast8_t const qsId)
QActive super
Definition qpc_qs.h:809
bool QActiveDummy_fakePost_(QActive *const me, QEvt const *const e, uint_fast16_t const margin, void const *const sender)
void QActiveDummy_fakePostLIFO_(QActive *const me, QEvt const *const e)
void QHsmDummy_ctor(QHsmDummy *const me)
void QHsmDummy_dispatch_(QAsm *const me, QEvt const *const e, uint_fast8_t const qsId)
QAsm super
Definition qpc_qs.h:780
void QHsmDummy_init_(QAsm *const me, void const *const par, uint_fast8_t const qsId)
uint8_t idx
Definition qpc_qs.h:718
QSFun addr
Definition qpc_qs.h:716
uint32_t data
Definition qpc_qs.h:717
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:984
QS_OSpyObjComb
Definition qpc_qs.h:972
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:324
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)
void QS_setCurrObj(uint8_t const obj_kind, void *const obj_ptr)
uint16_t QS_rxGetNfree(void)
QS_RxAttr QS_rxPriv_
Definition qpc_qs.h:950
void QS_onCommand(uint8_t cmdId, uint32_t param1, uint32_t param2, uint32_t param3)
QS_QSpyObjKind
Definition qpc_qs.h:959
QSpyIdGroups
Definition qpc_qs.h:246
uint8_t prio
Definition qpc_qs.h:256