#262 don't ever abort RTU unit parsing on error, just skip
This commit is contained in:
parent
b28e4d1e95
commit
af38025f50
File diff suppressed because one or more lines are too long
@ -120,7 +120,7 @@ function rtu.new_session(id, s_addr, in_queue, out_queue, timeout, advertisement
|
|||||||
|
|
||||||
if u_type == false then
|
if u_type == false then
|
||||||
-- validation fail
|
-- validation fail
|
||||||
log.debug(log_header .. "advertisement unit validation failure")
|
log.debug(log_header .. "_handle_advertisement(): advertisement unit validation failure")
|
||||||
else
|
else
|
||||||
if unit_advert.reactor > 0 then
|
if unit_advert.reactor > 0 then
|
||||||
local target_unit = self.fac_units[unit_advert.reactor] ---@type reactor_unit
|
local target_unit = self.fac_units[unit_advert.reactor] ---@type reactor_unit
|
||||||
@ -146,7 +146,7 @@ function rtu.new_session(id, s_addr, in_queue, out_queue, timeout, advertisement
|
|||||||
-- skip virtual units
|
-- skip virtual units
|
||||||
log.debug(util.c(log_header, "skipping virtual RTU unit #", i))
|
log.debug(util.c(log_header, "skipping virtual RTU unit #", i))
|
||||||
else
|
else
|
||||||
log.error(util.c(log_header, "bad advertisement: encountered unsupported reactor-specific RTU type ", type_string))
|
log.warning(util.c(log_header, "_handle_advertisement(): encountered unsupported reactor-specific RTU type ", type_string))
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
-- facility RTUs
|
-- facility RTUs
|
||||||
@ -172,7 +172,7 @@ function rtu.new_session(id, s_addr, in_queue, out_queue, timeout, advertisement
|
|||||||
-- skip virtual units
|
-- skip virtual units
|
||||||
log.debug(util.c(log_header, "skipping virtual RTU unit #", i))
|
log.debug(util.c(log_header, "skipping virtual RTU unit #", i))
|
||||||
else
|
else
|
||||||
log.error(util.c(log_header, "bad advertisement: encountered unsupported reactor-independent RTU type ", type_string))
|
log.warning(util.c(log_header, "_handle_advertisement(): encountered unsupported facility RTU type ", type_string))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -181,9 +181,7 @@ function rtu.new_session(id, s_addr, in_queue, out_queue, timeout, advertisement
|
|||||||
self.units[i] = unit
|
self.units[i] = unit
|
||||||
unit_count = unit_count + 1
|
unit_count = unit_count + 1
|
||||||
elseif u_type ~= RTU_UNIT_TYPE.VIRTUAL then
|
elseif u_type ~= RTU_UNIT_TYPE.VIRTUAL then
|
||||||
_reset_config()
|
log.warning(util.c(log_header, "_handle_advertisement(): problem occured while creating a unit (type is ", type_string, ")"))
|
||||||
log.error(util.c(log_header, "bad advertisement: error occured while creating a unit (type is ", type_string, ")"))
|
|
||||||
break
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@ -20,7 +20,7 @@ local supervisor = require("supervisor.supervisor")
|
|||||||
|
|
||||||
local svsessions = require("supervisor.session.svsessions")
|
local svsessions = require("supervisor.session.svsessions")
|
||||||
|
|
||||||
local SUPERVISOR_VERSION = "v0.17.7"
|
local SUPERVISOR_VERSION = "v0.17.8"
|
||||||
|
|
||||||
local println = util.println
|
local println = util.println
|
||||||
local println_ts = util.println_ts
|
local println_ts = util.println_ts
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user