siddhi-io / siddhi

Stream Processing and Complex Event Processing Engine
http://siddhi.io
Apache License 2.0
1.52k stars 527 forks source link

How Pattern enables continuous monitoring #1804

Open immno opened 1 year ago

immno commented 1 year ago

Description:

I want to realize the alarm after the temperature is greater than or equal to 48 degrees for 30 seconds (at least 30 seconds). But I didn't see the API, only Detecting event non-occurrence in Pattern. It's not a scenario for not, and it's very strange to use not. Like the following? within <time gap> is the maximum time range, what I need is the satisfaction within the minimum time range.

from every e1=OriginalStream[pointID == 1]
     -> not OriginalStream[e1.pointID == pointID and temp <= 48] for 30 sec
select e1.pointID, 'Alarm!' as result
insert into OutputStream;

Affected Siddhi Version: v5.1

OS, DB, other environment details and versions:
window 10

Steps to reproduce:

Related Issues: