]> git.basschouten.com Git - openhab-addons.git/blob
041cc8e964009193560f9a70caed08ace93ae62f
[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.knx.internal.handler;
14
15 /**
16  * Enumeration containing the firmware types.
17  *
18  * @author Karel Goderis - Initial contribution
19  */
20 public enum Firmware {
21     F0(0, "BCU 1, BCU 2, BIM M113"),
22     F1(1, "Unidirectional devices"),
23     F3(3, "Property based device management"),
24     F7(7, "BIM M112"),
25     F8(8, "IR Decoder, TP1 legacy"),
26     F9(9, "Repeater, Coupler");
27
28     private int code;
29     private String name;
30
31     private Firmware(int code, String name) {
32         this.code = code;
33         this.name = name;
34     }
35
36     @Override
37     public String toString() {
38         return name;
39     }
40
41     public static String getName(int code) {
42         for (Firmware c : Firmware.values()) {
43             if (c.code == code) {
44                 return c.name;
45             }
46         }
47         return null;
48     }
49 }