]> git.basschouten.com Git - openhab-addons.git/blob
62be0a3168de0536ad88a6d672533db17564bcdc
[openhab-addons.git] /
1 /**
2  * Copyright (c) 2010-2022 Contributors to the openHAB project
3  *
4  * See the NOTICE file(s) distributed with this work for additional
5  * information.
6  *
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
10  *
11  * SPDX-License-Identifier: EPL-2.0
12  */
13 package org.openhab.binding.lutron.internal.protocol;
14
15 import org.eclipse.jdt.annotation.NonNullByDefault;
16 import org.eclipse.jdt.annotation.Nullable;
17 import org.openhab.binding.lutron.internal.handler.LeapBridgeHandler;
18 import org.openhab.binding.lutron.internal.protocol.leap.LeapCommand;
19 import org.openhab.binding.lutron.internal.protocol.lip.LutronCommandType;
20 import org.openhab.binding.lutron.internal.protocol.lip.LutronOperation;
21 import org.openhab.binding.lutron.internal.protocol.lip.TargetType;
22
23 /**
24  * Lutron command abstract base class
25  *
26  * @author Bob Adair - Initial contribution
27  */
28 @NonNullByDefault
29 public abstract class LutronCommandNew {
30     public final TargetType targetType;
31     protected final LutronOperation operation;
32     protected final LutronCommandType commandType;
33     protected final @Nullable Integer integrationId;
34
35     public LutronCommandNew(TargetType targetType, LutronOperation operation, LutronCommandType type,
36             @Nullable Integer integrationId) {
37         this.targetType = targetType;
38         this.operation = operation;
39         this.commandType = type;
40         this.integrationId = integrationId;
41     }
42
43     public LutronCommandType getType() {
44         return commandType;
45     }
46
47     public LutronOperation getOperation() {
48         return operation;
49     }
50
51     public @Nullable Integer getIntegrationId() {
52         return integrationId;
53     }
54
55     public abstract String lipCommand();
56
57     public abstract @Nullable LeapCommand leapCommand(LeapBridgeHandler bridgeHandler, @Nullable Integer leapZone);
58 }