#8 renamed rtu_session_unit type to unit_session

This commit is contained in:
Mikayla Fischler 2022-05-13 09:49:24 -04:00
parent fc39588b2e
commit 45f5843598
4 changed files with 5 additions and 5 deletions

View File

@ -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

View File

@ -79,7 +79,7 @@ boiler.new = function (session_id, advert, out_queue)
}
}
---@class rtu_session_unit
---@class unit_session
local public = {}
-- PRIVATE FUNCTIONS --

View File

@ -58,7 +58,7 @@ emachine.new = function (session_id, advert, out_queue)
}
}
---@class rtu_session_unit
---@class unit_session
local public = {}
-- PRIVATE FUNCTIONS --

View File

@ -75,7 +75,7 @@ turbine.new = function (session_id, advert, out_queue)
}
}
---@class rtu_session_unit
---@class unit_session
local public = {}
-- PRIVATE FUNCTIONS --