Source Module Development
Posted: 25 Apr 2006, 06:08
Hi everyone,
I've just joined the BCI 2000 community, and i'm hoping i can contribute to this project!
In my Research Unit, we have a Lifelines Trackit ambulatory EEG recording, which I intend to use with BCI 2000. Therefore, i'm coding a Source Module to use it. Sadly, Lifelines doesn't provide an application interface but only an Interface Specification (for programmers to implement this API by themselves) so I had to code a library to do all the serial RS232 communication with the Trackit box.
I'm now following the tutorial on programming a Source Module found in the Implementation doc, and there i find the requirement for (at least) 3 functions, for acquisition setup, start, and stop.
The first function, TachyonStart, "configures the card and starts acquisition to some internal buffer". Therefore, is the API supposed to have its own thread for data acquisition and the TachyonWaitForData function merely collects the data from the buffer which TachyonStart updates? Or is it OK to just start data acquisition on TachyonWaitForData?
Also, i have another problem. Trackit requires that an HeartBeat packet is sent periodically so that data keeps being sent to the Host, so i would have to periodically notify this thread in order to send a heartbeat ?
I come from an UNIX development environment, so win32 programming is fairly uncharted land for me.. I wanted to know if you have an example source of one of these APIs, so I could understand their structure.
Thank you,
Luis
I've just joined the BCI 2000 community, and i'm hoping i can contribute to this project!
In my Research Unit, we have a Lifelines Trackit ambulatory EEG recording, which I intend to use with BCI 2000. Therefore, i'm coding a Source Module to use it. Sadly, Lifelines doesn't provide an application interface but only an Interface Specification (for programmers to implement this API by themselves) so I had to code a library to do all the serial RS232 communication with the Trackit box.
I'm now following the tutorial on programming a Source Module found in the Implementation doc, and there i find the requirement for (at least) 3 functions, for acquisition setup, start, and stop.
The first function, TachyonStart, "configures the card and starts acquisition to some internal buffer". Therefore, is the API supposed to have its own thread for data acquisition and the TachyonWaitForData function merely collects the data from the buffer which TachyonStart updates? Or is it OK to just start data acquisition on TachyonWaitForData?
Also, i have another problem. Trackit requires that an HeartBeat packet is sent periodically so that data keeps being sent to the Host, so i would have to periodically notify this thread in order to send a heartbeat ?
I come from an UNIX development environment, so win32 programming is fairly uncharted land for me.. I wanted to know if you have an example source of one of these APIs, so I could understand their structure.
Thank you,
Luis