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.enocean.internal.config;
15 import org.eclipse.jdt.annotation.NonNullByDefault;
16 import org.eclipse.jdt.annotation.Nullable;
20 * @author Daniel Weber - Initial contribution
23 public class EnOceanBridgeConfig {
25 public enum ESPVersion {
30 private String version;
32 ESPVersion(String version) {
33 this.version = version;
36 public static ESPVersion getESPVersion(String espVersion) {
37 for (ESPVersion version : values()) {
38 if (version.version.equalsIgnoreCase(espVersion)) {
43 return ESPVersion.UNKNOWN;
47 public String path = "";
49 public String espVersion = "ESP3";
51 public String rs485BaseId = "";
53 public @Nullable Integer nextSenderId;
55 public boolean enableSmack = true;
56 public boolean sendTeachOuts;
58 public ESPVersion getESPVersion() {
59 return ESPVersion.getESPVersion(espVersion);