13 #ifndef __AIOT_TASK_API_H__ 14 #define __AIOT_TASK_API_H__ 16 #if defined(__cplusplus) 26 #define STATE_TASK_BASE (-0x0B00) 32 #define STATE_TASK_DEINIT_HANDLE_IS_NULL (-0x0B01) 38 #define STATE_TASK_SETOPT_HANDLE_IS_NULL (-0x0B02) 43 #define STATE_TASK_RECV_NOTIFY (-0x0B03) 48 #define STATE_TASK_PARSE_NOTIFY_FAILED (-0x0B04) 53 #define STATE_TASK_PARSE_JSON_MALLOC_FAILED (-0x0B05) 58 #define STATE_TASK_PARSE_JSON_ERROR (-0x0B06) 63 #define STATE_TASK_QUERY_TASK_ID_IS_NULL (-0x0B07) 68 #define STATE_TASK_RECV_GET_LIST_REPLY (-0x0B08) 74 #define STATE_TASK_SETOPT_DATA_IS_NULL (-0x0B09) 80 #define STATE_TASK_UPDATE_STATUS_INVALID (-0x0B0A) 90 #define STATE_TASK_UPDATE_STATUS_DETAILS_INVALID (-0x0B0B) 266 int32_t
aiot_task_setopt(
void *handle, aiot_task_option_t option,
void *data);
319 #if defined(__cplusplus) Definition: aiot_task_api.h:149
设置处理task消息的用户回调函数
Definition: aiot_task_api.h:113
char * sign
Definition: aiot_task_api.h:162
aiot_task_status_t status
Definition: aiot_task_api.h:199
int32_t aiot_task_get_task_detail(void *handle, char *user_task_id)
从云端获取task详细内容
Definition: aiot_task_api.c:599
Definition: aiot_task_api.h:138
任务描述的数据结构
Definition: aiot_task_api.h:157
Definition: aiot_task_api.h:136
int32_t aiot_task_get_task_list(void *handle)
从云端获取task列表
Definition: aiot_task_api.c:589
char * task_id
Definition: aiot_task_api.h:173
char * document_file_url
Definition: aiot_task_api.h:163
uint8_t progress
Definition: aiot_task_api.h:165
Definition: aiot_task_api.h:132
uint32_t code
Definition: aiot_task_api.h:197
int32_t aiot_task_deinit(void **handle)
销毁task实例句柄
Definition: aiot_task_api.c:743
更新任务状态到云端后,云端返回的数据
Definition: aiot_task_api.h:196
task_update_reply_t update_reply
Definition: aiot_task_api.h:211
用户需要SDK暂存的上下文
Definition: aiot_task_api.h:124
Definition: aiot_task_api.h:137
从云端拉取list返回的数据
Definition: aiot_task_api.h:180
void(* aiot_task_recv_handler_t)(void *handle, const aiot_task_recv_t *recv, void *userdata)
设备收到task的mqtt下行报文时的接收回调函数
Definition: aiot_task_api.h:224
task_get_list_reply_t get_list_reply
Definition: aiot_task_api.h:209
char * status_details
Definition: aiot_task_api.h:164
uint32_t number
Definition: aiot_task_api.h:181
aiot_task_status_t
任务的状态.
Definition: aiot_task_api.h:131
void * handle
Definition: aiot_task_api.h:166
void * aiot_task_init(void)
创建一个task实例
Definition: aiot_task_api.c:721
aiot_task_status_t status
Definition: aiot_task_api.h:159
aiot_task_status_t status
Definition: aiot_task_api.h:174
aiot_task_recv_type_t type
Definition: aiot_task_api.h:206
Definition: aiot_task_api.h:148
设置MQTT的handle
Definition: aiot_task_api.h:102
char * sign_method
Definition: aiot_task_api.h:161
Definition: aiot_task_api.h:151
int32_t aiot_task_update(void *handle, task_desc_t *task)
更新任务状态到云端
Definition: aiot_task_api.c:617
aiot_task_option_t
Definition: aiot_task_api.h:92
Definition: aiot_task_api.h:133
从云端拉取任务详细信息时返回的数据
Definition: aiot_task_api.h:188
Definition: aiot_task_api.h:134
从云端拉取list时每个任务的简要描述
Definition: aiot_task_api.h:172
uint32_t code
Definition: aiot_task_api.h:189
task_desc_t notify
Definition: aiot_task_api.h:208
char * job_document
Definition: aiot_task_api.h:160
Definition: aiot_task_api.h:150
int32_t aiot_task_setopt(void *handle, aiot_task_option_t option, void *data)
设置task句柄的参数
Definition: aiot_task_api.c:679
Definition: aiot_task_api.h:135
task_get_detail_reply_t get_detail_reply
Definition: aiot_task_api.h:210
Definition: aiot_task_api.h:140
char * task_id
Definition: aiot_task_api.h:158
task_summary_t * tasks
Definition: aiot_task_api.h:182
云端主动下发或更新任务云端返回的数据
Definition: aiot_task_api.h:205
task_desc_t task
Definition: aiot_task_api.h:190
aiot_task_recv_type_t
下行有关的数据结构
Definition: aiot_task_api.h:147
Definition: aiot_task_api.h:125
Definition: aiot_task_api.h:139
Definition: aiot_task_api.h:141
char * task_id
Definition: aiot_task_api.h:198