2 * Copyright (c) 2010-2020 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.openthermgateway.internal;
15 import javax.measure.Unit;
17 import org.eclipse.jdt.annotation.NonNullByDefault;
18 import org.eclipse.jdt.annotation.Nullable;
21 * The {@link DataItem} holds the internal OpenTherm message and meta data.
23 * @author Arjen Korevaar - Initial contribution
26 public class DataItem {
29 private ByteType byteType;
30 private DataType dataType;
32 private String subject;
33 private @Nullable Unit<?> unit;
43 public ByteType getByteType() {
47 public DataType getDataType() {
51 public int getBitPos() {
55 public String getSubject() {
59 public @Nullable Unit<?> getUnit() {
63 public DataItem(int id, Msg msg, ByteType byteType, DataType dataType, int bit, String subject) {
66 this.byteType = byteType;
67 this.dataType = dataType;
69 this.subject = subject;
72 public DataItem(int id, Msg msg, ByteType byteType, DataType dataType, int bit, String subject, Unit<?> unit) {
73 this(id, msg, byteType, dataType, bit, subject);