use of com.zsmartsystems.zigbee.zcl.ZclTransactionMatcher in project com.zsmartsystems.zigbee by zsmartsystems.
the class ZigBeeApi method getGroupMemberships.
/**
* Gets group memberships from device.
*
* @param device the device
* @return the command result future
*/
public Future<CommandResult> getGroupMemberships(final ZigBeeEndpoint device) {
final GetGroupMembershipCommand command = new GetGroupMembershipCommand();
command.setGroupCount(0);
command.setGroupList(Collections.<Integer>emptyList());
command.setDestinationAddress(device.getEndpointAddress());
return networkManager.unicast(command, new ZclTransactionMatcher());
}
use of com.zsmartsystems.zigbee.zcl.ZclTransactionMatcher in project com.zsmartsystems.zigbee by zsmartsystems.
the class ZigBeeApi method removeMembership.
/**
* Removes group membership from device.
*
* @param device the device
* @param groupId the group ID
* @return the command result future
*/
public Future<CommandResult> removeMembership(final ZigBeeEndpoint device, final int groupId) {
final RemoveGroupCommand command = new RemoveGroupCommand();
command.setGroupId(groupId);
command.setDestinationAddress(device.getEndpointAddress());
return networkManager.unicast(command, new ZclTransactionMatcher());
}
use of com.zsmartsystems.zigbee.zcl.ZclTransactionMatcher in project com.zsmartsystems.zigbee by zsmartsystems.
the class ZigBeeApi method addMembership.
/**
* Adds group membership to device.
*
* @param device the device
* @param groupId the group ID
* @param groupName the group name
* @return the command result future
*/
public Future<CommandResult> addMembership(final ZigBeeEndpoint device, final int groupId, final String groupName) {
final AddGroupCommand command = new AddGroupCommand();
command.setGroupId(groupId);
command.setGroupName(groupName);
command.setDestinationAddress(device.getEndpointAddress());
return networkManager.unicast(command, new ZclTransactionMatcher());
}
use of com.zsmartsystems.zigbee.zcl.ZclTransactionMatcher in project com.zsmartsystems.zigbee by zsmartsystems.
the class ZigBeeApi method viewMembership.
/**
* Views group membership from device.
*
* @param device the device
* @param groupId the group ID
* @return the command result future
*/
public Future<CommandResult> viewMembership(final ZigBeeEndpoint device, final int groupId) {
final ViewGroupCommand command = new ViewGroupCommand();
command.setGroupId(groupId);
command.setDestinationAddress(device.getEndpointAddress());
return networkManager.unicast(command, new ZclTransactionMatcher());
}
Aggregations