review fixes
This commit is contained in:
@@ -16,7 +16,7 @@ databus.ps = psil.create()
|
||||
-- call to toggle heartbeat signal
|
||||
function databus.heartbeat() databus.ps.toggle("heartbeat") end
|
||||
|
||||
-- transmit firmware versions across the bus
|
||||
-- transmit firmware versions
|
||||
---@param sv_v string supervisor version
|
||||
---@param comms_v string comms version
|
||||
function databus.tx_versions(sv_v, comms_v)
|
||||
@@ -24,18 +24,18 @@ function databus.tx_versions(sv_v, comms_v)
|
||||
databus.ps.publish("comms_version", comms_v)
|
||||
end
|
||||
|
||||
-- transmit hardware status for the wireless comms modem connection state
|
||||
---@param has_modem boolean
|
||||
function databus.tx_hw_wl_modem(has_modem)
|
||||
databus.ps.publish("has_wl_modem", has_modem)
|
||||
end
|
||||
|
||||
-- transmit hardware status for the wired comms modem connection state
|
||||
-- transmit hardware status for the wired comms modem
|
||||
---@param has_modem boolean
|
||||
function databus.tx_hw_wd_modem(has_modem)
|
||||
databus.ps.publish("has_wd_modem", has_modem)
|
||||
end
|
||||
|
||||
-- transmit hardware status for the wireless comms modem
|
||||
---@param has_modem boolean
|
||||
function databus.tx_hw_wl_modem(has_modem)
|
||||
databus.ps.publish("has_wl_modem", has_modem)
|
||||
end
|
||||
|
||||
-- transmit PLC firmware version and session connection state
|
||||
---@param reactor_id integer reactor unit ID
|
||||
---@param fw string firmware version
|
||||
|
||||
@@ -104,11 +104,11 @@ function supervisor.load_config()
|
||||
cfv.assert((config.WiredModem == false) or (type(config.WiredModem) == "string"))
|
||||
cfv.assert((config.WirelessModem == true) or (type(config.WiredModem) == "string"))
|
||||
|
||||
cfv.assert_type_num(config.PLC_Listen)
|
||||
cfv.assert_type_int(config.PLC_Listen)
|
||||
cfv.assert_range(config.PLC_Listen, 0, 2)
|
||||
cfv.assert_type_num(config.RTU_Listen)
|
||||
cfv.assert_type_int(config.RTU_Listen)
|
||||
cfv.assert_range(config.RTU_Listen, 0, 2)
|
||||
cfv.assert_type_num(config.CRD_Listen)
|
||||
cfv.assert_type_int(config.CRD_Listen)
|
||||
cfv.assert_range(config.CRD_Listen, 0, 2)
|
||||
|
||||
cfv.assert_type_bool(config.PocketEnabled)
|
||||
@@ -398,6 +398,8 @@ function supervisor.comms(_version, fp_ok, facility)
|
||||
|
||||
if nic then
|
||||
s_pkt = nic.receive(side, sender, reply_to, message, distance)
|
||||
else
|
||||
log.error("parse_packet(" .. side .. "): received a packet from an interface without a nic?")
|
||||
end
|
||||
|
||||
if s_pkt then
|
||||
@@ -418,7 +420,7 @@ function supervisor.comms(_version, fp_ok, facility)
|
||||
local crdn_pkt = comms.crdn_packet()
|
||||
if crdn_pkt.decode(s_pkt) then pkt = crdn_pkt.get() end
|
||||
else
|
||||
log.debug("receive[" .. side .. "] attempted parse of illegal packet type " .. s_pkt.protocol(), true)
|
||||
log.debug("parse_packet(" .. side .. "): attempted parse of illegal packet type " .. s_pkt.protocol(), true)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user