#290 pocket page management and alarm test tool, supervisor pocket diagnostics system

This commit is contained in:
Mikayla Fischler
2023-07-29 18:16:59 -04:00
parent 775d4dc95b
commit df67795239
16 changed files with 858 additions and 250 deletions

View File

@@ -719,6 +719,23 @@ function unit.new(reactor_id, num_boilers, num_turbines)
return false
end
-- check if the reactor is connected, is stopped, the RPS is not tripped, and no alarms are active
---@nodiscard
function public.is_safe_idle()
-- can't be disconnected
if self.plc_i == nil then return false end
-- alarms must be inactive and not tripping
for _, alarm in pairs(self.alarms) do
if not (alarm.state == AISTATE.INACTIVE or alarm.state == AISTATE.RING_BACK) then return false end
end
-- reactor must be stopped and RPS can't be tripped
if self.plc_i.get_status().status or self.plc_i.get_db().rps_tripped then return false end
return true
end
-- get build properties of machines
--
-- filter options