/// <summary>
 /// Raises the <see cref="MeasurementComplete"/>event.
 /// </summary>
 /// <param name="sender">The <see cref="TemperatureSensor"/> object that raised the event.</param>
 /// <param name="temperature">The measured temperature.</param>
 /// <param name="relativeHumidity">The measured humidity.</param>
 protected virtual void OnMeasurementCompleteEvent(TemperatureSensor sender, double temperature)
 {
     if (_OnMeasurementComplete == null) _OnMeasurementComplete = new MeasurementCompleteEventHandler(OnMeasurementCompleteEvent);
     if (Program.CheckAndInvoke(MeasurementComplete, _OnMeasurementComplete, sender, temperature))
     {
         MeasurementComplete(sender, temperature);
     }
 }
Beispiel #2
0
        /// <summary>
        /// Event raised when temperature conversion is complete
        /// </summary>
        protected virtual void OnMeasurementComplete()
        {
            MeasurementCompleteEventHandler handler = MeasurementComplete;

            if (handler != null)
            {
                handler(this, temperatureCelsius);
            }
        }
Beispiel #3
0
        private void OnMeasurementComplete(Compass sender, MeasurementCompleteEventArgs e)
        {
            if (this.onMeasurementComplete == null)
            {
                this.onMeasurementComplete = this.OnMeasurementComplete;
            }

            this.MeasurementComplete?.Invoke(sender, e);
        }
Beispiel #4
0
        private void _measurementComplete(object sender, MeasurementCompleteEventArgs args)
        {
            MeasurementCompleteEventHandler handler = MeasurementComplete;

            if (handler == null)
            {
                return;
            }

            handler(sender, args);
        }
Beispiel #5
0
        private void OnMeasurementComplete(Compass sender, MeasurementCompleteEventArgs e)
        {
            if (this.onMeasurementComplete == null)
            {
                this.onMeasurementComplete = this.OnMeasurementComplete;
            }

            if (Program.CheckAndInvoke(this.MeasurementComplete, this.onMeasurementComplete, sender, e))
            {
                this.MeasurementComplete(sender, e);
            }
        }
 //    public static EventHandler<SensorData> MeasurementComplete;
 /// <summary>
 /// Raises the <see cref="MeasurementComplete"/> event.
 /// </summary>
 /// <param name="sender">The object that raised the event.</param>
 /// <param name="sensorData">The <see cref="SensorData"/> object that contains the results of the measurement.</param>
 public void OnMeasurementCompleteEvent(Magnetometer sender, SensorData sensorData)
 {
     if (_OnMeasurementComplete == null)
         _OnMeasurementComplete = OnMeasurementCompleteEvent;
 }
 //    public static EventHandler<SensorData> MeasurementComplete;
 /// <summary>
 /// Raises the <see cref="MeasurementComplete"/> event.
 /// </summary>
 /// <param name="sender">The object that raised the event.</param>
 /// <param name="sensorData">The <see cref="SensorData"/> object that contains the results of the measurement.</param>
 public void OnMeasurementCompleteEvent(Accelaccelerometer sender, SensorData sensorData)
 {
     if (_OnMeasurementComplete == null)
         _OnMeasurementComplete = OnMeasurementCompleteEvent;
 }
Beispiel #8
0
 /// <summary>
 /// Raises the <see cref="MeasurementComplete"/> event.
 /// </summary>
 /// <param name="sender">The object that raised the event.</param>
 /// <param name="sensorData">The <see cref="SensorData"/> object that contains the results of the measurement.</param>
 protected virtual void OnMeasurementCompleteEvent(Compass sender, SensorData sensorData)
 {
     if (_OnMeasurementComplete == null)
         _OnMeasurementComplete = new MeasurementCompleteEventHandler(OnMeasurementCompleteEvent);
     if (Program.CheckAndInvoke(MeasurementComplete, _OnMeasurementComplete, sender, sensorData))
     {
         MeasurementComplete(sender, sensorData);
     }
 }
Beispiel #9
0
        private void OnMeasurementComplete(Gyro sender, MeasurementCompleteEventArgs e)
        {
            if (this.onMeasurementComplete == null)
                this.onMeasurementComplete = this.OnMeasurementComplete;

            if (Program.CheckAndInvoke(this.MeasurementComplete, this.onMeasurementComplete, sender, e))
                this.MeasurementComplete(sender, e);
        }
Beispiel #10
0
 //    public static EventHandler<SensorData> MeasurementComplete;
 /// <summary>
 /// Raises the <see cref="MeasurementComplete"/> event.
 /// </summary>
 /// <param name="sender">The object that raised the event.</param>
 /// <param name="sensorData">The <see cref="SensorData"/> object that contains the results of the measurement.</param>
 public void OnMeasurementCompleteEvent(Gyro sender, SensorData sensorData)
 {
     if (_OnMeasurementComplete == null)
         _OnMeasurementComplete = OnMeasurementCompleteEvent;
 }