40#define QSPY_VER "7.4.0"
78 uint8_t
const *start, uint32_t tot_len);
134 uint8_t
const *srcBuf, uint32_t srcBytes);
145#define SIG_NOT_FOUND ((SigType)-1)
146#define KEY_NOT_FOUND ((KeyType)-1)
161#define QS_LINE_OFFSET 8
208#define SNPRINTF_LINE(format_, ...) do { \
209 int n_ = SNPRINTF_S(&QSPY_output.buf[QS_LINE_OFFSET], \
210 (QS_LINE_LEN_MAX - QS_LINE_OFFSET), \
211 format_, __VA_ARGS__); \
212 if ((0 < n_) && (n_ < QS_LINE_LEN_MAX - QS_LINE_OFFSET)) { \
213 QSPY_output.len = n_; \
216 QSPY_output.len = QS_LINE_LEN_MAX - QS_LINE_OFFSET; \
220#define SNPRINTF_APPEND(format_, ...) do { \
221 int n_ = SNPRINTF_S(&QSPY_output.buf[QS_LINE_OFFSET + QSPY_output.len],\
222 (QS_LINE_LEN_MAX - QS_LINE_OFFSET - QSPY_output.len), \
223 format_, __VA_ARGS__); \
225 && (n_ < QS_LINE_LEN_MAX - QS_LINE_OFFSET - QSPY_output.len)) { \
226 QSPY_output.len += n_; \
229 QSPY_output.len = QS_LINE_LEN_MAX - QS_LINE_OFFSET; \
233#define CONFIG_UPDATE(member_, new_, diff_) \
234 if (QSPY_conf.member_ != (new_)) { \
235 QSPY_conf.member_ = (new_); \
287 char const* name,
ObjType obj);
308 QSPY_SEND_TEST_PROBE,
321void QSPY_setExternDict(
char const* dictName);
325bool QDIC_isActive(
void);
327void Dictionary_write(
Dictionary const*
const me, FILE* stream);
328bool Dictionary_read(
Dictionary*
const me, FILE* stream);
330void SigDictionary_write(
SigDictionary const*
const me, FILE* stream);
331bool SigDictionary_read(
SigDictionary*
const me, FILE* stream);
332char const* QSPY_getMatDict(
char const* s);
334void QSEQ_configFile(
void *seqFile);
335bool QSEQ_isActive(
void);
336void QSEQ_config(
void* seqFile,
char const* seqList);
337void QSEQ_updateDictionary(
char const* name,
KeyType key);
339void QSEQ_genHeader(
void);
340void QSEQ_genPost(uint32_t tstamp,
int src,
int dst,
char const* sig,
342void QSEQ_genPostLIFO(uint32_t tstamp,
int src,
char const* sig);
343void QSEQ_genTran(uint32_t tstamp,
int obj,
char const* state);
344void QSEQ_genPublish(uint32_t tstamp,
int obj,
char const* sig);
345void QSEQ_genAnnotation(uint32_t tstamp,
int obj,
char const* ann);
346void QSEQ_genTick(uint32_t rate, uint32_t nTick);
347void QSEQ_dictionaryReset(
void);
void Dictionary_config(Dictionary *const me, int keySize)
void QSPY_sendTP(QSpyRecord const *const qrec)
SigType QSPY_findSig(char const *name, ObjType obj)
void SigDictionary_reset(SigDictionary *const me)
void Dictionary_ctor(Dictionary *const me, DictEntry *sto, uint32_t capacity)
char const * Dictionary_at(Dictionary *const me, unsigned idx)
int32_t QSpyRecord_getInt32(QSpyRecord *const me, uint8_t size)
QSpyStatus QSpyRecord_OK(QSpyRecord *const me)
void QSPY_resetAllDictionaries(void)
uint32_t QSpyRecord_getUint32(QSpyRecord *const me, uint8_t size)
uint32_t QSPY_encodeResetCmd(uint8_t *dstBuf, uint32_t dstSize)
uint64_t QSpyRecord_getUint64(QSpyRecord *const me, uint8_t size)
int64_t QSpyRecord_getInt64(QSpyRecord *const me, uint8_t size)
int SigDictionary_find(SigDictionary *const me, SigType sig, ObjType obj)
int(* QSPY_CustParseFun)(QSpyRecord *const me)
void SigDictionary_ctor(SigDictionary *const me, SigDictEntry *sto, uint32_t capacity)
char const * Dictionary_get(Dictionary *const me, KeyType key, char *buf)
KeyType Dictionary_findKey(Dictionary *const me, char const *name)
char const * SigDictionary_get(SigDictionary *const me, SigType sig, ObjType obj, char *buf)
void QSPY_sendCmd(QSpyRecord const *const qrec)
void SigDictionary_config(SigDictionary *const me, int ptrSize)
char const * QSPY_tstampStr(void)
void QSPY_printInfo(void)
QSPY_LastOutput QSPY_output
char const * QSpyRecord_getStr(QSpyRecord *const me)
void QSPY_sendEvt(QSpyRecord const *const qrec)
void QSPY_parse(uint8_t const *buf, uint32_t nBytes)
char const *const QSPY_line
SigType SigDictionary_findSig(SigDictionary *const me, char const *name, ObjType obj)
void Dictionary_put(Dictionary *const me, KeyType key, char const *name)
void QSPY_configTxReset(QSPY_resetFun txResetFun)
KeyType QSPY_findObj(char const *name)
QSRreRecGroup QSPY_getGroup(int recId)
void QSPY_onPrintLn(void)
uint32_t QSPY_encodeTickCmd(uint8_t *dstBuf, uint32_t dstSize, uint8_t rate)
KeyType QSPY_findEnum(char const *name, uint8_t group)
void QSPY_printError(void)
void QSPY_config(QSpyConfig const *config, QSPY_CustParseFun custParseFun)
void QSPY_showNote(QSpyRecord const *const qrec)
uint32_t QSPY_encodeInfoCmd(uint8_t *dstBuf, uint32_t dstSize)
void QSPY_configMatFile(void *matFile)
uint32_t QSPY_encode(uint8_t *dstBuf, uint32_t dstSize, uint8_t const *srcBuf, uint32_t srcBytes)
int Dictionary_find(Dictionary *const me, KeyType key)
uint8_t const * QSpyRecord_getMem(QSpyRecord *const me, uint8_t size, uint32_t *pNum)
void(* QSPY_resetFun)(void)
void QSpyRecord_init(QSpyRecord *const me, uint8_t const *start, uint32_t tot_len)
void QSPY_sendObj(QSpyRecord const *const qrec)
KeyType QSPY_findFun(char const *name)
void Dictionary_reset(Dictionary *const me)
bool QSPY_command(uint8_t cmdId, uint8_t opt)
KeyType QSPY_findUsr(char const *name)
void SigDictionary_put(SigDictionary *const me, SigType sig, ObjType obj, char const *name)