#33 lua module/require architecture changeover
This commit is contained in:
@@ -1,47 +1,49 @@
|
||||
-- #REQUIRES rsio.lua
|
||||
local rsio = require("scada-common.rsio")
|
||||
|
||||
local config = {}
|
||||
|
||||
-- port to send packets TO server
|
||||
SERVER_PORT = 16000
|
||||
config.SERVER_PORT = 16000
|
||||
-- port to listen to incoming packets FROM server
|
||||
LISTEN_PORT = 15001
|
||||
config.LISTEN_PORT = 15001
|
||||
-- log path
|
||||
LOG_PATH = "/log.txt"
|
||||
config.LOG_PATH = "/log.txt"
|
||||
-- log mode
|
||||
-- 0 = APPEND (adds to existing file on start)
|
||||
-- 1 = NEW (replaces existing file on start)
|
||||
LOG_MODE = 0
|
||||
config.LOG_MODE = 0
|
||||
-- RTU peripheral devices (named: side/network device name)
|
||||
RTU_DEVICES = {
|
||||
config.RTU_DEVICES = {
|
||||
{
|
||||
name = "boiler_0",
|
||||
name = "boiler_1",
|
||||
index = 1,
|
||||
for_reactor = 1
|
||||
},
|
||||
{
|
||||
name = "turbine_0",
|
||||
name = "turbine_1",
|
||||
index = 1,
|
||||
for_reactor = 1
|
||||
}
|
||||
}
|
||||
-- RTU redstone interface definitions
|
||||
RTU_REDSTONE = {
|
||||
config.RTU_REDSTONE = {
|
||||
{
|
||||
for_reactor = 1,
|
||||
io = {
|
||||
{
|
||||
channel = rsio.RS_IO.WASTE_PO,
|
||||
channel = rsio.IO.WASTE_PO,
|
||||
side = "top",
|
||||
bundled_color = colors.blue,
|
||||
for_reactor = 1
|
||||
},
|
||||
{
|
||||
channel = rsio.RS_IO.WASTE_PU,
|
||||
channel = rsio.IO.WASTE_PU,
|
||||
side = "top",
|
||||
bundled_color = colors.cyan,
|
||||
for_reactor = 1
|
||||
},
|
||||
{
|
||||
channel = rsio.RS_IO.WASTE_AM,
|
||||
channel = rsio.IO.WASTE_AM,
|
||||
side = "top",
|
||||
bundled_color = colors.purple,
|
||||
for_reactor = 1
|
||||
@@ -49,3 +51,5 @@ RTU_REDSTONE = {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return config
|
||||
|
||||
Reference in New Issue
Block a user