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.lcn.internal.common;
15 import java.math.BigDecimal;
17 import org.eclipse.jdt.annotation.NonNullByDefault;
18 import org.openhab.core.library.types.PercentType;
21 * Holds the information to control dimmer outputs of an LCN module. Used when the user configured an "output" profile.
23 * @author Fabian Wolter - Initial Contribution
26 public class DimmerOutputCommand extends PercentType {
27 private static final long serialVersionUID = 8147502412107723798L;
28 private final boolean controlAllOutputs;
29 private final boolean controlOutputs12;
30 private final int rampMs;
32 public DimmerOutputCommand(BigDecimal value, boolean controlAllOutputs, boolean controlOutputs12, int rampMs) {
34 this.controlAllOutputs = controlAllOutputs;
35 this.controlOutputs12 = controlOutputs12;
42 * @return ramp in milliseconds
44 public int getRampMs() {
49 * Returns if all dimmer outputs shall be controlled.
51 * @return true, if all dimmer outputs shall be controlled
53 public boolean isControlAllOutputs() {
54 return controlAllOutputs;
58 * Returns if dimmer outputs 1+2 shall be controlled.
60 * @return true, if dimmer outputs 1+2 shall be controlled
62 public boolean isControlOutputs12() {
63 return controlOutputs12;