-
public interface IThingBlueMesh
ThingMesh device operation interface.
-
-
Method Summary
Modifier and Type Method Description abstract boolean
isCloudOnline()
Get cloud online status.If both bluetooth and wifi modules are included and device is cloud onlie ,then return true. abstract void
removeMesh(IResultCallback callback)
Delete mesh group from server.If the group contains sub-devices,sub-devices will be deleted either. abstract void
renameMesh(String meshName, IResultCallback callback)
Rename mesh group device. abstract void
addSubDev(String uuid, String nodeId, String encryptedAuthKey, String productKey, String version, IAddSubDevCallback callback)
Add device to cloud with auth key. abstract void
addSubDev(String uuid, String nodeId, String productKey, String version, String deviceKey, String mac, String option, IAddSubDevCallback callback)
Add device to cloud without auth key. abstract void
addSubDev(MeshConfigParams params, IAddSubDevCallback callback)
abstract void
renameMeshSubDev(String devId, String name, IResultCallback callback)
Rename mesh device. abstract void
publishDps(String nodeId, String pcc, String dps, IResultCallback callback)
Send mesh message to a device. abstract void
broadcastDps(String pcc, String dps, IResultCallback callback)
Only for ThingMesh, send message by cloud. abstract void
multicastDps(String localId, String pcc, String dps, IResultCallback callback)
Send mesh message to a group address. abstract void
multicastDps(String localId, String pcc, String dps, Map<String, SchemaBean> schemaMap, IResultCallback callback)
Send mesh message to a group address, only for sensors and remote control devices. abstract void
publishRawData(Array<byte> data, IResultCallback callback)
Only for ThingMesh, send parameters of byte array type。 abstract DeviceBean
getMeshSubDevBean(String devId)
Get device info. abstract DeviceBean
getMeshSubDevBeanByNodeId(String nodeId)
Get device info. abstract DeviceBean
getMeshSubDevBeanByMac(String mac)
Get device info. abstract List<DeviceBean>
getMeshSubDevList()
Get sub-device info from local. abstract void
removeMeshSubDev(String devId, IResultCallback callback)
Delete device from server. abstract void
getDataByDpIds(String nodeId, List<Integer> dpIds, IResultCallback callback)
Get dp value by dp id by local, only for ThingMesh. abstract void
addGroup(String name, String pcc, String localId, IAddGroupCallback callback)
Create mesh group of the same category . abstract void
groupDpReport(long groupId, String dps, IResultCallback callback)
Upload group dp to cloud. abstract void
onDestroy()
Recycling resources. abstract void
ivIndexReport(String meshId, int ivIndex, IResultCallback callback)
upload iv index abstract void
switchRelayState(String devId, String nodeId, boolean switchState, IResultCallback callback)
abstract void
switchProxyStats(String devId, String nodeId, boolean switchState, IResultCallback callback)
-
-
Method Detail
-
isCloudOnline
abstract boolean isCloudOnline()
Get cloud online status.If both bluetooth and wifi modules are included and device is cloud onlie ,then return true.
-
removeMesh
abstract void removeMesh(IResultCallback callback)
Delete mesh group from server.If the group contains sub-devices,sub-devices will be deleted either.
- Parameters:
callback
- IResultCallback
-
renameMesh
abstract void renameMesh(String meshName, IResultCallback callback)
Rename mesh group device.
- Parameters:
meshName
- New namecallback
- IResultCallback
-
addSubDev
abstract void addSubDev(String uuid, String nodeId, String encryptedAuthKey, String productKey, String version, IAddSubDevCallback callback)
Add device to cloud with auth key.
- Parameters:
uuid
- Obtain from broadcast package of the devicenodeId
- Thing node id getNodeIdencryptedAuthKey
- Obtain from broadcast package of the deviceproductKey
- Obtain from broadcast package of the deviceversion
- Obtain from broadcast package of the devicecallback
- Callback for result IAddSubDevCallback
-
addSubDev
abstract void addSubDev(String uuid, String nodeId, String productKey, String version, String deviceKey, String mac, String option, IAddSubDevCallback callback)
Add device to cloud without auth key.
- Parameters:
uuid
- Mac address of devicenodeId
- Thing node id getNodeIdproductKey
- Obtain from broadcast package of the deviceversion
- Obtain from broadcast package of the devicedeviceKey
- Can be emptymac
- Mac address of deviceoption
- Additional configuration optionscallback
- Callback for result IResultCallback
-
addSubDev
abstract void addSubDev(MeshConfigParams params, IAddSubDevCallback callback)
-
renameMeshSubDev
abstract void renameMeshSubDev(String devId, String name, IResultCallback callback)
Rename mesh device.
- Parameters:
devId
- Thing device id getDevIdname
- New namecallback
- Callback for result IResultCallback
-
publishDps
abstract void publishDps(String nodeId, String pcc, String dps, IResultCallback callback)
Send mesh message to a device.
- Parameters:
nodeId
- Thing node id getNodeIdpcc
- Category of device getCategorydps
- Thing dpscallback
- Callback for send result IResultCallback
-
broadcastDps
abstract void broadcastDps(String pcc, String dps, IResultCallback callback)
Only for ThingMesh, send message by cloud.
- Parameters:
pcc
- Category of device getCategorydps
- Thing dpscallback
- Callback for send result IResultCallback
-
multicastDps
abstract void multicastDps(String localId, String pcc, String dps, IResultCallback callback)
Send mesh message to a group address.
- Parameters:
localId
- Mesh group addresspcc
- Category of device getCategorydps
- Thing dpscallback
- Callback for send result IResultCallback
-
multicastDps
abstract void multicastDps(String localId, String pcc, String dps, Map<String, SchemaBean> schemaMap, IResultCallback callback)
Send mesh message to a group address, only for sensors and remote control devices.
- Parameters:
localId
- Mesh group addresspcc
- Category of device getCategorydps
- Thing dpsschemaMap
- Thing schemaMap getSchemaMapcallback
- Callback for send result IResultCallback
-
publishRawData
abstract void publishRawData(Array<byte> data, IResultCallback callback)
Only for ThingMesh, send parameters of byte array type。
- Parameters:
data
- Parameter for sendcallback
- Callback for send result IResultCallback
-
getMeshSubDevBean
abstract DeviceBean getMeshSubDevBean(String devId)
Get device info.
- Parameters:
devId
- getDevId
-
getMeshSubDevBeanByNodeId
abstract DeviceBean getMeshSubDevBeanByNodeId(String nodeId)
Get device info.
- Parameters:
nodeId
- getNodeId
-
getMeshSubDevBeanByMac
abstract DeviceBean getMeshSubDevBeanByMac(String mac)
Get device info.
- Parameters:
mac
- Mac address of device
-
getMeshSubDevList
abstract List<DeviceBean> getMeshSubDevList()
Get sub-device info from local.
-
removeMeshSubDev
abstract void removeMeshSubDev(String devId, IResultCallback callback)
Delete device from server.
- Parameters:
devId
- getDevIdcallback
- Callback for result IResultCallback
-
getDataByDpIds
abstract void getDataByDpIds(String nodeId, List<Integer> dpIds, IResultCallback callback)
Get dp value by dp id by local, only for ThingMesh.
- Parameters:
nodeId
- getNodeIddpIds
- Dp idscallback
- Callback for send result IResultCallback
-
addGroup
abstract void addGroup(String name, String pcc, String localId, IAddGroupCallback callback)
Create mesh group of the same category .
- Parameters:
name
- Group namepcc
- Category of device getCategorylocalId
- Group addresscallback
- Callback for result IResultCallback
-
groupDpReport
abstract void groupDpReport(long groupId, String dps, IResultCallback callback)
Upload group dp to cloud.
- Parameters:
groupId
- Group iddps
- Data points
-
onDestroy
abstract void onDestroy()
Recycling resources.
-
ivIndexReport
abstract void ivIndexReport(String meshId, int ivIndex, IResultCallback callback)
upload iv index
- Parameters:
meshId
- meshIdivIndex
- ivIndexcallback
- Reporting cloud callback
-
switchRelayState
abstract void switchRelayState(String devId, String nodeId, boolean switchState, IResultCallback callback)
-
switchProxyStats
abstract void switchProxyStats(String devId, String nodeId, boolean switchState, IResultCallback callback)
-
-
-
-