Ejemplo n.º 1
0
 public void SendTmpDataToLH(TemperatureSensorChangedEventArgs tmp)
 {
     try
     {
         var values = new List <string>
         {
             tmp.SkinTemperature.ToString()
         };
         HubConnector.SendData(values);
     }
     catch (Exception ex)
     {
         Console.WriteLine(ex.ToString());
     }
 }
Ejemplo n.º 2
0
 public void SendBvpDataToLH(BVPSensorChangedEventArgs bvp)
 {
     try
     {
         var values = new List <string>
         {
             bvp.BloodVolumePulse.ToString()
         };
         HubConnector.SendData(values);
     }
     catch (Exception ex)
     {
         Console.WriteLine(ex.ToString());
     }
 }
Ejemplo n.º 3
0
 public void SendTagDataToLH(TagCreatedEventArgs tag)
 {
     try
     {
         var values = new List <string>
         {
             tag.Tag.ToString()
         };
         HubConnector.SendData(values);
     }
     catch (Exception ex)
     {
         Console.WriteLine(ex.ToString());
     }
 }
Ejemplo n.º 4
0
 public void SendGsrDataToLH(GSRSensorChangedEventArgs gsr)
 {
     try
     {
         var values = new List <string>
         {
             gsr.GalvanicSkinResponse.ToString()
         };
         HubConnector.SendData(values);
     }
     catch (Exception ex)
     {
         Console.WriteLine(ex.ToString());
     }
 }
Ejemplo n.º 5
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());
     }
 }
Ejemplo n.º 6
0
        /// <summary>Sends a data to lh.</summary>
        ///
        /// <remarks>Jordi Hutjens, 9-11-2018.</remarks>
        ///
        /// <param name="acc">Accelerometer changed event information.</param>

        public void SendAccDataToLH(AccelerometerChangedEventArgs acc)
        {
            try
            {
                var values = new List <string>
                {
                    acc.AccelerometerX.ToString(),
                    acc.AccelerometerY.ToString(),
                    acc.AccelerometerZ.ToString()
                };
                HubConnector.SendData(values);
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.ToString());
            }
        }
Ejemplo n.º 7
0
        ////////////////////////////////////////////////////////////////////////////////////////////////////
        /// <summary>   Sends the published sensor data to the Learning Hub. </summary>
        ///
        /// <remarks>   Jordi Hutjens, 26-10-2018. </remarks>
        ///
        /// <param name="e">    Parameter containing the filtered Json string data. </param>
        ////////////////////////////////////////////////////////////////////////////////////////////////////
        public void SendDataToLH(TextReceivedEventArgs e)
        {
            var values = new List <string>
            {
                e.ESPTimeStamp,
                e.IMU1_AccX,
                e.IMU1_AccY,
                e.IMU1_AccZ,
                e.IMU1_GyroX,
                e.IMU1_GyroY,
                e.IMU1_GyroZ,
                e.IMU1_MagX,
                e.IMU1_MagY,
                e.IMU1_MagZ,
                e.IMU1_Q0,
                e.IMU1_Q1,
                e.IMU1_Q2,
                e.IMU1_Q3,
                e.IMU2_AccX,
                e.IMU2_AccY,
                e.IMU2_AccZ,
                e.IMU2_GyroX,
                e.IMU2_GyroY,
                e.IMU2_GyroZ,
                e.IMU2_MagX,
                e.IMU2_MagY,
                e.IMU2_MagZ,
                e.IMU2_Q0,
                e.IMU2_Q1,
                e.IMU2_Q2,
                e.IMU2_Q3,
                e.TempExternal,
                e.HumExternal,
                e.TempInternal,
                e.HumInternal,
                e.Pulse,
                e.GSR
            };

            HubConnector.SendData(values);
        }