Skip to content

Interface ISimpleSensorDevice

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

Example interface demonstrating method interception with the [Task] and [PythonCode] attributes. This interface shows how to embed Python code directly in method declarations.

csharp
public interface ISimpleSensorDevice

Methods

CleanupAsync()

Cleans up the device. Demonstrates [Teardown] attribute with [PythonCode].

GetDeviceInfoAsync()

Gets device information without parameter substitution. Demonstrates disabling parameter substitution.

GetGreetingAsync()

Gets a simple greeting from the device. Demonstrates basic [Task] and [PythonCode] attribute usage.

InitializeAsync()

Initializes the device sensors. Demonstrates [Setup] attribute with [PythonCode].

ReadTemperatureAsync()

Reads a simulated temperature value. Demonstrates [PythonCode] with more complex Python code.

SetLEDAsync(int, bool)

Controls an LED with specified pin and state. Demonstrates parameter substitution in Python code.

Released under the Apache License 2.0.