type · Browser and Node

# SimFault

`@toip-tools/mesh-transport/sim` · [View source](https://github.com/yourbuddyconner/toip-tools/blob/main/packages/mesh-transport/src/sim.ts#L39)

Import:

```ts
import { type SimFault } from "@toip-tools/mesh-transport/sim";
```

## Declaration

type:

```ts
type SimFault =
  | { kind: "drop"; from?: string; to?: string; match?: (bytes: Uint8Array) => boolean; count?: number }
  | { kind: "duplicate"; from?: string; to?: string; match?: (bytes: Uint8Array) => boolean; count?: number }
  /** Delays delivery by `delayMs`, so later frames overtake it. */
  | { kind: "delay"; from?: string; to?: string; match?: (bytes: Uint8Array) => boolean; count?: number; delayMs: number }
  /** Flips a byte. Without `passCrc` the radio's CRC catches it and the frame is lost. */
  | { kind: "corrupt"; from?: string; to?: string; match?: (bytes: Uint8Array) => boolean; count?: number; passCrc?: boolean };
```

[Usage guide](https://toip.tools/toolkit/mesh-transport/#usage) · [Error handling](https://toip.tools/toolkit/mesh-transport/#errors) · [All exports](https://toip.tools/toolkit/mesh-transport/api/sim/)

---

This is the Markdown version of https://toip.tools/toolkit/mesh-transport/api/sim/SimFault/. An index of the documentation for AI assistants is at https://toip.tools/llms.txt.
