public class DeviceMeasurementsWithAsset extends DeviceEventWithAsset implements IDeviceMeasurements
DeviceMeasurements
so that information about the asset
associated with its assignment is available.asset, UNASSOCIATED_ASSET_NAME, wrapped
Constructor and Description |
---|
DeviceMeasurementsWithAsset(IDeviceMeasurements wrapped,
IAssetModuleManager assets) |
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.
|
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 |
setMeasurementsSummary(java.lang.String value)
For Jackson marshalling.
|
addOrReplaceMetadata, clearMetadata, compareTo, getAssetId, getAssetModuleId, getAssetName, getAssignmentType, getDeviceAssignmentToken, getEventDate, getEventType, getId, getMetadata, getMetadata, getReceivedDate, getSiteToken, getWrapped, removeMetadata
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 DeviceMeasurementsWithAsset(IDeviceMeasurements wrapped, IAssetModuleManager assets) throws SiteWhereException
SiteWhereException
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 java.lang.String getMeasurementsSummary()
IDeviceMeasurements
getMeasurementsSummary
in interface IDeviceMeasurements
public void setMeasurementsSummary(java.lang.String value)
value
-