#157 fixed bug with RTU remount messages
This commit is contained in:
@@ -265,7 +265,7 @@ function rtu.new_session(id, in_queue, out_queue, advertisement, facility)
|
||||
_handle_advertisement()
|
||||
elseif pkt.type == SCADA_MGMT_TYPES.RTU_DEV_REMOUNT then
|
||||
if pkt.length == 1 then
|
||||
local unit_id = pkt[1]
|
||||
local unit_id = pkt.data[1]
|
||||
if self.units[unit_id] ~= nil then
|
||||
local unit = self.units[unit_id] ---@type unit_session
|
||||
unit.invalidate_cache()
|
||||
|
||||
@@ -137,6 +137,8 @@ function boilerv.new(session_id, unit_id, advert, out_queue)
|
||||
-- load in data if correct length
|
||||
if m_pkt.length == 1 then
|
||||
self.db.formed = m_pkt.data[1]
|
||||
|
||||
if not self.db.formed then self.has_build = false end
|
||||
else
|
||||
log.debug(log_tag .. "MODBUS transaction reply length mismatch (" .. TXN_TAGS[txn_type] .. ")")
|
||||
end
|
||||
|
||||
@@ -124,6 +124,8 @@ function imatrix.new(session_id, unit_id, advert, out_queue)
|
||||
-- load in data if correct length
|
||||
if m_pkt.length == 1 then
|
||||
self.db.formed = m_pkt.data[1]
|
||||
|
||||
if not self.db.formed then self.has_build = false end
|
||||
else
|
||||
log.debug(log_tag .. "MODBUS transaction reply length mismatch (" .. TXN_TAGS[txn_type] .. ")")
|
||||
end
|
||||
|
||||
@@ -129,6 +129,8 @@ function sps.new(session_id, unit_id, advert, out_queue)
|
||||
-- load in data if correct length
|
||||
if m_pkt.length == 1 then
|
||||
self.db.formed = m_pkt.data[1]
|
||||
|
||||
if not self.db.formed then self.has_build = false end
|
||||
else
|
||||
log.debug(log_tag .. "MODBUS transaction reply length mismatch (" .. TXN_TAGS[txn_type] .. ")")
|
||||
end
|
||||
|
||||
@@ -166,6 +166,8 @@ function turbinev.new(session_id, unit_id, advert, out_queue)
|
||||
-- load in data if correct length
|
||||
if m_pkt.length == 1 then
|
||||
self.db.formed = m_pkt.data[1]
|
||||
|
||||
if not self.db.formed then self.has_build = false end
|
||||
else
|
||||
log.debug(log_tag .. "MODBUS transaction reply length mismatch (" .. TXN_TAGS[txn_type] .. ")")
|
||||
end
|
||||
|
||||
@@ -14,7 +14,7 @@ local svsessions = require("supervisor.session.svsessions")
|
||||
local config = require("supervisor.config")
|
||||
local supervisor = require("supervisor.supervisor")
|
||||
|
||||
local SUPERVISOR_VERSION = "beta-v0.11.0"
|
||||
local SUPERVISOR_VERSION = "beta-v0.11.1"
|
||||
|
||||
local print = util.print
|
||||
local println = util.println
|
||||
|
||||
Reference in New Issue
Block a user