QP/C  7.0.0
Real-Time Embedded Framework
qs.c File Reference

QS software tracing services. More...

#include "qs_port.h"
#include "qs_pkg.h"
#include "qstamp.h"
#include "qassert.h"

Go to the source code of this file.

Functions

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

Variables

QSPrivAttr QS_priv_
 

Detailed Description

Date
Last updated on: 2021-12-23
Version
Last updated for: Version 7.0.0, 2022-04-30

Definition in file qs.c.

Function Documentation

◆ QS_initBuf()

void QS_initBuf ( uint8_t  sto[],
uint_fast16_t  stoSize 
)

This function should be called from QS_onStartup() to provide QS with the data buffer. The first parameter sto[] is the address of the memory block, and the second parameter stoSize is the size of this block in bytes. Currently the size of the QS buffer cannot exceed 64KB.

Note
QS can work with quite small data buffers, but you will start losing data if the buffer is too small for the bursts of tracing activity. The right size of the buffer depends on the data production rate and the data output rate. QS offers flexible filtering to reduce the data production rate.
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 uitiliy to easily detect any data loss.
This function initializes all the internal QS variables, so that the tracing can start correctly even if the startup code fails to clear any uninitialized data (as is required by the C Standard).

Definition at line 68 of file qs.c.

◆ QF_QS_CRIT_EXIT()

void QF_QS_CRIT_EXIT ( void  )

Definition at line 1060 of file qs.c.

Variable Documentation

◆ QS_priv_

QSPrivAttr QS_priv_

Definition at line 41 of file qs.c.