2022-05-04 17:37:01 +00:00
|
|
|
local rsio = require("scada-common.rsio")
|
|
|
|
|
|
|
|
local config = {}
|
2022-03-15 16:02:31 +00:00
|
|
|
|
2023-06-07 16:25:50 +00:00
|
|
|
-- supervisor comms channel
|
2023-06-05 05:13:22 +00:00
|
|
|
config.SVR_CHANNEL = 16240
|
2023-06-07 16:25:50 +00:00
|
|
|
-- RTU/MODBUS comms channel
|
2023-06-05 05:13:22 +00:00
|
|
|
config.RTU_CHANNEL = 16242
|
|
|
|
-- max trusted modem message distance (0 to disable check)
|
2023-02-07 22:31:22 +00:00
|
|
|
config.TRUSTED_RANGE = 0
|
2023-02-13 17:29:59 +00:00
|
|
|
-- time in seconds (>= 2) before assuming a remote device is no longer active
|
2023-02-13 17:27:22 +00:00
|
|
|
config.COMMS_TIMEOUT = 5
|
|
|
|
|
2022-04-29 17:36:00 +00:00
|
|
|
-- log path
|
2022-05-04 17:37:01 +00:00
|
|
|
config.LOG_PATH = "/log.txt"
|
2022-04-29 17:36:00 +00:00
|
|
|
-- log mode
|
|
|
|
-- 0 = APPEND (adds to existing file on start)
|
|
|
|
-- 1 = NEW (replaces existing file on start)
|
2022-05-04 17:37:01 +00:00
|
|
|
config.LOG_MODE = 0
|
2023-05-10 20:57:23 +00:00
|
|
|
-- true to log verbose debug messages
|
|
|
|
config.LOG_DEBUG = false
|
2023-02-13 17:27:22 +00:00
|
|
|
|
2023-02-07 22:31:22 +00:00
|
|
|
-- RTU peripheral devices (named: side/network device name)
|
2022-05-04 17:37:01 +00:00
|
|
|
config.RTU_DEVICES = {
|
2022-01-13 15:12:44 +00:00
|
|
|
{
|
2022-09-17 21:04:57 +00:00
|
|
|
name = "boilerValve_0",
|
2022-03-15 16:02:31 +00:00
|
|
|
index = 1,
|
|
|
|
for_reactor = 1
|
2022-01-13 15:12:44 +00:00
|
|
|
},
|
|
|
|
{
|
2022-09-17 21:04:57 +00:00
|
|
|
name = "turbineValve_0",
|
2022-03-15 16:02:31 +00:00
|
|
|
index = 1,
|
|
|
|
for_reactor = 1
|
2022-01-13 15:12:44 +00:00
|
|
|
}
|
|
|
|
}
|
2022-04-11 15:08:46 +00:00
|
|
|
-- RTU redstone interface definitions
|
2022-05-04 17:37:01 +00:00
|
|
|
config.RTU_REDSTONE = {
|
2022-10-03 01:17:13 +00:00
|
|
|
-- {
|
|
|
|
-- for_reactor = 1,
|
|
|
|
-- io = {
|
|
|
|
-- {
|
2022-12-01 04:31:14 +00:00
|
|
|
-- port = rsio.IO.WASTE_PO,
|
2022-10-03 01:17:13 +00:00
|
|
|
-- side = "top",
|
2023-02-07 22:31:22 +00:00
|
|
|
-- bundled_color = colors.red
|
2022-10-03 01:17:13 +00:00
|
|
|
-- },
|
|
|
|
-- {
|
2022-12-01 04:31:14 +00:00
|
|
|
-- port = rsio.IO.WASTE_PU,
|
2022-10-03 01:17:13 +00:00
|
|
|
-- side = "top",
|
2023-02-07 22:31:22 +00:00
|
|
|
-- bundled_color = colors.orange
|
|
|
|
-- },
|
|
|
|
-- {
|
|
|
|
-- port = rsio.IO.WASTE_POPL,
|
|
|
|
-- side = "top",
|
|
|
|
-- bundled_color = colors.yellow
|
2022-10-03 01:17:13 +00:00
|
|
|
-- },
|
|
|
|
-- {
|
2022-12-01 04:31:14 +00:00
|
|
|
-- port = rsio.IO.WASTE_AM,
|
2022-10-03 01:17:13 +00:00
|
|
|
-- side = "top",
|
2023-02-07 22:31:22 +00:00
|
|
|
-- bundled_color = colors.lime
|
2022-10-03 01:17:13 +00:00
|
|
|
-- }
|
|
|
|
-- }
|
|
|
|
-- }
|
2022-03-15 16:02:31 +00:00
|
|
|
}
|
2022-05-04 17:37:01 +00:00
|
|
|
|
|
|
|
return config
|