| 123456789101112131415161718192021222324252627282930 |
- #ifndef __ALIYUNIOT_H
- #define __ALIYUNIOT_H
- #include <stdint.h>
- // 打印参数
- void aliyuniot_printf_params(void);
- // 设置阿里云连接参数
- void aliyuniot_set_device_params(char * prodect_key, char * device_name, char * device_secret);
- // 设置Token
- void aliyuniot_set_device_token(char * token, char * random, uint32_t seqOffset);
- // 拼接认证报文
- void aliyuniot_get_auth_message(uint8_t * coap_message, uint16_t * coap_message_length);
- // 拼接数据报文
- void aliyuniot_get_data_message(uint8_t * data, uint8_t data_length, uint8_t * coap_message, uint16_t * coap_message_length);
- // 接收数据处理
- uint8_t aliyuniot_recv_data_handle(uint8_t * coap_message, uint16_t coap_message_length);
- // 判断是否认证
- uint8_t aliyuniot_is_authentication(void);
- // 获取host
- char * aliyuniot_get_host(void);
- // 获取port
- uint16_t aliyuniot_get_port(void);
- #endif
|