Closed novikov-p-a closed 2 years ago
Thank you very much for submitting a pull request!
I have two apprehensions about changing this. One is that all the other API's have basically exactly the same example programs. Changing one implies that they should all be changed. The other is that I believe it is important to demonstrate the use of arguments in resolve_stream. One option would be adding a few comments in the code explaining this. Another option would be adding an example program that demonstrates just this. For the record, the arguments do not hang the call if there is in fact a stream on the network with 'type' 'EEG'.
Thank you very much for the explanation! I will have access to the recording equipment again in a couple of days and I can return to this.
If you are running tests without hardware, you can always generate a 'fake' eeg stream by running SendData.py.
Closing because we won't be merging this.
Along @dmedine 's comments, there are a couple changes that we would merge:
wait_time=2.0
argument to resolve, and if the length of the returned streams list is 0, print a message and return.
In either case, the added code should be minimal. These examples are really meant to be as simple as possible.
If we wanted to provide a more comprehensive example then we would add argparse, logging, continuous_resolver in a thread, preallocate a numpy array and use pull_chunk
's dest_obj
argument, etc.
Arguments were removed from the call of resolve_stream(). With previous arguments, resolve_stream() hangs the thread.