( ** Go back to PARENTPAGE ../WATER-LEVEL-BETWEEN-BAY1-AND-BAY2.html)
( ** Go back to HOMESITE https://www.tcnd.com)
( ** Go back to SetSphere https://www.setsphere.com)

Workspace BAYS12MON showing how to monitor water level between two bays

In this workspace BAYS12MON we show how to monitor the water level between two bays: BAY1 and BAY2. These variables have attributes attached to lambda functions of two sensors. ASPL iterative loop is invoked via ASPL interrogation operator.

ASPL 1> egCwhoami
ping the currently loaded grouping class

ASPL 2> attributes
display the attributes of the grouping class

ASPL 3> waterlevelday1 = ggbaylevel()
today water level assigned to waterlevelday1

ASPL 4> ?45,1 waterlevelday1
interrogate waterlevelday1 45 times with 1 second delay

ASPL 5> split waterlevelday1 into BAY1 BAY2 CRITICAL GOOD WARN
split waterlevelday1 into the five groups

ASPL 6> ks mean123 mtime aelm
set ks vector to mean123 mtime aelm

ASPL 7> f&`ks= CRITICAL BAY1 BAY2
display when BAY1 and BAY2 are CRITICAL level

ASPL 8> f&`ks= WARN BAY1 BAY2
display when BAY1 and BAY2 are WARN level

ASPL 9> f&`ks= CRITICAL BAY1
display when BAY1 is at CRITICAL level

ASPL 10> f&`ks= CRITICAL BAY2
display when BAY2 is at CRITICAL level

ASPL 11> DEF FN critical := {fU {f&`ks= CRITICAL BAY1}{f&`ks= CRITICAL BAY2}}
define function critical()

ASPL 12> DEF FN warn := {fU {f&`ks= CRITICAL BAY1}{f&`ks= CRITICAL BAY2}{f&`ks= WARN BAY1}{f&`ks= WARN BAY2}}
define function warn()

ASPL 13> FN critical()
call function critical()

ASPL 14> FN warn()
call function warn()

ASPL 15> bye
save workspace and quit ASPL