mirror of
https://github.com/MikaylaFischler/cc-mek-scada.git
synced 2024-08-30 18:22:34 +00:00
#8 renamed rtu_session_unit type to unit_session
This commit is contained in:
parent
fc39588b2e
commit
45f5843598
@ -52,7 +52,7 @@ rtu.new_session = function (id, in_queue, out_queue, advertisement)
|
||||
local _parse_advertisement = function ()
|
||||
self.units = {}
|
||||
for i = 1, #self.advert do
|
||||
local unit = nil
|
||||
local unit = nil ---@type unit_session
|
||||
|
||||
---@type rtu_advertisement
|
||||
local unit_advert = {
|
||||
@ -133,7 +133,7 @@ rtu.new_session = function (id, in_queue, out_queue, advertisement)
|
||||
-- process packet
|
||||
if pkt.scada_frame.protocol() == PROTOCOLS.MODBUS_TCP then
|
||||
if self.units[pkt.unit_id] ~= nil then
|
||||
local unit = self.units[pkt.unit_id] ---@type rtu_session_unit
|
||||
local unit = self.units[pkt.unit_id] ---@type unit_session
|
||||
unit.handle_packet(pkt)
|
||||
end
|
||||
elseif pkt.scada_frame.protocol() == PROTOCOLS.SCADA_MGMT then
|
||||
|
@ -79,7 +79,7 @@ boiler.new = function (session_id, advert, out_queue)
|
||||
}
|
||||
}
|
||||
|
||||
---@class rtu_session_unit
|
||||
---@class unit_session
|
||||
local public = {}
|
||||
|
||||
-- PRIVATE FUNCTIONS --
|
||||
|
@ -58,7 +58,7 @@ emachine.new = function (session_id, advert, out_queue)
|
||||
}
|
||||
}
|
||||
|
||||
---@class rtu_session_unit
|
||||
---@class unit_session
|
||||
local public = {}
|
||||
|
||||
-- PRIVATE FUNCTIONS --
|
||||
|
@ -75,7 +75,7 @@ turbine.new = function (session_id, advert, out_queue)
|
||||
}
|
||||
}
|
||||
|
||||
---@class rtu_session_unit
|
||||
---@class unit_session
|
||||
local public = {}
|
||||
|
||||
-- PRIVATE FUNCTIONS --
|
||||
|
Loading…
Reference in New Issue
Block a user