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 AtlonaDiscovery} to set the config property during discovery. Value of this field
24 * needs to match {@link #ipAddress}
26 public static final String IP_ADDRESS = "ipAddress";
29 * IP Address (or host name) of switch
31 private String ipAddress;
34 * Optional username to login in with. Only used if the switch has it's "Telnet Login" option turned on
36 private String userName;
39 * Optional password to login in with. Only used if the switch has it's "Telnet Login" option turned on
41 private String password;
44 * Polling time (in seconds) to refresh state from the switch itself. Only useful if something else modifies the
45 * switch (usually through the front panel or the IR link)
50 * Ping time (in seconds) to keep the connection alive. Should be less than the IP Timeout on the switch.
55 * Polling time (in seconds) to attempt a reconnect if the socket session has failed
57 private int retryPolling;
60 * Returns the IP address or host name of the switch
62 * @return the IP address or host name of the swtich
64 public String getIpAddress() {
69 * Sets the IP address or host name of the switch
71 * @param ipAddress the IP Address or host name of the switch
73 public void setIpAddress(String ipAddress) {
74 this.ipAddress = ipAddress;
78 * Gets the username used to login with
80 * @return the username used to login with
82 public String getUserName() {
87 * Sets the username used to login with
89 * @param userName the username used to login with
91 public void setUserName(String userName) {
92 this.userName = userName;
96 * Gets the password used to login with
98 * @return the password used to login with
100 public String getPassword() {
105 * Sets the password used to login with
107 * @param password the password used to login with
109 public void setPassword(String password) {
110 this.password = password;
114 * Gets the polling (in seconds) to refresh state
116 * @return the polling (in seconds) to refresh state
118 public int getPolling() {
123 * Sets the polling (in seconds) to refresh state
125 * @param polling the polling (in seconds) to refresh state
127 public void setPolling(int polling) {
128 this.polling = polling;
132 * Gets the polling (in seconds) to reconnect
134 * @return the polling (in seconds) to reconnect
136 public int getRetryPolling() {
141 * Sets the polling (in seconds) to reconnect
143 * @param retryPolling the polling (in seconds to reconnect)
145 public void setRetryPolling(int retryPolling) {
146 this.retryPolling = retryPolling;
150 * Gets the ping interval (in seconds)
152 * @return the ping interval (in seconds)
154 public int getPing() {
159 * Sets the ping interval (in seconds)
161 * @param ping the ping interval (in seconds)
163 public void setPing(int ping) {