QTools  7.0.0
Collection of Host-Based Tools
QS Struct Reference

#include <qpc_qs.h>

Static Public Member Functions

void QS_initBuf (uint8_t sto[], uint_fast16_t stoSize)
 
uint16_t QS_getByte (void)
 
uint8_t const * QS_getBlock (uint16_t *pNbytes)
 
uint8_t QS_onStartup (void const *arg)
 
void QS_onCleanup (void)
 
void QS_onFlush (void)
 
QSTimeCtr QS_onGetTime (void)
 
void QS_rxInitBuf (uint8_t sto[], uint16_t stoSize)
 
void QS_rxParse (void)
 
bool QS_RX_PUT (uint8_t const b)
 
uint16_t QS_rxGetNfree (void)
 
void QS_setCurrObj (uint8_t obj_kind, void *obj_ptr)
 
void QS_queryCurrObj (uint8_t obj_kind)
 
void QS_onReset (void)
 
void QS_onCommand (uint8_t cmdId, uint32_t param1, uint32_t param2, uint32_t param3)
 
void QS_onTestTeardown (void)
 
void QS_onTestLoop (void)
 
void QS_onTestEvt (QEvt *e)
 
void QS_onTestPost (void const *sender, QActive *recipient, QEvt const *e, bool status)
 
void QS_processTestEvts_ (void)
 
void QS_tickX_ (uint_fast8_t const tickRate, void const *const sender)
 
uint32_t QS_getTestProbe_ (void(*const api)(void))
 

Data Fields

uint8_t dummy
 

Static Private Member Functions

void QS_glbFilter_ (int_fast16_t const filter)
 
void QS_locFilter_ (int_fast16_t const filter)
 
void QS_beginRec_ (uint_fast8_t rec)
 
void QS_endRec_ (void)
 
void QS_u8_raw_ (uint8_t d)
 
void QS_2u8_raw_ (uint8_t d1, uint8_t d2)
 
void QS_u16_raw_ (uint16_t d)
 
void QS_u32_raw_ (uint32_t d)
 
void QS_str_raw_ (char const *str)
 
void QS_u8_fmt_ (uint8_t format, uint8_t d)
 
void QS_u16_fmt_ (uint8_t format, uint16_t d)
 
void QS_u32_fmt_ (uint8_t format, uint32_t d)
 
void QS_f32_fmt_ (uint8_t format, float32_t f)
 
void QS_f64_fmt_ (uint8_t format, float64_t d)
 
void QS_obj_raw_ (void const *const obj)
 
void QS_str_fmt_ (char const *str)
 
void QS_mem_fmt_ (uint8_t const *blk, uint8_t size)
 
void QS_u64_raw_ (uint64_t d)
 
void QS_u64_fmt_ (uint8_t format, uint64_t d)
 
void QS_sig_dict_pre_ (enum_t const sig, void const *const obj, char const *name)
 
void QS_obj_dict_pre_ (void const *const obj, char const *name)
 
void QS_fun_dict_pre_ (void(*const fun)(void), char const *name)
 
void QS_usr_dict_pre_ (enum_t const rec, char const *const name)
 
void QF_QS_CRIT_ENTRY (void)
 
void QF_QS_CRIT_EXIT (void)
 
void QF_QS_ISR_ENTRY (uint8_t const isrnest, uint8_t const prio)
 
void QF_QS_ISR_EXIT (uint8_t const isrnest, uint8_t const prio)
 
void QS_test_pause_ (void)
 

Detailed Description

QS software tracing facilities

Description
This class groups together QS services. It has only static members and should not be instantiated.

Definition at line 243 of file qpc_qs.h.

Member Function Documentation

◆ QS_initBuf()

void QS_initBuf ( uint8_t  sto[],
uint_fast16_t  stoSize 
)
static

Initialize the QS data buffer.

◆ QS_glbFilter_()

void QS_glbFilter_ ( int_fast16_t const  filter)
staticprivate

Set/clear the global Filter for a given QS record or group of records.

◆ QS_locFilter_()

void QS_locFilter_ ( int_fast16_t const  filter)
staticprivate

Set/clear the local Filter for a given object-id or group of object-ids.

◆ QS_beginRec_()

void QS_beginRec_ ( uint_fast8_t  rec)
staticprivate

Mark the begin of a QS record rec

◆ QS_endRec_()

void QS_endRec_ ( void  )
staticprivate

Mark the end of a QS record rec

◆ QS_u8_raw_()

void QS_u8_raw_ ( uint8_t  d)
staticprivate

output raw uint8_t data element (without format information)

◆ QS_2u8_raw_()

void QS_2u8_raw_ ( uint8_t  d1,
uint8_t  d2 
)
staticprivate

output two raw uint8_t data elements (without format information)

◆ QS_u16_raw_()

void QS_u16_raw_ ( uint16_t  d)
staticprivate

Output raw uint16_t data element (without format information)

◆ QS_u32_raw_()

void QS_u32_raw_ ( uint32_t  d)
staticprivate

Output raw uint32_t data element (without format information)

◆ QS_str_raw_()

void QS_str_raw_ ( char const *  str)
staticprivate

Output raw zero-terminated string element (without format information)

◆ QS_u8_fmt_()

void QS_u8_fmt_ ( uint8_t  format,
uint8_t  d 
)
staticprivate

Output uint8_t data element with format information

◆ QS_u16_fmt_()

void QS_u16_fmt_ ( uint8_t  format,
uint16_t  d 
)
staticprivate

output uint16_t data element with format information

◆ QS_u32_fmt_()

void QS_u32_fmt_ ( uint8_t  format,
uint32_t  d 
)
staticprivate

Output uint32_t data element with format information

◆ QS_f32_fmt_()

void QS_f32_fmt_ ( uint8_t  format,
float32_t  f 
)
staticprivate

Output 32-bit floating point data element with format information

◆ QS_f64_fmt_()

void QS_f64_fmt_ ( uint8_t  format,
float64_t  d 
)
staticprivate

Output 64-bit floating point data element with format information

◆ QS_obj_raw_()

void QS_obj_raw_ ( void const *const  obj)
staticprivate

Output obj pointer data element without format information

◆ QS_str_fmt_()

void QS_str_fmt_ ( char const *  str)
staticprivate

Output zero-terminated ASCII string element with format information

◆ QS_mem_fmt_()

void QS_mem_fmt_ ( uint8_t const *  blk,
uint8_t  size 
)
staticprivate

Output memory block of up to 255-bytes with format information

◆ QS_u64_raw_()

void QS_u64_raw_ ( uint64_t  d)
staticprivate

Output raw uint64_t data element without format information

◆ QS_u64_fmt_()

void QS_u64_fmt_ ( uint8_t  format,
uint64_t  d 
)
staticprivate

Output uint64_t data element with format information

◆ QS_getByte()

uint16_t QS_getByte ( void  )
static

Byte-oriented interface to the QS data buffer.

◆ QS_getBlock()

uint8_t const * QS_getBlock ( uint16_t *  pNbytes)
static

Block-oriented interface to the QS data buffer.

◆ QS_onStartup()

uint8_t QS_onStartup ( void const *  arg)
static

Callback to startup the QS facility

Description
This is a platform-dependent "callback" function invoked through the macro QS_INIT(). You need to implement this function in your application. At a minimum, the function must configure the QS buffer by calling QS_initBuf(). Typically, you will also want to open/configure the QS output channel, such as a serial port, or a data file. The void* argument arg can be used to pass parameter(s) needed to configure the output channel.
Returns
the staus of initialization. Typically 1 (true) when the QS initialization was successful, or 0 (false) when it failed.
Usage
The following example illustrates an implementation of QS_onStartup():

◆ QS_onCleanup()

void QS_onCleanup ( void  )
static

Callback to cleanup the QS facility

Description
This is a platform-dependent "callback" function invoked through the macro QS_EXIT(). You need to implement this function in your application. The main purpose of this function is to close the QS output channel, if necessary.

◆ QS_onFlush()

void QS_onFlush ( void  )
static

Callback to flush the QS trace data to the host

Description
This is a platform-dependent "callback" function to flush the QS trace buffer to the host. The function typically busy-waits until all the data in the buffer is sent to the host. This is acceptable only in the initial transient.

◆ QS_onGetTime()

QSTimeCtr QS_onGetTime ( void  )
static

Callback to obtain a timestamp for a QS record.

Description
This is a platform-dependent "callback" function invoked from the macro QS_TIME_PRE_() to add the time stamp to a QS record.
Note
Some of the predefined QS records from QP do not output the time stamp. However, ALL user records do output the time stamp.
QS_onGetTime() is called in a critical section and should not exit the critical section.
Returns
the current timestamp.
Usage
The following example shows using a system call to implement QS time stamping:

◆ QS_sig_dict_pre_()

void QS_sig_dict_pre_ ( enum_t const  sig,
void const *const  obj,
char const *  name 
)
staticprivate

Output predefined signal-dictionary record

◆ QS_obj_dict_pre_()

void QS_obj_dict_pre_ ( void const *const  obj,
char const *  name 
)
staticprivate

Output predefined object-dictionary record

◆ QS_fun_dict_pre_()

void QS_fun_dict_pre_ ( void(*)(void)  fun,
char const *  name 
)
staticprivate

Output predefined function-dictionary record

◆ QS_usr_dict_pre_()

void QS_usr_dict_pre_ ( enum_t const  rec,
char const *const  name 
)
staticprivate

Output predefined user-dictionary record

◆ QF_QS_CRIT_ENTRY()

void QF_QS_CRIT_ENTRY ( void  )
staticprivate

Output the critical section entry

◆ QF_QS_CRIT_EXIT()

void QF_QS_CRIT_EXIT ( void  )
staticprivate

Output the critical section exit

◆ QF_QS_ISR_ENTRY()

void QF_QS_ISR_ENTRY ( uint8_t const  isrnest,
uint8_t const  prio 
)
staticprivate

Output the interrupt entry record

◆ QF_QS_ISR_EXIT()

void QF_QS_ISR_EXIT ( uint8_t const  isrnest,
uint8_t const  prio 
)
staticprivate

Output the interrupt exit record

◆ QS_rxInitBuf()

void QS_rxInitBuf ( uint8_t  sto[],
uint16_t  stoSize 
)
static

Initialize the QS RX data buffer.

◆ QS_rxParse()

void QS_rxParse ( void  )
static

Parse all bytes present in the QS RX data buffer

◆ QS_RX_PUT()

bool QS_RX_PUT ( uint8_t const  b)
static

Put one byte into the QS RX lock-free buffer

◆ QS_rxGetNfree()

uint16_t QS_rxGetNfree ( void  )
static

Obtain the number of free bytes in the QS RX data buffer

◆ QS_setCurrObj()

void QS_setCurrObj ( uint8_t  obj_kind,
void *  obj_ptr 
)
static

Set the "current object" in the Target

◆ QS_queryCurrObj()

void QS_queryCurrObj ( uint8_t  obj_kind)
static

Query the "current object" in the Target

◆ QS_onReset()

void QS_onReset ( void  )
static

Callback function to reset the Target (to be implemented in the BSP)

◆ QS_onCommand()

void QS_onCommand ( uint8_t  cmdId,
uint32_t  param1,
uint32_t  param2,
uint32_t  param3 
)
static

Callback function to execute user commands (to be implemented in BSP)

◆ QS_onTestTeardown()

void QS_onTestTeardown ( void  )
static

callback to teardown after a unit test inside the Target

◆ QS_onTestLoop()

void QS_onTestLoop ( void  )
static

callback to run the test loop

◆ QS_onTestEvt()

void QS_onTestEvt ( QEvt *  e)
static

callback to "massage" the test event before dispatching/posting it

◆ QS_onTestPost()

void QS_onTestPost ( void const *  sender,
QActive *  recipient,
QEvt const *  e,
bool  status 
)
static

callback to examine an event that is about to be posted

◆ QS_processTestEvts_()

void QS_processTestEvts_ ( void  )
static

QS internal function to process posted events during test

◆ QS_tickX_()

void QS_tickX_ ( uint_fast8_t const  tickRate,
void const *const  sender 
)
static

internal function to process armed time events during test

◆ QS_getTestProbe_()

uint32_t QS_getTestProbe_ ( void(*)(void)  api)
static

QS internal function to get the Test-Probe for a given API

◆ QS_test_pause_()

void QS_test_pause_ ( void  )
staticprivate

QS internal function to pause test and enter the test event loop

Field Documentation

◆ dummy

uint8_t dummy

Definition at line 244 of file qpc_qs.h.


The documentation for this struct was generated from the following file: