]> git.basschouten.com Git - openhab-addons.git/blob
b4314f45e7aa54d46155e5cd7f8525749cf17cda
[openhab-addons.git] /
1 /**
2  * Copyright (c) 2010-2020 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.modbus.internal.config;
14
15 import org.eclipse.jdt.annotation.NonNullByDefault;
16 import org.eclipse.jdt.annotation.Nullable;
17
18 /**
19  * Configuration for tcp thing
20  *
21  * @author Sami Salonen - Initial contribution
22  *
23  */
24 @NonNullByDefault
25 public class ModbusTcpConfiguration {
26     private @Nullable String host;
27     private int port;
28     private int id;
29     private int timeBetweenTransactionsMillis;
30     private int timeBetweenReconnectMillis;
31     private int connectMaxTries;
32     private int reconnectAfterMillis;
33     private int connectTimeoutMillis;
34     private boolean enableDiscovery;
35
36     public @Nullable String getHost() {
37         return host;
38     }
39
40     public void setHost(String host) {
41         this.host = host;
42     }
43
44     public int getPort() {
45         return port;
46     }
47
48     public void setPort(int port) {
49         this.port = port;
50     }
51
52     public int getId() {
53         return id;
54     }
55
56     public void setId(int id) {
57         this.id = id;
58     }
59
60     public int getTimeBetweenTransactionsMillis() {
61         return timeBetweenTransactionsMillis;
62     }
63
64     public void setTimeBetweenTransactionsMillis(int timeBetweenTransactionsMillis) {
65         this.timeBetweenTransactionsMillis = timeBetweenTransactionsMillis;
66     }
67
68     public int getTimeBetweenReconnectMillis() {
69         return timeBetweenReconnectMillis;
70     }
71
72     public void setTimeBetweenReconnectMillis(int timeBetweenReconnectMillis) {
73         this.timeBetweenReconnectMillis = timeBetweenReconnectMillis;
74     }
75
76     public int getConnectMaxTries() {
77         return connectMaxTries;
78     }
79
80     public void setConnectMaxTries(int connectMaxTries) {
81         this.connectMaxTries = connectMaxTries;
82     }
83
84     public int getReconnectAfterMillis() {
85         return reconnectAfterMillis;
86     }
87
88     public void setReconnectAfterMillis(int reconnectAfterMillis) {
89         this.reconnectAfterMillis = reconnectAfterMillis;
90     }
91
92     public int getConnectTimeoutMillis() {
93         return connectTimeoutMillis;
94     }
95
96     public void setConnectTimeoutMillis(int connectTimeoutMillis) {
97         this.connectTimeoutMillis = connectTimeoutMillis;
98     }
99
100     public boolean isDiscoveryEnabled() {
101         return enableDiscovery;
102     }
103
104     public void setDiscoveryEnabled(boolean enableDiscovery) {
105         this.enableDiscovery = enableDiscovery;
106     }
107 }