Asv Mavlink Help

Frame client

To work with the frame configuration from the client side, request the IFrameClient microservice from a device instance.

var frameClient = device.GetMicroservice<IFrameClient>() ?? throw new Exception("No frame client found");

Usage

First, load the list of available frame configurations from the connected device:

// Load available frames from the device await frameClient.RefreshAvailableFrames(); // Access the available frames through the Frames property foreach (var frame in frameClient.Frames.Values) { Console.WriteLine($"Frame: {frame.Id}"); }

Get the current frame configuration:

// Load available frames first await frameClient.RefreshAvailableFrames(); await frameClient.RefreshCurrentFrame(); var subscription = frameClient.CurrentFrame.Subscribe(currentFrame => { if (currentFrame is null) { return; } Console.WriteLine($"Current frame: {currentFrame}"); });

Update the frame configuration:

// Load available frames first await frameClient.RefreshAvailableFrames(); // Select a frame from the Frames collection var selectedFrame = frameClient.Frames.Values.First(); // Apply the new frame configuration await frameClient.SetFrame(selectedFrame);

IFrameClient

Property

Type

Description

Frames

IReadOnlyObservableDictionary<string, IDroneFrame>

Supported drone frames. Populated by RefreshAvailableFrames().

CurrentFrame

ReadOnlyReactiveProperty<IDroneFrame?>

Currently selected frame, or null when it cannot be matched or has not been refreshed.

Method

Return Type

Description

RefreshAvailableFrames(CancellationToken cancel = default)

ValueTask

Rebuilds the Frames collection from the device.

SetFrame(IDroneFrame droneFrameToSet, CancellationToken cancel = default)

Task

Updates the frame type for the current device.

RefreshCurrentFrame(CancellationToken cancel = default)

Task

Refreshes the current frame configuration and starts reactively updating CurrentFrame when the frame parameters change.

IFrameClient.RefreshAvailableFrames

Parameter

Type

Description

cancel

CancellationToken

An optional token to cancel the operation.

IFrameClient.SetFrame

Parameter

Type

Description

droneFrameToSet

IDroneFrame

Frame type to use.

cancel

CancellationToken

An optional token to cancel the operation.

IFrameClient.RefreshCurrentFrame

Parameter

Type

Description

cancel

CancellationToken

An optional token to cancel the operation.

Implementations

Different vehicle types provide their own implementations of IFrameClient:

Each device has its own set of available frame configurations based on ArduPilot compatibility tables.

Last modified: 16 July 2026