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

View File

@@ -17,7 +17,7 @@ os.loadAPI("dev/boiler_rtu.lua")
os.loadAPI("dev/imatrix_rtu.lua")
os.loadAPI("dev/turbine_rtu.lua")
local RTU_VERSION = "alpha-v0.2.0"
local RTU_VERSION = "alpha-v0.2.1"
local print = util.print
local println = util.println