use of com.zsmartsystems.zigbee.zcl.clusters.groups.AddGroupCommand 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.clusters.groups.AddGroupCommand in project com.zsmartsystems.zigbee by zsmartsystems.
the class ZclGroupsCluster method addGroupCommand.
/**
* The Add Group Command
*
* @param groupId {@link Integer} Group ID
* @param groupName {@link String} Group Name
* @return the {@link Future<CommandResult>} command result future
*/
public Future<CommandResult> addGroupCommand(Integer groupId, String groupName) {
AddGroupCommand command = new AddGroupCommand();
// Set the fields
command.setGroupId(groupId);
command.setGroupName(groupName);
return send(command);
}
use of com.zsmartsystems.zigbee.zcl.clusters.groups.AddGroupCommand in project com.zsmartsystems.zigbee by zsmartsystems.
the class ZclCommandTypeTest method instantiateCommand.
@Test
public void instantiateCommand() {
ZclCommandType cmd = ZclCommandType.ADD_GROUP_COMMAND;
ZclCommand cmdClass = cmd.instantiateCommand();
assertTrue(cmdClass instanceof AddGroupCommand);
}
Aggregations