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 output control types:
20 * <li>ON - sets an output</li>
21 * <li>OFF - resets an output</li>
22 * <li>TOGGLE - inverts output state</li>
25 * @author Krzysztof Goworek - Initial contribution
27 public enum OutputControl implements ControlType {
32 private byte controlCommand;
33 private BitSet stateBits;
35 OutputControl(int controlCommand) {
36 this.controlCommand = (byte) controlCommand;
37 this.stateBits = StateType.getStatesBitSet(OutputState.STATE);
41 public byte getControlCommand() {
42 return controlCommand;
46 public ObjectType getObjectType() {
47 return ObjectType.OUTPUT;
51 public BitSet getControlledStates() {