Table of Contents

Interface IDeviceDiscoveryPort

Namespace
DotCompute.Abstractions.Ports
Assembly
DotCompute.Abstractions.dll

Port interface for device discovery operations. Part of hexagonal architecture - defines the contract that backend adapters must implement.

public interface IDeviceDiscoveryPort

Properties

BackendType

Gets the backend type.

BackendType BackendType { get; }

Property Value

BackendType

Methods

DiscoverDevicesAsync(CancellationToken)

Discovers all available devices.

ValueTask<IReadOnlyList<DiscoveredDevice>> DiscoverDevicesAsync(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

Cancellation token.

Returns

ValueTask<IReadOnlyList<DiscoveredDevice>>

List of discovered devices.

GetCapabilitiesAsync(string, CancellationToken)

Gets detailed capabilities for a specific device.

ValueTask<DeviceCapabilities> GetCapabilitiesAsync(string deviceId, CancellationToken cancellationToken = default)

Parameters

deviceId string

The device identifier.

cancellationToken CancellationToken

Cancellation token.

Returns

ValueTask<DeviceCapabilities>

Device capabilities.

IsDeviceAvailable(string)

Checks if a specific device is available.

bool IsDeviceAvailable(string deviceId)

Parameters

deviceId string

The device identifier.

Returns

bool

True if the device is available.