mqtt_prop模块的API接口实现, 提供mqtt 5.0属性管理的能力 更多...
#include <stdio.h>
#include "aiot_sysdep_api.h"
#include "aiot_state_api.h"
#include "aiot_mqtt_props_api.h"
#include "core_mqtt.h"
mqtt_prop模块的API接口实现, 提供mqtt 5.0属性管理的能力
|
static |
int32_t prop_check | ( | mqtt_property_t * | prop | ) |
mqtt_properties_t* aiot_mqtt_props_init | ( | ) |
int32_t aiot_mqtt_props_add | ( | mqtt_properties_t * | props, |
mqtt_property_t * | prop | ||
) |
向属性集合中增加一条属性
[in] | props | 属性集合 |
[in] | prop | 单个属性 |
<STATE_SUCCESS | 执行失败 |
>=STATE_SUCCESS | 执行成功 |
mqtt_property_t* aiot_mqtt_props_get | ( | mqtt_properties_t * | props, |
mqtt_property_identify_t | id, | ||
int32_t | index | ||
) |
从属性集合中,查询属性
[in] | props | 属性集合 |
[in] | id | 属性的identifer |
[in] | index | 序号,相同id存在多个属性时,属性的序号 |
NULL | 执行失败 |
非空NULL | 执行成功 |
void aiot_mqtt_props_deinit | ( | mqtt_properties_t ** | props | ) |
属性集合反初始化,回收资源
[in] | props | 属性集合 |
uint32_t prop_len | ( | mqtt_property_t * | property | ) |
|
static |
int32_t core_mqtt_props_bound | ( | mqtt_properties_t * | props | ) |
int32_t prop_write | ( | mqtt_property_t * | property, |
uint8_t * | data, | ||
uint32_t | size | ||
) |
int32_t core_mqtt_props_write | ( | mqtt_properties_t * | props, |
uint8_t * | data, | ||
uint32_t | size | ||
) |
int32_t prop_read | ( | mqtt_property_t * | property, |
uint8_t * | data, | ||
uint32_t | size | ||
) |
int32_t core_mqtt_props_read | ( | uint8_t * | data, |
uint32_t | size, | ||
mqtt_properties_t * | props | ||
) |
int32_t aiot_mqtt_props_print | ( | mqtt_properties_t * | props | ) |
printf属性内容
[in] | props | 属性集合 |
|
static |
|
static |
mqtt_properties_t* aiot_mqtt_props_copy | ( | mqtt_properties_t * | props | ) |
深拷贝属性
[in] | props | 属性集合 |