Listener class
- class pymeasure.experiment.listeners.Listener(port, topic='', timeout=0.01)
Bases:
StoppableThread
Base class for Threads that need to listen for messages on a ZMQ TCP port and can be stopped by a thread-safe method call
- message_waiting()
Check if we have a message, wait at most until timeout.
- receive(flags=0)
- class pymeasure.experiment.listeners.Monitor(results, queue)
Bases:
QueueListener
- class pymeasure.experiment.listeners.Recorder(results, queue, **kwargs)
Bases:
QueueListener
Recorder loads the initial Results for a filepath and appends data by listening for it over a queue. The queue ensures that no data is lost between the Recorder and Worker.
- stop()
Stop the listener.
This asks the thread to terminate, and then waits for it to do so. Note that if you don’t call this before your application exits, there may be some records still left on the queue, which won’t be processed.