private void CollectionComplete(object sender, DelsysAPI.Events.CollectionCompleteEvent e)
 {
     for (int i = 0; i < Data.Count; i++)
     {
         using (StreamWriter channelOutputFile = new StreamWriter("./channel" + i + "_data.csv"))
         {
             foreach (var pt in Data[i])
             {
                 channelOutputFile.WriteLine(pt.ToString());
             }
         }
     }
     BTPipeline.DisarmPipeline().Wait();
 }
Ejemplo n.º 2
0
        private void CollectionComplete(object sender, DelsysAPI.Events.CollectionCompleteEvent e)
        {
            string path = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments);

            for (int i = 0; i < Data.Count; i++)
            {
                using (StreamWriter channelOutputFile = new StreamWriter(System.IO.Path.Combine(path, "./channel" + i + "_data.csv")))
                {
                    foreach (var pt in Data[i])
                    {
                        channelOutputFile.WriteLine(pt.ToString());
                    }
                }
            }
            BTPipeline.DisarmPipeline().Wait();
            btn_Start.IsEnabled = true;
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Data collection complete, stores each data point into a csv file.
        /// Increments for every run.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void CollectionComplete(object sender, DelsysAPI.Events.CollectionCompleteEvent e)
        {
            string path = Path.Combine(Android.OS.Environment.ExternalStorageDirectory.AbsolutePath, Android.OS.Environment.DirectoryDownloads);

            for (int i = 0; i < Data.Count; i++)
            {
                string filename = Path.Combine(path, "sensor" + i + "_data.csv");
                using (StreamWriter channelOutputFile = new StreamWriter(filename, true))
                {
                    foreach (var pt in Data[i])
                    {
                        channelOutputFile.WriteLine(pt.ToString());
                    }
                }
            }
            // If you do not disarm the pipeline, then upon stopping you may begin streaming again.
            BTPipeline.DisarmPipeline().Wait();
        }
Ejemplo n.º 4
0
 private void CollectionComplete(object sender, DelsysAPI.Events.CollectionCompleteEvent e)
 {
     Console.WriteLine("CollectionComplete");
 }