Skip to main content
Version: 1.1.1

ecnet::BusFault

Structured description of a cyclic-bus fault, built when the cycle-health watchdog trips (see [NetworkConfig::watchdog_low_wkc_cycles](/lxmaster/api/classes/NetworkConfig#variable-watchdog-low-wkc-cycles)). More...

#include <bus_fault.hpp>

Public Attributes

Name
intwkc
Work counter observed on the tripping cycle and the expected value.
booloccurred
True when a fault was detected and this struct is meaningful.
std::vector< LostSlave >lost_slaves
Slaves that stopped responding (downstream of the break).
intexpected_wkc
std::stringdescription
Pre-rendered human-readable summary so simple apps can just print it.
std::stringbreak_slave_name
SII/ENI name of break_slave (empty when break_slave == 0).
intbreak_slave
1-based bus index of the still-responding slave whose downstream port dropped its link.
intbreak_port
ESC port index (0-3) on break_slave whose link dropped, or -1 if unknown.

Detailed Description

struct ecnet::BusFault;

Structured description of a cyclic-bus fault, built when the cycle-health watchdog trips (see [NetworkConfig::watchdog_low_wkc_cycles](/lxmaster/api/classes/NetworkConfig#variable-watchdog-low-wkc-cycles)).

Delivered to the application through the optional [NetworkConfig::on_bus_fault](/lxmaster/api/classes/NetworkConfig#variable-on-bus-fault) callback and also used by lxmaster to render the default lastError() / reportDeviceStatus() text.

The break point is reconstructed from the standard DL-status register (0x0110): the still-responding slave whose previously-active port lost its link is the upstream side of the cable break, and lost_slaves are the devices that went silent behind it.

Public Attributes Documentation

variable wkc

int wkc {0};

Work counter observed on the tripping cycle and the expected value.

variable occurred

bool occurred {false};

True when a fault was detected and this struct is meaningful.

variable lost_slaves

std::vector< LostSlave > lost_slaves;

Slaves that stopped responding (downstream of the break).

variable expected_wkc

int expected_wkc {0};

variable description

std::string description;

Pre-rendered human-readable summary so simple apps can just print it.

variable break_slave_name

std::string break_slave_name;

SII/ENI name of break_slave (empty when break_slave == 0).

variable break_slave

int break_slave {0};

1-based bus index of the still-responding slave whose downstream port dropped its link.

0 means no responder showed a dropped port (break at the master / first link).

variable break_port

int break_port {-1};

ESC port index (0-3) on break_slave whose link dropped, or -1 if unknown.


Updated on 2026-07-13 at 20:44:41 +0000