diff --git a/coordinator/backplane.lua b/coordinator/backplane.lua index af04d20..8526537 100644 --- a/coordinator/backplane.lua +++ b/coordinator/backplane.lua @@ -372,9 +372,7 @@ function backplane.detach(type, device, iface) if type == "modem" then ---@cast device Modem - local m_is_wl = device.isWireless() - - log.info(util.c("BKPLN: ", util.trinary(m_is_wl, "WIRELESS", "WIRED"), " PHY_DETACH ", iface)) + log.info(util.c("BKPLN: PHY_DETACH ", iface)) if wd_nic and wd_nic.is_modem(device) then wd_nic.disconnect() @@ -428,7 +426,11 @@ function backplane.detach(type, device, iface) else -- wired active disconnected, wireless unavailable end - elseif _bp.wl_nic and m_is_wl then + elseif wd_nic and wd_nic.is_modem(device) then + -- wired, but not active + log_sys("standby wired modem disconnected") + log.info("BKPLN: standby wired modem disconnected") + elseif wl_nic and wl_nic.is_modem(device) then -- wireless, but not active log_sys("standby wireless modem disconnected") log.info("BKPLN: standby wireless modem disconnected") diff --git a/reactor-plc/backplane.lua b/reactor-plc/backplane.lua index ecc15eb..07fd967 100644 --- a/reactor-plc/backplane.lua +++ b/reactor-plc/backplane.lua @@ -249,9 +249,7 @@ function backplane.detach(iface, type, device, print_no_fp) elseif _bp.smem.networked and type == "modem" then ---@cast device Modem - local m_is_wl = device.isWireless() - - log.info(util.c("BKPLN: ", util.trinary(m_is_wl, "WIRELESS", "WIRED"), " PHY_DETACH ", iface)) + log.info(util.c("BKPLN: PHY_DETACH ", iface)) if wd_nic and wd_nic.is_modem(device) then wd_nic.disconnect() @@ -304,14 +302,14 @@ function backplane.detach(iface, type, device, print_no_fp) state.degraded = true _bp.smem.q.mq_rps.push_command(MQ__RPS_CMD.DEGRADED_SCRAM) end - elseif wl_nic and m_is_wl then - -- wireless, but not active - print_no_fp("standby wireless modem disconnected") - log.info("BKPLN: standby wireless modem disconnected") elseif wd_nic and wd_nic.is_modem(device) then -- wired, but not active print_no_fp("standby wired modem disconnected") log.info("BKPLN: standby wired modem disconnected") + elseif wl_nic and wl_nic.is_modem(device) then + -- wireless, but not active + print_no_fp("standby wireless modem disconnected") + log.info("BKPLN: standby wireless modem disconnected") else print_no_fp("unassigned modem disconnected") log.warning("BKPLN: unassigned modem disconnected") diff --git a/rtu/backplane.lua b/rtu/backplane.lua index 92289b5..0027579 100644 --- a/rtu/backplane.lua +++ b/rtu/backplane.lua @@ -190,9 +190,7 @@ function backplane.detach(type, device, iface, print_no_fp) if type == "modem" then ---@cast device Modem - local m_is_wl = device.isWireless() - - log.info(util.c("BKPLN: ", util.trinary(m_is_wl, "WIRELESS", "WIRED"), " PHY_DETACH ", iface)) + log.info(util.c("BKPLN: PHY_DETACH ", iface)) if wd_nic and wd_nic.is_modem(device) then wd_nic.disconnect() @@ -239,14 +237,14 @@ function backplane.detach(type, device, iface, print_no_fp) else -- wired active disconnected, wireless unavailable end - elseif _bp.wl_nic and m_is_wl then - -- wireless, but not active - print_no_fp("standby wireless modem disconnected") - log.info("BKPLN: standby wireless modem disconnected") elseif wd_nic and wd_nic.is_modem(device) then -- wired, but not active print_no_fp("standby wired modem disconnected") log.info("BKPLN: standby wired modem disconnected") + elseif wl_nic and wl_nic.is_modem(device) then + -- wireless, but not active + print_no_fp("standby wireless modem disconnected") + log.info("BKPLN: standby wireless modem disconnected") else print_no_fp("unassigned modem disconnected") log.warning("BKPLN: unassigned modem disconnected") diff --git a/supervisor/backplane.lua b/supervisor/backplane.lua index 58cd55b..c88508b 100644 --- a/supervisor/backplane.lua +++ b/supervisor/backplane.lua @@ -129,9 +129,7 @@ function backplane.detach(iface, type, device, print_no_fp) if type == "modem" then ---@cast device Modem - local m_is_wl = device.isWireless() - - log.info(util.c("BKPLN: ", util.trinary(m_is_wl, "WIRELESS", "WIRED"), " PHY_DETACH ", iface)) + log.info(util.c("BKPLN: PHY_DETACH ", iface)) _bp.nic_map[iface] = nil @@ -159,10 +157,6 @@ function backplane.detach(iface, type, device, print_no_fp) else databus.tx_hw_wl_modem(false) end - elseif _bp.wl_nic and m_is_wl then - -- wireless, but not active - print_no_fp("standby wireless modem disconnected") - log.info("BKPLN: standby wireless modem disconnected") else print_no_fp("unassigned modem disconnected") log.warning("BKPLN: unassigned modem disconnected")