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); } }
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); } }