NucuCar/NucuCar.Sensors/Modules/Heartbeat/HeartbeatWorker.cs

19 lines
658 B
C#
Raw Normal View History

using Microsoft.Extensions.Logging;
2021-04-24 18:44:54 +00:00
using Microsoft.Extensions.Options;
using NucuCar.Sensors.Abstractions;
using NucuCar.Telemetry.Abstractions;
namespace NucuCar.Sensors.Modules.Heartbeat
{
2021-04-24 18:44:54 +00:00
public class HeartbeatWorker : SensorWorker
{
public HeartbeatWorker(ILogger<HeartbeatWorker> logger, ITelemetryPublisher telemetryPublisherProxy,
2021-04-24 18:44:54 +00:00
ISensor<HeartbeatSensor> sensor, IOptions<HeartbeatConfig> options)
{
Logger = logger;
MeasurementInterval = options.Value.MeasurementInterval;
TelemetryPublisher = telemetryPublisherProxy;
2021-04-24 18:44:54 +00:00
Sensor = sensor.Object;
}
}
}