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.atlona.internal.pro3;
16 * Configuration class for the Atlona Pro3 line of switchers
18 * @author Tim Roberts - Initial contribution
20 public class AtlonaPro3Config {
23 * Constant field used in {@link org.openhab.binding.atlona.internal.discovery.AtlonaDiscovery}
24 * to set the config property during discovery. Value of this field
25 * needs to match {@link #ipAddress}
27 public static final String IP_ADDRESS = "ipAddress";
30 * IP Address (or host name) of switch
32 private String ipAddress;
35 * Optional username to login in with. Only used if the switch has it's "Telnet Login" option turned on
37 private String userName;
40 * Optional password to login in with. Only used if the switch has it's "Telnet Login" option turned on
42 private String password;
45 * Polling time (in seconds) to refresh state from the switch itself. Only useful if something else modifies the
46 * switch (usually through the front panel or the IR link)
51 * Ping time (in seconds) to keep the connection alive. Should be less than the IP Timeout on the switch.
56 * Polling time (in seconds) to attempt a reconnect if the socket session has failed
58 private int retryPolling;
61 * Returns the IP address or host name of the switch
63 * @return the IP address or host name of the swtich
65 public String getIpAddress() {
70 * Sets the IP address or host name of the switch
72 * @param ipAddress the IP Address or host name of the switch
74 public void setIpAddress(String ipAddress) {
75 this.ipAddress = ipAddress;
79 * Gets the username used to login with
81 * @return the username used to login with
83 public String getUserName() {
88 * Sets the username used to login with
90 * @param userName the username used to login with
92 public void setUserName(String userName) {
93 this.userName = userName;
97 * Gets the password used to login with
99 * @return the password used to login with
101 public String getPassword() {
106 * Sets the password used to login with
108 * @param password the password used to login with
110 public void setPassword(String password) {
111 this.password = password;
115 * Gets the polling (in seconds) to refresh state
117 * @return the polling (in seconds) to refresh state
119 public int getPolling() {
124 * Sets the polling (in seconds) to refresh state
126 * @param polling the polling (in seconds) to refresh state
128 public void setPolling(int polling) {
129 this.polling = polling;
133 * Gets the polling (in seconds) to reconnect
135 * @return the polling (in seconds) to reconnect
137 public int getRetryPolling() {
142 * Sets the polling (in seconds) to reconnect
144 * @param retryPolling the polling (in seconds to reconnect)
146 public void setRetryPolling(int retryPolling) {
147 this.retryPolling = retryPolling;
151 * Gets the ping interval (in seconds)
153 * @return the ping interval (in seconds)
155 public int getPing() {
160 * Sets the ping interval (in seconds)
162 * @param ping the ping interval (in seconds)
164 public void setPing(int ping) {