version increment and log message formatting
This commit is contained in:
parent
1f9e86f6ea
commit
2fefe4fbd6
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user