# `EtherCAT.DC.Config`
[🔗](https://github.com/sid2baker/ethercat/blob/main/lib/ethercat/dc/config.ex#L1)

Declarative configuration for master-wide Distributed Clocks infrastructure.

Fields:
  - `:cycle_ns` — global DC cycle in nanoseconds, default `1_000_000`; must be a whole-millisecond value (`>= 1_000_000`, divisible by `1_000_000`)
  - `:await_lock?` — gate activation on DC lock detection, default `false`
  - `:lock_policy` — runtime reaction to DC lock loss: `:advisory | :recovering | :fatal`, default `:advisory`
  - `:lock_threshold_ns` — acceptable absolute sync-diff threshold, default `100`
  - `:lock_timeout_ms` — timeout while waiting for lock, default `5_000`
  - `:warmup_cycles` — optional pre-compensation cycle count, default `0`

Disable DC entirely by passing `dc: nil` to `EtherCAT.start/1`.

# `t`

```elixir
@type t() :: %EtherCAT.DC.Config{
  await_lock?: boolean(),
  cycle_ns: pos_integer(),
  lock_policy: :advisory | :recovering | :fatal,
  lock_threshold_ns: pos_integer(),
  lock_timeout_ms: pos_integer(),
  warmup_cycles: non_neg_integer()
}
```

---

*Consult [api-reference.md](api-reference.md) for complete listing*
