This is the development version of the documentation. It may change before the next release. See 0.6.x for the latest release.
EtherCrab
EtherCrabLink is a Link implementation using EtherCrab, an EtherCAT master written in Rust.
Because it handles an Ethernet raw socket, running it on Linux/macOS requires root privileges (or CAP_NET_RAW).
On Windows, npcap must be installed in “WinPcap API-compatible mode”.
EtherCrabLinkOption { iface, sync0_period, sync0_shift, sync_tolerance, sync_timeout,};ethercrab.EtherCrabLinkOption( iface, sync0_period, sync0_shift, sync_tolerance, sync_timeout,)new EtherCrabLinkOption( iface, sync0Period, sync0Shift, syncTolerance, syncTimeout);| Field | Type | Description |
|---|---|---|
iface |
Interface |
network interface to use. Interface::Auto for automatic selection, Interface::Name(..) to specify by name |
sync0_period |
Duration |
period of the SYNC0 signal |
sync0_shift |
Duration |
shift amount of the SYNC0 signal |
sync_tolerance |
Duration |
tolerance considered as synchronization complete |
sync_timeout |
Duration |
timeout to wait for synchronization to complete |
EtherCrabLinkOptionFull, which fully configures EtherCrab, is also provided (Rust only).
EtherCrabLinkOptionFull { iface, timeouts, main_device_config, dc_configuration, sync_tolerance, sync_timeout, tx_rx_priority, tx_rx_policy, tx_rx_affinity,};| Field | Type | Description |
|---|---|---|
iface |
Interface |
network interface to use. Interface::Auto for automatic selection, Interface::Name(..) to specify by name |
timeouts |
ethercrab::Timeouts |
see the EtherCrab documentation |
main_device_config |
ethercrab::MainDeviceConfig |
see the EtherCrab documentation |
dc_configuration |
ethercrab::subdevice_group::DcConfiguration |
see the EtherCrab documentation |
sync_tolerance |
Duration |
tolerance considered as synchronization complete |
sync_timeout |
Duration |
timeout to wait for synchronization to complete |
tx_rx_priority |
Option<ThreadPriority> |
RT priority of the dedicated tx/rx thread. Defaults to 90 outside Windows. It must stay above ClientConfig.rt_priority (default 80): throughput drops with lower value |
tx_rx_policy |
RtSchedulePolicy |
scheduling policy used when tx_rx_priority is set (Normal / Fifo / RoundRobin) |
tx_rx_affinity |
Option<CoreId> |
CPU core affinity of the tx/rx thread (OS default if unspecified) |