]> git.basschouten.com Git - openhab-addons.git/blob
c058a5fa12bd69085be0d03e7bdfae783d9dd129
[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.paradoxalarm.internal.model;
14
15 /**
16  * The {@link ZoneStateFlags} Paradox zone state flags. Retrieved and parsed from RAM memory responses.
17  *
18  * @author Konstantin Polihronov - Initial contribution
19  */
20 public class ZoneState {
21     // Regular states
22     private boolean isOpened;
23     private boolean isTampered;
24     private boolean hasLowBattery;
25
26     // Special flag states
27     private boolean supervisionTrouble;
28     private boolean inTxDelay;
29     private boolean shuttedDown;
30     private boolean bypassed;
31     private boolean hasActivatedIntellizoneDelay;
32     private boolean hasActivatedEntryDelay;
33     private boolean presentlyInAlarm;
34     private boolean generatedAlarm;
35
36     public ZoneState(boolean isOpened, boolean isTampered, boolean hasLowBattery) {
37         this.isOpened = isOpened;
38         this.isTampered = isTampered;
39         this.hasLowBattery = hasLowBattery;
40     }
41
42     public boolean isOpened() {
43         return isOpened;
44     }
45
46     public void setOpened(boolean isOpened) {
47         this.isOpened = isOpened;
48     }
49
50     public boolean isTampered() {
51         return isTampered;
52     }
53
54     public void setTampered(boolean isTampered) {
55         this.isTampered = isTampered;
56     }
57
58     public boolean hasLowBattery() {
59         return hasLowBattery;
60     }
61
62     public void setHasLowBattery(boolean hasLowBattery) {
63         this.hasLowBattery = hasLowBattery;
64     }
65
66     public void setSupervisionTrouble(boolean supervisionTrouble) {
67         this.supervisionTrouble = supervisionTrouble;
68     }
69
70     public boolean isSupervisionTrouble() {
71         return supervisionTrouble;
72     }
73
74     public boolean isInTxDelay() {
75         return inTxDelay;
76     }
77
78     public void setInTxDelay(boolean inTxDelay) {
79         this.inTxDelay = inTxDelay;
80     }
81
82     public boolean isShutdown() {
83         return shuttedDown;
84     }
85
86     public void setShuttedDown(boolean shuttedDown) {
87         this.shuttedDown = shuttedDown;
88     }
89
90     public boolean isBypassed() {
91         return bypassed;
92     }
93
94     public void setBypassed(boolean bypassed) {
95         this.bypassed = bypassed;
96     }
97
98     public boolean isHasActivatedIntellizoneDelay() {
99         return hasActivatedIntellizoneDelay;
100     }
101
102     public void setHasActivatedIntellizoneDelay(boolean hasActivatedIntellizoneDelay) {
103         this.hasActivatedIntellizoneDelay = hasActivatedIntellizoneDelay;
104     }
105
106     public boolean isHasActivatedEntryDelay() {
107         return hasActivatedEntryDelay;
108     }
109
110     public void setHasActivatedEntryDelay(boolean hasActivatedEntryDelay) {
111         this.hasActivatedEntryDelay = hasActivatedEntryDelay;
112     }
113
114     public boolean isPresentlyInAlarm() {
115         return presentlyInAlarm;
116     }
117
118     public void setPresentlyInAlarm(boolean presentlyInAlarm) {
119         this.presentlyInAlarm = presentlyInAlarm;
120     }
121
122     public boolean isGeneratedAlarm() {
123         return generatedAlarm;
124     }
125
126     public void setGeneratedAlarm(boolean generatedAlarm) {
127         this.generatedAlarm = generatedAlarm;
128     }
129
130     @Override
131     public String toString() {
132         return "ZoneState [isOpened=" + isOpened + ", isTampered=" + isTampered + ", hasLowBattery=" + hasLowBattery
133                 + ", supervisionTrouble=" + supervisionTrouble + ", inTxDelay=" + inTxDelay + ", shuttedDown="
134                 + shuttedDown + ", bypassed=" + bypassed + ", hasActivatedIntellizoneDelay="
135                 + hasActivatedIntellizoneDelay + ", hasActivatedEntryDelay=" + hasActivatedEntryDelay
136                 + ", presentlyInAlarm=" + presentlyInAlarm + ", generatedAlarm=" + generatedAlarm + "]";
137     }
138 }