WS63 SDK 文档 7021f4f@fbb_ws63
ws63 和 ws63e 解决方案的 SDK 文档
载入中...
搜索中...
未找到
log_buffer.h 文件参考
#include <stdint.h>
#include "log_buffer_common.h"
#include "log_memory_section.h"
log_buffer.h 的引用(Include)关系图:
此图展示该文件直接或间接的被哪些文件引用了:

浏览源代码.

结构体

struct  system_event_s_t
 
struct  chr_extend_data_t
 

宏定义

#define CHR_VALUE_NULL   0
 
#define CHR_VALUE_SHFIT_24BIT   24
 
#define CHR_INFO1_SHFIT_16BIT   16
 
#define CHR_INFO2_SHFIT_8BIT   8
 
#define CHR_VALUE_MASK   0xff
 
#define CHR_BUFFER_WL_RATIO   2
 
#define CHR_EXTEND_PARAM_MAX_LEN   128
 
#define chr_tws_value_group(EVENT, INFO1, INFO2, INFO3)
 
#define chr_wear_value_group(EVENT, INFO1, INFO2, INFO3)
 
#define EVENT_ID_BEGIN   943900000
 
#define EVENT_ID_END   943999999
 
#define get_event_id(id, info1)   (EVENT_ID_BEGIN + (((id) << 8) | (info1)))
 

类型定义

typedef struct system_event_s_t system_error_s_t
 

枚举

enum  log_ret_t {
  LOG_RET_OK , LOG_RET_ERROR_IN_PARAMETERS , LOG_RET_ERROR_NOT_ENOUGH_SPACE , LOG_RET_ERROR_CORRUPT_SHARED_MEMORY ,
  LOG_RET_ERROR_OVERFLOW
}
 
enum  mass_data_ret_t {
  MASS_RET_OK , MASS_RET_ERROR_IN_PARAMETERS , MASS_RET_ERROR_NOT_ENOUGH_SPACE , MASS_RET_ERROR_CORRUPT_SHARED_MEMORY ,
  MASS_MEM_COPY_FAIL , MASS_OVER_BUFFER_THD
}
 
enum  mass_point_type_t { MASS_EVENT_POINT , MASS_ERROR_POINT , MASS_EVENT_POINT_EXTEND , MASS_ERROR_POINT_EXTEND }
 
enum  chr_type_t {
  CHR_DFT = 0x0 , CHR_UE_INT = 0x01 , CHR_UE_STR = 0x02 , CHR_UE_JSON = 0x03 ,
  CHR_UE_BETA = 0x04 , CHR_END
}
 

函数

void log_buffer_init (log_memory_region_section_t logsec)
 Initialize the log buffer module to log in the given log memory region section.
 
void chr_record_ue (uint8_t eid, uint8_t sub_eid, uint8_t code, uint32_t sub_code)
 record the system event
 
void massdata_record_system_event (uint8_t event_id, uint8_t info1, uint8_t info2, uint32_t info3)
 record the system event.
 
void massdata_record_system_error (uint8_t event_id, uint8_t info1, uint8_t info2, uint32_t info3)
 record the system error.
 
void log_buffer_massdata_record_system_error_wear (uint8_t event_id, uint8_t info1, uint8_t info2, uint8_t info3)
 
void mass_buffer_init (mass_data_memory_region_section_t sec)
 init the mass share mem.
 
uint32_t mass_data_write_roll_buffer (const uint8_t *data, uint32_t length)
 write seg in the mass share mem.
 
uint32_t massdata_triger_event (void)
 triger mass data to flush.
 
uint32_t massdata_triger_queue (const uint8_t *pay_i, uint32_t type)
 triger mass data to flush by queue.
 
void log_buffer_write (const log_buffer_header_t *lb_header, const uint8_t *buffer, bool *was_empty)
 Add data to the circular buffer with updating the write index.
 
log_ret_t log_buffer_get_available_for_next_message (uint32_t *av)
 Get the available space for the next message
 
log_ret_t compress_log_write (const uint8_t *data, uint32_t length)
 
void log_buffer_record_system_event (uint32_t chr_event)
 Record chr event
 
void log_buffer_record_system_error (uint32_t chr_error)
 Record chr error
 
void massdata_record_system_info_with_extend (chr_extend_data_t *extend_data)
 Record chr info with extend parameter.