Issues generating the code

Forum for software developers to discuss BCI2000 software development
Post Reply
dcvertiz
Posts: 9
Joined: 08 Aug 2019, 14:33

Issues generating the code

Post by dcvertiz » 12 Sep 2019, 08:33

Hi, I was trying to build a contribution module from source code, I've already downloaded and installed:
TortoiseSVN, CMake, VisualStudio, and Qt. I've followed the instructions from https://www.bci2000.org/mediawiki/index ... ng_BCI2000
I also selected BUILD_ALL_SOURCEMODULES inside CMake.
I think I have a problem generating the code from cmake because when I build the source code I get an error about an icons folder
that couldn't be found. I have tried generating the code using visual and also using cmake directly and I get the same results.
Any suggestions?

mellinger
Posts: 1208
Joined: 12 Feb 2003, 11:06

Re: Issues generating the code

Post by mellinger » 12 Sep 2019, 11:30

Hi, could it be that the path to your BCI2000 source code contains special characters? After all those years, CMake and/or VisualStudio still choke on them.

dcvertiz
Posts: 9
Joined: 08 Aug 2019, 14:33

Re: Issues generating the code

Post by dcvertiz » 12 Sep 2019, 12:24

Thanks for your answer, the folder for my source code is C:/BCI2000.x64, I don't know if you mean that?

mellinger
Posts: 1208
Joined: 12 Feb 2003, 11:06

Re: Issues generating the code

Post by mellinger » 13 Sep 2019, 10:08

Did you move or rename the BCI2000 source code directory after running CMake?

dcvertiz
Posts: 9
Joined: 08 Aug 2019, 14:33

Re: Issues generating the code

Post by dcvertiz » 17 Sep 2019, 07:45

Hi, I didn't move or rename the BCI2000 source code directory after running CMake.
I'm following the steps described here:
https://www.bci2000.org/mediawiki/index ... ompilation
and still not getting results, the icons folder is missing. I'm using Cmake 3.15.2, Qt 5.12.4 and visual 2019.
Please help me!

mellinger
Posts: 1208
Joined: 12 Feb 2003, 11:06

Re: Issues generating the code

Post by mellinger » 08 Oct 2019, 11:08

Did TortoiseSVN successfully complete the entire checkout of BCI2000? If in doubt, right-click the BCI2000 folder, and choose "SVN Update" from the context menu. Then, rerun CMake.

dcvertiz
Posts: 9
Joined: 08 Aug 2019, 14:33

Re: Issues generating the code

Post by dcvertiz » 28 Nov 2019, 13:34

I've already solved the problem in compiling source code, Thanks for the help! Now, I have some questions about contributions... I'm trying to use openBCI with BCI2000, I've already compiled the source code but I've noticed there are 2 contributions, one named openBCISource and another named openBCI_Module, which one should I use? why are they organized that way?
I'm trying to implement a data adquisition module for another similar hardware that uses ADS1299, I don't know if I should create a source or a Module?

dcvertiz
Posts: 9
Joined: 08 Aug 2019, 14:33

Re: Issues generating the code

Post by dcvertiz » 10 Dec 2019, 17:43

Sorry about last question, i've realized it's a little bit general. Now I have a more specific question and it's related to my last question. I've noticed the difference between source and module files, this is that they inherit from different classes: GenericADC and bufferedADC, i've already read about these classes in other posts but my question is: can I modify the duration of the block in window timing, according to sampleblocksize and sampling rate, using genericADC class? How do you do that? is there a minimal value for block time, i'm trying to get 32ms with samplingrate= 250Hz and SampleBlockSize =8, but i can't. Any help?

mellinger
Posts: 1208
Joined: 12 Feb 2003, 11:06

Re: Issues generating the code

Post by mellinger » 11 Dec 2019, 10:08

BufferedADC adds multithreading to GenericADC. It does not change requirements for SampleBlockSize.
Any constraints on SampleBlockSize and SamplingRate are imposed by module code that inherits either BufferedADC or GenericADC. Typically, such constraints are due to hardware limitations, so changes to the source code of a source module are unlikely to lead to a satisfactory outcome.

You are welcome to try, though. Look in the source filter's Preflight() function for the error message you receive when specifying an "invalid" SampleBlockSize.

dcvertiz
Posts: 9
Joined: 08 Aug 2019, 14:33

Re: Issues generating the code

Post by dcvertiz » 12 Dec 2019, 08:49

Thanks for your answer, I'm a little confused because I don't get any error when specifying a sampleblocksize of 8. When visualization starts with 250Hz of sampling rate, I can see in timing window, that nominal and average time are 32ms but block time isn't. Why is that happening?

mellinger
Posts: 1208
Joined: 12 Feb 2003, 11:06

Re: Issues generating the code

Post by mellinger » 12 Dec 2019, 10:03

I guess that block duration switches between zero, and a multiple of 32ms, right? This happens when there is a hardware/software buffer involved with a length corresponding to a multiple of 32ms. That buffer is outside BCI2000. When it is full, data may be read without delay, for multiple software blocks in a row, until all data has been read. Then, it will take the buffer's duration until the next block may be read.

dcvertiz
Posts: 9
Joined: 08 Aug 2019, 14:33

Re: Issues generating the code

Post by dcvertiz » 12 Dec 2019, 14:42

Thank you! I think i understand a little bit more, but is that right? I mean, is it correct for the use of a BCI?

mellinger
Posts: 1208
Joined: 12 Feb 2003, 11:06

Re: Issues generating the code

Post by mellinger » 13 Dec 2019, 10:09

I am not sure what you mean. There is no sense in making SampleBlockSize less than what hardware/software outside BCI2000 can deliver. All BCI2000 blocks should have the same length, apart from a little variability.

mellinger
Posts: 1208
Joined: 12 Feb 2003, 11:06

Re: Issues generating the code

Post by mellinger » 13 Dec 2019, 10:59

For openBCI, I found some interesting information on their website. It seems that openBCI is sending data in a very choppy manner until the COM port is reconfigured as described here:
https://docs.openbci.com/docs/09Depreca ... WindowsDep

I see the page is deprecated but could not identify a current page regarding the choppy data issue.

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests