#140 partial build packet updates

This commit is contained in:
Mikayla Fischler
2023-02-20 00:49:37 -05:00
parent c4f6c1b289
commit 1be57aaf13
17 changed files with 128 additions and 81 deletions

View File

@@ -385,12 +385,12 @@ function rtu.new_session(id, in_queue, out_queue, timeout, advertisement, facili
_send_modbus(msg.message)
elseif msg.qtype == mqueue.TYPE.COMMAND then
-- handle instruction
local cmd = msg.message
if cmd == unit_session.RTU_US_CMDS.BUILD_CHANGED then
self.out_q.push_command(svqtypes.SV_Q_CMDS.BUILD_CHANGED)
end
elseif msg.qtype == mqueue.TYPE.DATA then
-- instruction with body
local cmd = msg.message ---@type queue_data
if cmd.key == unit_session.RTU_US_DATA.BUILD_CHANGED then
self.out_q.push_data(svqtypes.SV_Q_DATA.RTU_BUILD_CHANGED, cmd.val)
end
end
end
end