文档中心
灵隼物联网云平台
API 参考
灵隼客户端 Android API
|
int | getStateMachine () |
|
int | registerListener (IDeviceMgr.ICallback callback) |
|
int | unregisterListener (IDeviceMgr.ICallback callback) |
|
int | queryAllDevices () |
|
List< IotDevice > | getBindDevList () |
|
int | addDevice (String productNumber, String deviceID) |
|
int | removeDevice (IotDevice removingDev) |
|
int | renameDevice (IotDevice iotDevice, String newName) |
|
int | queryAllPropertyDesc (final String deviceID, final String productNumber) |
|
int | setDeviceProperty (IotDevice iotDevice, Map< String, Object > properties) |
|
int | getDeviceProperty (IotDevice iotDevice) |
|
int | getMcuVersionInfo (IotDevice iotDevice) |
|
int | upgradeMcuVersion (IotDevice iotDevice, long upgradeId, int decide) |
|
int | getMcuUpgradeStatus (IotDevice iotDevice, long upgradeId) |
|
int | queryProductList (final ProductQueryParam queryParam) |
|
int | shareDevice (final IotDevice iotDevice, final String sharingAccount, int permission, boolean needPeerAgree) |
|
int | deshareDevice (final IotOutSharer outSharer) |
|
int | acceptDevice (final String deviceName, final String order) |
|
int | querySharableDevList () |
|
int | queryOutSharerList (final String devcieID) |
|
int | queryInSharedDevList () |
|
int | queryShareMsgByPage (int pageNumber, int pageSize, int auditStatus) |
|
int | queryShareMsgById (long messageId) |
|
int | deleteShareMsg (long messageId) |
|
◆ acceptDevice()
int com.agora.iotsdk20.IDeviceMgr.acceptDevice |
( |
final String |
deviceName, |
|
|
final String |
order |
|
) |
| |
◆ addDevice()
int com.agora.iotsdk20.IDeviceMgr.addDevice |
( |
String |
productNumber, |
|
|
String |
deviceID |
|
) |
| |
添加设备。
成功添加设备后,SDK 会触发 onDeviceAddDone 回调。
- 参数
-
productNumber | 作为产品唯一标识的数字。 |
deviceID | 设备唯一 ID,即设备的 MAC 地址。 |
- 返回
- 错误码,详见 ErrCode。
◆ deleteShareMsg()
int com.agora.iotsdk20.IDeviceMgr.deleteShareMsg |
( |
long |
messageId | ) |
|
◆ deshareDevice()
int com.agora.iotsdk20.IDeviceMgr.deshareDevice |
( |
final IotOutSharer |
outSharer | ) |
|
◆ getBindDevList()
List< IotDevice > com.agora.iotsdk20.IDeviceMgr.getBindDevList |
( |
| ) |
|
◆ getDeviceProperty()
int com.agora.iotsdk20.IDeviceMgr.getDeviceProperty |
( |
IotDevice |
iotDevice | ) |
|
◆ getMcuUpgradeStatus()
int com.agora.iotsdk20.IDeviceMgr.getMcuUpgradeStatus |
( |
IotDevice |
iotDevice, |
|
|
long |
upgradeId |
|
) |
| |
获取设备升级,触发 onUpgradeStatusDone 回调。
- 参数
-
iotDevice | : 要获取的设备 |
upgradeId | : 指定升级 ID |
- 返回
- 错误码,详见 ErrCode。
◆ getMcuVersionInfo()
int com.agora.iotsdk20.IDeviceMgr.getMcuVersionInfo |
( |
IotDevice |
iotDevice | ) |
|
获取设备古版本信息属性,触发 onGetMcuVerInfoDone 回调。
- 参数
-
- 返回
- 错误码,详见 ErrCode。
◆ getStateMachine()
int com.agora.iotsdk20.IDeviceMgr.getStateMachine |
( |
| ) |
|
◆ queryAllDevices()
int com.agora.iotsdk20.IDeviceMgr.queryAllDevices |
( |
| ) |
|
◆ queryAllPropertyDesc()
int com.agora.iotsdk20.IDeviceMgr.queryAllPropertyDesc |
( |
final String |
deviceID, |
|
|
final String |
productNumber |
|
) |
| |
查询所有属性描述符。
成功查询所有属性描述符后,SDK 会触发 onQueryAllPropertyDescDone 回调。 该方法支持通过 deviceID
或 productNumber
查询,选择其中一个参数查询时,另一个参数需要设置为 null
。 不要同时填入 deviceID
和 productNumber
参数,否则该方法只会通过 deviceID
进行查询。
- 参数
-
deviceID | 设备 ID。 |
productNumber | 产品唯一标识。 |
- 返回
-
◆ queryInSharedDevList()
int com.agora.iotsdk20.IDeviceMgr.queryInSharedDevList |
( |
| ) |
|
◆ queryOutSharerList()
int com.agora.iotsdk20.IDeviceMgr.queryOutSharerList |
( |
final String |
devcieID | ) |
|
◆ queryProductList()
int com.agora.iotsdk20.IDeviceMgr.queryProductList |
( |
final ProductQueryParam |
queryParam | ) |
|
◆ querySharableDevList()
int com.agora.iotsdk20.IDeviceMgr.querySharableDevList |
( |
| ) |
|
◆ queryShareMsgById()
int com.agora.iotsdk20.IDeviceMgr.queryShareMsgById |
( |
long |
messageId | ) |
|
◆ queryShareMsgByPage()
int com.agora.iotsdk20.IDeviceMgr.queryShareMsgByPage |
( |
int |
pageNumber, |
|
|
int |
pageSize, |
|
|
int |
auditStatus |
|
) |
| |
分页查询设备分享消息。
成功查询后,SDK 会触发 onQueryShareMsgPageDone 回调。
- 参数
-
pageNumber | 要查询的页号,-1 表示不设置该参数。 |
pageSize | 每页列表最大数量,-1 表示不设置该参数。 |
auditStatus | 查询状态:
- 0:查询所有消息
- 1:查询已处理消息
- 2:查询未处理消息
|
- 返回
- 错误码,详见 ErrCode。
◆ registerListener()
int com.agora.iotsdk20.IDeviceMgr.registerListener |
( |
IDeviceMgr.ICallback |
callback | ) |
|
◆ removeDevice()
int com.agora.iotsdk20.IDeviceMgr.removeDevice |
( |
IotDevice |
removingDev | ) |
|
◆ renameDevice()
int com.agora.iotsdk20.IDeviceMgr.renameDevice |
( |
IotDevice |
iotDevice, |
|
|
String |
newName |
|
) |
| |
◆ setDeviceProperty()
int com.agora.iotsdk20.IDeviceMgr.setDeviceProperty |
( |
IotDevice |
iotDevice, |
|
|
Map< String, Object > |
properties |
|
) |
| |
◆ shareDevice()
int com.agora.iotsdk20.IDeviceMgr.shareDevice |
( |
final IotDevice |
iotDevice, |
|
|
final String |
sharingAccount, |
|
|
int |
permission, |
|
|
boolean |
needPeerAgree |
|
) |
| |
分享设备给其他人。
该方法需要有对方接受。成功分享后,SDK 会触发 onShareDeviceDone 回调。
- 参数
-
iotDevice | 将要分享出去的设备,详见 IotDevice。 |
sharingAccount | 分享的目标账号。 |
permission | 分享的权限:
|
needPeerAgree | 分享是否需要对端同意:
|
- 返回
- 错误码,详见 ErrCode。
◆ unregisterListener()
int com.agora.iotsdk20.IDeviceMgr.unregisterListener |
( |
IDeviceMgr.ICallback |
callback | ) |
|
◆ upgradeMcuVersion()
int com.agora.iotsdk20.IDeviceMgr.upgradeMcuVersion |
( |
IotDevice |
iotDevice, |
|
|
long |
upgradeId, |
|
|
int |
decide |
|
) |
| |
升级设备固件版本,触发 onUpgradeMcuVerDone 回调。
- 参数
-
iotDevice | : 要获取固件的设备 |
upgradeId | : 指定升级Id |
decide | : 1不升级(忽略本次升级); 2升级(确定升级); 0无效的决定 |
- 返回
- 错误码,详见 ErrCode。
◆ DEVMGR_STATE_IDLE
final int com.agora.iotsdk20.IDeviceMgr.DEVMGR_STATE_IDLE = 0x0000 |
|
static |
该接口的文档由以下文件生成: