QP/C 8.1.1
Real-Time Event Framework
Loading...
Searching...
No Matches
qs.h File Reference

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

Enumerations

enum  QS_GlbPredef {
  QS_EMPTY , QS_QEP_STATE_ENTRY , QS_QEP_STATE_EXIT , QS_QEP_STATE_INIT ,
  QS_QEP_INIT_TRAN , QS_QEP_INTERN_TRAN , QS_QEP_TRAN , QS_QEP_IGNORED ,
  QS_QEP_DISPATCH , QS_QEP_UNHANDLED , QS_QF_ACTIVE_DEFER , QS_QF_ACTIVE_RECALL ,
  QS_QF_ACTIVE_SUBSCRIBE , QS_QF_ACTIVE_UNSUBSCRIBE , QS_QF_ACTIVE_POST , QS_QF_ACTIVE_POST_LIFO ,
  QS_QF_ACTIVE_GET , QS_QF_ACTIVE_GET_LAST , QS_QF_ACTIVE_RECALL_ATTEMPT , QS_QF_EQUEUE_POST ,
  QS_QF_EQUEUE_POST_LIFO , QS_QF_EQUEUE_GET , QS_QF_EQUEUE_GET_LAST , QS_QF_NEW_ATTEMPT ,
  QS_QF_MPOOL_GET , QS_QF_MPOOL_PUT , QS_QF_PUBLISH , QS_QF_NEW_REF ,
  QS_QF_NEW , QS_QF_GC_ATTEMPT , QS_QF_GC , QS_QF_TICK ,
  QS_QF_TIMEEVT_ARM , QS_QF_TIMEEVT_AUTO_DISARM , QS_QF_TIMEEVT_DISARM_ATTEMPT , QS_QF_TIMEEVT_DISARM ,
  QS_QF_TIMEEVT_REARM , QS_QF_TIMEEVT_POST , QS_QF_DELETE_REF , QS_QF_CRIT_ENTRY ,
  QS_QF_CRIT_EXIT , QS_QF_ISR_ENTRY , QS_QF_ISR_EXIT , QS_QF_INT_DISABLE ,
  QS_QF_INT_ENABLE , QS_QF_ACTIVE_POST_ATTEMPT , QS_QF_EQUEUE_POST_ATTEMPT , QS_QF_MPOOL_GET_ATTEMPT ,
  QS_SCHED_PREEMPT , QS_SCHED_RESTORE , QS_SCHED_LOCK , QS_SCHED_UNLOCK ,
  QS_SCHED_NEXT , QS_SCHED_IDLE , QS_ENUM_DICT , QS_QEP_TRAN_HIST ,
  QS_RESERVED_56 , QS_RESERVED_57 , QS_TEST_PAUSED , QS_TEST_PROBE_GET ,
  QS_SIG_DICT , QS_OBJ_DICT , QS_FUN_DICT , QS_USR_DICT ,
  QS_TARGET_INFO , QS_TARGET_DONE , QS_RX_STATUS , QS_QUERY_DATA ,
  QS_PEEK_DATA , QS_ASSERT_FAIL , QS_QF_RUN , QS_SEM_TAKE ,
  QS_SEM_BLOCK , QS_SEM_SIGNAL , QS_SEM_BLOCK_ATTEMPT , QS_MTX_LOCK ,
  QS_MTX_BLOCK , QS_MTX_UNLOCK , QS_MTX_LOCK_ATTEMPT , QS_MTX_BLOCK_ATTEMPT ,
  QS_MTX_UNLOCK_ATTEMPT , QS_QF_ACTIVE_DEFER_ATTEMPT , QS_PRE_MAX
}
 Pre-defined QS record IDs (for QS_GLB_FILTER())}. More...
enum  QS_ObjKind {
  QS_OBJ_SM , QS_OBJ_AO , QS_OBJ_MP , QS_OBJ_EQ ,
  QS_OBJ_TE , QS_OBJ_AP , QS_OBJ_SM_AO , QS_OBJ_EP
}
 Object kinds used in QS-RX (NOTE: watch out for backwards compatibility!). More...

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)

Detailed Description

QS (QP/Spy software tracing) platform-independent public interface.

Forward Traceability

  • DVR_QS_MC5_D4_8: complete definition is unnecessary in this translation unit
  • DVR_QS_B18_R5_1B: BARR-C:2018 Rule 5.1b: non-anonymous struct/union/enum declared outside typedef

Definition in file qs.h.

Macro Definition Documentation

◆ QS_GRP_ALL

#define QS_GRP_ALL   ((int_fast16_t)0xF0)

Definition at line 176 of file qs.h.

◆ QS_GRP_SM

#define QS_GRP_SM   ((int_fast16_t)0xF1)

Definition at line 177 of file qs.h.

◆ QS_GRP_AO

#define QS_GRP_AO   ((int_fast16_t)0xF2)

Definition at line 178 of file qs.h.

◆ QS_GRP_EQ

#define QS_GRP_EQ   ((int_fast16_t)0xF3)

Definition at line 179 of file qs.h.

◆ QS_GRP_MP

#define QS_GRP_MP   ((int_fast16_t)0xF4)

Definition at line 180 of file qs.h.

◆ QS_GRP_TE

#define QS_GRP_TE   ((int_fast16_t)0xF5)

Definition at line 181 of file qs.h.

◆ QS_GRP_QF

#define QS_GRP_QF   ((int_fast16_t)0xF6)

Definition at line 182 of file qs.h.

◆ QS_GRP_SC

#define QS_GRP_SC   ((int_fast16_t)0xF7)

Definition at line 183 of file qs.h.

◆ QS_GRP_SEM

#define QS_GRP_SEM   ((int_fast16_t)0xF8)

Definition at line 184 of file qs.h.

◆ QS_GRP_MTX

#define QS_GRP_MTX   ((int_fast16_t)0xF9)

Definition at line 185 of file qs.h.

◆ QS_GRP_U0

#define QS_GRP_U0   ((int_fast16_t)0xFA)

Definition at line 186 of file qs.h.

◆ QS_GRP_U1

#define QS_GRP_U1   ((int_fast16_t)0xFB)

Definition at line 187 of file qs.h.

◆ QS_GRP_U2

#define QS_GRP_U2   ((int_fast16_t)0xFC)

Definition at line 188 of file qs.h.

◆ QS_GRP_U3

#define QS_GRP_U3   ((int_fast16_t)0xFD)

Definition at line 189 of file qs.h.

◆ QS_GRP_U4

#define QS_GRP_U4   ((int_fast16_t)0xFE)

Definition at line 190 of file qs.h.

◆ QS_GRP_UA

#define QS_GRP_UA   ((int_fast16_t)0xFF)

Definition at line 191 of file qs.h.

◆ QS_USER

#define QS_USER   ((enum_t)100)

Definition at line 194 of file qs.h.

◆ QS_USER0

#define QS_USER0   QS_USER

Definition at line 195 of file qs.h.

◆ QS_USER1

#define QS_USER1   ((enum_t)(QS_USER + 5))

Definition at line 196 of file qs.h.

◆ QS_USER2

#define QS_USER2   ((enum_t)(QS_USER + 10))

Definition at line 197 of file qs.h.

◆ QS_USER3

#define QS_USER3   ((enum_t)(QS_USER + 15))

Definition at line 198 of file qs.h.

◆ QS_USER4

#define QS_USER4   ((enum_t)(QS_USER + 20))

Definition at line 199 of file qs.h.

◆ QS_ID_AO

#define QS_ID_AO   ((uint_fast16_t)0)

Definition at line 202 of file qs.h.

◆ QS_ID_EP

#define QS_ID_EP   ((uint_fast16_t)64)

Definition at line 203 of file qs.h.

◆ QS_ID_EQ

#define QS_ID_EQ   ((uint_fast16_t)80)

Definition at line 204 of file qs.h.

◆ QS_ID_AP

#define QS_ID_AP   ((uint_fast16_t)96)

Definition at line 205 of file qs.h.

◆ QS_IDS_ALL

#define QS_IDS_ALL   ((int_fast16_t)0xF0)

Definition at line 208 of file qs.h.

◆ QS_IDS_AO

#define QS_IDS_AO   ((int_fast16_t)0xF1)

Definition at line 209 of file qs.h.

◆ QS_IDS_EP

#define QS_IDS_EP   ((int_fast16_t)0xF2)

Definition at line 210 of file qs.h.

◆ QS_IDS_EQ

#define QS_IDS_EQ   ((int_fast16_t)0xF3)

Definition at line 211 of file qs.h.

◆ QS_IDS_AP

#define QS_IDS_AP   ((int_fast16_t)0xF4)

Definition at line 212 of file qs.h.

◆ QS_EOD

#define QS_EOD   ((uint16_t)0xFFFFU)

Definition at line 214 of file qs.h.

◆ QS_CMD

#define QS_CMD   ((uint8_t)0x07U)

Definition at line 215 of file qs.h.

◆ QS_INIT

#define QS_INIT ( arg_)
Value:
(QS_onStartup(arg_))

Initialize the QS software tracing system.

See also
QS_onStartup()

Definition at line 256 of file qs.h.

◆ QS_EXIT

#define QS_EXIT ( )
Value:
(QS_onCleanup())

Terminate the QS software tracing system.

See also
QS_onCleanup()

Definition at line 257 of file qs.h.

◆ QS_OUTPUT

#define QS_OUTPUT ( )
Value:
(QS_output())

Definition at line 258 of file qs.h.

◆ QS_RX_INPUT

#define QS_RX_INPUT ( )
Value:
(QS_rx_input())

Definition at line 259 of file qs.h.

◆ QS_GLB_FILTER

#define QS_GLB_FILTER ( rec_)
Value:
(QS_glbFilter_((int_fast16_t)(rec_)))

check the global filter

See also
QS_glbFilter_()

Definition at line 260 of file qs.h.

◆ QS_LOC_FILTER

#define QS_LOC_FILTER ( qsId_)
Value:
(QS_locFilter_((int_fast16_t)(qsId_)))

check the local filter

See also
QS_locFilter_()

Definition at line 261 of file qs.h.

◆ QS_FLUSH

#define QS_FLUSH ( )
Value:
(QS_onFlush())

Definition at line 262 of file qs.h.

◆ QS_BEGIN_ID

#define QS_BEGIN_ID ( rec_,
qsId_ )
Value:
if (QS_fltCheck_((uint32_t)(rec_) >> 5U, \
(uint32_t)1U << ((uint32_t)(rec_) & 0x1FU), \
(qsId_))) { \
QS_CRIT_STAT \
QS_CRIT_ENTRY(); \
QS_beginRec_((uint_fast8_t)(rec_)); \
QS_TIME_PRE(); {

Definition at line 264 of file qs.h.

◆ QS_END

#define QS_END ( )
Value:
} \
QS_endRec_(); \
QS_CRIT_EXIT(); \
}

Definition at line 273 of file qs.h.

◆ QS_BEGIN_INCRIT

#define QS_BEGIN_INCRIT ( rec_,
qsId_ )
Value:
if (QS_fltCheck_((uint32_t)(rec_) >> 5U, \
(uint_fast32_t)1U << ((uint32_t)(rec_) & 0x1FU), (qsId_))) \
{ \
QS_beginRec_((uint_fast8_t)(rec_)); \
QS_TIME_PRE(); {

Definition at line 278 of file qs.h.

◆ QS_END_INCRIT

#define QS_END_INCRIT ( )
Value:
} \
QS_endRec_(); \
}

Definition at line 285 of file qs.h.

◆ QS_GLB_CHECK_

#define QS_GLB_CHECK_ ( rec_)
Value:
(QS_glbCheck_((uint32_t)(rec_) >> 5U, \
(uint32_t)1U << ((uint32_t)(rec_) & 0x1FU)))

Definition at line 289 of file qs.h.

◆ QS_LOC_CHECK_

#define QS_LOC_CHECK_ ( qsId_)
Value:
(QS_locCheck_((qsId_)))

Definition at line 292 of file qs.h.

◆ QS_REC_DONE

#define QS_REC_DONE ( )
Value:
((void)0)

Definition at line 295 of file qs.h.

◆ QS_I8

#define QS_I8 ( width_,
data_ )
Value:
(QS_u8_fmt_((uint8_t)(((width_) << 4U) & 0x7U) | QS_I8_ENUM_FMT, \
(data_)))

Definition at line 298 of file qs.h.

◆ QS_U8

#define QS_U8 ( width_,
data_ )
Value:
(QS_u8_fmt_((uint8_t)(((width_) << 4U)) | QS_U8_FMT, (data_)))

Definition at line 302 of file qs.h.

◆ QS_I16

#define QS_I16 ( width_,
data_ )
Value:
(QS_u16_fmt_((uint8_t)(((width_) << 4U)) | QS_I16_FMT, (data_)))

Definition at line 305 of file qs.h.

◆ QS_U16

#define QS_U16 ( width_,
data_ )
Value:
(QS_u16_fmt_((uint8_t)(((width_) << 4U)) | QS_U16_FMT, (data_)))

Definition at line 308 of file qs.h.

◆ QS_I32

#define QS_I32 ( width_,
data_ )
Value:
(QS_u32_fmt_((uint8_t)(((width_) << 4U)) | QS_I32_FMT, (data_)))

Definition at line 311 of file qs.h.

◆ QS_U32

#define QS_U32 ( width_,
data_ )
Value:
(QS_u32_fmt_((uint8_t)(((width_) << 4U)) | QS_U32_FMT, (data_)))

Definition at line 314 of file qs.h.

◆ QS_I64

#define QS_I64 ( width_,
data_ )
Value:
(QS_u64_fmt_((uint8_t)(((width_) << 4U)) | QS_I64_FMT, (data_)))

Definition at line 317 of file qs.h.

◆ QS_U64

#define QS_U64 ( width_,
data_ )
Value:
(QS_u64_fmt_((uint8_t)(((width_) << 4U)) | QS_U64_FMT, (data_)))

Definition at line 320 of file qs.h.

◆ QS_F32

#define QS_F32 ( width_,
data_ )
Value:
(QS_f32_fmt_((uint8_t)(((width_) << 4U)) | QS_F32_FMT, (data_)))

Definition at line 323 of file qs.h.

◆ QS_F64

#define QS_F64 ( width_,
data_ )
Value:
(QS_f64_fmt_((uint8_t)(((width_) << 4U)) | QS_F64_FMT, (data_)))

Definition at line 326 of file qs.h.

◆ QS_STR

#define QS_STR ( str_)
Value:
(QS_str_fmt_((str_)))

Definition at line 329 of file qs.h.

◆ QS_MEM

#define QS_MEM ( mem_,
size_ )
Value:
(QS_mem_fmt_((mem_), (size_)))

Definition at line 331 of file qs.h.

◆ QS_ENUM

#define QS_ENUM ( group_,
value_ )
Value:
(QS_u8_fmt_((uint8_t)(0x80U | ((group_) << 4U)) | QS_I8_ENUM_FMT, \
(uint8_t)(value_)))

Definition at line 333 of file qs.h.

◆ QS_TIME_PRE

#define QS_TIME_PRE ( )
Value:
(QS_u32_raw_(QS_onGetTime()))

Definition at line 340 of file qs.h.

◆ QS_OBJ

#define QS_OBJ ( obj_)
Value:
(QS_u32_fmt_(QS_OBJ_FMT, (uint32_t)(obj_)))

Definition at line 346 of file qs.h.

◆ QS_FUN

#define QS_FUN ( fun_)
Value:
(QS_u32_fmt_(QS_FUN_FMT, (uint32_t)(fun_)))

Definition at line 354 of file qs.h.

◆ QS_SIG

#define QS_SIG ( sig_,
obj_ )
Value:
QS_u16_fmt_(QS_SIG_FMT, (sig_)); \
QS_obj_raw_(obj_)

Definition at line 359 of file qs.h.

◆ QS_SIG_DICTIONARY

#define QS_SIG_DICTIONARY ( sig_,
obj_ )
Value:
(QS_sig_dict_pre_((QSignal)(sig_), (obj_), #sig_))
uint16_t QSignal
The signal of event QEvt.
Definition qp.h:97

Produce event signal dictionary.

Parameters
[in]sig_event signal to produce the dictionary
[in]obj_object pointer to the associated state machine (NULL for global signal)

Definition at line 363 of file qs.h.

◆ QS_OBJ_DICTIONARY

#define QS_OBJ_DICTIONARY ( obj_)
Value:
(QS_obj_dict_pre_((obj_), #obj_))

Produce object dictionary.

Parameters
[in]obj_object pointer for which to produce the dictionary

Definition at line 366 of file qs.h.

◆ QS_OBJ_ARR_DICTIONARY

#define QS_OBJ_ARR_DICTIONARY ( obj_,
idx_ )
Value:
(QS_obj_arr_dict_pre_((obj_), (idx_), #obj_))

Produce object-array dictionary.

Parameters
[in]obj_object pointer for which to produce the dictionary
[in]idx_index of the object array element to produce the dictionary

Definition at line 369 of file qs.h.

◆ QS_FUN_DICTIONARY

#define QS_FUN_DICTIONARY ( fun_)
Value:
(QS_fun_dict_pre_((void (*)(void))(fun_), #fun_))

Produce function dictionary (typically for state-handler functions).

Parameters
[in]fun_function pointer for which to produce the dictionary

Definition at line 372 of file qs.h.

◆ QS_USR_DICTIONARY

#define QS_USR_DICTIONARY ( rec_)
Value:
(QS_usr_dict_pre_((rec_), #rec_))

Produce user-record dictionary for application-specific trace records.

Parameters
[in]rec_user-defined record (typically enumeration) to produce the dictionary

Definition at line 375 of file qs.h.

◆ QS_ENUM_DICTIONARY

#define QS_ENUM_DICTIONARY ( value_,
group_ )
Value:
(QS_enum_dict_pre_((value_), (group_), #value_))

Produce enumeration dictionary for application-defined enumerations.

Parameters
[in]value_user-defined enumeration to produce the dictionary
[in]group_user-defined group number of the enumeration

Definition at line 378 of file qs.h.

◆ QS_RX_PUT

#define QS_RX_PUT ( b_)
Value:
(QS_rxPut((b_)))

Macro to call QS_rxPut() when Q_SPY is defined (resolves to nothing when Q_SPY is not defined).

See also
QS_rxPut()

Definition at line 381 of file qs.h.

◆ QS_TR_CRIT_ENTRY

#define QS_TR_CRIT_ENTRY ( )
Value:
(QS_crit_entry_pre_())

Definition at line 383 of file qs.h.

◆ QS_TR_CRIT_EXIT

#define QS_TR_CRIT_EXIT ( )
Value:
(QS_crit_exit_pre_())

Definition at line 384 of file qs.h.

◆ QS_TR_ISR_ENTRY

#define QS_TR_ISR_ENTRY ( isrnest_,
prio_ )
Value:
(QS_isr_entry_pre_((isrnest_), (prio_)))

Definition at line 386 of file qs.h.

◆ QS_TR_ISR_EXIT

#define QS_TR_ISR_EXIT ( isrnest_,
prio_ )
Value:
(QS_isr_exit_pre_((isrnest_), (prio_)))

Definition at line 388 of file qs.h.

◆ QS_ONLY

#define QS_ONLY ( code_)
Value:
(code_)

Definition at line 391 of file qs.h.

◆ QS_ASSERTION

#define QS_ASSERTION ( module_,
id_,
delay_ )
Value:
(QS_assertion_pre_((module_), (id_), (delay_)))

Definition at line 393 of file qs.h.

◆ QS_CRIT_STAT

#define QS_CRIT_STAT   QF_CRIT_STAT

Internal QS macro for defining the critical section status.

Definition at line 403 of file qs.h.

◆ QS_CRIT_ENTRY

#define QS_CRIT_ENTRY ( )
Value:
#define QF_CRIT_ENTRY()
Definition qsafe.h:40

Internal macro for entering a critical section.

Definition at line 407 of file qs.h.

◆ QS_CRIT_EXIT

#define QS_CRIT_EXIT ( )
Value:
#define QF_CRIT_EXIT()
Definition qsafe.h:44

Internal macro for exiting a critical section.

Definition at line 411 of file qs.h.

◆ QUTEST_ON_POST

#define QUTEST_ON_POST   124

Definition at line 573 of file qs.h.

◆ QS_RXATTR_SIZE

#define QS_RXATTR_SIZE   128U

Definition at line 574 of file qs.h.

◆ QS_TEST_PROBE_DEF

#define QS_TEST_PROBE_DEF ( fun_)
Value:
uint32_t const qs_tp_ = QS_getTestProbe_((void (*)(void))(fun_));
uint32_t QS_getTestProbe_(QSpyFunPtr const api)
Internal function to get a test probe.

Define a test probe for a given function.

Parameters
[in]fun_function pointer for which to define the test probe

Definition at line 758 of file qs.h.

◆ QS_TEST_PROBE

#define QS_TEST_PROBE ( code_)
Value:
if (qs_tp_ != 0U) { code_ }

QS macro to apply a Test-Probe.

Details

Parameters
[in]code_code to execute when the test probe is defined

Definition at line 760 of file qs.h.

◆ QS_TEST_PROBE_ID

#define QS_TEST_PROBE_ID ( id_,
code_ )
Value:
if (qs_tp_ == (uint32_t)(id_)) { code_ }

QS macro to apply a Test-Probe.

Details

Parameters
[in]id_the test probe ID
[in]code_code to execute when the test probe is defined

Definition at line 761 of file qs.h.

◆ QS_TEST_PAUSE

#define QS_TEST_PAUSE ( )
Value:
void QS_test_pause_(void)

QS macro to pause test execution and enter the test event-loop.

Definition at line 762 of file qs.h.

Typedef Documentation

◆ QSObj

typedef uint32_t QSObj

Definition at line 225 of file qs.h.

◆ QSFun

typedef uint32_t QSFun

Definition at line 233 of file qs.h.

◆ QSTimeCtr

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).

See also

Definition at line 252 of file qs.h.

◆ float32_t

typedef float float32_t

Alias for IEEE 754 32-bit floating point number.

Note
QP/C does not use floating-point types anywhere in the internal implementation, except in QS software tracing, where utilities for output of floating-point numbers are provided for application-specific trace records.

Definition at line 397 of file qs.h.

◆ float64_t

typedef double float64_t

Alias for IEEE 754 64-bit floating point number.

Note
QP/C does not use floating-point types anywhere in the internal implementation, except in QS software tracing, where utilities for output of floating-point numbers are provided for application-specific trace records.

Definition at line 398 of file qs.h.

◆ QCritStatus

typedef uint_fast8_t QCritStatus

Definition at line 746 of file qs.h.

Enumeration Type Documentation

◆ 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

Definition at line 50 of file qs.h.

◆ QS_ObjKind

enum QS_ObjKind

Object kinds used in QS-RX (NOTE: watch out for backwards compatibility!).

Enumerator
QS_OBJ_SM 

State Machine.

QS_OBJ_AO 

Active Object.

QS_OBJ_MP 

Event Pool.

QS_OBJ_EQ 

Event Queue.

QS_OBJ_TE 

Time Event.

QS_OBJ_AP 

generic Application-specific object

QS_OBJ_SM_AO 

state machine AND active object

QS_OBJ_EP 

Event Pool.

Definition at line 580 of file qs.h.

Function Documentation

◆ QS_test_pause_()

void QS_test_pause_ ( void )

◆ QS_getTestProbe_()

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).

◆ QF_critEntry()

QCritStatus QF_critEntry ( void )

Definition at line 147 of file qutest.c.

◆ QF_critExit()

void QF_critExit ( QCritStatus critStat)

Definition at line 158 of file qutest.c.

◆ QF_schedLock()

QSchedStatus QF_schedLock ( uint_fast8_t const ceiling)

Definition at line 168 of file qutest.c.

◆ QF_schedUnlock()

void QF_schedUnlock ( QSchedStatus const prevCeil)

Definition at line 193 of file qutest.c.