#580 comment updates, rtu listen fix, and trusted range init change

This commit is contained in:
Mikayla Fischler
2025-11-02 14:30:02 -05:00
parent 0417986c15
commit d9001090c2
3 changed files with 31 additions and 17 deletions

View File

@@ -306,7 +306,15 @@ function rtu.comms(version, nic, conn_watchdog)
local insert = table.insert
-- PRIVATE FUNCTIONS --
if config.WirelessModem then
comms.set_trusted_range(config.TrustedRange)
end
-- configure network channels
nic.closeAll()
nic.open(config.RTU_Channel)
--#region PRIVATE FUNCTIONS --
-- send a scada management packet
---@param msg_type MGMT_TYPE
@@ -347,7 +355,9 @@ function rtu.comms(version, nic, conn_watchdog)
return advertisement
end
-- PUBLIC FUNCTIONS --
--#endregion
--#region PUBLIC FUNCTIONS --
---@class rtu_comms
local public = {}
@@ -357,10 +367,6 @@ function rtu.comms(version, nic, conn_watchdog)
function public.switch_nic(_nic)
nic.closeAll()
if _nic.isWireless() then
comms.set_trusted_range(config.TrustedRange)
end
-- configure receive channels
_nic.closeAll()
_nic.open(config.RTU_Channel)
@@ -617,6 +623,8 @@ function rtu.comms(version, nic, conn_watchdog)
end
end
--#endregion
return public
end