public class Reading
extends java.lang.Object
DeviceModel| Modifier and Type | Field and Description |
|---|---|
java.lang.String |
meaning
Every device has a
DeviceModel which defines all device readings. |
java.lang.String |
path
If device contains multiple levels of readings (more than one component)
they will be identified with the path.
|
long |
received
Timestamp - when reading is received on the platform
|
long |
recorded
Timestamp - when reading is recorded on the device
|
long |
ts
Timestamp - used when publishing through MQTT, later it's saved as #recorded timestamp
|
java.lang.Object |
value
Reading value is determined by
DeviceReading.getValueSchema() |
| Constructor and Description |
|---|
Reading(long received,
long recorded,
java.lang.String meaning,
java.lang.String path,
java.lang.Object value) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object o) |
int |
hashCode() |
java.lang.String |
toString() |
public final long received
public final long recorded
public final long ts
public final java.lang.String meaning
DeviceModel which defines all device readings.
Every DeviceReading has a DeviceReading.meaning.
Details for every reading can be found in DeviceReading.getValueSchema()
Details about device readings can be obtained using DeviceModelCache.getModelById(String)
where modelId is Device.getModelId().public final java.lang.String path
public final java.lang.Object value
DeviceReading.getValueSchema()public Reading(long received,
long recorded,
java.lang.String meaning,
java.lang.String path,
java.lang.Object value)
received - - timestamp written by serverrecorded - - timestamp written by device that's publishing the reading objectmeaning - - @see #meaningpath - - @see #pathvalue - - defined by DeviceReading.getValueSchema()