TUYA schema OTA service
更多...
#include "tuya_cloud_types.h"
#include "tuya_error_code.h"
浏览源代码.
|
#define | EVT_DEV_SCHEMA_UPGRADE "schema.ug.cid" |
|
TUYA schema OTA service
- 版本
- 0.1
- 日期
- 2020-07-31
- 版权所有
- Copyright 2020-2021 Tuya Inc. All Rights Reserved.
◆ ACTION_CB
typedef Action_e(* ACTION_CB) (OUT VOID *data) |
Schema upgrade action
- 参数
-
[in] | data | ID of sub-device, or NULL for GW |
- 返回
- see Action_e
◆ tagAction_e
Definition of schema upgrade action
枚举值 |
---|
ACTION_CONTINUE | this action will redo
|
ACTION_NEXT | switch to next action
|
ACTION_COMPLETE | action list is complete
|
◆ ty_schema_upgrade_active()
OPERATE_RET ty_schema_upgrade_active |
( |
VOID |
| ) |
|
Run schema upgrade framework, workloads registered will be executed
- 返回
- OPRT_OK on success. Others on error, please refer to tuya_error_code.h
◆ ty_schema_upgrade_init()
OPERATE_RET ty_schema_upgrade_init |
( |
VOID |
| ) |
|
Initilize schema upgrade framework
- 返回
- OPRT_OK on success. Others on error, please refer to tuya_error_code.h
◆ ty_schema_upgrade_notify()
OPERATE_RET ty_schema_upgrade_notify |
( |
CHAR_T * |
dev_id | ) |
|
Schema upgrade is triggered by MQTT msg
- 返回
- OPRT_OK on success. Others on error, please refer to tuya_error_code.h
◆ ty_schema_upgrade_register()
Register schema upgrade workload
- 参数
-
[in] | cb_update | Callback to upload schema upload status |
[in] | cb_get | Callback to retrieve schema from cloud |
- 返回
- OPRT_OK on success. Others on error, please refer to tuya_error_code.h