Skip to content

Interface ISensorDevice

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

Example interface demonstrating method interception with the [Task] attribute. This interface shows the recommended pattern for using Belay.NET's attribute-based programming model.

csharp
public interface ISensorDevice

Methods

CalibrateAsync()

Calibrates the sensor. Demonstrates [Task] attribute with void return type and longer timeout.

CleanupSensorAsync()

Cleans up the device after use. Demonstrates [Teardown] attribute for cleanup.

GetDeviceInfoAsync()

Gets device information. Demonstrates [Task] attribute with string return type.

InitializeSensorAsync()

Sets up the device for sensor readings. Demonstrates [Setup] attribute for initialization.

ReadHumidityAsync()

Reads humidity from the device sensor. Demonstrates [Task] attribute with custom name and timeout.

ReadTemperatureAsync()

Reads the temperature from the device sensor. Demonstrates basic [Task] attribute usage.

Released under the Apache License 2.0.