mirror of
https://github.com/MikaylaFischler/cc-mek-scada.git
synced 2024-08-30 18:22:34 +00:00
RTU support for non reactor specific devices
This commit is contained in:
parent
2a99d1d385
commit
41913441d5
@ -12,7 +12,7 @@ config.LOG_PATH = "/log.txt"
|
||||
-- 0 = APPEND (adds to existing file on start)
|
||||
-- 1 = NEW (replaces existing file on start)
|
||||
config.LOG_MODE = 0
|
||||
-- RTU peripheral devices (named: side/network device name)
|
||||
-- RTU peripheral devices (name: side/network device name)
|
||||
config.RTU_DEVICES = {
|
||||
{
|
||||
name = "boilerValve_0",
|
||||
|
@ -25,7 +25,7 @@ local sna_rtu = require("rtu.dev.sna_rtu")
|
||||
local sps_rtu = require("rtu.dev.sps_rtu")
|
||||
local turbinev_rtu = require("rtu.dev.turbinev_rtu")
|
||||
|
||||
local RTU_VERSION = "beta-v0.9.8"
|
||||
local RTU_VERSION = "beta-v0.9.9"
|
||||
|
||||
local rtu_t = types.rtu_t
|
||||
|
||||
@ -257,9 +257,9 @@ local function main()
|
||||
return false
|
||||
end
|
||||
|
||||
-- CHECK: reactor is an integer >= 1
|
||||
if (not util.is_int(for_reactor)) or (for_reactor <= 0) then
|
||||
println(util.c("configure> device entry #", i, ": reactor ", for_reactor, " isn't an integer >= 1"))
|
||||
-- CHECK: reactor is an integer >= 0
|
||||
if (not util.is_int(for_reactor)) or (for_reactor < 0) then
|
||||
println(util.c("configure> device entry #", i, ": reactor ", for_reactor, " isn't an integer >= 0"))
|
||||
return false
|
||||
end
|
||||
|
||||
@ -362,7 +362,12 @@ local function main()
|
||||
|
||||
table.insert(units, rtu_unit)
|
||||
|
||||
log.debug(util.c("configure> initialized RTU unit #", #units, ": ", name, " (", rtu_type, ") [", index, "] for reactor ", for_reactor))
|
||||
local for_message = "facility"
|
||||
if for_reactor > 0 then
|
||||
for_message = util.c("reactor ", for_reactor)
|
||||
end
|
||||
|
||||
log.debug(util.c("configure> initialized RTU unit #", #units, ": ", name, " (", rtu_type, ") [", index, "] for ", for_message))
|
||||
end
|
||||
|
||||
-- we made it through all that trusting-user-to-write-a-config-file chaos
|
||||
|
Loading…
Reference in New Issue
Block a user