-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Socket updates - reconnect loop, merge buttons #18
Conversation
- Fixed formatting - Removed all `ScopedPointer`s and used std::unique_ptr instead
- Say the remote socket closes unexpectedly; now, this plugin will attempt to automatically reconnect to the same port if the remote socket opens again - This will also ensure that header parameters are consistent between connections, and will stop acquisition if the header changes
dc15cb2
to
87d053a
Compare
87d053a
to
d5a1f6d
Compare
- Once connected, all data is read to prevent buffer overflow - If acquisition is running, this data is processed and plotted; otherwise, it is thrown away Fixes #12
- Fixed a visual bug where the disconnect button would not be correctly enabled in certain conditions
Source/Socket.cpp
Outdated
if (printOutput) | ||
{ | ||
LOGC("EphysSocket failed to connect; could not read header from stream."); | ||
CoreServices::sendStatusMessage("Ephys Socket: Could not read stream."); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Putting here for lack of better place:
I think the messages presented in the GUI should be more descriptive. For instance, when I change the underlying type of a cv::Mat in Bonsai, I get the following error message
It would be nice if the message said why the Ephys Socket stopped data acqusition (in this case I changed for u16 to floats). I would say the same is true for e.g. changing the shape of the input array. I would be nice to know what exactly. I see this in the console
[open-ephys][debug] CoreServices::sendStatusMessage: Ephys Socket: Invalid header
[open-ephys] ***ERROR*** Ephys Socket: Header values have changed since first connecting
But, this still does not tell us what changed that caused the issue and its quite buried to the user. I think this info should be displayed on the main message bar.
This PR is updated to work with version 1.0 of the GUI.
If the remote socket closes unexpectedly, the plugin will attempt to automatically reconnect to the same port if the remote socket opens again.
This will also ensure that header parameters are consistent between connections, and will stop acquisition if the header changes.
Buttons are consolidated so there is one button that changes from
Connect
toDisconnect
and vice versa.