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 * Object that holds the rssi infos for a RF device.
18 * @author Gerhard Riegler - Initial contribution
21 public class HmRssiInfo {
22 private String address;
23 private Integer device;
26 public HmRssiInfo(String address, Integer device, Integer peer) {
27 this.address = address;
28 this.device = convert(device);
29 this.peer = convert(peer);
33 * Converts the rssi value to null if necessary.
35 private Integer convert(Integer intValue) {
36 if (intValue == null || intValue == 65536) {
43 * Returns the address of the device.
45 public String getAddress() {
50 * Returns the device rssi.
52 public Integer getDevice() {
57 * Returns the peer rssi.
59 public Integer getPeer() {
64 public String toString() {
65 return String.format("%s[address=%s,device=%d,peer=%i]", getClass().getSimpleName(), address, device, peer);