EtherCAT.Slave.Sync.Config (ethercat v0.4.2)

Copy Markdown View Source

Declarative per-slave sync and latch configuration.

This models user-facing sync intent. Master-wide Distributed Clocks still live under EtherCAT.DC.Config; this struct only describes how one slave should use SYNC0/SYNC1 and which latch edges should be surfaced by name.

Summary

Types

latch_ref()

@type latch_ref() :: {0 | 1, :pos | :neg}

mode()

@type mode() :: :free_run | :sync0 | :sync1 | nil

sync0()

@type sync0() :: %{pulse_ns: pos_integer(), shift_ns: integer()}

sync1()

@type sync1() :: %{offset_ns: non_neg_integer()}

t()

@type t() :: %EtherCAT.Slave.Sync.Config{
  latches: %{optional(atom()) => latch_ref()},
  mode: mode(),
  sync0: sync0() | nil,
  sync1: sync1() | nil
}