devinfo模块的API接口实现, 提供更新和删除设备标签的能力 更多...
#include "devinfo_private.h"#include "core_string.h"#include "core_log.h"#include "core_global.h"#include "core_mqtt.h"
函数 | |
| static void | _core_devinfo_exec_inc (devinfo_handle_t *devinfo_handle) |
| static void | _core_devinfo_exec_dec (devinfo_handle_t *devinfo_handle) |
| static void | _devinfo_find_pk_dn (devinfo_handle_t *devinfo_handle, char *topic, uint16_t topic_len, char **product_key, char **device_name) |
| static void | _devinfo_mqtt_recv_handler (void *handle, const aiot_mqtt_recv_t *packet, void *userdata) |
| static int32_t | _devinfo_operate_topic_map (devinfo_handle_t *devinfo_handle, aiot_mqtt_option_t option) |
| static int32_t | _devinfo_send (devinfo_handle_t *devinfo_handle, char *product_key, char *device_name, aiot_devinfo_msg_data_t *data, char *topic_fmt) |
| static void | _devinfo_core_mqtt_process_handler (void *context, aiot_mqtt_event_t *event, core_mqtt_event_t *core_event) |
| static int32_t | _devinfo_core_mqtt_operate_process_handler (devinfo_handle_t *devinfo_handle, core_mqtt_option_t option) |
| void * | aiot_devinfo_init (void) |
| 创建devinfo会话实例, 并以默认值配置会话参数 更多... | |
| int32_t | aiot_devinfo_setopt (void *handle, aiot_devinfo_option_t option, void *data) |
| 配置devinfo会话 更多... | |
| int32_t | aiot_devinfo_deinit (void **handle) |
| 结束devinfo会话, 销毁实例并回收资源 更多... | |
| int32_t | aiot_devinfo_send (void *handle, aiot_devinfo_msg_t *msg) |
| 向devinfo服务器发送devinfo消息请求 更多... | |
devinfo模块的API接口实现, 提供更新和删除设备标签的能力
|
static |
|
static |
|
static |
|
static |

|
static |

|
static |

|
static |
|
static |

| void* aiot_devinfo_init | ( | void | ) |
创建devinfo会话实例, 并以默认值配置会话参数
| 非NULL | devinfo实例的句柄 |
| NULL | 初始化失败, 一般是内存分配失败导致 |

| int32_t aiot_devinfo_setopt | ( | void * | handle, |
| aiot_devinfo_option_t | option, | ||
| void * | data | ||
| ) |
配置devinfo会话
| [in] | handle | devinfo会话句柄 |
| [in] | option | 配置选项, 更多信息请参考aiot_devinfo_option_t |
| [in] | data | 配置选项数据, 更多信息请参考aiot_devinfo_option_t |
| <STATE_SUCCESS | 参数配置失败 |
| >=STATE_SUCCESS | 参数配置成功 |

| int32_t aiot_devinfo_deinit | ( | void ** | handle | ) |
结束devinfo会话, 销毁实例并回收资源
| [in] | handle | 指向devinfo会话句柄的指针 |
| <STATE_SUCCESS | 执行失败 |
| >=STATE_SUCCESS | 执行成功 |

| int32_t aiot_devinfo_send | ( | void * | handle, |
| aiot_devinfo_msg_t * | msg | ||
| ) |
向devinfo服务器发送devinfo消息请求
| handle | devinfo会话句柄 |
| msg | devinfo发送给云端的删除/更新设备标签信息的报文 |
| <STATE_SUCCESS | 请求发送失败 |
| >=STATE_SUCCESS | 请求发送成功 |

1.8.11