예제 #1
0
 public BoardShim(int board_id, string port_name)
 {
     this.board_id          = board_id;
     this.port_name         = port_name;
     this.package_length    = BoardInfoGetter.get_package_length(board_id);
     this.fs_hz             = BoardInfoGetter.get_fs_hz(board_id);
     this.num_eeg_channels  = BoardInfoGetter.get_num_eeg_channels(board_id);
     this.first_eeg_channel = BoardInfoGetter.get_first_eeg_channel(board_id);
 }
예제 #2
0
        internal BoardData(int board_id, float[] raw_data, double[] ts_data)
        {
            this.board_id       = board_id;
            this.package_length = BoardInfoGetter.get_package_length(board_id);
            List <List <double> > temp_board_data = new List <List <double> > ();

            for (int i = 0; i < ts_data.Length; i++)
            {
                List <double> temp = new List <double> ();
                for (int j = 0; j < this.package_length; j++)
                {
                    temp.Add((double)raw_data[i * package_length + j]);
                }
                temp.Add(ts_data[i]);
                temp_board_data.Add(temp);
            }
            board_data = temp_board_data.Select(a => a.ToArray()).ToArray().ToMatrix();
        }