Interface ISensorService
Represents a sensor service interface for registering sensors.
Assembly: Meadow.Contracts.dll
View Source
public interface ISensorService
Methods
RegisterSensor(ISensor)
Registers a sampling sensor with the sensor service.
View Source
void RegisterSensor(ISensor sensor)
Parameters
Type | Name | Description |
---|---|---|
Meadow.Peripherals.Sensors.ISensor | sensor | The sensor to register. |
GetSensorsOfType<TSensor>()
Gets all registered sensors of a specified type
View Source
IEnumerable<TSensor> GetSensorsOfType<TSensor>() where TSensor : ISensor
Returns
System.Collections.Generic.IEnumerable<<TSensor>>
Type Parameters
Name | Description |
---|---|
TSensor | The type of sensor to search for |
GetSensorsWithData<TUnit>()
Gets all registered sensors that can provide data of a specified unit type
View Source
IEnumerable<ISensor> GetSensorsWithData<TUnit>() where TUnit : struct
Returns
System.Collections.Generic.IEnumerable<Meadow.Peripherals.Sensors.ISensor>
Type Parameters
Name | Description |
---|---|
TUnit | The unit type of the sensor data to search for |