Advertisement
Fyrhtu

config.lua

Apr 10th, 2023 (edited)
2,883
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local rsio = require("scada-common.rsio")
  2.  
  3. local config = {}
  4.  
  5. -- port to send packets TO server
  6. config.SERVER_PORT = 16000
  7. -- port to listen to incoming packets FROM server
  8. config.LISTEN_PORT = 15001
  9. -- max trusted modem message distance (< 1 to disable check)
  10. config.TRUSTED_RANGE = 0
  11. -- time in seconds (>= 2) before assuming a remote device is no longer active
  12. config.COMMS_TIMEOUT = 5
  13.  
  14. -- log path
  15. config.LOG_PATH = "/log.txt"
  16. -- log mode
  17. --  0 = APPEND (adds to existing file on start)
  18. --  1 = NEW (replaces existing file on start)
  19. config.LOG_MODE = 1
  20.  
  21. -- RTU peripheral devices (named: side/network device name)
  22. config.RTU_DEVICES = {
  23.     {
  24.         name = "boilerValve_0",
  25.         index = 1,
  26.         for_reactor = 1
  27.     },
  28.     {
  29.         name = "turbineValve_0",
  30.         index = 1,
  31.         for_reactor = 1
  32.     },
  33.     {
  34.         name = "turbineValve_2",
  35.         index = 2,
  36.         for_reactor = 1
  37.     }
  38.     {
  39.         name = "inductionPort_0",
  40.         index = 1,
  41.         for_reactor = 0
  42.     }
  43.     {
  44.         name = "environmentDetector_0",
  45.         index = 1,
  46.         for_reactor = 1
  47.     }
  48. }
  49. - RTU redstone interface definitions
  50. config.RTU_REDSTONE = {
  51.     -- {
  52.     --     for_reactor = 1,
  53.     --     io = {
  54.     --         {
  55.     --             port = rsio.IO.WASTE_PO,
  56.     --             side = "top",
  57.     --             bundled_color = colors.red
  58.     --         },
  59.     --         {
  60.     --             port = rsio.IO.WASTE_PU,
  61.     --             side = "top",
  62.     --             bundled_color = colors.orange
  63.     --         },
  64.     --         {
  65.     --             port = rsio.IO.WASTE_POPL,
  66.     --             side = "top",
  67.     --             bundled_color = colors.yellow
  68.     --         },
  69.     --         {
  70.     --             port = rsio.IO.WASTE_AM,
  71.     --             side = "top",
  72.     --             bundled_color = colors.lime
  73.     --         }
  74.     --     }
  75.     -- }
  76. }
  77.  
  78. return config
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement