Skip to content

Interface IDeviceConnection

Namespace: Belay.Core
Assembly: Belay.Core.dll

Simplified device connection interface that replaces the complex IDeviceCommunication hierarchy. Focuses on essential operations without over-abstraction. See ICD-002 for complete specification.

csharp
public interface IDeviceConnection : IDisposable

Implements

IDisposable

Properties

ConnectionString

Gets the connection string used to connect to this device.

DeviceInfo

Gets information about the connected device.

IsConnected

Gets a value indicating whether the device is currently connected.

Methods

Connect(CancellationToken)

Connects to the device.

DeleteFile(string, CancellationToken)

Deletes a file from the device.

Disconnect()

Disconnects from the device.

ExecutePython(string, CancellationToken)

Executes Python code on the device and returns the raw string output.

ExecutePython<T>(string, CancellationToken)

Executes Python code on the device and parses the result as the specified type.

ListFiles(string, CancellationToken)

Lists files in a directory on the device.

ReadFile(string, CancellationToken)

Reads a file from the device.

WriteFile(string, byte[], CancellationToken)

Writes a file to the device.

Released under the Apache License 2.0.