Package 

Interface IThingGroup


  • 
    public interface IThingGroup
    
                        

    Provides group related operations, like group control, status change monitoring, rename, add/remove device and so on.

    • Method Detail

      • registerGroupListener

         abstract void registerGroupListener(IGroupListener listener)

        Register the group status change listener

        The group related information (dp data, group name, and group removal),which will be synchronized here in real time.

        Parameters:
        listener - The listener IGroupListener
      • renameGroup

         abstract void renameGroup(String groupName, IResultCallback callback)

        Rename the group.

        Parameters:
        groupName - The name of the group you want to change
        callback - Callback result success or failure.
      • dismissGroup

         abstract void dismissGroup(IResultCallback callback)

        Dismiss the group.

        Parameters:
        callback - Callback result success or failure.
      • publishDps

         abstract void publishDps(String dps, ThingDevicePublishModeEnum publishModeEnum, IResultCallback callback)

        Send the command to the group.

        The successful issuing of a command does not mean that the group is successfully operated,but only means that the command has been successfully sent.

        If the operation succeeds, the data point information will be reported,and returned through the onDpUpdate interface.

        The command string is json string like {"101": true}.

        The command can send multiple data point at one time.

        Parameters:
        dps - Data points
        publishModeEnum - Publish mode ThingDevicePublishModeEnum
        callback - Callback IResultCallback
      • updateDeviceList

         abstract void updateDeviceList(List<String> devIds, IResultCallback callback)

        Update device list.

        Parameters:
        devIds - device ids.
        callback - Callback result success or failure.
      • addDevice

         abstract void addDevice(String devId, IResultCallback callback)

        Add device to this group.

        Parameters:
        devId - device id.
        callback - Callback result success or failure.
      • removeDevice

         abstract void removeDevice(String devId, IResultCallback callback)

        Remove device from this group.

        Parameters:
        devId - device id.
        callback - Callback result success or failure.
      • onDestroy

         abstract void onDestroy()

        Recycle and release the resources