2 * Copyright (c) 2010-2022 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 partition control types.
20 * @author Krzysztof Goworek - Initial contribution
22 public enum PartitionControl implements ControlType {
29 FORCE_ARM_MODE_0(0xa0),
30 FORCE_ARM_MODE_1(0xa1),
31 FORCE_ARM_MODE_2(0xa2),
32 FORCE_ARM_MODE_3(0xa3);
34 private byte controlCommand;
35 private BitSet stateBits;
37 PartitionControl(int controlCommand) {
38 this.controlCommand = (byte) controlCommand;
39 // for simplicity we just add all partition states here
40 this.stateBits = StateType.getStatesBitSet(PartitionState.values());
44 public byte getControlCommand() {
45 return controlCommand;
49 public ObjectType getObjectType() {
50 return ObjectType.PARTITION;
54 public BitSet getControlledStates() {