#107, #121 RTU build changes, formed handling

This commit is contained in:
Mikayla Fischler
2022-11-11 14:59:53 -05:00
parent bc63a06b09
commit 83cf645da4
20 changed files with 282 additions and 39 deletions

View File

@@ -288,6 +288,16 @@ function rtu.new_session(id, in_queue, out_queue, advertisement, facility_units)
-- handle advertisement; this will re-create all unit sub-sessions
self.advert = pkt.data
_handle_advertisement()
elseif pkt.type == SCADA_MGMT_TYPES.RTU_DEV_REMOUNT then
if pkt.length == 1 then
local unit_id = pkt[1]
if self.units[unit_id] ~= nil then
local unit = self.units[unit_id] ---@type unit_session
unit.invalidate_cache()
end
else
log.debug(log_header .. "SCADA RTU device re-mount packet length mismatch")
end
else
log.debug(log_header .. "handler received unsupported SCADA_MGMT packet type " .. pkt.type)
end