public SensorsListService(MqttService mqttService)
 {
     this.SensorsList = new List <SensorService>
     {
         new SensorService(mqttService, "Temperature", "/app/deviceServices/weatherHistory.csv"),
         new SensorService(mqttService, "Humidity", "/app/deviceServices/weatherHistory.csv"),
         new SensorService(mqttService, "Pressure", "/app/deviceServices/weatherHistory.csv")
     };
 }
        public SensorService(MqttService mqttService, string sensorType, string filePath)
        {
            _mqttService = mqttService;

            Threshold       = INITIAL_SENSOR_THRESHOLD;
            this.Timeout    = 5000;
            _timer          = new Timer(this.Timeout);
            _timer.Elapsed += OnTimerEvent;
            this.SensorType = sensorType;
            this._filePath  = filePath;
            _timer.Start();
            this.IsMeasuring = true;
            this.setCsv();
            this.IsThreshold = false;
        }