#7 PLC session comms link, accept statuses, functional keep-alives

This commit is contained in:
Mikayla Fischler
2022-04-27 18:52:06 -04:00
parent 7f0f423450
commit f14d715070
3 changed files with 34 additions and 30 deletions

View File

@@ -34,19 +34,19 @@ end
function find_session(stype, remote_port)
if stype == SESSION_TYPE.RTU_SESSION then
for i = 1, #self.rtu_sessions do
if self.rtu_sessions[i].r_host == remote_port then
if self.rtu_sessions[i].r_port == remote_port then
return self.rtu_sessions[i]
end
end
elseif stype == SESSION_TYPE.PLC_SESSION then
for i = 1, #self.plc_sessions do
if self.plc_sessions[i].r_host == remote_port then
if self.plc_sessions[i].r_port == remote_port then
return self.plc_sessions[i]
end
end
elseif stype == SESSION_TYPE.COORD_SESSION then
for i = 1, #self.coord_sessions do
if self.coord_sessions[i].r_host == remote_port then
if self.coord_sessions[i].r_port == remote_port then
return self.coord_sessions[i]
end
end