Skip to content

Class SimplifiedDevice ​

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

Simplified device implementation using direct AttributeHandler and IDeviceConnection. Replaces complex executor hierarchy with direct, documented interfaces per ICD-002.

csharp
public class SimplifiedDevice : IDeviceConnection, IDisposable

Inheritance ​

object ← SimplifiedDevice

Implements ​

IDeviceConnection, IDisposable

Inherited Members ​

object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.MemberwiseClone(), object.ReferenceEquals(object?, object?), object.ToString()

Constructors ​

SimplifiedDevice(DeviceConnection, ILogger<SimplifiedDevice>?)

Initializes a new instance of the class.

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.

DisconnectAsync(CancellationToken)

Disconnects from the device with cancellation support.

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

ExecuteMethod<T>(MethodInfo, object[], CancellationToken)

Executes a method with attribute-based behavior using AttributeHandler.

ExecuteMethod(MethodInfo, object[], CancellationToken)

Executes a method without return value using AttributeHandler.

ExecutePython<T>(string, CancellationToken)

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

ExecutePython(string, CancellationToken)

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

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.