ZMQAdapter class
hardware_control.base.ZMQAdapter module
- class hardware_control.base.ZMQAdapter.ZMQAdapter(instrument, stopevent, context, publisher)
Bases:
ThreadWraps an instrument driver into a thread and establishes ZMQ connections to the main app.
ZMQAdapter takes an instrument driver argument, creates a thread, creates a ZMQ-publisher to publish any value changes, and listens to the ZMQ-app-publisher for requests.
The run function gets executed when calling .start() on the thread and therefore hosts the custom event loop.
- get_address(ip_and_port: str) str
Parses the ip address from the zmq connection string.
- run()
Run custom event loop.
Listens for ZMQ requests from the main app and if the instrument is not online, tries to reconnect to it.