2 * Copyright (c) 2010-2023 Contributors to the openHAB project
4 * See the NOTICE file(s) distributed with this work for additional
7 * This program and the accompanying materials are made available under the
8 * terms of the Eclipse Public License 2.0 which is available at
9 * http://www.eclipse.org/legal/epl-2.0
11 * SPDX-License-Identifier: EPL-2.0
13 package org.openhab.binding.satel.internal.types;
15 import java.util.BitSet;
18 * Available zone control types.
20 * @author Krzysztof Goworek - Initial contribution
22 public enum ZoneControl implements ControlType {
23 BYPASS(0x86, ZoneState.BYPASS),
24 UNBYPASS(0x87, ZoneState.BYPASS),
25 ISOLATE(0x90, ZoneState.ISOLATE);
27 private byte controlCommand;
28 private BitSet stateBits;
30 ZoneControl(int controlCommand, ZoneState... controlledStates) {
31 this.controlCommand = (byte) controlCommand;
32 this.stateBits = StateType.getStatesBitSet(controlledStates);
36 public byte getControlCommand() {
37 return controlCommand;
41 public ObjectType getObjectType() {
42 return ObjectType.ZONE;
46 public BitSet getControlledStates() {