예제 #1
0
        public async Task ListenDataFromSensor(TelemetryDynamic sensorData)
        {
            sensorData.TimeToSend.ToUniversalTime().ToString("u");
            DataFromSensor.Add(sensorData);
            await SensorDataRepository.Add(sensorData, Token);

            _logger.Info($"Sensor with MAC: {sensorData.Data.MACSensor} has sent " + sensorData.Data.Value);
        }
 private void SaveSensorData()
 {
     _lastData.Height = (int)_heights.Average();
     _sensorDataRepository.Add(_lastData);
 }