Namespace MavNet.Core

Classes

StateSubscription

Handle to a single state-change subscription. Dispose to unsubscribe — there is no matching -= form. Implements IDisposable so it composes cleanly with using/using var and the Blazor IDisposable page pattern.

Disposal is idempotent and thread-safe.

Structs

MavId

(SystemId, ComponentId) — the MAVLink address pair that identifies one device.

StateRate

How often a state-change subscriber wants to be called. Choose with the named factories — Raw, Hz(double), Every(TimeSpan) — rather than passing raw TimeSpan values, so call sites stay self-documenting.

Raw fires on every state-affecting packet (full fidelity, no throttling — appropriate for telemetry recorders, packet loggers, replay capture). Throttled rates fire at most once per MinInterval per subscriber.

Interfaces

IStateObservable

A source of state-change notifications with caller-controlled delivery rate. Raw delivers on every state-affecting packet; throttled rates deliver at most once per MinInterval per subscriber.

Multiple subscribers at different rates are supported and isolated — one slow subscriber does not throttle the others.

IStateObservable<TState>

A state-change source that can also deliver an immutable snapshot per fire. Prefer this overload for recording, replay, alerting, or any consumer that needs thread-safe reads of multiple fields (no torn reads across separate property gets).