]> git.basschouten.com Git - openhab-addons.git/blob
f30e196e1cd76af7487dc34e6f632d6036ec14dd
[openhab-addons.git] /
1 /**
2  * Copyright (c) 2010-2023 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.satel.internal.config;
14
15 import org.eclipse.jdt.annotation.NonNullByDefault;
16
17 /**
18  * The {@link SatelThingConfig} contains common configuration values for Satel devices.
19  *
20  * @author Krzysztof Goworek - Initial contribution
21  */
22 @NonNullByDefault
23 public class SatelThingConfig {
24
25     public static final String ID = "id";
26     public static final String UP_ID = "upId";
27     public static final String DOWN_ID = "downId";
28
29     private int id;
30     private int upId;
31     private int downId;
32     private boolean invertState;
33     private boolean forceArming;
34     private boolean commandOnly;
35     private boolean wireless;
36
37     /**
38      * @return device identifier
39      */
40     public int getId() {
41         return id;
42     }
43
44     /**
45      * @return for a shutter: output number to control "up" direction
46      */
47     public int getUpId() {
48         return upId;
49     }
50
51     /**
52      * @return for a shutter: output number to control "down" direction
53      */
54     public int getDownId() {
55         return downId;
56     }
57
58     /**
59      * @return if <code>true</code>, device's state should be inverted
60      */
61     public boolean isStateInverted() {
62         return invertState;
63     }
64
65     /**
66      * @return if <code>true</code>, forces arming a partition
67      */
68     public boolean isForceArmingEnabled() {
69         return forceArming;
70     }
71
72     /**
73      * @return if <code>true</code> the thing should accept only commands, it does not update its state
74      */
75     public boolean isCommandOnly() {
76         return commandOnly;
77     }
78
79     /**
80      * @return if <code>true</code> the thing is a wireless device
81      */
82     public boolean isWireless() {
83         return wireless;
84     }
85 }