]> git.basschouten.com Git - openhab-addons.git/blob
84473a1a1038ad273f11b186b02d9e877797c30c
[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.caddx.internal.config;
14
15 import org.eclipse.jdt.annotation.NonNullByDefault;
16 import org.eclipse.jdt.annotation.Nullable;
17 import org.openhab.binding.caddx.internal.CaddxProtocol;
18
19 /**
20  * Configuration class for the Caddx RS232 Serial interface bridge.
21  *
22  * @author Georgios Moutsos - Initial contribution
23  */
24
25 @NonNullByDefault
26 public class CaddxBridgeConfiguration {
27
28     // Caddx Bridge Thing constants
29     public static final String PROTOCOL = "protocol";
30     public static final String SERIAL_PORT = "serialPort";
31     public static final String BAUD = "baud";
32     public static final String MAX_ZONE_NUMBER = "maxZoneNumber";
33     public static final String IGNORE_ZONE_STATUS_TRANSITIONS = "ignoreZoneStatusTransitions";
34
35     private CaddxProtocol protocol = CaddxProtocol.Binary;
36     private @Nullable String serialPort;
37     private int baudrate = 9600;
38     private int maxZoneNumber = 16;
39     private boolean ignoreZoneStatusTransitions = false;
40
41     public CaddxProtocol getProtocol() {
42         return protocol;
43     }
44
45     public @Nullable String getSerialPort() {
46         return serialPort;
47     }
48
49     public int getBaudrate() {
50         return baudrate;
51     }
52
53     public int getMaxZoneNumber() {
54         return maxZoneNumber;
55     }
56
57     public boolean isIgnoreZoneStatusTransitions() {
58         return ignoreZoneStatusTransitions;
59     }
60 }