cc-mek-scada/rtu/config.lua

64 lines
1.6 KiB
Lua
Raw Normal View History

local rsio = require("scada-common.rsio")
local config = {}
2022-03-15 16:02:31 +00:00
-- port to send packets TO server
config.SERVER_PORT = 16000
-- port to listen to incoming packets FROM server
config.LISTEN_PORT = 15001
-- max trusted modem message distance (< 1 to disable check)
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
config.COMMS_TIMEOUT = 5
2022-04-29 17:36:00 +00:00
-- log path
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)
config.LOG_MODE = 0
-- RTU peripheral devices (named: side/network device name)
config.RTU_DEVICES = {
2022-01-13 15:12:44 +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
},
{
name = "turbineValve_0",
2022-03-15 16:02:31 +00:00
index = 1,
for_reactor = 1
2022-01-13 15:12:44 +00:00
}
}
-- RTU redstone interface definitions
config.RTU_REDSTONE = {
2022-10-03 01:17:13 +00:00
-- {
-- for_reactor = 1,
-- io = {
-- {
-- port = rsio.IO.WASTE_PO,
2022-10-03 01:17:13 +00:00
-- side = "top",
-- bundled_color = colors.red
2022-10-03 01:17:13 +00:00
-- },
-- {
-- port = rsio.IO.WASTE_PU,
2022-10-03 01:17:13 +00:00
-- side = "top",
-- bundled_color = colors.orange
-- },
-- {
-- port = rsio.IO.WASTE_POPL,
-- side = "top",
-- bundled_color = colors.yellow
2022-10-03 01:17:13 +00:00
-- },
-- {
-- port = rsio.IO.WASTE_AM,
2022-10-03 01:17:13 +00:00
-- side = "top",
-- bundled_color = colors.lime
2022-10-03 01:17:13 +00:00
-- }
-- }
-- }
2022-03-15 16:02:31 +00:00
}
return config