# `EtherCAT.Simulator.Transport.Raw.Fault`
[🔗](https://github.com/sid2baker/ethercat/blob/main/lib/ethercat/simulator/transport/raw/fault.ex#L1)

Builder API for `EtherCAT.Simulator.Transport.Raw.inject_fault/1`.

Raw transport faults model behavior at the raw-wire endpoint boundary, not at
the simulator core. They are mode-aware: single-link raw only exposes the
primary endpoint, while redundant raw can target both primary and secondary
endpoints independently.

Typical usage:

    alias EtherCAT.Simulator.Transport.Raw
    alias EtherCAT.Simulator.Transport.Raw.Fault

    Raw.inject_fault(Fault.delay_response(200))
    Raw.inject_fault(Fault.delay_response(200, endpoint: :secondary, from_ingress: :primary))
    Fault.describe(Fault.delay_response(50, endpoint: :primary, from_ingress: :secondary))

# `endpoint_selector`

```elixir
@type endpoint_selector() :: :primary | :secondary | :all
```

# `from_ingress`

```elixir
@type from_ingress() :: :primary | :secondary | :all
```

# `t`

```elixir
@type t() :: %EtherCAT.Simulator.Transport.Raw.Fault{
  delay_ms: non_neg_integer(),
  endpoint: endpoint_selector(),
  from_ingress: from_ingress(),
  kind: :delay_response
}
```

# `delay_response`

```elixir
@spec delay_response(
  non_neg_integer(),
  keyword()
) :: t()
```

# `describe`

```elixir
@spec describe(t() | EtherCAT.Simulator.Transport.Raw.fault()) :: String.t()
```

# `normalize`

```elixir
@spec normalize(t() | EtherCAT.Simulator.Transport.Raw.fault()) ::
  {:ok, EtherCAT.Simulator.Transport.Raw.fault()} | :error
```

---

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