Search in sources :

Example 1 with GetGroupMembershipCommand

use of com.zsmartsystems.zigbee.zcl.clusters.groups.GetGroupMembershipCommand 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());
}
Also used : GetGroupMembershipCommand(com.zsmartsystems.zigbee.zcl.clusters.groups.GetGroupMembershipCommand) ZclTransactionMatcher(com.zsmartsystems.zigbee.zcl.ZclTransactionMatcher)

Example 2 with GetGroupMembershipCommand

use of com.zsmartsystems.zigbee.zcl.clusters.groups.GetGroupMembershipCommand in project com.zsmartsystems.zigbee by zsmartsystems.

the class ZclGroupsCluster method getGroupMembershipCommand.

/**
 * The Get Group Membership Command
 *
 * @param groupCount {@link Integer} Group count
 * @param groupList {@link List<Integer>} Group list
 * @return the {@link Future<CommandResult>} command result future
 */
public Future<CommandResult> getGroupMembershipCommand(Integer groupCount, List<Integer> groupList) {
    GetGroupMembershipCommand command = new GetGroupMembershipCommand();
    // Set the fields
    command.setGroupCount(groupCount);
    command.setGroupList(groupList);
    return send(command);
}
Also used : GetGroupMembershipCommand(com.zsmartsystems.zigbee.zcl.clusters.groups.GetGroupMembershipCommand)

Aggregations

GetGroupMembershipCommand (com.zsmartsystems.zigbee.zcl.clusters.groups.GetGroupMembershipCommand)2 ZclTransactionMatcher (com.zsmartsystems.zigbee.zcl.ZclTransactionMatcher)1