I would like to access ARTIQ dataset broadcasts from a custom applet running outside of our ARTIQ-8 Nix environment. Does anyone have experience setting this up with sipyco
?
I've tried running the following script
from sipyco.sync_struct import Subscriber
import time
import asyncio
server = '192.168.1.83'
port = 3250
loop = asyncio.new_event_loop()
def sub_init(dat):
print(dat)
def sub_mod(mod):
print(mod)
subscriber = Subscriber("datasets", sub_init, sub_mod)
loop.run_until_complete(subscriber.connect(server, port))
time.sleep(5)
However the two handler functions do not update when dataset broadcasts are sent out by the master. I have the feeling that I am not taking the right approach here, but I can't seem to find examples where this is done.
If anyone has experience with this I would appreciate any tips/pointers you might have!