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
|
||||
---@nodiscard
|
||||
---@param session_id integer RTU session ID
|
||||
---@param unit_id integer RTU unit ID
|
||||
---@param session_id integer RTU gateway session ID
|
||||
---@param unit_id integer RTU ID
|
||||
---@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)
|
||||
-- checks
|
||||
if advert.type ~= RTU_UNIT_TYPE.BOILER_VALVE then
|
||||
|
@ -44,10 +44,10 @@ local PERIODICS = {
|
||||
|
||||
-- create a new dynamicv rtu session runner
|
||||
---@nodiscard
|
||||
---@param session_id integer RTU session ID
|
||||
---@param unit_id integer RTU unit ID
|
||||
---@param session_id integer RTU gateway session ID
|
||||
---@param unit_id integer RTU ID
|
||||
---@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)
|
||||
-- checks
|
||||
if advert.type ~= RTU_UNIT_TYPE.DYNAMIC_VALVE then
|
||||
|
@ -23,10 +23,10 @@ local PERIODICS = {
|
||||
|
||||
-- create a new environment detector rtu session runner
|
||||
---@nodiscard
|
||||
---@param session_id integer
|
||||
---@param unit_id integer
|
||||
---@param advert rtu_advertisement
|
||||
---@param out_queue mqueue
|
||||
---@param session_id integer RTU gateway session ID
|
||||
---@param unit_id integer RTU ID
|
||||
---@param advert rtu_advertisement RTU advertisement table
|
||||
---@param out_queue mqueue RTU message out queue
|
||||
function envd.new(session_id, unit_id, advert, out_queue)
|
||||
-- checks
|
||||
if advert.type ~= RTU_UNIT_TYPE.ENV_DETECTOR then
|
||||
|
@ -32,10 +32,10 @@ local PERIODICS = {
|
||||
|
||||
-- create a new imatrix rtu session runner
|
||||
---@nodiscard
|
||||
---@param session_id integer RTU session ID
|
||||
---@param unit_id integer RTU unit ID
|
||||
---@param session_id integer RTU gateway session ID
|
||||
---@param unit_id integer RTU ID
|
||||
---@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)
|
||||
-- checks
|
||||
if advert.type ~= RTU_UNIT_TYPE.IMATRIX then
|
||||
|
@ -45,10 +45,10 @@ local PERIODICS = {
|
||||
|
||||
-- create a new redstone rtu session runner
|
||||
---@nodiscard
|
||||
---@param session_id integer
|
||||
---@param unit_id integer
|
||||
---@param advert rtu_advertisement
|
||||
---@param out_queue mqueue
|
||||
---@param session_id integer RTU gateway session ID
|
||||
---@param unit_id integer RTU ID
|
||||
---@param advert rtu_advertisement RTU advertisement table
|
||||
---@param out_queue mqueue RTU message out queue
|
||||
function redstone.new(session_id, unit_id, advert, out_queue)
|
||||
-- type check
|
||||
if advert.type ~= RTU_UNIT_TYPE.REDSTONE then
|
||||
|
@ -29,10 +29,10 @@ local PERIODICS = {
|
||||
|
||||
-- create a new sna rtu session runner
|
||||
---@nodiscard
|
||||
---@param session_id integer RTU session ID
|
||||
---@param unit_id integer RTU unit ID
|
||||
---@param session_id integer RTU gateway session ID
|
||||
---@param unit_id integer RTU ID
|
||||
---@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)
|
||||
-- type check
|
||||
if advert.type ~= RTU_UNIT_TYPE.SNA then
|
||||
|
@ -32,10 +32,10 @@ local PERIODICS = {
|
||||
|
||||
-- create a new sps rtu session runner
|
||||
---@nodiscard
|
||||
---@param session_id integer RTU session ID
|
||||
---@param unit_id integer RTU unit ID
|
||||
---@param session_id integer RTU gateway session ID
|
||||
---@param unit_id integer RTU ID
|
||||
---@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)
|
||||
-- type check
|
||||
if advert.type ~= RTU_UNIT_TYPE.SPS then
|
||||
|
@ -44,10 +44,10 @@ local PERIODICS = {
|
||||
|
||||
-- create a new turbinev rtu session runner
|
||||
---@nodiscard
|
||||
---@param session_id integer RTU session ID
|
||||
---@param unit_id integer RTU unit ID
|
||||
---@param session_id integer RTU gateway session ID
|
||||
---@param unit_id integer RTU ID
|
||||
---@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)
|
||||
-- checks
|
||||
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
|
||||
---@nodiscard
|
||||
---@param session_id integer RTU session ID
|
||||
---@param session_id integer RTU gateway session ID
|
||||
---@param unit_id integer MODBUS unit ID
|
||||
---@param advert rtu_advertisement RTU advertisement for this unit
|
||||
---@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 --
|
||||
|
||||
-- get the unit ID
|
||||
-- get the RTU gateway session ID
|
||||
---@nodiscard
|
||||
function public.get_session_id() return session_id end
|
||||
-- get the unit ID
|
||||
|
Loading…
Reference in New Issue
Block a user