コード例 #1
0
 /// <summary>   Updates the ibi values. </summary>
 ///
 /// <remarks>   Jordi Hutjens, 13-11-2018. </remarks>
 private void UpdateIbiValues()
 {
     try
     {
         IBISensorChangedEventArgs args = new IBISensorChangedEventArgs
         {
             HearthRateVariability = float.Parse(receivedStrFilteredIBI[0]),
             InterBeatInterval     = float.Parse(receivedStrFilteredIBI[1])
         };
         receivedStrFilteredIBI.Clear();
         OnIBISensorChanged(args);
         if (CheckParameters.Instance.LHRunning)
         {
             lhsend.SendIbiDataToLH(args);
         }
     }
     catch (Exception)
     {
         IBISensorChangedEventArgs args = new IBISensorChangedEventArgs
         {
             InterBeatInterval     = 0.0F,
             HearthRateVariability = 0.0F
         };
         OnIBISensorChanged(args);
     }
 }
コード例 #2
0
 public void SendIbiDataToLH(IBISensorChangedEventArgs ibi)
 {
     try
     {
         var values = new List <string>
         {
             ibi.InterBeatInterval.ToString(),
             ibi.HearthRateVariability.ToString()
         };
         HubConnector.SendData(values);
     }
     catch (Exception ex)
     {
         Console.WriteLine(ex.ToString());
     }
 }
コード例 #3
0
 /// <summary>   Updates the inter beat interval. </summary>
 ///
 /// <remarks>   Jordi Hutjens, 13-11-2018. </remarks>
 ///
 /// <param name="sender">   Source of the event. </param>
 /// <param name="ibi">      Ibi sensor changed event information. </param>
 private void IUpdateInterBeatInterval(object sender, IBISensorChangedEventArgs ibi)
 {
     InterBeatInterval     = ibi.InterBeatInterval;
     HearthRateVariability = ibi.HearthRateVariability;
 }
コード例 #4
0
 /// <summary>   Raises the ibi sensor changed event. </summary>
 ///
 /// <remarks>   Jordi Hutjens, 12-11-2018. </remarks>
 ///
 /// <param name="e">    Event information to send to registered event handlers. </param>
 protected virtual void OnIBISensorChanged(IBISensorChangedEventArgs e)
 {
     IBISensorChanged?.Invoke(this, e);
 }