|
|
@ -1,5 +1,5 @@
|
|
|
|
define stream fireAlarmEventStream (deviceID string, temp int);
|
|
|
|
define stream fireAlarmEventStream (deviceID string, temp int);
|
|
|
|
from fireAlarmEventStream#window.time(7886776 sec)
|
|
|
|
from fireAlarmEventStream#window.time(10 sec)
|
|
|
|
select deviceID, max(temp) as maxValue
|
|
|
|
select deviceID, max(temp) as maxValue
|
|
|
|
group by deviceID
|
|
|
|
group by deviceID
|
|
|
|
insert into analyzeStream for expired-events;
|
|
|
|
insert into analyzeStream for expired-events;
|
|
|
@ -8,4 +8,4 @@ select maxValue
|
|
|
|
insert into bulbOnStream;
|
|
|
|
insert into bulbOnStream;
|
|
|
|
from fireAlarmEventStream[temp > 1093]
|
|
|
|
from fireAlarmEventStream[temp > 1093]
|
|
|
|
select deviceID, temp
|
|
|
|
select deviceID, temp
|
|
|
|
insert into bulbOffStream;
|
|
|
|
insert into bulbOffStream;
|
|
|
|