Closed zibrov-zlobin closed 9 years ago
The data available signal is only sent to clients who have a particular dataset open for reading, so you'd need to call self.server.open(dataset)
to start receiving signals about data being added to a particular dataset.
In addition, the server keeps track for each reader whether it has sent a signal, and whether you have fetched more data. Each client will only be sent one data available message between calling get
to load more data, even if in that time multiple calls to add
are made. This is just an optimization to avoid spamming clients with lots of messages, especially if they are reading slowly.
I just filed an issue about documenting the signals in the datavault server. Let's not close this issue until the documentation goes in.
Thanks a lot! Makes much more sense now
Closing for now as this has been answered. See #254 where we are tracking actually adding this to the docs.
Hi, I am trying to understand how the signaling works based on the Datavault code. I've written a simple listener client (taken from https://github.com/labrad/pylabrad/wiki/Pylabrad-Signal-Slot-Example):
and from a python shell:
If I create a new data set:
Then I do get an output from the client, "Signal received is printed". But if I change the client to listen for
yield self.server.signal__data_available(self.ID)
which judging from the code should be emitted everytime data is added, the client does not respond todv.add((1,2,3,4))
What am I missing? Thanks