Hi all,
I am currently working on some processors to handle machine states.
Any ideas and improvements are welcome, especially for the names of the
processors ;)
The first one transforms multiple boolean values into a state field
(BooleanToState)
Example:
{‘active’: True, ‘inactive’: False} => {‘state’: [‘active’]}
We also already have a domain property for states in SPSensor [1].
I decided to put the states into an array for the case that multiple states are
active.
Next I want to buffer sensor values during a state and emit the result in an
array, once the state changes (StateBuffer)
Example:
{’state’:[‘inactive’], sensor: 2}, … ,{’state’:[‘active’], sensor: 3} =>
{’state’: [‘active’], sensor_values: [3,…5]}
In the third processor we want to add a label to the event, according to the
values of the sensor.
E.g. when the average is lower than a certain number the label ‘bad part'
should be added.
Philipp
[1]
https://github.com/apache/incubator-streampipes/blob/cbfbf7b83e139f4c6317e9021b388aefe94d249e/streampipes-vocabulary/src/main/java/org/apache/streampipes/vocabulary/SPSensor.java
<https://github.com/apache/incubator-streampipes/blob/cbfbf7b83e139f4c6317e9021b388aefe94d249e/streampipes-vocabulary/src/main/java/org/apache/streampipes/vocabulary/SPSensor.java>