TuyaOS
结构体 | 宏定义 | 类型定义 | 枚举 | 函数
tuya_devos_health.h 文件参考

Tuya Device OS设备健康监控 更多...

#include "tuya_cloud_com_defs.h"
#include "tal_thread.h"
#include "tal_mutex.h"
#include "tuya_list.h"
tuya_devos_health.h 的引用(Include)关系图:

浏览源代码.

结构体

struct  health_alert_evt_data
 

宏定义

#define HEALTH_DETECT_INTERVAL   600
 
#define HEALTH_FREE_MEM_THRESHOLD   (1024*8)
 
#define HEALTH_LARGEST_MEM_BLOK_THRESHOLD   (1024*5)
 
#define HEALTH_MSGQ_THRESHOLD   (50)
 
#define HEALTH_REPORT_INTERVAL   (60 * 60)
 
#define HEALTH_SLEEP_INTERVAL   (5)
 
#define HEALTH_TIMEQ_THRESHOLD   (100)
 
#define HEALTH_WATCHDOG_INTERVAL   60
 
#define HEALTH_WORKQ_THRESHOLD   (50)
 

类型定义

typedef VOID(* health_notify_cb) ()
 
typedef BOOL_T(* health_query_cb) ()
 

枚举

enum  HEALTH_MONITOR_RULE_E {
  HEALTH_RULE_FREE_MEM_SIZE , HEALTH_RULE_MAX_MEM_SIZE , HEALTH_RULE_ATOP_REFUSE , HEALTH_RULE_ATOP_SIGN_FAILED ,
  HEALTH_RULE_WORKQ_DEPTH , HEALTH_RULE_MSGQ_NUM , HEALTH_RULE_TIMER_NUM , HEALTH_RULE_FEED_WATCH_DOG ,
  HEALTH_RULE_RUNTIME_REPT , HEALTH_RULE_EVENT_PUB
}
 

函数

INT_T tuya_devos_add_health_item (UINT_T threshold, UINT_T period, health_query_cb query, health_notify_cb notify)
 add health item 更多...
 
VOID tuya_devos_delete_health_item (INT_T type)
 delete health item 更多...
 
VOID tuya_devos_dump_health_item (VOID)
 dump health item
 
INT_T tuya_devos_health_init_and_start ()
 devos health init function 更多...
 
VOID tuya_devos_update_health_item_period (INT_T type, UINT_T period)
 update health item period 更多...
 
VOID tuya_devos_update_health_item_threshold (INT_T type, UINT_T threshold)
 update health item threshold 更多...
 

详细描述

Tuya Device OS设备健康监控

作者
fangw.nosp@m.eng..nosp@m.hu@tu.nosp@m.ya.c.nosp@m.om
版本
0.2
日期
2022-03-18

函数说明

◆ tuya_devos_add_health_item()

INT_T tuya_devos_add_health_item ( UINT_T  threshold,
UINT_T  period,
health_query_cb  query,
health_notify_cb  notify 
)

add health item

参数
[in]thresholdthreshold
[in]periodperiod
[in]queryquery cb
[in]notifynotify cb
返回
type id, success when large than 0,others failed

◆ tuya_devos_delete_health_item()

VOID tuya_devos_delete_health_item ( INT_T  type)

delete health item

参数
[in]typetype

◆ tuya_devos_health_init_and_start()

INT_T tuya_devos_health_init_and_start ( )

devos health init function

返回
OPRT_OK on success. Others on error, please refer to tuya_error_code.h

◆ tuya_devos_update_health_item_period()

VOID tuya_devos_update_health_item_period ( INT_T  type,
UINT_T  period 
)

update health item period

参数
[in]typetype
[in]periodperiod

◆ tuya_devos_update_health_item_threshold()

VOID tuya_devos_update_health_item_threshold ( INT_T  type,
UINT_T  threshold 
)

update health item threshold

参数
[in]typetype
[in]thresholdthreshold