public class DeviceMeasurements extends DeviceEvent implements IDeviceMeasurements, java.io.Serializable
Constructor and Description |
---|
DeviceMeasurements() |
Modifier and Type | Method and Description |
---|---|
void |
addOrReplaceMeasurement(java.lang.String name,
java.lang.Double value)
Add or replace measurement data.
|
void |
clearMeasurements()
Clear all measurements.
|
static DeviceMeasurements |
copy(IDeviceMeasurements input)
Create a copy of an SPI object.
|
java.lang.Double |
getMeasurement(java.lang.String name)
Get measurement by name.
|
java.util.Map<java.lang.String,java.lang.Double> |
getMeasurements()
Get map of all measurements.
|
java.lang.String |
getMeasurementsSummary()
Get a simple string that lists the measurements.
|
java.lang.Double |
removeMeasurement(java.lang.String name)
Remove a measurement.
|
void |
setMeasurements(java.util.Map<java.lang.String,java.lang.Double> entries)
Needed for JSON marshaling.
|
void |
setMeasurementsSummary(java.lang.String value)
For Jackson marshalling.
|
compareTo, copy, getAssetId, getAssetModuleId, getAssignmentType, getDeviceAssignmentToken, getEventDate, getEventType, getId, getReceivedDate, getSiteToken, setAssetId, setAssetModuleId, setAssignmentType, setDeviceAssignmentToken, setEventDate, setEventType, setId, setReceivedDate, setSiteToken
addOrReplaceMetadata, clearMetadata, copy, copy, getMetadata, getMetadata, removeMetadata, setMetadata
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getAssetId, getAssetModuleId, getAssignmentType, getDeviceAssignmentToken, getEventDate, getEventType, getId, getReceivedDate, getSiteToken
addOrReplaceMetadata, clearMetadata, getMetadata, getMetadata, removeMetadata
public void addOrReplaceMeasurement(java.lang.String name, java.lang.Double value)
IMeasurementsProvider
addOrReplaceMeasurement
in interface IMeasurementsProvider
public java.lang.Double removeMeasurement(java.lang.String name)
IMeasurementsProvider
removeMeasurement
in interface IMeasurementsProvider
public java.lang.Double getMeasurement(java.lang.String name)
IMeasurementsProvider
getMeasurement
in interface IMeasurementsProvider
public java.util.Map<java.lang.String,java.lang.Double> getMeasurements()
IMeasurementsProvider
getMeasurements
in interface IMeasurementsProvider
public void clearMeasurements()
IMeasurementsProvider
clearMeasurements
in interface IMeasurementsProvider
public void setMeasurements(java.util.Map<java.lang.String,java.lang.Double> entries)
entries
- public java.lang.String getMeasurementsSummary()
IDeviceMeasurements
getMeasurementsSummary
in interface IDeviceMeasurements
public void setMeasurementsSummary(java.lang.String value)
value
- public static DeviceMeasurements copy(IDeviceMeasurements input) throws SiteWhereException
input
- SiteWhereException