moved packet constructors and fixes to comms namespace references in plc comms code

This commit is contained in:
Mikayla Fischler
2022-04-21 10:26:02 -04:00
parent 04f8dc7d75
commit 4842f9cb0d
6 changed files with 153 additions and 139 deletions

View File

@@ -153,7 +153,7 @@ function rtu_comms(modem, local_port, server_port)
if s_pkt.is_valid() then
-- get as MODBUS TCP packet
if s_pkt.protocol() == PROTOCOLS.MODBUS_TCP then
local m_pkt = modbus.packet()
local m_pkt = comms.modbus_packet()
if m_pkt.decode(s_pkt) then
pkt = m_pkt.get()
end