#280 moved alarm sounder logic to supervisor and tone control to common
This commit is contained in:
@@ -83,6 +83,8 @@ function iocontrol.init(conf, comms)
|
||||
scram_ack = __generic_ack,
|
||||
ack_alarms_ack = __generic_ack,
|
||||
|
||||
alarm_tones = { false, false, false, false, false, false, false, false },
|
||||
|
||||
ps = psil.create(),
|
||||
|
||||
induction_ps_tbl = {},
|
||||
@@ -664,6 +666,16 @@ function iocontrol.update_facility_status(status)
|
||||
end
|
||||
|
||||
fac.ps.publish("rtu_count", fac.rtu_count)
|
||||
|
||||
-- alarm tone commands
|
||||
|
||||
if (type(status[3]) == "table") and (#status[3] == 8) then
|
||||
fac.alarm_tones = status[3]
|
||||
sounder.set(fac.alarm_tones)
|
||||
else
|
||||
log.debug(log_header .. "alarm tones not a table or length mismatch")
|
||||
valid = false
|
||||
end
|
||||
end
|
||||
|
||||
return valid
|
||||
@@ -1013,9 +1025,6 @@ function iocontrol.update_unit_statuses(statuses)
|
||||
io.facility.ps.publish("sna_count", sna_count_sum)
|
||||
io.facility.ps.publish("pu_rate", pu_rate)
|
||||
io.facility.ps.publish("po_rate", po_rate)
|
||||
|
||||
-- update alarm sounder
|
||||
sounder.eval(io.units)
|
||||
end
|
||||
|
||||
return valid
|
||||
|
||||
Reference in New Issue
Block a user