Link Kit C-SDK  4.1.0
函数
aiot_mqtt_props_api.c 文件参考

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"
aiot_mqtt_props_api.c 的引用(Include)关系图:

函数

static mqtt_property_type_t get_type (mqtt_property_identify_t id)
 
int32_t prop_check (mqtt_property_t *prop)
 
mqtt_properties_taiot_mqtt_props_init ()
 mqtt消息属性集合初始化 更多...
 
int32_t aiot_mqtt_props_add (mqtt_properties_t *props, mqtt_property_t *prop)
 向属性集合中增加一条属性 更多...
 
mqtt_property_taiot_mqtt_props_get (mqtt_properties_t *props, mqtt_property_identify_t id, int32_t index)
 从属性集合中,查询属性 更多...
 
void aiot_mqtt_props_deinit (mqtt_properties_t **props_pp)
 属性集合反初始化,回收资源 更多...
 
uint32_t prop_len (mqtt_property_t *property)
 
static int32_t _calc_props_len (mqtt_properties_t *props)
 
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属性内容 更多...
 
static uint8_t * binary_copy (uint8_t *in, uint32_t inlen)
 
static int32_t prop_copy (mqtt_property_t *in, mqtt_property_t *out)
 
mqtt_properties_taiot_mqtt_props_copy (mqtt_properties_t *props)
 深拷贝属性 更多...
 

详细描述

mqtt_prop模块的API接口实现, 提供mqtt 5.0属性管理的能力

函数说明

static mqtt_property_type_t get_type ( mqtt_property_identify_t  id)
static
int32_t prop_check ( mqtt_property_t prop)
mqtt_properties_t* aiot_mqtt_props_init ( )

mqtt消息属性集合初始化

返回
mqtt_properties_t *
返回值
NULL执行失败
非空NULL执行成功

函数调用图:

int32_t aiot_mqtt_props_add ( mqtt_properties_t props,
mqtt_property_t prop 
)

向属性集合中增加一条属性

参数
[in]props属性集合
[in]prop单个属性
返回
int32_t
返回值
<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存在多个属性时,属性的序号
返回
mqtt_properties_t *
返回值
NULL执行失败
非空NULL执行成功
void aiot_mqtt_props_deinit ( mqtt_properties_t **  props)

属性集合反初始化,回收资源

参数
[in]props属性集合

函数调用图:

uint32_t prop_len ( mqtt_property_t property)

函数调用图:

static int32_t _calc_props_len ( mqtt_properties_t props)
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 uint8_t* binary_copy ( uint8_t *  in,
uint32_t  inlen 
)
static

函数调用图:

static int32_t prop_copy ( mqtt_property_t in,
mqtt_property_t out 
)
static

函数调用图:

mqtt_properties_t* aiot_mqtt_props_copy ( mqtt_properties_t props)

深拷贝属性

参数
[in]props属性集合

函数调用图: