mirror of
https://github.com/MikaylaFischler/cc-mek-scada.git
synced 2024-08-30 18:22:34 +00:00
27 lines
458 B
Lua
27 lines
458 B
Lua
|
local rtu = require("rtu.rtu")
|
||
|
|
||
|
local envd_rtu = {}
|
||
|
|
||
|
-- create new environment detector device
|
||
|
---@param envd table
|
||
|
function envd_rtu.new(envd)
|
||
|
local unit = rtu.init_unit()
|
||
|
|
||
|
-- discrete inputs --
|
||
|
-- none
|
||
|
|
||
|
-- coils --
|
||
|
-- none
|
||
|
|
||
|
-- input registers --
|
||
|
unit.connect_input_reg(envd.getRadiation)
|
||
|
unit.connect_input_reg(envd.getRadiationRaw)
|
||
|
|
||
|
-- holding registers --
|
||
|
-- none
|
||
|
|
||
|
return unit.interface()
|
||
|
end
|
||
|
|
||
|
return envd_rtu
|