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

Runtime status snapshot for Distributed Clocks.

`lock_state` values:
  - `:disabled` — DC not configured for this session
  - `:inactive` — DC configured but not currently active
  - `:unavailable` — DC active, but no monitorable sync-diff stations are available
  - `:locking` — DC lock detection is active and still converging
  - `:locked` — DC lock detection reports convergence

`monitor_failures` counts consecutive runtime failures inside the
`EtherCAT.DC` worker. That includes diagnostic decode failures and
transport/runtime tick failures before the next successful DC frame.

`await_lock?` and `lock_policy` expose the configured DC contract:

- `await_lock?` applies during activation
- `lock_policy` applies after activation if lock is later lost

# `lock_policy`

```elixir
@type lock_policy() :: :advisory | :recovering | :fatal
```

# `lock_state`

```elixir
@type lock_state() :: :disabled | :inactive | :unavailable | :locking | :locked
```

# `t`

```elixir
@type t() :: %EtherCAT.DC.Status{
  active?: boolean(),
  await_lock?: boolean(),
  configured?: boolean(),
  cycle_ns: pos_integer() | nil,
  last_sync_check_at_ms: integer() | nil,
  lock_policy: lock_policy() | nil,
  lock_state: lock_state(),
  max_sync_diff_ns: non_neg_integer() | nil,
  monitor_failures: non_neg_integer(),
  reference_clock: atom() | nil,
  reference_station: non_neg_integer() | nil
}
```

---

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