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.homematic.internal.model;
16 * Info object which holds gateway specific informations.
18 * @author Gerhard Riegler - Initial contribution
20 public class HmGatewayInfo {
21 public static final String ID_HOMEGEAR = "HOMEGEAR";
22 public static final String ID_CCU = "CCU";
23 public static final String ID_DEFAULT = "DEFAULT";
27 private String firmware;
28 private String address;
29 private boolean rfInterface;
30 private boolean wiredInterface;
31 private boolean cuxdInterface;
32 private boolean hmipInterface;
33 private boolean groupInterface;
36 * Returns the id of the gateway type.
38 public String getId() {
43 * Sets the id of the gateway type.
45 public void setId(String id) {
50 * Returns the type of the gateway.
52 public String getType() {
57 * Sets the type of the server.
59 public void setType(String type) {
64 * Returns the firmware version of the gateway.
66 public String getFirmware() {
71 * Sets the firmware version of the gateway.
73 public void setFirmware(String firmware) {
74 this.firmware = firmware;
78 * Returns the address of the Homematic gateway.
80 public String getAddress() {
85 * Sets the address of the Homematic gateway.
87 public void setAddress(String address) {
88 this.address = address;
92 * Returns true, if the gateway is a Homegear gateway.
94 public boolean isHomegear() {
95 return ID_HOMEGEAR.equals(id);
99 * Returns true, if the gateway is a CCU.
101 public boolean isCCU() {
102 return ID_CCU.equals(id);
106 * Return true, if the gateway is a CCU1.
108 public boolean isCCU1() {
109 return "CCU".equals(type);
113 * Returns true, if the gateway supports the CUxD interface.
115 public boolean isCuxdInterface() {
116 return cuxdInterface;
120 * Sets the CUxD support of the gateway.
122 public void setCuxdInterface(boolean cuxdInterface) {
123 this.cuxdInterface = cuxdInterface;
127 * Returns true, if the gateway supports the wired interface.
129 public boolean isWiredInterface() {
130 return wiredInterface;
134 * Sets the wired support of the gateway.
136 public void setWiredInterface(boolean wiredInterface) {
137 this.wiredInterface = wiredInterface;
141 * Returns true, if the gateway supports the HMIP interface.
143 public boolean isHmipInterface() {
144 return hmipInterface;
148 * Sets the HMIP support of the gateway.
150 public void setHmipInterface(boolean hmipInterface) {
151 this.hmipInterface = hmipInterface;
155 * Returns true, if the gateway supports the Group interface.
157 public boolean isGroupInterface() {
158 return groupInterface;
162 * Sets the Group support of the gateway.
164 public void setGroupInterface(boolean groupInterface) {
165 this.groupInterface = groupInterface;
169 * Returns true, if the gateway supports the RF interface.
171 public boolean isRfInterface() {
176 * Sets the RF support of the gateway.
178 public void setRfInterface(boolean rfInterface) {
179 this.rfInterface = rfInterface;
183 public String toString() {
184 return String.format("%s[id=%s,type=%s,firmware=%s,address=%s,rf=%b,wired=%b,hmip=%b,cuxd=%b,group=%b]",
185 getClass().getSimpleName(), id, type, firmware, address, rfInterface, wiredInterface, hmipInterface,
186 cuxdInterface, groupInterface);