I'm trying to create a set of EPL statements that allow the engine to alert when a value is or not over a threshold. Another way to understand it is like a 'fence' or geographical fence.
The set of statements must alert when a value enters or leaves this region. For example the next 'fence' value>45 must rise an alert only when value is greater than 45 or, less or equal than 45, but only when a value pass over the threshold.
Here is an I/O example. For DistanceEvents which hold a property distance, and the fence distance>45.
Inputs
DistanceEvents={distance=50}
DistanceEvents={distance=40}
DistanceEvents={distance=33}
DistanceEvents={distance=60}
DistanceEvents={distance=55}
DistanceEvents={distance=45}
DistanceEvents={distance=15}
Outputs
1 - output= {distance=50.0}
2 - output= {a.distance=50.0, b.distance=40.0}
3 - output= {a.distance=40.0, b.distance=60.0}
4 - output= {a.distance=60.0, b.distance=45.0}
Could someone help me, please?