QS (QP/Spy software tracing) platform-independent public interface. More...
Go to the source code of this file.
Classes | |
| struct | QSpyId |
| QS ID type for applying local filtering. More... | |
| class | QS |
| Software tracing instrumentation target-resident component. More... | |
| class | QHsmDummy |
| Dummy hierarchical state machine class for testing. More... | |
| class | QActiveDummy |
| Dummy Active Object for testing. More... | |
Macros | |
| #define | QS_GRP_ALL ((int_fast16_t)0xF0) |
| #define | QS_GRP_SM ((int_fast16_t)0xF1) |
| #define | QS_GRP_AO ((int_fast16_t)0xF2) |
| #define | QS_GRP_EQ ((int_fast16_t)0xF3) |
| #define | QS_GRP_MP ((int_fast16_t)0xF4) |
| #define | QS_GRP_TE ((int_fast16_t)0xF5) |
| #define | QS_GRP_QF ((int_fast16_t)0xF6) |
| #define | QS_GRP_SC ((int_fast16_t)0xF7) |
| #define | QS_GRP_SEM ((int_fast16_t)0xF8) |
| #define | QS_GRP_MTX ((int_fast16_t)0xF9) |
| #define | QS_GRP_U0 ((int_fast16_t)0xFA) |
| #define | QS_GRP_U1 ((int_fast16_t)0xFB) |
| #define | QS_GRP_U2 ((int_fast16_t)0xFC) |
| #define | QS_GRP_U3 ((int_fast16_t)0xFD) |
| #define | QS_GRP_U4 ((int_fast16_t)0xFE) |
| #define | QS_GRP_UA ((int_fast16_t)0xFF) |
| #define | QS_USER ((enum_t)100) |
| #define | QS_USER0 QS_USER |
| #define | QS_USER1 ((enum_t)(QS_USER + 5)) |
| #define | QS_USER2 ((enum_t)(QS_USER + 10)) |
| #define | QS_USER3 ((enum_t)(QS_USER + 15)) |
| #define | QS_USER4 ((enum_t)(QS_USER + 20)) |
| #define | QS_ID_AO ((uint_fast16_t)0) |
| #define | QS_ID_EP ((uint_fast16_t)64) |
| #define | QS_ID_EQ ((uint_fast16_t)80) |
| #define | QS_ID_AP ((uint_fast16_t)96) |
| #define | QS_IDS_ALL ((int_fast16_t)0xF0) |
| #define | QS_IDS_AO ((int_fast16_t)0xF1) |
| #define | QS_IDS_EP ((int_fast16_t)0xF2) |
| #define | QS_IDS_EQ ((int_fast16_t)0xF3) |
| #define | QS_IDS_AP ((int_fast16_t)0xF4) |
| #define | QS_EOD ((uint16_t)0xFFFFU) |
| #define | QS_CMD ((uint8_t)0x07U) |
| #define | QS_INIT(arg_) |
| Initialize the QS software tracing system. | |
| #define | QS_EXIT() |
| Terminate the QS software tracing system. | |
| #define | QS_OUTPUT() |
| #define | QS_RX_INPUT() |
| #define | QS_GLB_FILTER(rec_) |
| check the global filter | |
| #define | QS_LOC_FILTER(qsId_) |
| check the local filter | |
| #define | QS_FLUSH() |
| #define | QS_BEGIN_ID(rec_, qsId_) |
| #define | QS_END() |
| #define | QS_BEGIN_INCRIT(rec_, qsId_) |
| #define | QS_END_INCRIT() |
| #define | QS_GLB_CHECK_(rec_) |
| #define | QS_LOC_CHECK_(qsId_) |
| #define | QS_REC_DONE() |
| #define | QS_I8(width_, data_) |
| #define | QS_U8(width_, data_) |
| #define | QS_I16(width_, data_) |
| #define | QS_U16(width_, data_) |
| #define | QS_I32(width_, data_) |
| #define | QS_U32(width_, data_) |
| #define | QS_I64(width_, data_) |
| #define | QS_U64(width_, data_) |
| #define | QS_F32(width_, data_) |
| #define | QS_F64(width_, data_) |
| #define | QS_STR(str_) |
| #define | QS_MEM(mem_, size_) |
| #define | QS_ENUM(group_, value_) |
| #define | QS_TIME_PRE() |
| #define | QS_OBJ(obj_) |
| #define | QS_FUN(fun_) |
| #define | QS_SIG(sig_, obj_) |
| #define | QS_SIG_DICTIONARY(sig_, obj_) |
| Produce event signal dictionary. | |
| #define | QS_OBJ_DICTIONARY(obj_) |
| Produce object dictionary. | |
| #define | QS_OBJ_ARR_DICTIONARY(obj_, idx_) |
| Produce object-array dictionary. | |
| #define | QS_FUN_DICTIONARY(fun_) |
| Produce function dictionary (typically for state-handler functions). | |
| #define | QS_USR_DICTIONARY(rec_) |
| Produce user-record dictionary for application-specific trace records. | |
| #define | QS_ENUM_DICTIONARY(value_, group_) |
| Produce enumeration dictionary for application-defined enumerations. | |
| #define | QS_RX_PUT(b_) |
| Macro to call QS_rxPut() when Q_SPY is defined (resolves to nothing when Q_SPY is not defined). | |
| #define | QS_TR_CRIT_ENTRY() |
| #define | QS_TR_CRIT_EXIT() |
| #define | QS_TR_ISR_ENTRY(isrnest_, prio_) |
| #define | QS_TR_ISR_EXIT(isrnest_, prio_) |
| #define | QS_ONLY(code_) |
| #define | QS_ASSERTION(module_, id_, delay_) |
| #define | QS_CRIT_STAT QF_CRIT_STAT |
| Internal QS macro for defining the critical section status. | |
| #define | QS_CRIT_ENTRY() |
| Internal macro for entering a critical section. | |
| #define | QS_CRIT_EXIT() |
| Internal macro for exiting a critical section. | |
| #define | QUTEST_ON_POST 124 |
| #define | QS_RXATTR_SIZE 128U |
| #define | QS_TEST_PROBE_DEF(fun_) |
| Define a test probe for a given function. | |
| #define | QS_TEST_PROBE(code_) |
| QS macro to apply a Test-Probe. | |
| #define | QS_TEST_PROBE_ID(id_, code_) |
| QS macro to apply a Test-Probe. | |
| #define | QS_TEST_PAUSE() |
| QS macro to pause test execution and enter the test event-loop. | |
Typedefs | |
| typedef uint32_t | QSObj |
| typedef uint32_t | QSFun |
| typedef uint32_t | QSTimeCtr |
| Unsigned integer type for QS timestamps. | |
| typedef float | float32_t |
| Alias for IEEE 754 32-bit floating point number. | |
| typedef double | float64_t |
| Alias for IEEE 754 64-bit floating point number. | |
| typedef uint_fast8_t | QCritStatus |
Functions | |
| void | QS_test_pause_ (void) |
| uint32_t | QS_getTestProbe_ (QSpyFunPtr const api) |
| Internal function to get a test probe. | |
| QCritStatus | QF_critEntry (void) |
| void | QF_critExit (QCritStatus critStat) |
| QSchedStatus | QF_schedLock (uint_fast8_t const ceiling) |
| void | QF_schedUnlock (QSchedStatus const prevCeil) |
QS (QP/Spy software tracing) platform-independent public interface.
Forward Traceability
Definition in file qs.h.
| #define QS_INIT | ( | arg_ | ) |
| #define QS_EXIT | ( | ) |
| #define QS_GLB_FILTER | ( | rec_ | ) |
| #define QS_LOC_FILTER | ( | qsId_ | ) |
| #define QS_BEGIN_ID | ( | rec_, | |
| qsId_ ) |
| #define QS_END | ( | ) |
| #define QS_BEGIN_INCRIT | ( | rec_, | |
| qsId_ ) |
| #define QS_GLB_CHECK_ | ( | rec_ | ) |
| #define QS_I8 | ( | width_, | |
| data_ ) |
| #define QS_U8 | ( | width_, | |
| data_ ) |
| #define QS_I16 | ( | width_, | |
| data_ ) |
| #define QS_U16 | ( | width_, | |
| data_ ) |
| #define QS_I32 | ( | width_, | |
| data_ ) |
| #define QS_U32 | ( | width_, | |
| data_ ) |
| #define QS_I64 | ( | width_, | |
| data_ ) |
| #define QS_U64 | ( | width_, | |
| data_ ) |
| #define QS_F32 | ( | width_, | |
| data_ ) |
| #define QS_F64 | ( | width_, | |
| data_ ) |
| #define QS_MEM | ( | mem_, | |
| size_ ) |
| #define QS_ENUM | ( | group_, | |
| value_ ) |
| #define QS_OBJ | ( | obj_ | ) |
| #define QS_FUN | ( | fun_ | ) |
| #define QS_SIG | ( | sig_, | |
| obj_ ) |
| #define QS_SIG_DICTIONARY | ( | sig_, | |
| obj_ ) |
Produce event signal dictionary.
| [in] | sig_ | event signal to produce the dictionary |
| [in] | obj_ | object pointer to the associated state machine (NULL for global signal) |
| #define QS_OBJ_DICTIONARY | ( | obj_ | ) |
| #define QS_OBJ_ARR_DICTIONARY | ( | obj_, | |
| idx_ ) |
| #define QS_FUN_DICTIONARY | ( | fun_ | ) |
| #define QS_USR_DICTIONARY | ( | rec_ | ) |
| #define QS_ENUM_DICTIONARY | ( | value_, | |
| group_ ) |
| #define QS_RX_PUT | ( | b_ | ) |
| #define QS_TR_ISR_ENTRY | ( | isrnest_, | |
| prio_ ) |
| #define QS_TR_ISR_EXIT | ( | isrnest_, | |
| prio_ ) |
| #define QS_ASSERTION | ( | module_, | |
| id_, | |||
| delay_ ) |
| #define QS_CRIT_STAT QF_CRIT_STAT |
| #define QS_CRIT_ENTRY | ( | ) |
Internal macro for entering a critical section.
| #define QS_CRIT_EXIT | ( | ) |
Internal macro for exiting a critical section.
| #define QS_TEST_PROBE_DEF | ( | fun_ | ) |
Define a test probe for a given function.
| [in] | fun_ | function pointer for which to define the test probe |
| #define QS_TEST_PROBE | ( | code_ | ) |
| #define QS_TEST_PROBE_ID | ( | id_, | |
| code_ ) |
| #define QS_TEST_PAUSE | ( | ) |
QS macro to pause test execution and enter the test event-loop.
| typedef uint32_t QSTimeCtr |
Unsigned integer type for QS timestamps.
Details
The dynamic range of QSTimeCtr is configurable by the macro QS_TIME_SIZE, which can take values 1-byte (256 counts), 2-bytes (64K counts) and 4-bytes (4G counts).
| typedef float float32_t |
Alias for IEEE 754 32-bit floating point number.
| typedef double float64_t |
Alias for IEEE 754 64-bit floating point number.
| typedef uint_fast8_t QCritStatus |
| enum QS_GlbPredef |
Pre-defined QS record IDs (for QS_GLB_FILTER())}.
| Enumerator | |
|---|---|
| QS_EMPTY | QS record for cleanly starting a session. |
| QS_QEP_STATE_ENTRY | a state was entered |
| QS_QEP_STATE_EXIT | a state was exited |
| QS_QEP_STATE_INIT | an initial transition was taken in a state |
| QS_QEP_INIT_TRAN | the top-most initial transition was taken |
| QS_QEP_INTERN_TRAN | an internal transition was taken |
| QS_QEP_TRAN | a regular transition was taken |
| QS_QEP_IGNORED | an event was ignored (silently discarded) |
| QS_QEP_DISPATCH | an event was dispatched (begin of RTC step) |
| QS_QEP_UNHANDLED | an event was un-handled due to a guard |
| QS_QF_ACTIVE_DEFER | AO deferred an event. |
| QS_QF_ACTIVE_RECALL | AO recalled an event. |
| QS_QF_ACTIVE_SUBSCRIBE | an AO subscribed to an event |
| QS_QF_ACTIVE_UNSUBSCRIBE | an AO unsubscribed to an event |
| QS_QF_ACTIVE_POST | an event was posted (FIFO) directly to AO |
| QS_QF_ACTIVE_POST_LIFO | an event was posted (LIFO) directly to AO |
| QS_QF_ACTIVE_GET | AO got an event and its queue is not empty. |
| QS_QF_ACTIVE_GET_LAST | AO got an event and its queue is empty. |
| QS_QF_ACTIVE_RECALL_ATTEMPT | AO attempted to recall an event. |
| QS_QF_EQUEUE_POST | an event was posted (FIFO) to a raw queue |
| QS_QF_EQUEUE_POST_LIFO | an event was posted (LIFO) to a raw queue |
| QS_QF_EQUEUE_GET | get an event and queue still not empty |
| QS_QF_EQUEUE_GET_LAST | get the last event from the queue |
| QS_QF_NEW_ATTEMPT | an attempt to allocate an event failed |
| QS_QF_MPOOL_GET | a memory block was removed from memory pool |
| QS_QF_MPOOL_PUT | a memory block was returned to memory pool |
| QS_QF_PUBLISH | an event was published to active objects |
| QS_QF_NEW_REF | new event reference was created |
| QS_QF_NEW | new event was created |
| QS_QF_GC_ATTEMPT | garbage collection attempt |
| QS_QF_GC | garbage collection |
| QS_QF_TICK | QTimeEvt tick was called. |
| QS_QF_TIMEEVT_ARM | a time event was armed |
| QS_QF_TIMEEVT_AUTO_DISARM | a time event expired and was disarmed |
| QS_QF_TIMEEVT_DISARM_ATTEMPT | attempt to disarm a disarmed QTimeEvt |
| QS_QF_TIMEEVT_DISARM | true disarming of an armed time event |
| QS_QF_TIMEEVT_REARM | rearming of a time event |
| QS_QF_TIMEEVT_POST | a time event posted itself directly to an AO |
| QS_QF_DELETE_REF | an event reference is about to be deleted |
| QS_QF_CRIT_ENTRY | critical section was entered |
| QS_QF_CRIT_EXIT | critical section was exited |
| QS_QF_ISR_ENTRY | an ISR was entered |
| QS_QF_ISR_EXIT | an ISR was exited |
| QS_QF_INT_DISABLE | interrupts were disabled |
| QS_QF_INT_ENABLE | interrupts were enabled |
| QS_QF_ACTIVE_POST_ATTEMPT | attempt to post an evt to AO failed |
| QS_QF_EQUEUE_POST_ATTEMPT | attempt to post evt to QEQueue failed |
| QS_QF_MPOOL_GET_ATTEMPT | attempt to get a memory block failed |
| QS_SCHED_PREEMPT | scheduler asynchronously preempted a task |
| QS_SCHED_RESTORE | scheduler restored preempted task |
| QS_SCHED_LOCK | scheduler was locked |
| QS_SCHED_UNLOCK | scheduler was unlocked |
| QS_SCHED_NEXT | scheduler started next task |
| QS_SCHED_IDLE | scheduler restored the idle task |
| QS_ENUM_DICT | enumeration dictionary entry |
| QS_QEP_TRAN_HIST | a tran. to history was taken |
| QS_RESERVED_56 | reserved (previously QS_QEP_TRAN_EP) |
| QS_RESERVED_57 | reserved (previously QS_QEP_TRAN_XP) |
| QS_TEST_PAUSED | test has been paused |
| QS_TEST_PROBE_GET | reports that Test-Probe has been used |
| QS_SIG_DICT | signal dictionary entry |
| QS_OBJ_DICT | object dictionary entry |
| QS_FUN_DICT | function dictionary entry |
| QS_USR_DICT | user QS record dictionary entry |
| QS_TARGET_INFO | reports the Target information |
| QS_TARGET_DONE | reports completion of a user callback |
| QS_RX_STATUS | reports QS data receive status |
| QS_QUERY_DATA | reports the data from "current object" query |
| QS_PEEK_DATA | reports the data from the PEEK query |
| QS_ASSERT_FAIL | assertion failed in the code |
| QS_QF_RUN | QF_run() was entered. |
| QS_SEM_TAKE | a semaphore was taken by a thread |
| QS_SEM_BLOCK | a semaphore blocked a thread |
| QS_SEM_SIGNAL | a semaphore was signaled |
| QS_SEM_BLOCK_ATTEMPT | a semaphore blocked was attempted |
| QS_MTX_LOCK | a mutex was locked |
| QS_MTX_BLOCK | a mutex blocked a thread |
| QS_MTX_UNLOCK | a mutex was unlocked |
| QS_MTX_LOCK_ATTEMPT | a mutex lock was attempted |
| QS_MTX_BLOCK_ATTEMPT | a mutex blocking was attempted |
| QS_MTX_UNLOCK_ATTEMPT | a mutex unlock was attempted |
| QS_QF_ACTIVE_DEFER_ATTEMPT | AO attempted to defer an event. |
| QS_PRE_MAX | the # predefined signals |
| enum QS_ObjKind |
Object kinds used in QS-RX (NOTE: watch out for backwards compatibility!).
| void QS_test_pause_ | ( | void | ) |
| uint32_t QS_getTestProbe_ | ( | QSpyFunPtr const | api | ) |
Internal function to get a test probe.
Details
Test-Probe allows dynamic modification of the behavior of the CUT (Code Under Test).
| QCritStatus QF_critEntry | ( | void | ) |
| void QF_critExit | ( | QCritStatus | critStat | ) |
| QSchedStatus QF_schedLock | ( | uint_fast8_t const | ceiling | ) |
| void QF_schedUnlock | ( | QSchedStatus const | prevCeil | ) |