java.io.Serializablepublic class VacuumStatus
extends java.lang.Object
implements java.io.Serializable
| Modifier and Type | Class | Description |
|---|---|---|
static class |
VacuumStatus.Error |
|
static class |
VacuumStatus.State |
| Constructor | Description |
|---|---|
VacuumStatus(boolean dndEnabled,
boolean mapPresent,
int cleanArea,
int fanPower,
int msgVersion,
boolean inCleaning,
VacuumStatus.Error errorCode,
VacuumStatus.State state,
int battery,
int msgSeq,
int cleanTime) |
Create a new vacuum status object.
|
VacuumStatus(org.json.JSONObject status) |
Generate a new vacuum status object from the response of a device.
|
| Modifier and Type | Method | Description |
|---|---|---|
org.json.JSONObject |
construct() |
Construct the message the vacuum sends to the controlling device.
|
boolean |
equals(java.lang.Object o) |
|
int |
getBattery() |
|
int |
getCleanArea() |
|
int |
getCleanTime() |
|
VacuumStatus.Error |
getErrorCode() |
|
int |
getFanPower() |
|
int |
getMsgSeq() |
|
int |
getMsgVersion() |
|
VacuumStatus.State |
getState() |
|
int |
hashCode() |
|
boolean |
isDndEnabled() |
|
boolean |
isInCleaning() |
|
boolean |
isMapPresent() |
|
void |
setBattery(int battery) |
|
void |
setCleanArea(int cleanArea) |
|
void |
setCleanTime(int cleanTime) |
|
void |
setDndEnabled(boolean dndEnabled) |
|
void |
setErrorCode(VacuumStatus.Error errorCode) |
|
void |
setFanPower(int fanPower) |
|
void |
setInCleaning(boolean inCleaning) |
|
void |
setMapPresent(boolean mapPresent) |
|
void |
setMsgSeq(int msgSeq) |
|
void |
setMsgVersion(int msgVersion) |
|
void |
setState(VacuumStatus.State state) |
|
java.lang.String |
toString() |
public VacuumStatus(boolean dndEnabled,
boolean mapPresent,
int cleanArea,
int fanPower,
int msgVersion,
boolean inCleaning,
VacuumStatus.Error errorCode,
VacuumStatus.State state,
int battery,
int msgSeq,
int cleanTime)
dndEnabled - Whether the do not disturb period is active.mapPresent - Whether a valid map is present.cleanArea - The total cleaned area.fanPower - The current fan power.msgVersion - The message version.inCleaning - Whether the vacuum is currently cleaning.errorCode - The current error.state - The current status.battery - The current battery level.msgSeq - The message sequence.cleanTime - The total time spent cleaning.public VacuumStatus(org.json.JSONObject status)
status - The response to parse.public org.json.JSONObject construct()
public boolean isDndEnabled()
public void setDndEnabled(boolean dndEnabled)
dndEnabled - Whether the do not disturb period is active.public boolean isMapPresent()
public void setMapPresent(boolean mapPresent)
mapPresent - Whether a valid map is present.public int getCleanArea()
public void setCleanArea(int cleanArea)
cleanArea - The total cleaned area.public int getFanPower()
public void setFanPower(int fanPower)
fanPower - The current fan power.public int getMsgVersion()
public void setMsgVersion(int msgVersion)
msgVersion - The message version.public boolean isInCleaning()
public void setInCleaning(boolean inCleaning)
inCleaning - Whether the vacuum is currently cleaning.public VacuumStatus.Error getErrorCode()
public void setErrorCode(VacuumStatus.Error errorCode)
errorCode - The current error.public VacuumStatus.State getState()
public void setState(VacuumStatus.State state)
state - The current status.public int getBattery()
public void setBattery(int battery)
battery - The current battery level.public int getMsgSeq()
public void setMsgSeq(int msgSeq)
msgSeq - The message sequence.public int getCleanTime()
public void setCleanTime(int cleanTime)
cleanTime - The total time spent cleaning.public boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.ObjectCopyright © 2018. All rights reserved.