Exemple #1
0
 public void WriteTest()
 {
     // Write sample data to CSV file
     using (CSVFileWriter writer = new CSVFileWriter("WriteTest.csv"))
     {
         for (int i = 0; i < 100; i++)
         {
             CsvRow row = new CsvRow();
             for (int j = 0; j < 5; j++)
             {
                 row.Add(String.Format("Column{0}", j));
             }
             writer.WriteRow(row);
         }
     }
 }
Exemple #2
0
        //for(i = 0; i < 11; i++)
        //circular_buffer[i] = 0;
        #endregion
        #region constructer
        public Form1()
        {
            InitializeComponent();                              //Zeichnet alle Elemente auf der Form

            foreach (string s in SerialPort.GetPortNames())     //Liest verfügbare Com Ports ein..
            {
                PORTBOX.Items.Add(s);                           //..und fügt sie zur Auswahl hinzu
            }

            BAUDBOX.SelectedItem          = "115200";
            CH1TypeBox.SelectedItem       = "Normal";
            CH2TypeBox.SelectedItem       = "Normal";
            CH3TypeBox.SelectedItem       = "Normal";
            CH4TypeBox.SelectedItem       = "Normal";
            CH5TypeBox.SelectedItem       = "Normal";
            CH6TypeBox.SelectedItem       = "Normal";
            CH7TypeBox.SelectedItem       = "Normal";
            CH8TypeBox.SelectedItem       = "Normal";
            CH1GainBox.SelectedItem       = "6";
            CH2GainBox.SelectedItem       = "6";
            CH3GainBox.SelectedItem       = "6";
            CH4GainBox.SelectedItem       = "6";
            CH5GainBox.SelectedItem       = "6";
            CH6GainBox.SelectedItem       = "6";
            CH7GainBox.SelectedItem       = "6";
            CH8GainBox.SelectedItem       = "6";
            LOFF_Periode_Box.SelectedItem = "500ms";

            ekg1.NewDataEvent += new EKG.NewDataHandler(ekg1_NewDataEvent); //Abonieren des "New Data" Events


            // Filterkoeffizienten b[0] = b_N, ..., b[nc - 1] = b_0
            //			b[0] = -0.048916;
            //			b[1] = -0.066589;
            //			b[2] = -0.082893;
            //			b[3] = -0.096076;
            //			b[4] = -0.104652;
            //			b[5] =  0.796336;
            //			b[6] = -0.104652;
            //			b[7] = -0.096076;
            //			b[8] = -0.082893;
            //			b[9] = -0.066589;
            //			b[10] = 0.048916;

            b[0]  = -0.021653307460162728;
            b[1]  = -0.037981079732206075;
            b[2]  = -0.062415260408351145;
            b[3]  = -0.103191080649192538;
            b[4]  = -0.190861991171255463;
            b[5]  = -0.602132557843853444;
            b[6]  = 0.602132557843853444;
            b[7]  = 0.190861991171255463;
            b[8]  = 0.103191080649192538;
            b[9]  = 0.062415260408351145;
            b[10] = 0.037981079732206075;
            b[11] = 0.021653307460162728;

            // creat a new Write to write sample data to CSV file
            writer = new CSVFileWriter("test.txt");
            writer.writeHeader();
        }