type · Browser and Node
MeshEvent
@toip-tools/mesh-transportView sourceimport { type MeshEvent } from "@toip-tools/mesh-transport";
Declaration
type MeshEvent =
| { type: "frame-out"; link: string; bytes: number; airtimeMs: number; summary: string }
| { type: "frame-in"; link: string; bytes: number; rssi?: number; snr?: number; summary: string }
| { type: "packet-in"; pid: string; kind: PacketKind; forMe: boolean }
/** A packet built from a posted TSP message, before its first frame goes out. `wireBytes` is the TSP message's size. */
| { type: "packet-out"; pid: string; kind: PacketKind; from: string; to: string; route: "direct" | "flood" | "gateway"; bytes: number; frames: number; wireBytes: number }
| { type: "retry"; pid: string; round: number; missing: number[] }
| { type: "delivered"; pid: string; to: string; route: "direct" | "flood" | "gateway" }
| { type: "custody"; pid: string; gateway: string }
| { type: "queued"; pid: string; reason: "no-route" | "no-airtime" | "no-answer" }
| { type: "budget"; link: string; usedFraction: number; waitMs: number; warning?: string }
| { type: "dropped"; reason: string };