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.digiplex.internal.communication.events;
15 import static org.openhab.binding.digiplex.internal.DigiplexBindingConstants.*;
17 import org.eclipse.jdt.annotation.NonNullByDefault;
22 * @author Robert Michalak - Initial contribution
26 public enum TroubleType {
27 TLM_TROUBLE(BRIDGE_TLM_TROUBLE),
28 AC_FAILURE(BRIDGE_AC_FAILURE),
29 BATTERY_FAILURE(BRIDGE_BATTERY_FAILURE),
30 AUXILIARY_CURRENT_LIMIT(BRIDGE_AUX_CURRENT_LIMIT),
31 BELL_CURRENT_LIMIT(BRIDGE_BELL_CURRENT_LIMIT),
32 BELL_ABSENT(BRIDGE_BELL_ABSENT),
33 CLOCK_TROUBLE(BRIDGE_CLOCK_TROUBLE),
34 GLOBAL_FIRE_LOOP(BRIDGE_GLOBAL_FIRE_LOOP);
36 private String bridgeChannel;
38 private TroubleType(String bridgeChannel) {
39 this.bridgeChannel = bridgeChannel;
42 public String getBridgeChannel() {
46 public static TroubleType fromEventNumber(int eventNumber) {
47 return TroubleType.values()[eventNumber];