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