#545 supervisor type annotation updates
This commit is contained in:
@@ -84,7 +84,7 @@ function dynamicv.new(session_id, unit_id, advert, out_queue)
|
||||
},
|
||||
state = {
|
||||
last_update = 0,
|
||||
container_mode = CONTAINER_MODE.BOTH ---@type container_mode
|
||||
container_mode = CONTAINER_MODE.BOTH ---@type container_mode
|
||||
},
|
||||
tanks = {
|
||||
last_update = 0,
|
||||
@@ -224,7 +224,7 @@ function dynamicv.new(session_id, unit_id, advert, out_queue)
|
||||
end
|
||||
elseif msg.qtype == mqueue.TYPE.DATA then
|
||||
-- instruction with body
|
||||
local cmd = msg.message ---@type queue_data
|
||||
local cmd = msg.message ---@type queue_data
|
||||
if cmd.key == DTV_RTU_S_DATA.SET_CONT_MODE then
|
||||
if cmd.val == types.CONTAINER_MODE.BOTH or
|
||||
cmd.val == types.CONTAINER_MODE.FILL or
|
||||
|
||||
@@ -95,7 +95,7 @@ function turbinev.new(session_id, unit_id, advert, out_queue)
|
||||
flow_rate = 0,
|
||||
prod_rate = 0,
|
||||
steam_input_rate = 0,
|
||||
dumping_mode = DUMPING_MODE.IDLE ---@type dumping_mode
|
||||
dumping_mode = DUMPING_MODE.IDLE ---@type dumping_mode
|
||||
},
|
||||
tanks = {
|
||||
last_update = 0,
|
||||
@@ -254,7 +254,7 @@ function turbinev.new(session_id, unit_id, advert, out_queue)
|
||||
end
|
||||
elseif msg.qtype == mqueue.TYPE.DATA then
|
||||
-- instruction with body
|
||||
local cmd = msg.message ---@type queue_data
|
||||
local cmd = msg.message ---@type queue_data
|
||||
if cmd.key == TBV_RTU_S_DATA.SET_DUMP_MODE then
|
||||
if cmd.val == types.DUMPING_MODE.IDLE or
|
||||
cmd.val == types.DUMPING_MODE.DUMPING_EXCESS or
|
||||
|
||||
@@ -6,7 +6,8 @@ local util = require("scada-common.util")
|
||||
|
||||
local txnctrl = {}
|
||||
|
||||
local TIMEOUT = 2000 -- 2000ms max wait
|
||||
-- 2000ms max wait
|
||||
local TIMEOUT = 2000
|
||||
|
||||
-- create a new transaction controller
|
||||
---@nodiscard
|
||||
|
||||
@@ -164,7 +164,6 @@ function unit_session.new(session_id, unit_id, advert, out_queue, log_tag, txn_t
|
||||
function public.get_cmd_queue() return protected.in_q end
|
||||
|
||||
-- close this unit
|
||||
---@nodiscard
|
||||
function public.close() self.connected = false end
|
||||
-- check if this unit is connected
|
||||
---@nodiscard
|
||||
|
||||
Reference in New Issue
Block a user