Package org.shredzone.geordi.device
Class Device
java.lang.Object
org.shredzone.geordi.device.Device
- Direct Known Subclasses:
AquaeroDevice
,AvmDevice
,Ccu2Device
,DustyDevice
,KaminariDevice
public abstract class Device extends Object
-
Constructor Summary
Constructors Constructor Description Device()
-
Method Summary
Modifier and Type Method Description org.json.JSONObject
getConfig()
Reads the JSON configuration of the device.org.quartz.CronExpression
getCron()
Reads theCronExpression
that is used for polling the device sensors.int
getId()
Reads the device ID.String
getName()
Reads a human-readable device name.abstract List<Sample>
readSensors()
Reads all sensors of this device.void
setConfig(org.json.JSONObject config)
Sets the JSON configuration of the device.void
setCron(org.quartz.CronExpression cron)
Sets theCronExpression
that is used for polling the device sensors.void
setId(int id)
Sets the device ID.void
setName(String name)
Sets the device name.
-
Constructor Details
-
Method Details
-
getId
Reads the device ID. -
setId
Sets the device ID. It must be unique. -
getName
Reads a human-readable device name. -
setName
Sets the device name. -
getCron
Reads theCronExpression
that is used for polling the device sensors. -
setCron
Sets theCronExpression
that is used for polling the device sensors. -
getConfig
Reads the JSON configuration of the device. -
setConfig
Sets the JSON configuration of the device. -
readSensors
Reads all sensors of this device.- Returns:
- List of
Sample
objects containing all current sensor values that have been read.
-