NucuCar/NucuCar.Sensors/Modules/Health/CpuTempWorker.cs

18 lines
586 B
C#
Raw Normal View History

using Microsoft.Extensions.Logging;
2021-04-24 18:44:54 +00:00
using Microsoft.Extensions.Options;
2020-08-01 15:07:13 +00:00
using NucuCar.Sensors.Abstractions;
namespace NucuCar.Sensors.Modules.Health
{
public class CpuTempWorker : SensorWorker
{
2021-04-24 18:44:54 +00:00
public CpuTempWorker(ILogger<CpuTempWorker> logger, Telemetry.Telemetry telemetry,
ISensor<CpuTempSensor> sensor, IOptions<CpuTempConfig> options)
{
Logger = logger;
2021-04-24 18:44:54 +00:00
MeasurementInterval = options.Value.MeasurementInterval;
TelemetryPublisher = telemetry.Publisher;
Sensor = sensor.Object;
}
}
}