#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

@@ -465,11 +465,15 @@ function coordinator.comms(version, modem, sv_port, sv_listen, api_listen, range
end
elseif packet.type == SCADA_CRDN_TYPES.UNIT_BUILDS then
-- record builds
if iocontrol.record_unit_builds(packet.data) then
-- acknowledge receipt of builds
_send_sv(PROTOCOLS.SCADA_CRDN, SCADA_CRDN_TYPES.UNIT_BUILDS, {})
if packet.length == 1 then
if iocontrol.record_unit_builds(packet.data[1]) then
-- acknowledge receipt of builds
_send_sv(PROTOCOLS.SCADA_CRDN, SCADA_CRDN_TYPES.UNIT_BUILDS, {})
else
log.error("received invalid UNIT_BUILDS packet")
end
else
log.error("received invalid UNIT_BUILDS packet")
log.debug("UNIT_BUILDS packet length mismatch")
end
elseif packet.type == SCADA_CRDN_TYPES.UNIT_STATUSES then
-- update statuses