mirror of
https://repository.entgra.net/community/device-mgt-core.git
synced 2025-10-06 02:01:45 +00:00
Update alert messages to convey proper meaning
This commit is contained in:
parent
055d422e23
commit
8c0869649a
@ -21,7 +21,7 @@ select id, owner, latitude, longitude, timeStamp, type, speed, heading, eventId,
|
||||
insert into withinStream;
|
||||
|
||||
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;
|
||||
|
||||
from withinStream[isWithin == true]
|
||||
@ -33,5 +33,5 @@ select fs2.id, fs2.owner, fs2.latitude, fs2.longitude, fs2.timeStamp, fs2.type,
|
||||
insert into crossedStream;
|
||||
|
||||
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;
|
||||
|
||||
@ -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);
|
||||
|
||||
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;
|
||||
|
||||
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;
|
||||
|
||||
from dataOut[notify == true]
|
||||
|
||||
@ -83,7 +83,7 @@ select id, owner, latitude, longitude,timeStamp, type, speed, heading ,eventId ,
|
||||
insert into dataOutStream;
|
||||
|
||||
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;
|
||||
|
||||
from dataOutStream[isStationary == 'false']
|
||||
|
||||
@ -21,7 +21,7 @@ select id, owner, latitude, longitude, timeStamp, type, speed, heading, eventId,
|
||||
insert into withinStream;
|
||||
|
||||
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;
|
||||
|
||||
from withinStream[isWithin == false]
|
||||
@ -33,5 +33,5 @@ select fs2.id, fs2.owner, fs2.latitude, fs2.longitude, fs2.timeStamp, fs2.type,
|
||||
insert into crossedStream;
|
||||
|
||||
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;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user