]> git.basschouten.com Git - openhab-addons.git/blob
4128734a2eb2efa97bca539bb07a5f6e8fcfe264
[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.robonect.internal.model;
14
15 /**
16  * Object holding information from the status section of the mowers status response.
17  *
18  * @author Marco Meyer - Initial contribution
19  */
20 public class Status {
21
22     private int battery;
23     private int duration;
24     private int hours;
25     private MowerStatus status;
26     private MowerMode mode;
27     private boolean stopped;
28     private int distance;
29
30     /**
31      * @return - the battery level in percent. (0-100)
32      */
33     public int getBattery() {
34         return battery;
35     }
36
37     /**
38      * @return - The duration in seconds the mower is already in the current {@link #status}.
39      */
40     public int getDuration() {
41         return duration;
42     }
43
44     /**
45      * @return - The distance from the charging station (in case it searches the remote starting point)
46      */
47     public int getDistance() {
48         return distance;
49     }
50
51     /**
52      * @return - The hours the mower was in use so far.
53      */
54     public int getHours() {
55         return hours;
56     }
57
58     /**
59      * @return - The status the mower is currently in. see {@link MowerStatus} for details.
60      */
61     public MowerStatus getStatus() {
62         return status;
63     }
64
65     /**
66      * @return - true if the mower is currentyl stopped, false otherwise.
67      */
68     public boolean isStopped() {
69         return stopped;
70     }
71
72     /**
73      * @return - The mode the mower is currently in. See {@link MowerMode} for details.
74      */
75     public MowerMode getMode() {
76         return mode;
77     }
78
79     public void setBattery(int battery) {
80         this.battery = battery;
81     }
82
83     public void setDuration(int duration) {
84         this.duration = duration;
85     }
86
87     public void setDistance(int distance) {
88         this.distance = distance;
89     }
90
91     public void setHours(int hours) {
92         this.hours = hours;
93     }
94
95     public void setStatus(MowerStatus status) {
96         this.status = status;
97     }
98
99     public void setMode(MowerMode mode) {
100         this.mode = mode;
101     }
102
103     public void setStopped(boolean stopped) {
104         this.stopped = stopped;
105     }
106 }