Package 

Interface IThingBlueMesh


  • 
    public interface IThingBlueMesh
    
                        

    ThingMesh device operation interface.

    • 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
      • 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 device
        nodeId - Thing node id getNodeId
        encryptedAuthKey - Obtain from broadcast package of the device
        productKey - Obtain from broadcast package of the device
        version - Obtain from broadcast package of the device
        callback - 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 device
        nodeId - Thing node id getNodeId
        productKey - Obtain from broadcast package of the device
        version - Obtain from broadcast package of the device
        deviceKey - Can be empty
        mac - Mac address of device
        option - Additional configuration options
        callback - Callback for 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 address
        pcc - Category of device getCategory
        dps - Thing dps
        callback - 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 address
        pcc - Category of device getCategory
        dps - Thing dps
        schemaMap - Thing schemaMap getSchemaMap
        callback - 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 send
        callback - 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 name
        pcc - Category of device getCategory
        localId - Group address
        callback - Callback for result IResultCallback
      • groupDpReport

         abstract void groupDpReport(long groupId, String dps, IResultCallback callback)

        Upload group dp to cloud.

        Parameters:
        groupId - Group id
        dps - Data points
      • onDestroy

         abstract void onDestroy()

        Recycling resources.

      • ivIndexReport

         abstract void ivIndexReport(String meshId, int ivIndex, IResultCallback callback)

        upload iv index

        Parameters:
        meshId - meshId
        ivIndex - ivIndex
        callback - Reporting cloud callback