in streampipes-extensions/streampipes-connect-adapters-iiot/src/main/java/org/apache/streampipes/connect/iiot/adapters/simulator/machine/MachineDataSimulatorUtils.java [111:166]
public static GuessSchema getFlowrateSchema() {
return GuessSchemaBuilder.create()
.property(timestampProperty(TIMESTAMP))
.sample(TIMESTAMP, System.currentTimeMillis())
.property(PrimitivePropertyBuilder
.create(Datatypes.String, SENSOR_ID)
.label("Sensor ID")
.description("The ID of the sensor")
.semanticType(HAS_SENSOR_ID)
.scope(PropertyScope.DIMENSION_PROPERTY)
.build())
.sample(SENSOR_ID, "sensor01")
.property(PrimitivePropertyBuilder
.create(Datatypes.Float, MASS_FLOW)
.label("Mass Flow")
.description("Denotes the current mass flow in the sensor")
.semanticType(SO.NUMBER)
.scope(PropertyScope.MEASUREMENT_PROPERTY)
.build())
.sample(MASS_FLOW, 5.76f)
.property(PrimitivePropertyBuilder
.create(Datatypes.Float, "volume_flow")
.label("Volume Flow")
.description("Denotes the current volume flow")
.semanticType(SO.NUMBER)
.scope(PropertyScope.MEASUREMENT_PROPERTY)
.build())
.sample("volume_flow", 3.34f)
.property(PrimitivePropertyBuilder
.create(Datatypes.Float, TEMPERATURE)
.label("Temperature")
.description("Denotes the current temperature in degrees celsius")
.semanticType(SO.NUMBER)
.scope(PropertyScope.MEASUREMENT_PROPERTY)
.measurementUnit(URI.create("http://qudt.org/vocab/unit#DegreeCelsius"))
.valueSpecification(0.0f, 100.0f, 0.1f)
.build())
.sample(TEMPERATURE, 33.221f)
.property(PrimitivePropertyBuilder
.create(Datatypes.Float, "density")
.label("Density")
.description("Denotes the current density of the fluid")
.semanticType(SO.NUMBER)
.scope(PropertyScope.MEASUREMENT_PROPERTY)
.build())
.sample("density", 5.0f)
.property(PrimitivePropertyBuilder
.create(Datatypes.Boolean, "sensor_fault_flags")
.label("Sensor Fault Flags")
.description("Any fault flags of the sensors")
.semanticType(SO.BOOLEAN)
.scope(PropertyScope.MEASUREMENT_PROPERTY)
.build())
.sample("sensor_fault_flags", true)
.build();
}