#include <qpc_qs.h>
|
void | QS_beginRec_ (uint_fast8_t const rec) |
|
void | QS_endRec_ (void) |
|
void | QS_u8_raw_ (uint8_t const d) |
|
void | QS_2u8_raw_ (uint8_t const d1, uint8_t const d2) |
|
void | QS_u16_raw_ (uint16_t const d) |
|
void | QS_u32_raw_ (uint32_t const d) |
|
void | QS_obj_raw_ (void const *const obj) |
|
void | QS_str_raw_ (char const *const str) |
|
void | QS_u8_fmt_ (uint8_t const format, uint8_t const d) |
|
void | QS_u16_fmt_ (uint8_t const format, uint16_t const d) |
|
void | QS_u32_fmt_ (uint8_t const format, uint32_t const d) |
|
void | QS_str_fmt_ (char const *const str) |
|
void | QS_mem_fmt_ (uint8_t const *const blk, uint8_t const size) |
|
void | QS_sig_dict_pre_ (enum_t const sig, void const *const obj, char const *const name) |
|
void | QS_obj_dict_pre_ (void const *const obj, char const *const name) |
|
void | QS_obj_arr_dict_pre_ (void const *const obj, uint_fast16_t const idx, char const *const name) |
|
void | QS_fun_dict_pre_ (QSpyFunPtr const fun, char const *const name) |
|
void | QS_usr_dict_pre_ (enum_t const rec, char const *const name) |
|
void | QS_enum_dict_pre_ (enum_t const value, uint8_t const group, char const *const name) |
|
void | QS_target_info_pre_ (uint8_t const isReset) |
|
void | QS_u64_raw_ (uint64_t d) |
|
void | QS_u64_fmt_ (uint8_t format, uint64_t d) |
|
void | QS_f32_fmt_ (uint8_t const format, float32_t const d) |
|
void | QS_f64_fmt_ (uint8_t const format, float64_t const d) |
|
Definition at line 356 of file qpc_qs.h.
◆ QS_initBuf()
void QS_initBuf |
( |
uint8_t *const |
sto, |
|
|
uint_fast32_t const |
stoSize |
|
) |
| |
|
static |
Initialize the QS-TX data buffer
This function should be called from QS_onStartup() to provide QS with the data buffer. The first argument sto
is the address of the memory block, and the second argument stoSize
is the size of this block [in bytes]. Currently the size of the QS buffer cannot exceed 64KB.
- Parameters
-
[in] | sto | pointer to the storage for the transmit buffer |
[in] | stoSize | size in [bytes] of the storage buffer |
- Note
- If the data output rate cannot keep up with the production rate, QS will start overwriting the older data with newer data. This is consistent with the "last-is-best" QS policy. The record sequence counters and check sums on each record allow the QSPY host utility to easily detect any data loss.
◆ QS_getByte()
uint16_t QS_getByte |
( |
void |
| ) |
|
|
static |
Byte-oriented interface to the QS-TX data buffer
This function delivers one byte at a time from the QS data buffer.
- Returns
- the byte in the least-significant 8-bits of the 16-bit return value if the byte is available. If no more data is available at the time, the function returns QS_EOD (End-Of-Data).
- Note
- QS_getByte() is NOT protected with a critical section.
◆ QS_getBlock()
uint8_t const * QS_getBlock |
( |
uint16_t *const |
pNbytes | ) |
|
|
static |
Block-oriented interface to the QS-TX data buffer
This function delivers a contiguous block of data from the QS data buffer. The function returns the pointer to the beginning of the block, and writes the number of bytes in the block to the location pointed to by pNbytes
. The argument pNbytes
is also used as input to provide the maximum size of the data block that the caller can accept.
- Parameters
-
[in,out] | pNbytes | pointer to the number of bytes to send. On input, pNbytes specifies the maximum number of bytes that the function can provide. On output, pNbytes contains the actual number of bytes available. |
- Returns
- if data is available, the function returns pointer to the contiguous block of data and sets the value pointed to by
pNbytes
to the # available bytes. If data is available at the time the function is called, the function returns NULL pointer and sets the value pointed to by pNbytes
to zero.
- Note
- Only the NULL return from QS_getBlock() indicates that the QS buffer is empty at the time of the call. The non-NULL return often means that the block is at the end of the buffer and you need to call QS_getBlock() again to obtain the rest of the data that "wrapped around" to the beginning of the QS data buffer.
-
QS_getBlock() is not protected with a critical section.
◆ QS_glbFilter_()
void QS_glbFilter_ |
( |
int_fast16_t const |
filter | ) |
|
|
static |
Set/clear the global Filter for a given QS record or a group of records
This function sets up the QS filter to enable record types specified in the filter
parameter. The value QS_ALL_RECORDS specifies to filter-in all records. This function should be called indirectly through the macro QS_GLB_FILTER()
- Parameters
-
[in] | filter | the QS record-d or group to enable in the filter, if positive or disable, if negative. The record-id numbers must be in the range -127..127. |
- Note
- Filtering based on the record-type is only the first layer of filtering. The second layer is based on the object-type. Both filter layers must be enabled for the QS record to be inserted in the QS buffer.
- See also
- QS_locFilter_()
◆ QS_locFilter_()
void QS_locFilter_ |
( |
int_fast16_t const |
filter | ) |
|
|
static |
Set/clear the local Filter for a given object-id or a group of object-ids
This function sets up the local QS filter to enable or disable the given QS object-id or a group of object-ids filter. This function should be called indirectly through the macro QS_LOC_FILTER()
- Parameters
-
[in] | filter | the QS object-id or group to enable in the filter, if positive or disable, if negative. The qs_id numbers must be in the range 1..127. |
- Note
- Filtering based on the object-id (local filter) is the second layer of filtering. The first layer is based on the QS record-type (global filter). Both filter layers must be enabled for the QS record to be inserted into the QS buffer.
- See also
- QS_glbFilter_()
◆ QS_doOutput()
void QS_doOutput |
( |
void |
| ) |
|
|
static |
Perform the QS-TX output (implemented in some QS ports)
◆ QS_beginRec_()
void QS_beginRec_ |
( |
uint_fast8_t const |
rec | ) |
|
|
staticprivate |
Mark the begin of a QS record rec
This function must be called at the beginning of each QS record. This function should be called indirectly through the macro QS_BEGIN_ID(), or QS_BEGIN_NOCRIT(), depending if it's called in a normal code or from a critical section.
◆ QS_endRec_()
Mark the end of a QS record rec
This function must be called at the end of each QS record. This function should be called indirectly through the macro QS_END(), or QS_END_NOCRIT(), depending if it's called in a normal code or from a critical section.
◆ QS_u8_raw_()
void QS_u8_raw_ |
( |
uint8_t const |
d | ) |
|
|
staticprivate |
output uint8_t data element without format information
◆ QS_2u8_raw_()
void QS_2u8_raw_ |
( |
uint8_t const |
d1, |
|
|
uint8_t const |
d2 |
|
) |
| |
|
staticprivate |
output two uint8_t data elements without format information
◆ QS_u16_raw_()
void QS_u16_raw_ |
( |
uint16_t const |
d | ) |
|
|
staticprivate |
output uint16_t data element without format information
◆ QS_u32_raw_()
void QS_u32_raw_ |
( |
uint32_t const |
d | ) |
|
|
staticprivate |
output uint32_t data element without format information
◆ QS_obj_raw_()
void QS_obj_raw_ |
( |
void const *const |
obj | ) |
|
|
staticprivate |
Output obj pointer data element without format information
- Note
- This function is only to be used through macros, never in the client code directly.
◆ QS_str_raw_()
void QS_str_raw_ |
( |
char const *const |
str | ) |
|
|
staticprivate |
Output raw zero-terminated string element (without format information)
- Note
- This function is only to be used through macros, never in the client code directly.
◆ QS_u8_fmt_()
void QS_u8_fmt_ |
( |
uint8_t const |
format, |
|
|
uint8_t const |
d |
|
) |
| |
|
staticprivate |
Output uint8_t data element with format information
- Note
- This function is only to be used through macros, never in the client code directly.
◆ QS_u16_fmt_()
void QS_u16_fmt_ |
( |
uint8_t const |
format, |
|
|
uint16_t const |
d |
|
) |
| |
|
staticprivate |
output uint16_t data element with format information
This function is only to be used through macros, never in the client code directly.
◆ QS_u32_fmt_()
void QS_u32_fmt_ |
( |
uint8_t const |
format, |
|
|
uint32_t const |
d |
|
) |
| |
|
staticprivate |
Output uint32_t data element with format information
- Note
- This function is only to be used through macros, never in the client code directly.
◆ QS_str_fmt_()
void QS_str_fmt_ |
( |
char const *const |
str | ) |
|
|
staticprivate |
Output formatted zero-terminated ASCII string to the QS record
◆ QS_mem_fmt_()
void QS_mem_fmt_ |
( |
uint8_t const *const |
blk, |
|
|
uint8_t const |
size |
|
) |
| |
|
staticprivate |
Output formatted memory block of up to 255 bytes to the QS record
◆ QS_sig_dict_pre_()
void QS_sig_dict_pre_ |
( |
enum_t const |
sig, |
|
|
void const *const |
obj, |
|
|
char const *const |
name |
|
) |
| |
|
staticprivate |
Output predefined signal-dictionary record
- Note
- This function is only to be used through macro QS_SIG_DICTIONARY()
◆ QS_obj_dict_pre_()
void QS_obj_dict_pre_ |
( |
void const *const |
obj, |
|
|
char const *const |
name |
|
) |
| |
|
staticprivate |
Output predefined object-dictionary record
- Note
- This function is only to be used through macro QS_OBJ_DICTIONARY()
◆ QS_obj_arr_dict_pre_()
void QS_obj_arr_dict_pre_ |
( |
void const *const |
obj, |
|
|
uint_fast16_t const |
idx, |
|
|
char const *const |
name |
|
) |
| |
|
staticprivate |
Output predefined object-array dictionary record
- Note
- This function is only to be used through macro QS_OBJ_ARR_DICTIONARY()
◆ QS_fun_dict_pre_()
void QS_fun_dict_pre_ |
( |
QSpyFunPtr const |
fun, |
|
|
char const *const |
name |
|
) |
| |
|
staticprivate |
Output predefined function-dictionary record
- Note
- This function is only to be used through macro QS_FUN_DICTIONARY()
◆ QS_usr_dict_pre_()
void QS_usr_dict_pre_ |
( |
enum_t const |
rec, |
|
|
char const *const |
name |
|
) |
| |
|
staticprivate |
Output predefined user-dictionary record
- Note
- This function is only to be used through macro QS_USR_DICTIONARY()
◆ QS_enum_dict_pre_()
void QS_enum_dict_pre_ |
( |
enum_t const |
value, |
|
|
uint8_t const |
group, |
|
|
char const *const |
name |
|
) |
| |
|
staticprivate |
Output predefined enum-dictionary record
- Note
- This function is only to be used through macro QS_ENUM_DICTIONARY()
◆ QS_ASSERTION()
void QS_ASSERTION |
( |
char const *const |
module, |
|
|
int_t const |
loc, |
|
|
uint32_t const |
delay |
|
) |
| |
|
static |
Output the predefined assertion failure trace record
This trace record is intended to use from the Q_onAssert() callback.
◆ QS_target_info_pre_()
void QS_target_info_pre_ |
( |
uint8_t const |
isReset | ) |
|
|
staticprivate |
Helper function to output the predefined Target-info trace record
◆ QS_onStartup()
uint8_t QS_onStartup |
( |
void const * |
arg | ) |
|
|
static |
Callback to startup the QS facility
◆ QS_onCleanup()
void QS_onCleanup |
( |
void |
| ) |
|
|
static |
Callback to cleanup the QS facility
◆ QS_onFlush()
Callback to flush the QS trace data to the host
◆ QS_onGetTime()
Callback to obtain a timestamp for a QS record
◆ QS_u64_raw_()
void QS_u64_raw_ |
( |
uint64_t |
d | ) |
|
|
staticprivate |
Output uint64_t data element without format information
◆ QS_u64_fmt_()
void QS_u64_fmt_ |
( |
uint8_t |
format, |
|
|
uint64_t |
d |
|
) |
| |
|
staticprivate |
◆ QS_f32_fmt_()
void QS_f32_fmt_ |
( |
uint8_t const |
format, |
|
|
float32_t const |
d |
|
) |
| |
|
staticprivate |
Output 32-bit floating point data element with format information
- See also
- QS_F32()
◆ QS_f64_fmt_()
void QS_f64_fmt_ |
( |
uint8_t const |
format, |
|
|
float64_t const |
d |
|
) |
| |
|
staticprivate |
Output 64-bit floating point data element with format information
- See also
- QS_F64()
◆ glbFilter
◆ locFilter
◆ locFilter_AP
◆ buf
pointer to the start of the QS-TX ring buffer
Definition at line 369 of file qpc_qs.h.
◆ end
offset of the end of the ring buffer
Definition at line 372 of file qpc_qs.h.
◆ head
offset to where next byte will be inserted
Definition at line 375 of file qpc_qs.h.
◆ tail
offset of where next record will be extracted
Definition at line 378 of file qpc_qs.h.
◆ used
number of bytes currently in the ring buffer
Definition at line 381 of file qpc_qs.h.
◆ seq
sequence number of the last inserted QS record
Definition at line 384 of file qpc_qs.h.
◆ chksum
checksum of the currently inserted record
Definition at line 387 of file qpc_qs.h.
◆ critNest
uint8_t volatile critNest |
critical section nesting level
Definition at line 390 of file qpc_qs.h.
◆ flags
The documentation for this struct was generated from the following file: