2019-12-29 12:08:18 +00:00
|
|
|
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;
|
2021-08-02 18:28:02 +00:00
|
|
|
using NucuCar.Telemetry.Abstractions;
|
2019-12-29 12:08:18 +00:00
|
|
|
|
2021-08-02 18:13:59 +00:00
|
|
|
namespace NucuCar.Sensors.Modules.CpuTemperature
|
2019-12-29 12:08:18 +00:00
|
|
|
{
|
|
|
|
public class CpuTempWorker : SensorWorker
|
|
|
|
{
|
2021-08-02 18:28:02 +00:00
|
|
|
public CpuTempWorker(ILogger<CpuTempWorker> logger, ITelemetryPublisher telemetryPublisherProxy,
|
2021-04-24 18:44:54 +00:00
|
|
|
ISensor<CpuTempSensor> sensor, IOptions<CpuTempConfig> options)
|
2019-12-29 12:08:18 +00:00
|
|
|
{
|
|
|
|
Logger = logger;
|
2021-04-24 18:44:54 +00:00
|
|
|
MeasurementInterval = options.Value.MeasurementInterval;
|
2021-08-02 18:28:02 +00:00
|
|
|
TelemetryPublisher = telemetryPublisherProxy;
|
2019-12-29 12:08:18 +00:00
|
|
|
Sensor = sensor.Object;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|