Exemplo n.º 1
0
        private int master_board_id; // for streaming board

        /// <summary>
        /// Create an instance of BoardShim class
        /// </summary>
        /// <param name="board_id"></param>
        /// <param name="input_params"></param>
        public BoardShim(int board_id, BrainFlowInputParams input_params)
        {
            this.board_id        = board_id;
            this.master_board_id = board_id;
            if ((board_id == (int)BoardIds.STREAMING_BOARD) || (board_id == (int)BoardIds.PLAYBACK_FILE_BOARD))
            {
                try
                {
                    master_board_id = System.Convert.ToInt32(input_params.other_info);
                }
                catch (FormatException)
                {
                    throw new BrainFlowException((int)CustomExitCodes.INVALID_ARGUMENTS_ERROR);
                }
            }
            this.input_json = input_params.to_json();
        }
Exemplo n.º 2
0
 public BoardShim(int board_id, BrainFlowInputParams input_params)
 {
     this.board_id   = board_id;
     this.input_json = input_params.to_json();
 }