8 #ifndef __AIOT_SUBDEV_API_H__ 9 #define __AIOT_SUBDEV_API_H__ 11 #if defined(__cplusplus) 20 #define STATE_SUBDEV_BASE (-0x0C00) 59 aiot_subdev_recv_type_t
type;
343 #if defined(__cplusplus) char * params
Definition: aiot_subdev_api.h:47
aiot_subdev_generic_notify_t generic_notify
收到的云端的通知
Definition: aiot_subdev_api.h:69
Definition: aiot_subdev_api.h:45
Definition: aiot_subdev_api.h:134
char * device_name
Definition: aiot_subdev_api.h:136
设置回调, 它在SDK收到网络报文的时候被调用, 告知用户, 数据类型为(aiot_subdev_recv_handler_t) ...
Definition: aiot_subdev_api.h:168
void(* aiot_subdev_event_handler_t)(void *handle, const aiot_subdev_event_t *event, void *userdata)
subdev模块内部发生值得用户关注的状态变化时, 通知用户所调用的事件回调函数
Definition: aiot_subdev_api.h:127
Definition: aiot_subdev_api.h:32
Definition: aiot_subdev_api.h:29
uint32_t msg_id
Definition: aiot_subdev_api.h:46
aiot_subdev_recv_type_t
subdev模块收到从网络上来的报文时, 通知用户的报文类型
Definition: aiot_subdev_api.h:25
char * device_secret
Definition: aiot_subdev_api.h:137
设置回调, 它在SDK发生内部状态变更时被调用, 告知用户, 数据类型为(aiot_subdev_event_handler_t) ...
Definition: aiot_subdev_api.h:177
Definition: aiot_subdev_api.h:36
非法的应答报文
Definition: aiot_subdev_api.h:97
char * product_key
Definition: aiot_subdev_api.h:41
void(* aiot_subdev_recv_handler_t)(void *handle, const aiot_subdev_recv_t *packet, void *user_data)
subdev模块收到从网络上来的报文时, 通知用户所调用的数据回调函数
Definition: aiot_subdev_api.h:82
void * aiot_subdev_init(void)
创建subdev会话实例, 并以默认值配置会话参数
Definition: aiot_subdev_api.c:485
uint32_t code
Definition: aiot_subdev_api.h:38
char * product_key
Definition: aiot_subdev_api.h:48
char * device_name
Definition: aiot_subdev_api.h:42
Definition: aiot_subdev_api.h:26
subdev会话 需要的MQTT句柄, 需要先建立MQTT连接,再设置MQTT句柄
Definition: aiot_subdev_api.h:159
int32_t aiot_subdev_send_topo_add(void *handle, aiot_subdev_dev_t dev[], uint32_t dev_num)
向物联网平台发送添加子设备与网关topo关系的请求
Definition: aiot_subdev_api.c:576
Definition: aiot_subdev_api.h:31
Definition: aiot_subdev_api.h:27
subdev模块收到从网络上来的报文时, 通知用户的报文内容
Definition: aiot_subdev_api.h:55
char * product_key
Definition: aiot_subdev_api.h:135
Definition: aiot_subdev_api.h:33
subdev模块内部发生值得用户关注的状态变化时, 通知用户的事件内容
Definition: aiot_subdev_api.h:111
用户需要SDK暂存的上下文, 数据类型为(void *)
Definition: aiot_subdev_api.h:186
char * product_secret
Definition: aiot_subdev_api.h:138
aiot_subdev_event_type_t
subdev模块内部发生值得用户关注的状态变化时, 通知用户的事件类型
Definition: aiot_subdev_api.h:93
int32_t aiot_subdev_send_topo_get(void *handle)
向物联网平台发送查询子设备与网关topo关系的请求
Definition: aiot_subdev_api.c:695
int32_t aiot_subdev_send_topo_delete(void *handle, aiot_subdev_dev_t dev[], uint32_t dev_num)
向物联网平台发送删除子设备与网关topo关系的请求
Definition: aiot_subdev_api.c:639
aiot_subdev_option_t
aiot_subdev_setopt 接口的option参数可选值.
Definition: aiot_subdev_api.h:151
aiot_subdev_generic_reply_t generic_reply
从设备发起请求消息后,收到的云端的应答
Definition: aiot_subdev_api.h:64
char * device_name
Definition: aiot_subdev_api.h:49
应答报文的id字段非法
Definition: aiot_subdev_api.h:101
char * data
Definition: aiot_subdev_api.h:39
Definition: aiot_subdev_api.h:30
int32_t aiot_subdev_deinit(void **handle)
结束subdev会话, 销毁实例并回收资源
Definition: aiot_subdev_api.c:555
Definition: aiot_subdev_api.h:28
Definition: aiot_subdev_api.h:187
aiot_subdev_event_type_t type
事件内容所对应的事件类型, 更多信息请参考aiot_subdev_event_type_t
Definition: aiot_subdev_api.h:115
int32_t aiot_subdev_send_batch_login(void *handle, aiot_subdev_dev_t dev[], uint32_t dev_num)
向物联网平台发送子设备上线请求
Definition: aiot_subdev_api.c:720
应答报文的code字段非法
Definition: aiot_subdev_api.h:105
uint32_t msg_id
Definition: aiot_subdev_api.h:37
int32_t aiot_subdev_setopt(void *handle, aiot_subdev_option_t option, void *data)
配置subdev会话
Definition: aiot_subdev_api.c:513
int32_t aiot_subdev_send_product_register(void *handle, aiot_subdev_dev_t dev[], uint32_t dev_num)
向物联网平台发送子设备动态注册请求(可从其他网关抢绑子设备)
Definition: aiot_subdev_api.c:905
int32_t aiot_subdev_send_sub_register(void *handle, aiot_subdev_dev_t dev[], uint32_t dev_num)
向物联网平台发送子设备动态注册请求
Definition: aiot_subdev_api.c:849
aiot_subdev_recv_type_t type
报文内容所对应的报文类型, 更多信息请参考aiot_subdev_recv_type_t
Definition: aiot_subdev_api.h:59
int32_t aiot_subdev_send_batch_logout(void *handle, aiot_subdev_dev_t dev[], uint32_t dev_num)
向物联网平台发送子设备下线请求
Definition: aiot_subdev_api.c:793
char * message
Definition: aiot_subdev_api.h:40