use of org.opensmartgridplatform.domain.da.measurements.MeasurementElement in project open-smart-grid-platform by OSGP.
the class DomainMeasurementsFactory method gasFlowMeasurement.
public static Measurement gasFlowMeasurement(final float gasFlow) {
final BitmaskMeasurementElement flags = new BitmaskMeasurementElement((byte) 96);
final TimestampMeasurementElement from = new TimestampMeasurementElement(1546800000501l);
final TimestampMeasurementElement until = new TimestampMeasurementElement(1546700000444l);
final FloatMeasurementElement cubicMeters = new FloatMeasurementElement(gasFlow);
final List<MeasurementElement> measurementElements = new ArrayList<>();
measurementElements.add(flags);
measurementElements.add(from);
measurementElements.add(until);
measurementElements.add(cubicMeters);
return DomainMeasurementsFactory.measurementFrom(measurementElements);
}
use of org.opensmartgridplatform.domain.da.measurements.MeasurementElement in project open-smart-grid-platform by OSGP.
the class DomainMeasurementsFactory method gasFlowMeasurement.
public static Measurement gasFlowMeasurement(final float gasFlow) {
final BitmaskMeasurementElement flags = new BitmaskMeasurementElement((byte) 96);
final TimestampMeasurementElement from = new TimestampMeasurementElement(1546800000501l);
final TimestampMeasurementElement until = new TimestampMeasurementElement(1546700000444l);
final FloatMeasurementElement cubicMeters = new FloatMeasurementElement(gasFlow);
final List<MeasurementElement> measurementElements = new ArrayList<>();
measurementElements.add(flags);
measurementElements.add(from);
measurementElements.add(until);
measurementElements.add(cubicMeters);
return DomainMeasurementsFactory.measurementFrom(measurementElements);
}
Aggregations