2019-12-17 19:40:20 +00:00
|
|
|
using System.Threading.Tasks;
|
|
|
|
using Microsoft.Extensions.Logging;
|
|
|
|
using NucuCarSensorsProto;
|
|
|
|
|
|
|
|
namespace NucuCar.Domain.Sensors
|
|
|
|
{
|
2019-12-17 19:54:38 +00:00
|
|
|
/// <summary>
|
|
|
|
/// The GenericSensor is an abstract class, which provides a base for abstracting hardware sensors.
|
|
|
|
/// </summary>
|
2019-12-17 19:40:20 +00:00
|
|
|
public abstract class GenericSensor
|
|
|
|
{
|
|
|
|
protected bool TelemetryEnabled;
|
|
|
|
protected ILogger Logger;
|
|
|
|
protected SensorStateEnum SensorStateEnum;
|
|
|
|
|
2019-12-17 19:44:15 +00:00
|
|
|
public abstract void Initialize();
|
2019-12-17 19:40:20 +00:00
|
|
|
public abstract Task TakeMeasurementAsync();
|
|
|
|
public abstract Bme680MeasurementData GetMeasurement();
|
|
|
|
public abstract SensorStateEnum GetState();
|
|
|
|
}
|
|
|
|
}
|