diff --git a/coordinator/coordinator.lua b/coordinator/coordinator.lua index d8d43a2..f12d586 100644 --- a/coordinator/coordinator.lua +++ b/coordinator/coordinator.lua @@ -515,7 +515,7 @@ function coordinator.comms(version, modem, sv_port, sv_listen, api_listen, range elseif packet.type == SCADA_CRDN_TYPE.UNIT_STATUSES then -- update statuses if not iocontrol.update_unit_statuses(packet.data) then - log.error("received invalid UNIT_STATUSES packet") + log.debug("received invalid UNIT_STATUSES packet") end elseif packet.type == SCADA_CRDN_TYPE.UNIT_CMD then -- unit command acknowledgement @@ -551,7 +551,7 @@ function coordinator.comms(version, modem, sv_port, sv_listen, api_listen, range log.debug("SCADA_CRDN unit command ack packet length mismatch") end else - log.warning("received unknown SCADA_CRDN packet type " .. packet.type) + log.debug("received unknown SCADA_CRDN packet type " .. packet.type) end else log.debug("discarding SCADA_CRDN packet before linked") @@ -606,11 +606,11 @@ function coordinator.comms(version, modem, sv_port, sv_listen, api_listen, range end elseif est_ack == ESTABLISH_ACK.COLLISION then if self.last_est_ack ~= est_ack then - log.info("supervisor connection denied due to collision") + log.warning("supervisor connection denied due to collision") end elseif est_ack == ESTABLISH_ACK.BAD_VERSION then if self.last_est_ack ~= est_ack then - log.info("supervisor comms version mismatch") + log.warning("supervisor comms version mismatch") end else log.debug("SCADA_MGMT establish packet reply (len = 1) unsupported") diff --git a/coordinator/startup.lua b/coordinator/startup.lua index d59e528..7ebd49e 100644 --- a/coordinator/startup.lua +++ b/coordinator/startup.lua @@ -19,7 +19,7 @@ local iocontrol = require("coordinator.iocontrol") local renderer = require("coordinator.renderer") local sounder = require("coordinator.sounder") -local COORDINATOR_VERSION = "v0.12.6" +local COORDINATOR_VERSION = "v0.12.7" local println = util.println local println_ts = util.println_ts diff --git a/reactor-plc/plc.lua b/reactor-plc/plc.lua index 96dc446..39b2fb1 100644 --- a/reactor-plc/plc.lua +++ b/reactor-plc/plc.lua @@ -774,8 +774,10 @@ function plc.comms(id, version, modem, local_port, server_port, range, reactor, -- print a log message to the terminal as long as the UI isn't running local function println_ts(message) if not plc_state.fp_ok then util.println_ts(message) end end + local l_port = packet.scada_frame.local_port() + -- handle packets now that we have prints setup - if packet.scada_frame.local_port() == local_port then + if l_port == local_port then -- check sequence number if self.r_seq_num == nil then self.r_seq_num = packet.scada_frame.seq_num() @@ -1040,6 +1042,8 @@ function plc.comms(id, version, modem, local_port, server_port, range, reactor, -- should be unreachable assuming packet is from parse_packet() log.error("illegal packet type " .. protocol, true) end + else + log.debug("received packet on unconfigured channel " .. l_port, true) end end diff --git a/reactor-plc/startup.lua b/reactor-plc/startup.lua index 1eb4120..17be32a 100644 --- a/reactor-plc/startup.lua +++ b/reactor-plc/startup.lua @@ -18,7 +18,7 @@ local plc = require("reactor-plc.plc") local renderer = require("reactor-plc.renderer") local threads = require("reactor-plc.threads") -local R_PLC_VERSION = "v1.1.7" +local R_PLC_VERSION = "v1.1.8" local println = util.println local println_ts = util.println_ts diff --git a/rtu/rtu.lua b/rtu/rtu.lua index b8dee99..2690f90 100644 --- a/rtu/rtu.lua +++ b/rtu/rtu.lua @@ -313,7 +313,7 @@ function rtu.comms(version, modem, local_port, server_port, range, conn_watchdog pkt = mgmt_pkt.get() end else - log.error("illegal packet type " .. s_pkt.protocol(), true) + log.debug("illegal packet type " .. s_pkt.protocol(), true) end end @@ -379,7 +379,7 @@ function rtu.comms(version, modem, local_port, server_port, range, conn_watchdog else -- unit ID out of range? reply = modbus.reply__gw_unavailable(packet) - log.error("received MODBUS packet for non-existent unit") + log.debug("received MODBUS packet for non-existent unit") end public.send_modbus(reply) @@ -447,7 +447,7 @@ function rtu.comms(version, modem, local_port, server_port, range, conn_watchdog public.send_advertisement(units) else -- not supported - log.warning("received unsupported SCADA_MGMT message type " .. packet.type) + log.debug("received unsupported SCADA_MGMT message type " .. packet.type) end else log.debug("discarding non-link SCADA_MGMT packet before linked") diff --git a/rtu/startup.lua b/rtu/startup.lua index 2ebbd8d..10fc24e 100644 --- a/rtu/startup.lua +++ b/rtu/startup.lua @@ -25,7 +25,7 @@ local sna_rtu = require("rtu.dev.sna_rtu") local sps_rtu = require("rtu.dev.sps_rtu") local turbinev_rtu = require("rtu.dev.turbinev_rtu") -local RTU_VERSION = "v0.13.3" +local RTU_VERSION = "v0.13.4" local RTU_UNIT_TYPE = types.RTU_UNIT_TYPE diff --git a/supervisor/session/coordinator.lua b/supervisor/session/coordinator.lua index ad706e8..77ea5eb 100644 --- a/supervisor/session/coordinator.lua +++ b/supervisor/session/coordinator.lua @@ -410,7 +410,7 @@ function coordinator.new_session(id, in_queue, out_queue, timeout, facility) _send(SCADA_CRDN_TYPE.FAC_BUILDS, { facility.get_build(cmd.val.type == RTU_UNIT_TYPE.IMATRIX) }) end else - log.warning(log_header .. "unsupported data command received in in_queue (this is a bug)") + log.error(log_header .. "unsupported data command received in in_queue (this is a bug)", true) end end end diff --git a/supervisor/session/plc.lua b/supervisor/session/plc.lua index 40efd8c..656e95b 100644 --- a/supervisor/session/plc.lua +++ b/supervisor/session/plc.lua @@ -273,7 +273,7 @@ function plc.new_session(id, reactor_id, in_queue, out_queue, timeout) if pkt.length == 1 then return pkt.data[1] else - log.warning(log_header .. "RPLC ACK length mismatch") + log.debug(log_header .. "RPLC ACK length mismatch") return nil end end @@ -295,7 +295,7 @@ function plc.new_session(id, reactor_id, in_queue, out_queue, timeout) if pkt.scada_frame.protocol() == PROTOCOL.RPLC then -- check reactor ID if pkt.id ~= reactor_id then - log.warning(log_header .. "RPLC packet with ID not matching reactor ID: reactor " .. reactor_id .. " != " .. pkt.id) + log.warning(log_header .. "discarding RPLC packet with ID not matching reactor ID: reactor " .. reactor_id .. " != " .. pkt.id) return end @@ -633,7 +633,7 @@ function plc.new_session(id, reactor_id, in_queue, out_queue, timeout) _send(RPLC_TYPE.RPS_AUTO_RESET, {}) end else - log.warning(log_header .. "unsupported command received in in_queue (this is a bug)") + log.error(log_header .. "unsupported command received in in_queue (this is a bug)", true) end elseif message.qtype == mqueue.TYPE.DATA then -- instruction with body @@ -680,7 +680,7 @@ function plc.new_session(id, reactor_id, in_queue, out_queue, timeout) end end else - log.warning(log_header .. "unsupported data command received in in_queue (this is a bug)") + log.error(log_header .. "unsupported data command received in in_queue (this is a bug)", true) end end end diff --git a/supervisor/startup.lua b/supervisor/startup.lua index 87bd902..a731b42 100644 --- a/supervisor/startup.lua +++ b/supervisor/startup.lua @@ -14,7 +14,7 @@ local svsessions = require("supervisor.session.svsessions") local config = require("supervisor.config") local supervisor = require("supervisor.supervisor") -local SUPERVISOR_VERSION = "v0.14.4" +local SUPERVISOR_VERSION = "v0.14.5" local println = util.println local println_ts = util.println_ts diff --git a/supervisor/supervisor.lua b/supervisor/supervisor.lua index 937dac8..1d25ed6 100644 --- a/supervisor/supervisor.lua +++ b/supervisor/supervisor.lua @@ -327,7 +327,7 @@ function supervisor.comms(version, num_reactors, cooling_conf, modem, dev_listen log.debug("illegal packet type " .. protocol .. " on coordinator listening channel") end else - log.warning("received packet on unconfigured channel " .. l_port) + log.debug("received packet on unconfigured channel " .. l_port, true) end end end