]> git.basschouten.com Git - openhab-addons.git/blob
c8f42985939574a2d18709db4555c916cbd354c1
[openhab-addons.git] /
1 /**
2  * Copyright (c) 2010-2023 Contributors to the openHAB project
3  *
4  * See the NOTICE file(s) distributed with this work for additional
5  * information.
6  *
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
10  *
11  * SPDX-License-Identifier: EPL-2.0
12  */
13 package org.openhab.binding.fineoffsetweatherstation.internal.domain.response;
14
15 import org.eclipse.jdt.annotation.NonNullByDefault;
16 import org.openhab.binding.fineoffsetweatherstation.internal.domain.SensorGatewayBinding;
17
18 /**
19  * HHolds all available information of a sensor device.
20  *
21  * @author Andreas Berger - Initial contribution
22  */
23 @NonNullByDefault
24 public class SensorDevice {
25     private final int id;
26     private final SensorGatewayBinding sensorGatewayBinding;
27     private final BatteryStatus batteryStatus;
28     private final int signal;
29
30     public SensorDevice(int id, SensorGatewayBinding sensorGatewayBinding, BatteryStatus batteryStatus, int signal) {
31         this.id = id;
32         this.sensorGatewayBinding = sensorGatewayBinding;
33         this.batteryStatus = batteryStatus;
34         this.signal = signal;
35     }
36
37     public int getId() {
38         return id;
39     }
40
41     public SensorGatewayBinding getSensorGatewayBinding() {
42         return sensorGatewayBinding;
43     }
44
45     public BatteryStatus getBatteryStatus() {
46         return batteryStatus;
47     }
48
49     public int getSignal() {
50         return signal;
51     }
52
53     @Override
54     public String toString() {
55         return "SensorDevice{" + "id=" + id + ", sensor=" + sensorGatewayBinding + ", batteryStatus=" + batteryStatus
56                 + ", signal=" + signal + '}';
57     }
58 }