Tuya Device OS设备健康监控
更多...
#include "tuya_cloud_com_defs.h"
#include "tal_thread.h"
#include "tal_mutex.h"
#include "tuya_list.h"
浏览源代码.
|
#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
} |
|
Tuya Device OS设备健康监控
- 作者
- fangw.nosp@m.eng..nosp@m.hu@tu.nosp@m.ya.c.nosp@m.om
- 版本
- 0.2
- 日期
- 2022-03-18
- 版权所有
- Copyright (c) 2020
◆ 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] | threshold | threshold |
[in] | period | period |
[in] | query | query cb |
[in] | notify | notify cb |
- 返回
- type id, success when large than 0,others failed
◆ tuya_devos_delete_health_item()
VOID tuya_devos_delete_health_item |
( |
INT_T |
type | ) |
|
◆ 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] | type | type |
[in] | period | period |
◆ tuya_devos_update_health_item_threshold()
VOID tuya_devos_update_health_item_threshold |
( |
INT_T |
type, |
|
|
UINT_T |
threshold |
|
) |
| |
update health item threshold
- 参数
-
[in] | type | type |
[in] | threshold | threshold |