]> git.basschouten.com Git - openhab-addons.git/blob
74f4c741bf454736e1440381fbc160997ddeafc6
[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.touchwand.internal.dto;
14
15 import java.util.ArrayList;
16 import java.util.List;
17
18 import org.eclipse.jdt.annotation.NonNullByDefault;
19
20 /**
21  * The {@link TouchWandAlarmSensorCurrentStatus} implements Alarm Sensor unit
22  * CurrentStatus data property.
23  *
24  * @author Roie Geron - Initial contribution
25  */
26
27 @NonNullByDefault
28 public class TouchWandAlarmSensorCurrentStatus {
29
30     private int batt;
31     private List<Sensor> sensorsStatus = new ArrayList<Sensor>();
32     private List<AlarmEvent> alarmsStatus = new ArrayList<AlarmEvent>();
33     private List<BinarySensorEvent> bSensorsStatus = new ArrayList<BinarySensorEvent>();
34
35     public void setBatt(Integer batt) {
36         this.batt = batt;
37     }
38
39     public int getBatt() {
40         return batt;
41     }
42
43     public void setSensorsStatus(List<Sensor> sensorsStatus) {
44         this.sensorsStatus = sensorsStatus;
45     }
46
47     public List<Sensor> getSensorsStatus() {
48         return sensorsStatus;
49     }
50
51     public List<BinarySensorEvent> getbSensorsStatus() {
52         return bSensorsStatus;
53     }
54
55     public void setbSensorsStatus(List<BinarySensorEvent> bSensorsStatus) {
56         this.bSensorsStatus = bSensorsStatus;
57     }
58
59     public List<AlarmEvent> getAlarmsStatus() {
60         return alarmsStatus;
61     }
62
63     public void setAlarmsStatus(List<AlarmEvent> alarmsStatus) {
64         this.alarmsStatus = alarmsStatus;
65     }
66
67     public static class Alarm {
68         public int event;
69         public long ts;
70     }
71
72     public static class AlarmEvent {
73         int alarmType;
74         Alarm alarm = new Alarm();
75     }
76
77     public static class Sensor {
78         public int type;
79         public float value;
80     }
81
82     public static class BinarySensor {
83         public long ts;
84         public boolean state;
85     }
86
87     public static class BinarySensorEvent {
88         public int sensorType;
89         public BinarySensor sensor = new BinarySensor();
90     }
91 }