#52 basic reactor unit object

This commit is contained in:
Mikayla Fischler
2022-05-21 12:24:43 -04:00
parent 61965f295d
commit 3f4fb63029
4 changed files with 321 additions and 56 deletions

View File

@@ -422,7 +422,7 @@ plc.new_session = function (id, for_reactor, in_queue, out_queue)
end
end
-- get the reactor structure
-- get the reactor status
public.get_status = function ()
if self.received_status_cache then
return self.sDB.mek_status
@@ -431,6 +431,23 @@ plc.new_session = function (id, for_reactor, in_queue, out_queue)
end
end
-- get the reactor RPS status
public.get_rps = function ()
return self.sDB.rps_status
end
-- get the general status information
public.get_general_status = function ()
return {
last_status_update = self.sDB.last_status_update,
control_state = self.sDB.control_state,
overridden = self.sDB.overridden,
degraded = self.sDB.degraded,
rps_tripped = self.sDB.rps_tripped,
rps_trip_cause = self.sDB.rps_trip_cause
}
end
-- check if a timer matches this session's watchdog
public.check_wd = function (timer)
return self.plc_conn_watchdog.is_timer(timer) and self.connected