#8 cleaned up closing logic, added connected flags to RTU unit sessions

This commit is contained in:
Mikayla Fischler
2022-05-16 17:13:54 -04:00
parent 136b09d7f2
commit 0eff8a3e6a
6 changed files with 39 additions and 10 deletions

View File

@@ -60,6 +60,7 @@ redstone.new = function (session_id, advert, out_queue)
in_q = mqueue.new(),
out_q = out_queue,
transaction_controller = txnctrl.new(),
connected = true,
has_di = false,
has_ai = false,
periodics = {
@@ -192,6 +193,9 @@ redstone.new = function (session_id, advert, out_queue)
public.get_reactor = function () return self.reactor end
public.get_db = function () return self.db end
public.close = function () self.connected = false end
public.is_connected = function () return self.connected end
-- update this runner
---@param time_now integer milliseconds
public.update = function (time_now)