TuyaOS
tuya_svc_schema_upgrade.h
浏览该文件的文档.
1
10#ifndef __TUYA_SVC_SCHEMA_UPGRADE_H__
11#define __TUYA_SVC_SCHEMA_UPGRADE_H__
12
13#include "tuya_cloud_types.h"
14#include "tuya_error_code.h"
15
16#ifdef __cplusplus
17extern "C" {
18#endif
19
20#define EVT_DEV_SCHEMA_UPGRADE "schema.ug.cid"
21
25typedef enum tagAction_e {
32 ACTION_MAX
34
42typedef Action_e(*ACTION_CB)(OUT VOID *data);
43
49OPERATE_RET ty_schema_upgrade_init(VOID);
50
56OPERATE_RET ty_schema_upgrade_active(VOID);
57
63OPERATE_RET ty_schema_upgrade_notify(CHAR_T *dev_id);
64
73OPERATE_RET ty_schema_upgrade_register(ACTION_CB cb_update, ACTION_CB cb_get);
74
75#ifdef __cplusplus
76}
77#endif
78
79#endif //__TUYA_SVC_SCHEMA_UPGRADE_H__
80
81
OPERATE_RET ty_schema_upgrade_init(VOID)
Initilize schema upgrade framework
tagAction_e
Definition of schema upgrade action
Definition: tuya_svc_schema_upgrade.h:25
@ ACTION_CONTINUE
Definition: tuya_svc_schema_upgrade.h:27
@ ACTION_COMPLETE
Definition: tuya_svc_schema_upgrade.h:31
@ ACTION_NEXT
Definition: tuya_svc_schema_upgrade.h:29
Action_e(* ACTION_CB)(OUT VOID *data)
Schema upgrade action
Definition: tuya_svc_schema_upgrade.h:42
OPERATE_RET ty_schema_upgrade_notify(CHAR_T *dev_id)
Schema upgrade is triggered by MQTT msg
enum tagAction_e Action_e
Definition of schema upgrade action
OPERATE_RET ty_schema_upgrade_register(ACTION_CB cb_update, ACTION_CB cb_get)
Register schema upgrade workload
OPERATE_RET ty_schema_upgrade_active(VOID)
Run schema upgrade framework, workloads registered will be executed