Ejemplo n.º 1
0
 private void _mqttWorker_WindReadEvent(object sender, WindReadEventArgs e)
 {
     var measurement = e.WindMeasurement;
     measurement.ReceivedAt = DateTime.Now;
     measurement.NodeDescription = Nodes[measurement.NodeEui];
     if (LastReceivedWindMeasurements.ContainsKey(measurement.NodeEui))
     {
         LastReceivedWindMeasurements[measurement.NodeEui] = measurement;
     }
     else
     {
         LastReceivedWindMeasurements.Add(measurement.NodeEui, measurement);
     }
 }
Ejemplo n.º 2
0
        private void _mqttWorker_WindReadEvent(object sender, WindReadEventArgs e)
        {
            var measurement = e.WindMeasurement;

            measurement.ReceivedAt      = DateTime.Now;
            measurement.NodeDescription = Nodes[measurement.NodeEui];
            if (LastReceivedWindMeasurements.ContainsKey(measurement.NodeEui))
            {
                LastReceivedWindMeasurements[measurement.NodeEui] = measurement;
            }
            else
            {
                LastReceivedWindMeasurements.Add(measurement.NodeEui, measurement);
            }
        }