public interface Data
Modifier and Type | Method and Description |
---|---|
byte[] |
bytes()
Raw byte representation of the data value
|
<T> T |
extra(java.lang.Class<T> clazz)
Extra information attached to this data sample
|
java.lang.String |
formattedTimestamp()
String representation of the timestamp in the format
YYYY-MM-DDTHH:MM:SS.LLL . |
float |
scale()
LSB to units ratio.
|
java.util.Calendar |
timestamp()
Time of when the data was received (streaming) or created (logging)
|
java.lang.Class<?>[] |
types()
Classes that can be used when calling
value(Class) |
<T> T |
value(java.lang.Class<T> clazz)
Converts the data bytes to a usable data type
|
java.util.Calendar timestamp()
java.lang.String formattedTimestamp()
YYYY-MM-DDTHH:MM:SS.LLL
. The timezone
of the string will be the local device's current timezone.float scale()
bytes()
methodbyte[] bytes()
java.lang.Class<?>[] types()
value(Class)
<T> T value(java.lang.Class<T> clazz)
T
- Runtime type the return value is casted asclazz
- Class type to convert the value tojava.lang.ClassCastException
- if the data cannot be casted to desired type<T> T extra(java.lang.Class<T> clazz)
T
- Runtime type the return value is casted asclazz
- Class type to convert the value tojava.lang.ClassCastException
- if the data cannot be casted to the desired type