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.paradoxalarm.internal.model;
16 * The {@link ZoneStateFlags} Paradox zone state flags. Retrieved and parsed from RAM memory responses.
18 * @author Konstantin Polihronov - Initial contribution
20 public class ZoneState {
22 private boolean isOpened;
23 private boolean isTampered;
24 private boolean hasLowBattery;
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;
36 public ZoneState(boolean isOpened, boolean isTampered, boolean hasLowBattery) {
37 this.isOpened = isOpened;
38 this.isTampered = isTampered;
39 this.hasLowBattery = hasLowBattery;
42 public boolean isOpened() {
46 public void setOpened(boolean isOpened) {
47 this.isOpened = isOpened;
50 public boolean isTampered() {
54 public void setTampered(boolean isTampered) {
55 this.isTampered = isTampered;
58 public boolean hasLowBattery() {
62 public void setHasLowBattery(boolean hasLowBattery) {
63 this.hasLowBattery = hasLowBattery;
66 public void setSupervisionTrouble(boolean supervisionTrouble) {
67 this.supervisionTrouble = supervisionTrouble;
70 public boolean isSupervisionTrouble() {
71 return supervisionTrouble;
74 public boolean isInTxDelay() {
78 public void setInTxDelay(boolean inTxDelay) {
79 this.inTxDelay = inTxDelay;
82 public boolean isShutdown() {
86 public void setShuttedDown(boolean shuttedDown) {
87 this.shuttedDown = shuttedDown;
90 public boolean isBypassed() {
94 public void setBypassed(boolean bypassed) {
95 this.bypassed = bypassed;
98 public boolean isHasActivatedIntellizoneDelay() {
99 return hasActivatedIntellizoneDelay;
102 public void setHasActivatedIntellizoneDelay(boolean hasActivatedIntellizoneDelay) {
103 this.hasActivatedIntellizoneDelay = hasActivatedIntellizoneDelay;
106 public boolean isHasActivatedEntryDelay() {
107 return hasActivatedEntryDelay;
110 public void setHasActivatedEntryDelay(boolean hasActivatedEntryDelay) {
111 this.hasActivatedEntryDelay = hasActivatedEntryDelay;
114 public boolean isPresentlyInAlarm() {
115 return presentlyInAlarm;
118 public void setPresentlyInAlarm(boolean presentlyInAlarm) {
119 this.presentlyInAlarm = presentlyInAlarm;
122 public boolean isGeneratedAlarm() {
123 return generatedAlarm;
126 public void setGeneratedAlarm(boolean generatedAlarm) {
127 this.generatedAlarm = generatedAlarm;
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 + "]";