cc-mek-scada/rtu/dev/envd_rtu.lua

28 lines
472 B
Lua
Raw Normal View History

2022-06-04 14:49:36 +00:00
local rtu = require("rtu.rtu")
local envd_rtu = {}
-- create new environment detector device
2023-02-22 04:50:43 +00:00
---@nodiscard
2022-06-04 14:49:36 +00:00
---@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