Asv Mavlink Help

Heartbeat client

To work with heartbeat packets from a client, you can request the IHeartbeatClient from the device instance. It is registered by default.

var heartbeat = device.GetMicroservice<IHeartbeatClient>() ?? throw new Exception("No heartbeat client found");

After that you can, for example, subscribe to new heartbeat events:

var subscription = heartbeat.RawHeartbeat.Subscribe(payload => { if (payload == null) return; Console.WriteLine($"Heartbeat: type={payload.Type}, status={payload.SystemStatus}"); });

Or subscribe to connection quality changes:

var subscription = heartbeat.LinkQuality.Subscribe(quality => { Console.WriteLine($"Heartbeat quality: {quality}"); });

IHeartbeatClient (source)

Represents a client that sends and receives heartbeats.

Property

Type

Description

FullId

ushort

Full ID of the property.

RawHeartbeat

ReadOnlyReactiveProperty<HeartbeatPayload?>

Raw heartbeat value.

PacketRateHz

ReadOnlyReactiveProperty<double>

Packet rate in Hz.

LinkQuality

ReadOnlyReactiveProperty<double>

Quality of the link.

Link

ILinkIndicator

State of the link.

Last modified: 09 October 2025