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

18 lines
602 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;
namespace NucuCar.Sensors.Modules.Heartbeat
{
2021-04-24 18:44:54 +00:00
public class HeartbeatWorker : SensorWorker
{
2021-04-24 18:44:54 +00:00
public HeartbeatWorker(ILogger<HeartbeatWorker> logger, Telemetry.Telemetry telemetry,
ISensor<HeartbeatSensor> sensor, IOptions<HeartbeatConfig> options)
{
Logger = logger;
MeasurementInterval = options.Value.MeasurementInterval;
TelemetryPublisher = telemetry.Publisher;
Sensor = sensor.Object;
}
}
}