8 #ifndef __AIOT_COMPRESS_API_H__ 9 #define __AIOT_COMPRESS_API_H__ 11 #if defined(__cplusplus) 21 #define STATE_COMPRESS_BASE (-0x2200) 26 #define STATE_COMPRESS_LEVEL_INVALID (-0x2201) 31 #define STATE_COMPRESS_COMPR_FAILED (-0x2202) 36 #define STATE_COMPRESS_DECOMPR_FAILED (-0x2203) 41 #define STATE_COMPRESS_APPEND_REPEATED (-0x2204) 57 aiot_compress_recv_type_t
type;
199 #if defined(__cplusplus) void * aiot_compress_init(void)
创建compress会话实例, 并以默认值配置会话参数
Definition: aiot_compress_api.c:264
aiot_compress_option_t
aiot_compress_setopt 接口的option参数可选值.
Definition: aiot_compress_api.h:88
int32_t aiot_compress_deinit(void **handle)
结束compress会话, 销毁实例并回收资源
Definition: aiot_compress_api.c:364
用户需要SDK暂存的上下文
Definition: aiot_compress_api.h:145
添加上行消息中,需要压缩的topic
Definition: aiot_compress_api.h:118
添加下行消息中,需要解压缩的topic
Definition: aiot_compress_api.h:127
char * message
Definition: aiot_compress_api.h:64
Definition: aiot_compress_api.h:147
int32_t aiot_compress_topiclist_update(void *handle)
同步给云平台,需要压缩/解压缩的topic
Definition: aiot_compress_api.c:428
compress模块收到从网络上来的报文时, 通知用户的报文内容
Definition: aiot_compress_api.h:53
uint32_t message_len
Definition: aiot_compress_api.h:65
模块依赖的MQTT句柄,为该MQTT句柄连接提供压缩能力
Definition: aiot_compress_api.h:98
Definition: aiot_compress_api.h:47
int32_t aiot_compress_setopt(void *handle, aiot_compress_option_t option, void *data)
配置compress模块参数
Definition: aiot_compress_api.c:292
压缩等级设置,等级越高压缩率越高,消耗的内存和时间也更多
Definition: aiot_compress_api.h:109
uint32_t code
Definition: aiot_compress_api.h:63
设置回调, 它在SDK收到网络报文的时候被调用, 告知用户
Definition: aiot_compress_api.h:136
void(* aiot_compress_recv_handler_t)(void *handle, const aiot_compress_recv_t *packet, void *userdata)
compress模块收到从网络上来的报文时, 通知用户所调用的数据回调函数
Definition: aiot_compress_api.h:79
aiot_compress_recv_type_t type
报文内容所对应的报文类型, 更多信息请参考aiot_compress_recv_type_t
Definition: aiot_compress_api.h:57
aiot_compress_recv_type_t
compress模块收到从网络上来的报文时, 通知用户的报文类型
Definition: aiot_compress_api.h:46