select id, owner, "ALERTED" as state, str:concat(str:concat(str:concat(type," device "),id), " is outside $areaName area!!!") as information, timeStamp, latitude, longitude, type
select id, owner, "ALERTED" as state, str:concat("The ", type, " device `", id, "` of $owner is outside $areaName area!") as information, timeStamp, latitude, longitude, type
@ -16,11 +16,11 @@ define stream dataOut (id string, owner string, latitude double, longitude doubl
define stream alertsOut (id string, owner string, state string, information string, timeStamp long, latitude double, longitude double, type string);
define stream alertsOut (id string, owner string, state string, information string, timeStamp long, latitude double, longitude double, type string);
from dataIn[speed >= $speedAlertValue and id == "$deviceId" and owner == "$owner"]
from dataIn[speed >= $speedAlertValue and id == "$deviceId" and owner == "$owner"]
select id, owner, latitude, longitude, timeStamp, type, speed, heading, "ALERTED" as state, str:concat(str:concat(str:concat(str:concat("Speed of ",type), " device "), id), " is not normal!!") as information, true as notify
select id, owner, latitude, longitude, timeStamp, type, speed, heading, "ALERTED" as state, str:concat("The ", type, " device `", id, "` of $owner is traveling at ", math:round(speed), "km/h and is exceeding the $speedAlertValuekm/h speed limit") as information, true as notify
insert into dataOut;
insert into dataOut;
from dataIn[speed < $speedAlertValue and id == "$deviceId" and owner == "$owner"]
from dataIn[speed < $speedAlertValue and id == "$deviceId" and owner == "$owner"]
select id, owner, latitude, longitude, timeStamp, type, speed, heading, "NORMAL" as state, str:concat(str:concat(str:concat(str:concat("Speed of ",type), " device "), id), " is normal") as information, false as notify
select id, owner, latitude, longitude, timeStamp, type, speed, heading, "NORMAL" as state, str:concat("The ", type, " device `", id, "` of $owner is travailing at normal speed.") as information, false as notify
select id, owner, latitude, longitude,timeStamp, type, speed, heading, "ALERTED" as state, str:concat(str:concat(str:concat(type," device "),id),"is in $stationeryName area!!!") as information, true as notify
select id, owner, latitude, longitude,timeStamp, type, speed, heading, "ALERTED" as state, str:concat("The ", type, " device `", id, "` of $owner is in $stationeryName area!") as information, true as notify
select id, owner, latitude, longitude,timeStamp, type, speed, heading, "ALERTED" as state, str:concat(str:concat(str:concat(type," device "),id), " is in $areaName restricted area!!!") as information, true as notify
select id, owner, latitude, longitude,timeStamp, type, speed, heading, "ALERTED" as state, str:concat("The ", type, " device `", id, "` of $owner is inside $areaName area!") as information, true as notify
select id, owner, "ALERTED" as state, str:concat(str:concat(str:concat(type," device "),id), " is outside $areaName area!!!") as information, timeStamp, latitude, longitude, type
select id, owner, "ALERTED" as state, str:concat("The ", type, " device `", id, "` of $owner is inside $areaName area!") as information, timeStamp, latitude, longitude, type