Open cboulay opened 7 years ago
There is some for-display data (i.e. low sample rate) that are sent cbPKT_STREAMPREV
but CereLink currently does not do anything with it, it is good for display because eye refresh rate us slower. Also, there is a raw channel cbRAWGROUP
that can be configured along with the normal sample rate (both at the same time).
Everything should be in cbhwlib somewhere.
FYI, the reason I'm pursuing this is because I'm running into performance problems trying to plot 8 channels at 30 kHz + 4 channels at 2 kHz.
Central does not allow configuring a channel to transmit both SDK_SMPGRP_RAW
and SDK_SMPGRP_RATE_30k
, but RAW and something less than 30kHz is allowed. Is that a limitation of the NSP or just Central?
cbPKT_STREAMPREV
sounds interesting. In its definition I don't see any fields that would hold data. Can you indicate which?
The code comments suggest that cbPKT_STREAMPREV.chid
should be 0x8000 + channel identifier
. It seems like this chid doesn't meet any logical checks in ProcessIncomingPackets
(there is no corresponding else
for that second if). Would this be the right place to put it? I can attempt this, but I will only bother doing so if this gets me closer to getting easy-to-plot data.
Analysing the package traffic it seems like Central sends out a cbPKTTYPE_PREVSET
every some 250ms. I didn't see a definition of the packet, but it just seems to be 0x8000 + chid
, and empty payload. That gets confirmed by the NSP with cbPKTTYPE_PREVREP
, followed by cbPKT_STREAMPREV
every 20 ms. I guess Central then calculates the displayed value from rawmin
and rawmax
?
After the last cbPKTTYPE_PREVSET
package was sent from Central (before closing the preview window), cbPKT_STREAMPREV
were sent for 1 second, so perhaps cbPKTTYPE_PREVSET
don't have to be sent that often.
The comments describe what each field is. For example rawmin
and rawmax
are the minimum and maximum of the raw channel (the additional raw channel) for that time period (I think around 250ms). Or envmin
and envmin
are enevelope's min and max (that is shown in threshold). To plot, just plot a bar with those values, and it will look like zoomed-out version of the high sample rate data.
(I think) It is sent only for one channel currently under preview, Central sends some packet to tell which channel is currently open.
Central not configuring SDK_SMPGRP_RAW
could be to avoid going above bandwidth I think.
I think monsource
is the channel to be monitored
Thanks, I'll give it a try later this week.
Hi all,
In Central, there's an app to display activity from a single neural channel. This window is very useful and has 90% of the functionality that I need but unfortunately not quite enough; I have to write my own app. I'm curious about how this window achieves a couple different things.
How is (1) achieved? Does CereLink expose that functionality?
I guess that (2) can be achieved by filtering (1), though this seems dangerous if the filters don't match exactly those used by the NSP because then the threshold set by the user wouldn't perform exactly as expected on the NSP.