-
public interface IThingGroupProvides group related operations, like group control, status change monitoring, rename, add/remove device and so on.
-
-
Method Summary
Modifier and Type Method Description abstract voidregisterGroupListener(IGroupListener listener)Register the group status change listenerThe group related information (dp data, group name, and group removal),which will be synchronized here in real time. abstract voidunRegisterGroupListener()Unregister the group status change listener abstract voidrenameGroup(String groupName, IResultCallback callback)Rename the group. abstract voiddismissGroup(IResultCallback callback)Dismiss the group. abstract voidpublishDps(String dps, IResultCallback callback)Send the command to the group. abstract voidpublishDpCodes(Map<String, Object> dpCodeMap, IResultCallback callback)abstract voidpublishDps(String dps, ThingDevicePublishModeEnum publishModeEnum, IResultCallback callback)Send the command to the group. abstract voidupdateDeviceList(List<String> devIds, IResultCallback callback)Update device list. abstract voidaddDevice(String devId, IResultCallback callback)Add device to this group. abstract voidremoveDevice(String devId, IResultCallback callback)Remove device from this group. abstract voidonDestroy()Recycle and release the resources -
-
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
-
unRegisterGroupListener
abstract void unRegisterGroupListener()
Unregister the group status change listener
-
renameGroup
abstract void renameGroup(String groupName, IResultCallback callback)
Rename the group.
- Parameters:
groupName- The name of the group you want to changecallback- 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, IResultCallback callback)
Send the command to the group.
- Parameters:
dps- Data pointscallback- Callback IResultCallback
-
publishDpCodes
abstract void publishDpCodes(Map<String, Object> dpCodeMap, IResultCallback callback)
-
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 pointspublishModeEnum- Publish mode ThingDevicePublishModeEnumcallback- 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
-
-
-
-