From 2fefe4fbd6618050ddec33c48b3969f2d7031b7a Mon Sep 17 00:00:00 2001 From: Mikayla Fischler Date: Sun, 26 Oct 2025 18:15:18 -0400 Subject: [PATCH] version increment and log message formatting --- reactor-plc/startup.lua | 2 +- scada-common/comms.lua | 4 ++-- scada-common/network.lua | 10 +++++----- scada-common/util.lua | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/reactor-plc/startup.lua b/reactor-plc/startup.lua index d76199d..a051adb 100644 --- a/reactor-plc/startup.lua +++ b/reactor-plc/startup.lua @@ -19,7 +19,7 @@ local plc = require("reactor-plc.plc") local renderer = require("reactor-plc.renderer") local threads = require("reactor-plc.threads") -local R_PLC_VERSION = "v1.9.0" +local R_PLC_VERSION = "v1.9.1" local println = util.println local println_ts = util.println_ts diff --git a/scada-common/comms.lua b/scada-common/comms.lua index 93a0e69..e3e7403 100644 --- a/scada-common/comms.lua +++ b/scada-common/comms.lua @@ -214,7 +214,7 @@ function comms.scada_packet() if (type(max_distance) == "number") and (type(distance) == "number") and (distance > max_distance) then -- outside of maximum allowable transmission distance - -- log.debug("COMMS: comms.scada_packet.receive(): discarding packet with distance " .. distance .. " (outside trusted range)") + -- log.debug("COMMS: scada_packet.receive(): discarding packet with distance " .. distance .. " (outside trusted range)") else if type(self.raw) == "table" then if #self.raw == 5 then @@ -337,7 +337,7 @@ function comms.authd_packet() if (type(max_distance) == "number") and ((type(distance) ~= "number") or (distance > max_distance)) then -- outside of maximum allowable transmission distance - -- log.debug("COMMS: comms.authd_packet.receive(): discarding packet with distance " .. distance .. " (outside trusted range)") + -- log.debug("COMMS: authd_packet.receive(): discarding packet with distance " .. distance .. " (outside trusted range)") else if type(self.raw) == "table" then if #self.raw == 4 then diff --git a/scada-common/network.lua b/scada-common/network.lua index 317d517..8a7e031 100644 --- a/scada-common/network.lua +++ b/scada-common/network.lua @@ -49,7 +49,7 @@ function network.init_mac(passkey) _crypt.hmac.setKey(_crypt.key) local init_time = util.time_ms() - start - log.info("NET: network.init_mac completed in " .. init_time .. "ms") + log.info("NET: network.init_mac() completed in " .. init_time .. "ms") return init_time end @@ -190,13 +190,13 @@ function network.nic(modem) ---@cast tx_packet authd_packet tx_packet.make(packet, compute_hmac) - -- log.debug("NET: network.modem.transmit: data processing took " .. (util.time_ms() - start) .. "ms") + -- log.debug("NET: network.modem.transmit(): data processing took " .. (util.time_ms() - start) .. "ms") end ---@diagnostic disable-next-line: need-check-nil modem.transmit(dest_channel, local_channel, tx_packet.raw_sendable()) else - log.debug("NET: network.transmit tx dropped, link is down") + log.debug("NET: network.transmit() tx dropped, link is down") end end @@ -227,10 +227,10 @@ function network.nic(modem) local computed_hmac = compute_hmac(textutils.serialize(s_packet.raw_header(), { allow_repetitions = true, compact = true })) if a_packet.mac() == computed_hmac then - -- log.debug("NET: network.modem.receive: HMAC verified in " .. (util.time_ms() - start) .. "ms") + -- log.debug("NET: network.modem.receive(): HMAC verified in " .. (util.time_ms() - start) .. "ms") s_packet.stamp_authenticated() else - -- log.debug("NET: network.modem.receive: HMAC failed verification in " .. (util.time_ms() - start) .. "ms") + -- log.debug("NET: network.modem.receive(): HMAC failed verification in " .. (util.time_ms() - start) .. "ms") end end end diff --git a/scada-common/util.lua b/scada-common/util.lua index c889037..fe661be 100644 --- a/scada-common/util.lua +++ b/scada-common/util.lua @@ -24,7 +24,7 @@ local t_pack = table.pack local util = {} -- scada-common version -util.version = "1.5.5" +util.version = "1.5.6" util.TICK_TIME_S = 0.05 util.TICK_TIME_MS = 50