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.qbus.internal.protocol;
15 import org.eclipse.jdt.annotation.NonNullByDefault;
16 import org.eclipse.jdt.annotation.Nullable;
19 * Class {@link QbusMessageBase} used as base class for output from gson for cmd or event feedback from the Qbus server.
20 * This class only contains the common base fields required for the deserializer
21 * {@link QbusMessageDeserializer} to select the specific formats implemented in {@link QbusMessageMap},
22 * {@link QbusMessageListMap}, {@link QbusMessageCmd}.
25 * @author Koen Schockaert - Initial Contribution
29 abstract class QbusMessageBase {
31 private @Nullable String ctd;
32 protected @Nullable String cmd;
33 protected @Nullable String type;
34 protected @Nullable Integer id;
35 protected @Nullable Integer state;
36 protected @Nullable Integer mode;
37 protected @Nullable Double setpoint;
38 protected @Nullable Double measured;
39 protected @Nullable Integer slatState;
46 void setSn(String ctd) {
55 void setCmd(String cmd) {
60 public Integer getId() {
64 public void setType(String type) {
69 public String getType() {
73 public void setId(Integer id) {
78 public Integer getState() {
82 public void setState(int state) {
87 public Integer getMode() {
91 public void setMode(int mode) {
96 public Double getSetPoint() {
100 public void setSetPoint(Double setpoint) {
101 this.setpoint = setpoint;
105 public Double getMeasured() {
109 public void setMeasured(Double measured) {
110 this.measured = measured;
114 public Integer getSlatState() {
118 public void setSlatState(int slatState) {
119 this.slatState = slatState;