]> git.basschouten.com Git - openhab-addons.git/blob
b241284d604a66a30554b6f8ba8f86dc07418bf8
[openhab-addons.git] /
1 /**
2  * Copyright (c) 2010-2020 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.teleinfo.internal.reader.io.serialport;
14
15 import org.eclipse.jdt.annotation.NonNullByDefault;
16 import org.openhab.binding.teleinfo.internal.dto.common.FrameTempoOption.CouleurDemain;
17 import org.openhab.binding.teleinfo.internal.dto.common.Hhphc;
18 import org.openhab.binding.teleinfo.internal.dto.common.Ptec;
19
20 /**
21  * The {@link Label} enum defines all Teleinfo labels and their format.
22  *
23  * @author Nicolas SIBERIL - Initial contribution
24  */
25 @NonNullByDefault
26 public enum Label {
27
28     ADCO(String.class, 12),
29     OPTARIF(String.class, 4),
30     BASE(Integer.class, 9),
31     HCHC(Integer.class, 9),
32     HCHP(Integer.class, 9),
33     EJPHN(Integer.class, 9),
34     EJPHPM(Integer.class, 9),
35     GAZ(Integer.class, 7),
36     AUTRE(Integer.class, 7),
37     PTEC(Ptec.class, 4),
38     MOTDETAT(String.class, 6),
39     ISOUSC(Integer.class, 2),
40     IINST(Integer.class, 3),
41     IINST1(Integer.class, 3),
42     IINST2(Integer.class, 3),
43     IINST3(Integer.class, 3),
44     ADIR1(Integer.class, 3),
45     ADIR2(Integer.class, 3),
46     ADIR3(Integer.class, 3),
47     ADPS(Integer.class, 3),
48     IMAX(Integer.class, 3),
49     IMAX1(Integer.class, 3),
50     IMAX2(Integer.class, 3),
51     IMAX3(Integer.class, 3),
52     PMAX(Integer.class, 5),
53     PPOT(String.class, 2),
54     HHPHC(Hhphc.class, 1),
55     PAPP(Integer.class, 5),
56     BBRHCJB(Integer.class, 9),
57     BBRHPJB(Integer.class, 9),
58     BBRHCJW(Integer.class, 9),
59     BBRHPJW(Integer.class, 9),
60     BBRHCJR(Integer.class, 9),
61     BBRHPJR(Integer.class, 9),
62     PEJP(Integer.class, 2),
63     DEMAIN(CouleurDemain.class, 4);
64
65     private Class<?> type;
66     private int size;
67
68     Label(Class<?> type, int size) {
69         this.type = type;
70         this.size = size;
71     }
72
73     public Class<?> getType() {
74         return type;
75     }
76
77     public int getSize() {
78         return size;
79     }
80 }