ESP8266_RTOS_SDK v1.4.0

- Main Page
- Modules
- Data Structures
- Files

- File List

airkiss.h
1 /*
2 * airkiss.h
3 *
4 * Created on: 2015-1-26
5 * Author: peterfan
6 */
7
8 #ifndef AIRKISS_H_
9 #define AIRKISS_H_
10
11 #ifdef __cplusplus
12 extern "C" {
13 #endif
14
15
16 typedef void* (*airkiss_memset_fn) (void* ptr, int value, unsigned int num);
17 typedef void* (*airkiss_memcpy_fn) (void* dst, const void* src, unsigned int num);
18 typedef int (*airkiss_memcmp_fn) (const void* ptr1, const void* ptr2, unsigned int num);
19 typedef int (*airkiss_printf_fn) (const char* format, ...);
20
21
22
23 typedef struct
24 {
25 airkiss_memset_fn memset;
26 airkiss_memcpy_fn memcpy;
27 airkiss_memcmp_fn memcmp;
28 airkiss_printf_fn printf;
29
30 } airkiss_config_t;
31
66 const char* airkiss_version(void);
67
68
69 typedef enum
70 {
72 AIRKISS_LAN_ERR_OVERFLOW = -5,
73
75 AIRKISS_LAN_ERR_CMD = -4,
76
78 AIRKISS_LAN_ERR_PAKE = -3,
79
81 AIRKISS_LAN_ERR_PARA = -2,
82
84 AIRKISS_LAN_ERR_PKG = -1,
85
87 AIRKISS_LAN_CONTINUE = 0,
88
90 AIRKISS_LAN_SSDP_REQ = 1,
91
93 AIRKISS_LAN_PAKE_READY = 2
94
95
96 } airkiss_lan_ret_t;
97
98
99 typedef enum
100 {
101 AIRKISS_LAN_SSDP_REQ_CMD = 0x1,
102 AIRKISS_LAN_SSDP_RESP_CMD = 0x1001,
103 AIRKISS_LAN_SSDP_NOTIFY_CMD = 0x1002
104 } airkiss_lan_cmdid_t;
105
117 int airkiss_lan_recv(const void* body, unsigned short length, const airkiss_config_t* config);
118
119
136 int airkiss_lan_pack(airkiss_lan_cmdid_t ak_lan_cmdid, void* appid, void* deviceid, void* _datain, unsigned short inlength, void* _dataout, unsigned short* outlength, const airkiss_config_t* config);
137
146 #ifdef __cplusplus
147 }
148 #endif
149
150 #endif /* AIRKISS_H_ */
AIRKISS_LAN_ERR_PARA
Definition: airkiss.h:81
airkiss_lan_recv
int airkiss_lan_recv(const void *body, unsigned short length, const airkiss_config_t *config)
Parse the UDP packet sent by AirKiss.
airkiss_version
const char * airkiss_version(void)
Get the version information of AirKiss lib.
AIRKISS_LAN_SSDP_REQ
Definition: airkiss.h:90
AIRKISS_LAN_CONTINUE
Definition: airkiss.h:87
AIRKISS_LAN_PAKE_READY
Definition: airkiss.h:93
AIRKISS_LAN_ERR_OVERFLOW
Definition: airkiss.h:72
AIRKISS_LAN_ERR_CMD
Definition: airkiss.h:75
airkiss_config_t
Definition: airkiss.h:23
AIRKISS_LAN_ERR_PKG
Definition: airkiss.h:84
AIRKISS_LAN_ERR_PAKE
Definition: airkiss.h:78
airkiss_lan_pack
int airkiss_lan_pack(airkiss_lan_cmdid_t ak_lan_cmdid, void *appid, void *deviceid, void *_datain, unsigned short inlength, void *_dataout, unsigned short *outlength, const airkiss_config_t *config)
Packaging the UDP packet.
airkiss_lan_ret_t
airkiss_lan_ret_t
Definition: airkiss.h:69