]> git.basschouten.com Git - openhab-addons.git/blob
b7b262ffcf0ec4e929659cf9cd42a0b8cfb67a5f
[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.lutron.internal.config;
14
15 import java.util.Objects;
16
17 /**
18  * Configuration settings for an {@link org.openhab.binding.lutron.internal.handler.IPBridgeHandler}.
19  *
20  * @author Allan Tong - Initial contribution
21  * @author Bob Adair - Added reconnect, heartbeat and discoveryFile parameters
22  */
23 public class IPBridgeConfig {
24     public String ipAddress;
25     public String user;
26     public String password;
27     public String discoveryFile;
28     public int reconnect;
29     public int heartbeat;
30     public int delay = 0;
31
32     public boolean sameConnectionParameters(IPBridgeConfig config) {
33         return Objects.equals(ipAddress, config.ipAddress) && Objects.equals(user, config.user)
34                 && Objects.equals(password, config.password) && (reconnect == config.reconnect)
35                 && (heartbeat == config.heartbeat) && (delay == config.delay);
36     }
37 }