Skip to content
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

can't read any socket #2

Open
pplenck opened this issue Mar 19, 2021 · 0 comments
Open

can't read any socket #2

pplenck opened this issue Mar 19, 2021 · 0 comments

Comments

@pplenck
Copy link

pplenck commented Mar 19, 2021

Hello
here is my signal chain:
rhythmfpga->bandpassfilter->crossingdetector->eventBroadcaster
I use a threshold that gets me events on the screen (if I add an lfp viewer) and on the recordings (if I add an recording node)
I am trying to read the sockets with python (with matlab I couldn't get zmq jar files to compile)
unfortunately I can't get anything out of the sockets
here is the simplest code I could make:

#############
import zmq

Prepare our context and sockets

context = zmq.Context()
socket = context.socket(zmq.SUB)
socket.connect("tcp://localhost:5557")

Do 10 requests, waiting each time for a response

for request in range(1,11):
# socket.send(b"Hello")
event = socket.poll(timeout=3000) # wait 3 seconds
if event == 0:
# timeout reached before any events were queued
print("nothing")
pass
else:
# events queued within our time limit
msg = socket.recv()
print("Received reply %s" %(msg))

can you help me?
I've been stuck for days trying to communicate with the gui

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant