-
public interface IThingGroup
Provides group related operations, like group control, status change monitoring, rename, add/remove device and so on.
-
-
Method Summary
Modifier and Type Method Description abstract void
registerGroupListener(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 void
unRegisterGroupListener()
Unregister the group status change listener abstract void
renameGroup(String groupName, IResultCallback callback)
Rename the group. abstract void
dismissGroup(IResultCallback callback)
Dismiss the group. abstract void
publishDps(String dps, IResultCallback callback)
Send the command to the group. abstract void
publishDpCodes(Map<String, Object> dpCodeMap, IResultCallback callback)
abstract void
publishDps(String dps, ThingDevicePublishModeEnum publishModeEnum, IResultCallback callback)
Send the command to the group. abstract void
updateDeviceList(List<String> devIds, IResultCallback callback)
Update device list. abstract void
addDevice(String devId, IResultCallback callback)
Add device to this group. abstract void
removeDevice(String devId, IResultCallback callback)
Remove device from this group. abstract void
onDestroy()
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
-
-
-
-