Update alert messages to convey proper meaning

revert-70aa11f8
charitha 6 years ago
parent 055d422e23
commit 8c0869649a

@ -21,7 +21,7 @@ select id, owner, latitude, longitude, timeStamp, type, speed, heading, eventId,
insert into withinStream; insert into withinStream;
from withinStream[isWithin == false] from withinStream[isWithin == false]
select id, owner, latitude, longitude,timeStamp, type, speed, heading, "ALERTED" as state, str:concat(str:concat(str:concat(type," device "),id), " is outside $areaName 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 outside $areaName area!") as information, true as notify
insert into dataOut; insert into dataOut;
from withinStream[isWithin == true] from withinStream[isWithin == true]
@ -33,5 +33,5 @@ select fs2.id, fs2.owner, fs2.latitude, fs2.longitude, fs2.timeStamp, fs2.type,
insert into crossedStream; insert into crossedStream;
from crossedStream[isWithin == false] from crossedStream[isWithin == false]
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
insert into alertsOut; insert into alertsOut;

@ -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
insert into dataOut; insert into dataOut;
from dataOut[notify == true] from dataOut[notify == true]

@ -83,7 +83,7 @@ select id, owner, latitude, longitude,timeStamp, type, speed, heading ,eventId ,
insert into dataOutStream; insert into dataOutStream;
from dataOutStream[isStationary == 'true'] from dataOutStream[isStationary == 'true']
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
insert into dataOut; insert into dataOut;
from dataOutStream[isStationary == 'false'] from dataOutStream[isStationary == 'false']

@ -21,7 +21,7 @@ select id, owner, latitude, longitude, timeStamp, type, speed, heading, eventId,
insert into withinStream; insert into withinStream;
from withinStream[isWithin == true] from withinStream[isWithin == true]
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
insert into dataOut; insert into dataOut;
from withinStream[isWithin == false] from withinStream[isWithin == false]
@ -33,5 +33,5 @@ select fs2.id, fs2.owner, fs2.latitude, fs2.longitude, fs2.timeStamp, fs2.type,
insert into crossedStream; insert into crossedStream;
from crossedStream[isWithin == true] from crossedStream[isWithin == true]
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
insert into alertsOut; insert into alertsOut;

Loading…
Cancel
Save