2 * Copyright (c) 2010-2021 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.powermax.internal.state;
16 * A class to store the state of a zone
18 * @author Laurent Garnier - Initial contribution
20 public class PowermaxZoneState {
22 private Boolean tripped;
23 private Long lastTripped;
24 private Boolean lowBattery;
25 private Boolean bypassed;
26 private Boolean armed;
28 public PowermaxZoneState() {
36 public Boolean isTripped() {
40 public void setTripped(Boolean tripped) {
41 this.tripped = tripped;
44 public Long getLastTripped() {
48 public void setLastTripped(Long lastTripped) {
49 this.lastTripped = lastTripped;
52 public boolean isLastTripBeforeTime(long refTime) {
53 return isTripped() == Boolean.TRUE && getLastTripped() != null && getLastTripped() < refTime;
56 public Boolean isLowBattery() {
60 public void setLowBattery(Boolean lowBattery) {
61 this.lowBattery = lowBattery;
64 public Boolean isBypassed() {
68 public void setBypassed(Boolean bypassed) {
69 this.bypassed = bypassed;
72 public Boolean isArmed() {
76 public void setArmed(Boolean armed) {