mirror of
https://github.com/MikaylaFischler/cc-mek-scada.git
synced 2024-08-30 18:22:34 +00:00
comment updates for clarity around RTU gateway vs RTU
This commit is contained in:
parent
0f4a8b6dfc
commit
5597ea2097
@ -32,10 +32,10 @@ local PERIODICS = {
|
|||||||
|
|
||||||
-- create a new boilerv rtu session runner
|
-- create a new boilerv rtu session runner
|
||||||
---@nodiscard
|
---@nodiscard
|
||||||
---@param session_id integer RTU session ID
|
---@param session_id integer RTU gateway session ID
|
||||||
---@param unit_id integer RTU unit ID
|
---@param unit_id integer RTU ID
|
||||||
---@param advert rtu_advertisement RTU advertisement table
|
---@param advert rtu_advertisement RTU advertisement table
|
||||||
---@param out_queue mqueue RTU unit message out queue
|
---@param out_queue mqueue RTU message out queue
|
||||||
function boilerv.new(session_id, unit_id, advert, out_queue)
|
function boilerv.new(session_id, unit_id, advert, out_queue)
|
||||||
-- checks
|
-- checks
|
||||||
if advert.type ~= RTU_UNIT_TYPE.BOILER_VALVE then
|
if advert.type ~= RTU_UNIT_TYPE.BOILER_VALVE then
|
||||||
|
@ -44,10 +44,10 @@ local PERIODICS = {
|
|||||||
|
|
||||||
-- create a new dynamicv rtu session runner
|
-- create a new dynamicv rtu session runner
|
||||||
---@nodiscard
|
---@nodiscard
|
||||||
---@param session_id integer RTU session ID
|
---@param session_id integer RTU gateway session ID
|
||||||
---@param unit_id integer RTU unit ID
|
---@param unit_id integer RTU ID
|
||||||
---@param advert rtu_advertisement RTU advertisement table
|
---@param advert rtu_advertisement RTU advertisement table
|
||||||
---@param out_queue mqueue RTU unit message out queue
|
---@param out_queue mqueue RTU message out queue
|
||||||
function dynamicv.new(session_id, unit_id, advert, out_queue)
|
function dynamicv.new(session_id, unit_id, advert, out_queue)
|
||||||
-- checks
|
-- checks
|
||||||
if advert.type ~= RTU_UNIT_TYPE.DYNAMIC_VALVE then
|
if advert.type ~= RTU_UNIT_TYPE.DYNAMIC_VALVE then
|
||||||
|
@ -23,10 +23,10 @@ local PERIODICS = {
|
|||||||
|
|
||||||
-- create a new environment detector rtu session runner
|
-- create a new environment detector rtu session runner
|
||||||
---@nodiscard
|
---@nodiscard
|
||||||
---@param session_id integer
|
---@param session_id integer RTU gateway session ID
|
||||||
---@param unit_id integer
|
---@param unit_id integer RTU ID
|
||||||
---@param advert rtu_advertisement
|
---@param advert rtu_advertisement RTU advertisement table
|
||||||
---@param out_queue mqueue
|
---@param out_queue mqueue RTU message out queue
|
||||||
function envd.new(session_id, unit_id, advert, out_queue)
|
function envd.new(session_id, unit_id, advert, out_queue)
|
||||||
-- checks
|
-- checks
|
||||||
if advert.type ~= RTU_UNIT_TYPE.ENV_DETECTOR then
|
if advert.type ~= RTU_UNIT_TYPE.ENV_DETECTOR then
|
||||||
|
@ -32,10 +32,10 @@ local PERIODICS = {
|
|||||||
|
|
||||||
-- create a new imatrix rtu session runner
|
-- create a new imatrix rtu session runner
|
||||||
---@nodiscard
|
---@nodiscard
|
||||||
---@param session_id integer RTU session ID
|
---@param session_id integer RTU gateway session ID
|
||||||
---@param unit_id integer RTU unit ID
|
---@param unit_id integer RTU ID
|
||||||
---@param advert rtu_advertisement RTU advertisement table
|
---@param advert rtu_advertisement RTU advertisement table
|
||||||
---@param out_queue mqueue RTU unit message out queue
|
---@param out_queue mqueue RTU message out queue
|
||||||
function imatrix.new(session_id, unit_id, advert, out_queue)
|
function imatrix.new(session_id, unit_id, advert, out_queue)
|
||||||
-- checks
|
-- checks
|
||||||
if advert.type ~= RTU_UNIT_TYPE.IMATRIX then
|
if advert.type ~= RTU_UNIT_TYPE.IMATRIX then
|
||||||
|
@ -45,10 +45,10 @@ local PERIODICS = {
|
|||||||
|
|
||||||
-- create a new redstone rtu session runner
|
-- create a new redstone rtu session runner
|
||||||
---@nodiscard
|
---@nodiscard
|
||||||
---@param session_id integer
|
---@param session_id integer RTU gateway session ID
|
||||||
---@param unit_id integer
|
---@param unit_id integer RTU ID
|
||||||
---@param advert rtu_advertisement
|
---@param advert rtu_advertisement RTU advertisement table
|
||||||
---@param out_queue mqueue
|
---@param out_queue mqueue RTU message out queue
|
||||||
function redstone.new(session_id, unit_id, advert, out_queue)
|
function redstone.new(session_id, unit_id, advert, out_queue)
|
||||||
-- type check
|
-- type check
|
||||||
if advert.type ~= RTU_UNIT_TYPE.REDSTONE then
|
if advert.type ~= RTU_UNIT_TYPE.REDSTONE then
|
||||||
|
@ -29,10 +29,10 @@ local PERIODICS = {
|
|||||||
|
|
||||||
-- create a new sna rtu session runner
|
-- create a new sna rtu session runner
|
||||||
---@nodiscard
|
---@nodiscard
|
||||||
---@param session_id integer RTU session ID
|
---@param session_id integer RTU gateway session ID
|
||||||
---@param unit_id integer RTU unit ID
|
---@param unit_id integer RTU ID
|
||||||
---@param advert rtu_advertisement RTU advertisement table
|
---@param advert rtu_advertisement RTU advertisement table
|
||||||
---@param out_queue mqueue RTU unit message out queue
|
---@param out_queue mqueue RTU message out queue
|
||||||
function sna.new(session_id, unit_id, advert, out_queue)
|
function sna.new(session_id, unit_id, advert, out_queue)
|
||||||
-- type check
|
-- type check
|
||||||
if advert.type ~= RTU_UNIT_TYPE.SNA then
|
if advert.type ~= RTU_UNIT_TYPE.SNA then
|
||||||
|
@ -32,10 +32,10 @@ local PERIODICS = {
|
|||||||
|
|
||||||
-- create a new sps rtu session runner
|
-- create a new sps rtu session runner
|
||||||
---@nodiscard
|
---@nodiscard
|
||||||
---@param session_id integer RTU session ID
|
---@param session_id integer RTU gateway session ID
|
||||||
---@param unit_id integer RTU unit ID
|
---@param unit_id integer RTU ID
|
||||||
---@param advert rtu_advertisement RTU advertisement table
|
---@param advert rtu_advertisement RTU advertisement table
|
||||||
---@param out_queue mqueue RTU unit message out queue
|
---@param out_queue mqueue RTU message out queue
|
||||||
function sps.new(session_id, unit_id, advert, out_queue)
|
function sps.new(session_id, unit_id, advert, out_queue)
|
||||||
-- type check
|
-- type check
|
||||||
if advert.type ~= RTU_UNIT_TYPE.SPS then
|
if advert.type ~= RTU_UNIT_TYPE.SPS then
|
||||||
|
@ -44,10 +44,10 @@ local PERIODICS = {
|
|||||||
|
|
||||||
-- create a new turbinev rtu session runner
|
-- create a new turbinev rtu session runner
|
||||||
---@nodiscard
|
---@nodiscard
|
||||||
---@param session_id integer RTU session ID
|
---@param session_id integer RTU gateway session ID
|
||||||
---@param unit_id integer RTU unit ID
|
---@param unit_id integer RTU ID
|
||||||
---@param advert rtu_advertisement RTU advertisement table
|
---@param advert rtu_advertisement RTU advertisement table
|
||||||
---@param out_queue mqueue RTU unit message out queue
|
---@param out_queue mqueue RTU message out queue
|
||||||
function turbinev.new(session_id, unit_id, advert, out_queue)
|
function turbinev.new(session_id, unit_id, advert, out_queue)
|
||||||
-- checks
|
-- checks
|
||||||
if advert.type ~= RTU_UNIT_TYPE.TURBINE_VALVE then
|
if advert.type ~= RTU_UNIT_TYPE.TURBINE_VALVE then
|
||||||
|
@ -24,7 +24,7 @@ unit_session.RTU_US_DATA = RTU_US_DATA
|
|||||||
|
|
||||||
-- create a new unit session runner
|
-- create a new unit session runner
|
||||||
---@nodiscard
|
---@nodiscard
|
||||||
---@param session_id integer RTU session ID
|
---@param session_id integer RTU gateway session ID
|
||||||
---@param unit_id integer MODBUS unit ID
|
---@param unit_id integer MODBUS unit ID
|
||||||
---@param advert rtu_advertisement RTU advertisement for this unit
|
---@param advert rtu_advertisement RTU advertisement for this unit
|
||||||
---@param out_queue mqueue send queue
|
---@param out_queue mqueue send queue
|
||||||
@ -144,7 +144,7 @@ function unit_session.new(session_id, unit_id, advert, out_queue, log_tag, txn_t
|
|||||||
|
|
||||||
-- PUBLIC FUNCTIONS --
|
-- PUBLIC FUNCTIONS --
|
||||||
|
|
||||||
-- get the unit ID
|
-- get the RTU gateway session ID
|
||||||
---@nodiscard
|
---@nodiscard
|
||||||
function public.get_session_id() return session_id end
|
function public.get_session_id() return session_id end
|
||||||
-- get the unit ID
|
-- get the unit ID
|
||||||
|
Loading…
Reference in New Issue
Block a user