QS internal variables definitions and core QS functions implementations. More...
#include "qs_pkg.h"Go to the source code of this file.
Functions | |
| char const Q_ROM *Q_ROM_VAR | QS_getVersion (void) |
| Get the current version of QS. | |
| void | QS_initBuf (uint8_t sto[], uint32_t stoSize) |
| Initialize the QS data buffer. | |
| void | QS_filterOn (uint8_t rec) |
| Turn the global Filter on for a given record type rec. | |
| void | QS_filterOff (uint8_t rec) |
| Turn the global Filter off for a given record type rec. | |
| void | QS_begin (uint8_t rec) |
| Mark the begin of a QS record rec. | |
| void | QS_end (void) |
| Mark the end of a QS record rec. | |
| void | QS_u8 (uint8_t format, uint8_t d) |
| Output uint8_t data element with format information. | |
| void | QS_u16 (uint8_t format, uint16_t d) |
| output uint16_t data element with format information | |
| void | QS_u32 (uint8_t format, uint32_t d) |
| Output uint32_t data element with format information. | |
Variables | |
| uint8_t | QS_glbFilter_ [32] |
| uint8_t * | QS_ring_ |
| QSCtr | QS_end_ |
| QSCtr | QS_head_ |
| QSCtr | QS_tail_ |
| QSCtr | QS_used_ |
| uint8_t | QS_seq_ |
| uint8_t | QS_chksum_ |
| uint8_t | QS_full_ |
QS internal variables definitions and core QS functions implementations.
Definition in file qs.c.
| void QS_begin | ( | uint8_t | rec | ) |
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, or QS_BEGIN_NOLOCK, depending if it's called in a normal code or from a critical section.
Definition at line 94 of file qs.c.
References QS_chksum_, QS_INSERT_ESC_BYTE, and QS_seq_.
| void QS_end | ( | void | ) |
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_NOLOCK, depending if it's called in a normal code or from a critical section.
Definition at line 101 of file qs.c.
References QS_end_, QS_FRAME, QS_head_, QS_INSERT_BYTE, QS_INSERT_CHKSUM_BYTE, QS_tail_, and QS_used_.
| void QS_filterOff | ( | uint8_t | rec | ) |
Turn the global Filter off for a given record type rec.
This function sets up the QS filter to disable the record type rec. The argument QS_ALL_RECORDS specifies to suppress all records. This function should be called indirectly through the macro QS_FILTER_OFF.
Definition at line 82 of file qs.c.
References QS_ALL_RECORDS, and QS_glbFilter_.
| void QS_filterOn | ( | uint8_t | rec | ) |
Turn the global Filter on for a given record type rec.
This function sets up the QS filter to enable the record type rec. The argument QS_ALL_RECORDS specifies to filter-in all records. This function should be called indirectly through the macro QS_FILTER_ON.
Definition at line 70 of file qs.c.
References QS_ALL_RECORDS, and QS_glbFilter_.
| char const Q_ROM* Q_ROM_VAR QS_getVersion | ( | void | ) |
Get the current version of QS.
Definition at line 52 of file qs.c.
References QP_VERSION.
Initialize the QS 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.
QS can work with quite small data buffers, but you will start losing data if the buffer is too small for the bursts of logging 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.
output uint16_t data element with format information
Definition at line 115 of file qs.c.
References QS_INSERT_ESC_BYTE.
Output uint32_t data element with format information.
Definition at line 122 of file qs.c.
References QS_INSERT_ESC_BYTE.
Output uint8_t data element with format information.
Definition at line 110 of file qs.c.
References QS_INSERT_ESC_BYTE.
the checksum of the current record
Definition at line 47 of file qs.c.
Referenced by QS_begin(), QS_mem(), QS_str(), QS_str_(), QS_str_ROM(), and QS_str_ROM_().
offset of the end of the ring buffer
Definition at line 42 of file qs.c.
Referenced by QS_end(), QS_getBlock(), QS_getByte(), and QS_initBuf().
| uint8_t QS_glbFilter_[32] |
global on/off QS filter
Definition at line 38 of file qs.c.
Referenced by QS_filterOff(), and QS_filterOn().
pointer to the start of the ring buffer
Definition at line 41 of file qs.c.
Referenced by QS_getBlock(), QS_getByte(), and QS_initBuf().
offset of where next event will be extracted
Definition at line 44 of file qs.c.
Referenced by QS_end(), QS_getBlock(), and QS_getByte().
number of bytes currently in the ring buffer
Definition at line 45 of file qs.c.
Referenced by QS_end(), QS_getBlock(), and QS_getByte().
1.6.2