Link Kit C-SDK  5.0.0
aiot_devinfo_api.h
浏览该文件的文档.
1 
10 #ifndef _AIOT_DEVINFO_API_H
11 #define _AIOT_DEVINFO_API_H
12 
13 #if defined(__cplusplus)
14 extern "C" {
15 #endif
16 
17 #include <stdint.h>
18 
22 typedef struct {
26  uint32_t msg_id;
30  uint32_t code;
34  char *data;
38  uint32_t data_len;
42  char *message;
46  uint32_t message_len;
48 
56 typedef void (*devinfo_callback_t)(void *device,
57  const aiot_devinfo_msg_reply_t *recv, void *userdata);
58 
71 int32_t aiot_device_devinfo_set_callback(void *device, devinfo_callback_t callback, void *userdata);
72 
85 int32_t aiot_device_devinfo_add(void *device, char *key, char *value);
86 
98 int32_t aiot_device_devinfo_delete(void *device, char *key);
99 
100 
101 
102 #if defined(__cplusplus)
103 }
104 #endif
105 
106 #endif
char * data
指向云端应答数据的指针
Definition: aiot_devinfo_api.h:34
void(* devinfo_callback_t)(void *device, const aiot_devinfo_msg_reply_t *recv, void *userdata)
设备标签回复消息的回调函数原型,可通过 aiot_device_devinfo_set_callback 配置
Definition: aiot_devinfo_api.h:56
uint32_t msg_id
消息标识符, uint32_t类型的整数, 与属性上报或事件上报的消息标示符一致
Definition: aiot_devinfo_api.h:26
int32_t aiot_device_devinfo_set_callback(void *device, devinfo_callback_t callback, void *userdata)
设置远程配置
设备标签添加/删除后,物联网平台回复消息的结构体
Definition: aiot_devinfo_api.h:22
uint32_t data_len
云端应答数据的长度
Definition: aiot_devinfo_api.h:38
uint32_t message_len
消息字符串的长度
Definition: aiot_devinfo_api.h:46
char * message
指向状态消息字符串的指针, 当设备端上报请求成功时对应的应答消息为"success", 若请求失败则应答消息中包含...
Definition: aiot_devinfo_api.h:42
int32_t aiot_device_devinfo_delete(void *device, char *key)
删除设备标签
int32_t aiot_device_devinfo_add(void *device, char *key, char *value)
给设备添加标签
uint32_t code
设备端错误码, 200-请求成功, 更多错误码码查看设备端错误码
Definition: aiot_devinfo_api.h:30