Class SignalMeasurementBuilder
- java.lang.Object
-
- com.trx.neon.api.neonMeasurement.model.SignalMeasurementBuilder
-
public class SignalMeasurementBuilder extends java.lang.Object
A builder that constructs a signal measurement A signal measurement is a set of data keyed by the field name in the signal definition and representing a single measurement of a signal.
-
-
Constructor Summary
Constructors Constructor Description SignalMeasurementBuilder(java.lang.String provider, java.lang.String technology, java.lang.String signal, java.util.ArrayList<IdentifierDefinition> identifierDefinitions, java.util.ArrayList<HeatmapDefinition> heatmapDefinitions, java.util.ArrayList<DisplayDefinition> displayDefinitions)
This is used by the signal definition to generate a signal measurement builder.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SignalMeasurementBuilder
AddAdditionalData(java.lang.String fieldName, java.lang.Object value)
Add an display value to the signal measurementSignalMeasurementBuilder
AddHeatmapValue(java.lang.String fieldName, float value)
Add an heatmap value to the signal measurementSignalMeasurementBuilder
AddIdentifier(java.lang.String fieldName, java.lang.Object value)
Add an identifier value to the signal measurementSignalMeasurementBuilder
AddTimestamp(long unixTimeMs)
Add the unixTimeMs timestamp to this measurement (required)SignalMeasurement
Build()
Build the signal measurement.
-
-
-
Constructor Detail
-
SignalMeasurementBuilder
public SignalMeasurementBuilder(java.lang.String provider, java.lang.String technology, java.lang.String signal, java.util.ArrayList<IdentifierDefinition> identifierDefinitions, java.util.ArrayList<HeatmapDefinition> heatmapDefinitions, java.util.ArrayList<DisplayDefinition> displayDefinitions)
This is used by the signal definition to generate a signal measurement builder. Use SignalDefinition.generateSignalMeasurementBuilder() instead
-
-
Method Detail
-
AddTimestamp
public SignalMeasurementBuilder AddTimestamp(long unixTimeMs)
Add the unixTimeMs timestamp to this measurement (required)- Parameters:
unixTimeMs
- Unix Time in milliseconds- Returns:
- the SignalMeasurementBuilder
-
AddIdentifier
public SignalMeasurementBuilder AddIdentifier(java.lang.String fieldName, java.lang.Object value)
Add an identifier value to the signal measurement- Parameters:
fieldName
- The name of the field as found in the signal definitionvalue
- The value of the field (must match the defined display type)- Returns:
- the SignalMeasurementBuilder
-
AddHeatmapValue
public SignalMeasurementBuilder AddHeatmapValue(java.lang.String fieldName, float value)
Add an heatmap value to the signal measurement- Parameters:
fieldName
- The name of the field as found in the signal definitionvalue
- The value of the field (must be a float)- Returns:
- the SignalMeasurementBuilder
-
AddAdditionalData
public SignalMeasurementBuilder AddAdditionalData(java.lang.String fieldName, java.lang.Object value)
Add an display value to the signal measurement- Parameters:
fieldName
- The name of the field as found in the signal definitionvalue
- The value of the field (must match the defined display type)- Returns:
- the SignalMeasurementBuilder
-
Build
public SignalMeasurement Build()
Build the signal measurement. Checks that all fields defined in the signal definition have a value- Returns:
- A complete signal measurement
-
-