public void Add(Sensor sensor) { //sensor.SetBoard(this.board); lock (this.sensors) this.sensors.Add(sensor); sensor.DataAvailable += (data) => OnSensorData(sensor, data); }
private void OnSensorData(Sensor sensor, SensorData data) { if (this.SensorDataReceived != null) this.SensorDataReceived(sensor, data); }