14#include "tuya_cloud_types.h"
23#define STR_DATA_MAX_LENGTH 64
25typedef BYTE_T LS_DATA_TP_T;
29#define LDT_TIMESTAMP 3
54 struct tuya_list_head node;
57typedef BYTE_T LS_STAT_T;
59#define LSS_RECORDING 1
63typedef int (*LOG_SEQ_UPLOAD_CB)(
const char *p_log);
65#define LS_DELIMITER " | "
67int log_seq_insert_log(
const char *ls_name, BYTE_T
id, LS_DATA_TP_T type, VOID_T* data);
68int log_seq_insert_error_log(
const char *ls_name, BYTE_T
id, LS_DATA_TP_T type, VOID_T* data);
69int log_seq_insert_report_log(
const char *ls_name, BYTE_T
id, LS_DATA_TP_T type, VOID_T* data);
71#define INSERT_LOG_SEQ_NULL(seq) log_seq_insert_log(LOGSEQ_OBJ, seq, LDT_NULL, NULL)
72#define INSERT_LOG_SEQ_DEC(seq,dec) log_seq_insert_log(LOGSEQ_OBJ, seq, LDT_DEC, (VOID_T*)(intptr_t)dec)
73#define INSERT_LOG_SEQ_HEX(seq,hex) log_seq_insert_log(LOGSEQ_OBJ, seq, LDT_HEX, (VOID_T*)(uintptr_t)hex)
74#define INSERT_LOG_SEQ_TM(seq,tm) log_seq_insert_log(LOGSEQ_OBJ, seq, LDT_TIMESTAMP, (VOID_T*)tm)
76#define INSERT_LOG_SEQ_STR(seq,str) log_seq_insert_log(LOGSEQ_OBJ, seq, LDT_STRING, (VOID_T*)str)
77#define INSERT_ERROR_LOG_SEQ_NULL(seq) log_seq_insert_error_log(LOGSEQ_OBJ, seq, LDT_NULL, NULL)
78#define INSERT_ERROR_LOG_SEQ_DEC(seq,dec) log_seq_insert_error_log(LOGSEQ_OBJ, seq, LDT_DEC, (VOID_T*)(intptr_t)dec)
79#define INSERT_ERROR_LOG_SEQ_HEX(seq,hex) log_seq_insert_error_log(LOGSEQ_OBJ, seq, LDT_HEX, (VOID_T*)(uintptr_t)hex)
80#define INSERT_ERROR_LOG_SEQ_TM(seq,tm) log_seq_insert_error_log(LOGSEQ_OBJ, seq, LDT_TIMESTAMP, (VOID_T*)tm)
82#define INSERT_ERROR_LOG_SEQ_STR(seq,str) log_seq_insert_error_log(LOGSEQ_OBJ, seq, LDT_STRING, (VOID_T*)str)
83#define INSERT_REPORT_LOG_SEQ_NULL(seq) log_seq_insert_report_log(LOGSEQ_OBJ, seq, LDT_NULL, NULL)
84#define INSERT_REPORT_LOG_SEQ_DEC(seq,dec) log_seq_insert_report_log(LOGSEQ_OBJ, seq, LDT_DEC, (VOID_T*)(intptr_t)dec)
85#define INSERT_REPORT_LOG_SEQ_HEX(seq,hex) log_seq_insert_report_log(LOGSEQ_OBJ, seq, LDT_HEX, (VOID_T*)(uintptr_t)hex)
86#define INSERT_REPORT_LOG_SEQ_TM(seq,tm) log_seq_insert_report_log(LOGSEQ_OBJ, seq, LDT_TIMESTAMP, (VOID_T*)tm)
88#define INSERT_REPORT_LOG_SEQ_STR(seq,str) log_seq_insert_report_log(LOGSEQ_OBJ, seq, LDT_STRING, (VOID_T*)str)
int log_seq_set_force_report(bool_t enable)
enable or disable force report repeat
int log_seq_set_enable(bool_t enable)
enable or disable log sequence.
int log_seq_clean(int is_force_clean_all)
reset log sequence, clean all log sequence, this is used when device reset.
int log_seq_get_netcfg_log(char **log_buff, int *log_len)
get network configure log sequence.
int log_seq_set_depth(const unsigned int depth)
set log sequence depth.
int log_seq_force_sync(void)
force synchronization of log sequence .
int log_seq_upload_custom_log(const char *p_log)
upload customer log sequence .
int log_seq_init(const char *log_seq_path)
initialize of log sequence.
data structure of log sequence
Definition: log_seq.h:46
LS_DATA_TP_T type
Definition: log_seq.h:50
BYTE_T id
Definition: log_seq.h:48
LOG_DA_TP_U data
Definition: log_seq.h:52
data storage structure of log sequence
Definition: log_seq.h:36