更新时间:2022-11-24 09:20:12
本文介绍了配网业务相关的接口。
函数名称 | 功能描述 |
---|---|
iot_get_sdk_info | 获取 SDK 版本号 |
intf_init | 初始化系统的适配接口 |
iot_init | 初始化系统的适配接口 |
iot_set_wf_gw_prod_info | 设置无线网关信息 |
iot_set_gw_prod_info | 设置无线网关信息 |
iot_app_cbs_init | IoT 初始化回调设置 |
iot_reg_dp_cb | DP 下发回调注册 |
get_wifi_gw | 判断当前是否是无线模式 |
iot_enable_blemesh_compatible | 适配安卓版本的蓝牙模块 |
iotHttpcCommonPost | 发送 ATOP 命令 |
iot_lan_udp_force_ip | UDP 广播指定 IP |
gwAppLogPathCallBack | IoT 日志回调 |
gwDpCallBack | DP 下发回调 |
iotMqPortCallbackWith2 | 协议 2 监听回调 |
iotMqPortCallbackWith401 | 协议 401 监听回调 |
iotMqPortCallbackWith903 | 协议 903 监听回调 |
函数原型
external fun iot_get_sdk_info(): String
功能说明
获取 SDK 版本号
返回值
返回值 | 说明 |
---|---|
版本 | 版本信息 |
函数原型
external fun intf_init(): Int
功能说明
初始化系统的适配接口
返回值
返回值 | 说明 |
---|---|
0 | 成功 |
非 0 | 失败 |
函数原型
external fun iot_init(path: String): Int
功能说明
初始化系统的适配接口
参数说明
参数名称 | 说明 |
---|---|
path | 路径 |
返回值
返回值 | 说明 |
---|---|
0 | 成功 |
非 0 | 失败 |
函数原型
fun iot_set_wf_gw_prod_info(bean: WfGwProdInfoBean): Int
功能说明
设置无线网关信息
参数说明
参数名称 | 说明 |
---|---|
bean | WfGwProdInfoBean,Wi-Fi 信息类 |
返回值
返回值 | 说明 |
---|---|
0 | 成功 |
非 0 | 失败 |
函数原型
fun iot_set_gw_prod_info(bean: GwProdInfoBean): Int
功能说明
设置无线网关信息
参数说明
参数名称 | 说明 |
---|---|
bean | GwProdInfoBean,配网信息 |
返回值
返回值 | 说明 |
---|---|
0 | 成功 |
非 0 | 失败 |
函数原型
fun iot_app_cbs_init(iotAppLogListener: IotListener.IotAppLogListener)
功能说明
iot 初始化回调设置
参数说明
参数名称 | 说明 |
---|---|
iotAppLogListener | iot 操作回调 |
函数原型
fun iot_reg_dp_cb(
dp_dev_type: DataEnum.DP_DEV_TYPE_T,
gw_permit_dev_tp_t: DataEnum.GW_PERMIT_DEV_TP_T,
iotDpListener: IotListener.IotDpListener
): Int
功能说明
DP 下发回调注册
参数说明
参数名称 | 说明 |
---|---|
dp_dev_type | DP 设置类型 |
gw_permit_dev_tp_t | DP 设置类型 |
dp_dev_type | GW_PERMIT_DEV_TP_T 类型 |
iotDpListener | dp 回调 |
返回值
返回值 | 说明 |
---|---|
0 | 成功 |
非 0 | 失败 |
函数原型
external fun get_wifi_gw(): Int
功能说明
判断当前是否是无线模式。
返回值
返回值 | 说明 |
---|---|
1 | 无线模式 |
0 | 非无线模式 |
函数原型
external fun iot_enable_blemesh_compatible()
功能说明
适配安卓版本的蓝牙模块
函数原型
fun iotHttpcCommonPost(
apiName: String,
apiVer: String,
uuid: String,
devid: String,
postData: String,
pHeadOther: String
): String
功能说明
发送 ATOP 命令。
参数说明
参数名称 | 说明 |
---|---|
apiName | DP 设置类型 |
apiVer | DP 设置类型 |
uuid | UID |
devid | 设备 ID |
postData | JSON 格式的数据 |
pHeadOther | 扩展头一般填 null |
返回值
返回值 | 说明 |
---|---|
string | 成功返回 JSON 结果字符串,否则返回 null |
函数原型
external fun iot_lan_udp_force_ip()
功能说明
udp 广播指定 IP
函数原型
fun gwAppLogPathCallBack():String
功能说明
IoT 日志回调
返回值
返回值 | 说明 |
---|---|
string | 日志存储路径 |
函数原型
fun gwDpCallBack(events: Array<DPEvent>)
功能说明
DP 下发回调。
返回值
返回值 | 说明 |
---|---|
events | DP 集合 |
函数原型
fun iotMqPortCallbackWith2(parString: String)
功能说明
协议 2 监听回调。
参数说明
参数名称 | 说明 |
---|---|
parString | 监听信息 |
函数原型
fun iotMqPortCallbackWith401(parString: String)
功能说明
协议 401 监听回调。
参数说明
参数名称 | 说明 |
---|---|
parString | 监听信息 |
函数原型
fun iotMqPortCallbackWith903(parString: String)
功能说明
协议 903 监听回调。
参数说明
参数名称 | 说明 |
---|---|
parString | 监听信息 |
该内容对您有帮助吗?
是意见反馈该内容对您有帮助吗?
是意见反馈