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.km200.internal;
15 import java.util.HashMap;
18 import org.eclipse.jdt.annotation.NonNullByDefault;
19 import org.eclipse.jdt.annotation.Nullable;
21 import com.google.gson.JsonObject;
24 * The KM200CommObject representing a service on a device with its all capabilities
26 * @author Markus Eckhardt - Initial contribution
29 public class KM200ServiceObject {
31 private int writeable;
32 private int recordable;
34 private boolean updated;
35 private @Nullable String parent;
36 private String fullServiceName;
37 private String serviceType;
38 private @Nullable JsonObject jsonData;
39 private @Nullable Object value;
40 private @Nullable Object valueParameter;
43 public Map<String, KM200ServiceObject> serviceTreeMap;
45 public KM200ServiceObject(String fullServiceName, String serviceType, int readable, int writeable, int recordable,
46 int virtual, @Nullable String parent) {
47 serviceTreeMap = new HashMap<>();
48 this.fullServiceName = fullServiceName;
49 this.serviceType = serviceType;
50 this.readable = readable;
51 this.writeable = writeable;
52 this.recordable = recordable;
53 this.virtual = virtual;
59 public void setValue(Object val) {
63 public void setUpdated(boolean updt) {
67 public void setValueParameter(Object val) {
71 public void setJSONData(JsonObject data) {
76 public int getReadable() {
80 public int getWriteable() {
84 public int getRecordable() {
88 public String getServiceType() {
92 public String getFullServiceName() {
93 return fullServiceName;
96 public @Nullable Object getValue() {
100 public @Nullable Object getValueParameter() {
101 return valueParameter;
104 public @Nullable String getParent() {
108 public int getVirtual() {
112 public boolean getUpdated() {
116 public @Nullable JsonObject getJSONData() {