#635 comms optimizations

This commit is contained in:
Mikayla
2025-11-10 23:00:52 +00:00
parent fb102502dd
commit 2e01b478f1
15 changed files with 90 additions and 134 deletions

View File

@@ -327,10 +327,10 @@ function facility.receive_sv(side, sender, reply_to, message, distance)
local s_pkt = self.nic.receive(side, sender, reply_to, message, distance)
if s_pkt and s_pkt.protocol() == PROTOCOL.SCADA_MGMT then
local mgmt_pkt = comms.mgmt_packet()
if mgmt_pkt.decode(s_pkt) then
local pkt = comms.mgmt_packet().decode(s_pkt)
if pkt then
tcd.abort(handle_timeout)
handle_packet(mgmt_pkt.get())
handle_packet(pkt)
end
end
end

View File

@@ -374,18 +374,10 @@ function coordinator.comms(version, nic, wl_nic, sv_watchdog)
local pkt = nil
if s_pkt then
-- get as SCADA management packet
if s_pkt.protocol() == PROTOCOL.SCADA_MGMT then
local mgmt_pkt = comms.mgmt_packet()
if mgmt_pkt.decode(s_pkt) then
pkt = mgmt_pkt.get()
end
-- get as coordinator packet
pkt = comms.mgmt_packet().decode(s_pkt)
elseif s_pkt.protocol() == PROTOCOL.SCADA_CRDN then
local crdn_pkt = comms.crdn_packet()
if crdn_pkt.decode(s_pkt) then
pkt = crdn_pkt.get()
end
pkt = comms.crdn_packet().decode(s_pkt)
else
log.debug("attempted parse of illegal packet type " .. s_pkt.protocol(), true)
end

View File

@@ -20,7 +20,7 @@ local renderer = require("coordinator.renderer")
local sounder = require("coordinator.sounder")
local threads = require("coordinator.threads")
local COORDINATOR_VERSION = "v1.7.0"
local COORDINATOR_VERSION = "v1.7.1"
local CHUNK_LOAD_DELAY_S = 30.0