TuyaOS
宏定义 | 类型定义 | 枚举 | 函数
tuya_svc_schema_upgrade.h 文件参考

TUYA schema OTA service 更多...

#include "tuya_cloud_types.h"
#include "tuya_error_code.h"
tuya_svc_schema_upgrade.h 的引用(Include)关系图:

浏览源代码.

宏定义

#define EVT_DEV_SCHEMA_UPGRADE   "schema.ug.cid"
 

类型定义

typedef Action_e(* ACTION_CB) (OUT VOID *data)
 Schema upgrade action 更多...
 
typedef enum tagAction_e Action_e
 Definition of schema upgrade action
 

枚举

enum  tagAction_e { ACTION_CONTINUE , ACTION_NEXT , ACTION_COMPLETE , ACTION_MAX }
 Definition of schema upgrade action 更多...
 

函数

OPERATE_RET ty_schema_upgrade_active (VOID)
 Run schema upgrade framework, workloads registered will be executed 更多...
 
OPERATE_RET ty_schema_upgrade_init (VOID)
 Initilize schema upgrade framework 更多...
 
OPERATE_RET ty_schema_upgrade_notify (CHAR_T *dev_id)
 Schema upgrade is triggered by MQTT msg 更多...
 
OPERATE_RET ty_schema_upgrade_register (ACTION_CB cb_update, ACTION_CB cb_get)
 Register schema upgrade workload 更多...
 

详细描述

TUYA schema OTA service

版本
0.1
日期
2020-07-31

类型定义说明

◆ ACTION_CB

typedef Action_e(* ACTION_CB) (OUT VOID *data)

Schema upgrade action

参数
[in]dataID 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()

OPERATE_RET ty_schema_upgrade_register ( ACTION_CB  cb_update,
ACTION_CB  cb_get 
)

Register schema upgrade workload

参数
[in]cb_updateCallback to upload schema upload status
[in]cb_getCallback to retrieve schema from cloud
返回
OPRT_OK on success. Others on error, please refer to tuya_error_code.h