Heartbeat client
To work with heartbeat packets from a client, you can request the IHeartbeatClient from the device instance. It is registered by default.
After that you can, for example, subscribe to new heartbeat events:
Or subscribe to connection quality changes:
HeartbeatClientConfig
Property | Type | Default | Description |
|---|---|---|---|
|
|
| Time without a heartbeat before the link indicator is downgraded. |
|
|
| Number of link downgrade events tolerated before disconnection. |
|
|
| Moving-average filter size used to calculate |
|
|
| Interval for logging packet rate and link quality. A non-positive value disables it. |
|
|
| Enables logging of link state changes. |
IHeartbeatClient
Represents a client that receives heartbeats and monitors the connection to a target device.
Property | Type | Description |
|---|---|---|
|
| Combined system and component ID of the target device. |
|
| Most recently received heartbeat payload. |
|
| Receive rate of all MAVLink packets from the target device, in packets per second. |
|
| Packet sequence quality for all MAVLink packets received from the target device. |
|
| State of the heartbeat connection. |
WhenRepairConnection
WhenRepairConnection(TimeSpan lostTime, CancellationToken cancel = default) creates an observable intended to report a restored connection after it has been disconnected longer than lostTime.