missing fields fixes

This commit is contained in:
Mikayla 2024-12-10 14:57:16 +00:00
parent 7eebf0524f
commit 6bd43af5c0
5 changed files with 6 additions and 0 deletions

View File

@ -24,6 +24,7 @@ local LINK_TIMEOUT = 60.0
local coordinator = {}
---@type crd_config
---@diagnostic disable-next-line: missing-fields
local config = {}
coordinator.config = config

View File

@ -255,6 +255,7 @@ function coordinator.new_session(id, s_addr, i_seq_num, in_queue, out_queue, tim
elseif cmd == FAC_COMMAND.START then
if pkt.length == 6 then
---@type sys_auto_config
---@diagnostic disable-next-line: missing-fields
local config = {
mode = pkt.data[2],
burn_target = pkt.data[3],

View File

@ -46,12 +46,14 @@ local self = {
config = nil, ---@type svr_config
facility = nil, ---@type facility|nil
-- lists of connected sessions
---@diagnostic disable: missing-fields
sessions = {
rtu = {}, ---@type rtu_session_struct
plc = {}, ---@type plc_session_struct
crd = {}, ---@type crd_session_struct
pdg = {} ---@type pdg_session_struct
},
---@diagnostic enable: missing-fields
-- next session IDs
next_ids = { rtu = 0, plc = 0, crd = 0, pdg = 0 },
-- rtu device tracking and invalid assignment detection

View File

@ -14,6 +14,7 @@ local ESTABLISH_ACK = comms.ESTABLISH_ACK
local MGMT_TYPE = comms.MGMT_TYPE
---@type svr_config
---@diagnostic disable-next-line: missing-fields
local config = {}
supervisor.config = config

View File

@ -90,6 +90,7 @@ function unit.new(reactor_id, num_boilers, num_turbines, ext_idle)
envd = {}, ---@type envd_session[]
-- redstone control
io_ctl = nil, ---@type rs_controller
---@diagnostic disable-next-line: missing-fields
valves = {}, ---@type unit_valves
emcool_opened = false,
-- auto control