#574 additional fixes and log cleanup
This commit is contained in:
parent
e8b8dfde5b
commit
c4c45ae329
@ -338,8 +338,8 @@ local function main()
|
|||||||
formed = device.isFormed()
|
formed = device.isFormed()
|
||||||
|
|
||||||
if formed == ppm.ACCESS_FAULT then
|
if formed == ppm.ACCESS_FAULT then
|
||||||
println_ts(util.c("sys_config> failed to check if '", name, "' is formed"))
|
println_ts(util.c("sys_config> failed to check if '", name, "' is formed"))
|
||||||
log.warning(util.c("sys_config> failed to check if '", name, "' is a formed boiler multiblock"))
|
log.warning(util.c("sys_config> failed to check if '", name, "' is a formed boiler multiblock"))
|
||||||
end
|
end
|
||||||
elseif type == "turbineValve" then
|
elseif type == "turbineValve" then
|
||||||
-- turbine multiblock
|
-- turbine multiblock
|
||||||
@ -352,8 +352,8 @@ local function main()
|
|||||||
formed = device.isFormed()
|
formed = device.isFormed()
|
||||||
|
|
||||||
if formed == ppm.ACCESS_FAULT then
|
if formed == ppm.ACCESS_FAULT then
|
||||||
println_ts(util.c("sys_config> failed to check if '", name, "' is formed"))
|
println_ts(util.c("sys_config> failed to check if '", name, "' is formed"))
|
||||||
log.warning(util.c("sys_config> failed to check if '", name, "' is a formed turbine multiblock"))
|
log.warning(util.c("sys_config> failed to check if '", name, "' is a formed turbine multiblock"))
|
||||||
end
|
end
|
||||||
elseif type == "dynamicValve" then
|
elseif type == "dynamicValve" then
|
||||||
-- dynamic tank multiblock
|
-- dynamic tank multiblock
|
||||||
@ -371,8 +371,8 @@ local function main()
|
|||||||
formed = device.isFormed()
|
formed = device.isFormed()
|
||||||
|
|
||||||
if formed == ppm.ACCESS_FAULT then
|
if formed == ppm.ACCESS_FAULT then
|
||||||
println_ts(util.c("sys_config> failed to check if '", name, "' is formed"))
|
println_ts(util.c("sys_config> failed to check if '", name, "' is formed"))
|
||||||
log.warning(util.c("sys_config> failed to check if '", name, "' is a formed dynamic tank multiblock"))
|
log.warning(util.c("sys_config> failed to check if '", name, "' is a formed dynamic tank multiblock"))
|
||||||
end
|
end
|
||||||
elseif type == "inductionPort" then
|
elseif type == "inductionPort" then
|
||||||
-- induction matrix multiblock
|
-- induction matrix multiblock
|
||||||
@ -384,8 +384,8 @@ local function main()
|
|||||||
formed = device.isFormed()
|
formed = device.isFormed()
|
||||||
|
|
||||||
if formed == ppm.ACCESS_FAULT then
|
if formed == ppm.ACCESS_FAULT then
|
||||||
println_ts(util.c("sys_config> failed to check if '", name, "' is formed"))
|
println_ts(util.c("sys_config> failed to check if '", name, "' is formed"))
|
||||||
log.warning(util.c("sys_config> failed to check if '", name, "' is a formed induction matrix multiblock"))
|
log.warning(util.c("sys_config> failed to check if '", name, "' is a formed induction matrix multiblock"))
|
||||||
end
|
end
|
||||||
elseif type == "spsPort" then
|
elseif type == "spsPort" then
|
||||||
-- SPS multiblock
|
-- SPS multiblock
|
||||||
@ -397,8 +397,8 @@ local function main()
|
|||||||
formed = device.isFormed()
|
formed = device.isFormed()
|
||||||
|
|
||||||
if formed == ppm.ACCESS_FAULT then
|
if formed == ppm.ACCESS_FAULT then
|
||||||
println_ts(util.c("sys_config> failed to check if '", name, "' is formed"))
|
println_ts(util.c("sys_config> failed to check if '", name, "' is formed"))
|
||||||
log.warning(util.c("sys_config> failed to check if '", name, "' is a formed SPS multiblock"))
|
log.warning(util.c("sys_config> failed to check if '", name, "' is a formed SPS multiblock"))
|
||||||
end
|
end
|
||||||
elseif type == "solarNeutronActivator" then
|
elseif type == "solarNeutronActivator" then
|
||||||
-- SNA
|
-- SNA
|
||||||
@ -428,7 +428,7 @@ local function main()
|
|||||||
if not formed then
|
if not formed then
|
||||||
if formed == false then
|
if formed == false then
|
||||||
log.info(util.c("sys_config> device '", name, "' is not formed"))
|
log.info(util.c("sys_config> device '", name, "' is not formed"))
|
||||||
end
|
else formed = false end
|
||||||
elseif faulted then
|
elseif faulted then
|
||||||
-- sometimes there is a race condition on server boot where it reports formed, but
|
-- sometimes there is a race condition on server boot where it reports formed, but
|
||||||
-- the other functions are not yet defined (that's the theory at least). mark as unformed to attempt connection later
|
-- the other functions are not yet defined (that's the theory at least). mark as unformed to attempt connection later
|
||||||
@ -458,7 +458,7 @@ local function main()
|
|||||||
|
|
||||||
table.insert(units, rtu_unit)
|
table.insert(units, rtu_unit)
|
||||||
|
|
||||||
local for_message = "facility"
|
local for_message = "the facility"
|
||||||
if for_reactor > 0 then
|
if for_reactor > 0 then
|
||||||
for_message = util.c("reactor ", for_reactor)
|
for_message = util.c("reactor ", for_reactor)
|
||||||
end
|
end
|
||||||
|
|||||||
@ -486,7 +486,9 @@ function threads.thread__unit_comms(smem, unit)
|
|||||||
|
|
||||||
local last_f_check = 0
|
local last_f_check = 0
|
||||||
|
|
||||||
local detail_name = util.c(types.rtu_type_to_string(unit.type), " (", unit.name, ") [", unit.index, "] for reactor ", unit.reactor)
|
local detail_name = util.c(types.rtu_type_to_string(unit.type), " (", unit.name, ") ",
|
||||||
|
util.trinary(unit.index == false, "", util.c("[", unit.index, "] ")), "for ",
|
||||||
|
util.trinary(unit.reactor == 0, "the facility", util.c("reactor ", unit.reactor)))
|
||||||
local short_name = util.c(types.rtu_type_to_string(unit.type), " (", unit.name, ")")
|
local short_name = util.c(types.rtu_type_to_string(unit.type), " (", unit.name, ")")
|
||||||
|
|
||||||
if packet_queue == nil then
|
if packet_queue == nil then
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user