forked from NSLS-II/lightsource2-recipes
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request NSLS-II#99 from jrmlhermitte/bec_zmq
Added bec_zmq
- Loading branch information
Showing
4 changed files
with
32 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
- name: copy bec_zmq | ||
template: src=bec_zmq.j2 dest=/usr/local/bin/bec_zmq owner=root group=root mode=0755 | ||
become: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/opt/conda_envs/collection-{{ current_env_tag }}/bin/python | ||
import matplotlib.pyplot as plt | ||
plt.ion() | ||
|
||
from bluesky.callbacks.zmq import RemoteDispatcher | ||
from bluesky.callbacks.best_effort import BestEffortCallback | ||
from bluesky.utils import install_qt_kicker | ||
|
||
bec = BestEffortCallback() | ||
|
||
host = "{{ zmq_host }}" | ||
port = "{{ zmq_proxy_out }}" | ||
rd = RemoteDispatcher((host, port)) | ||
rd.subscribe(bec) | ||
install_qt_kicker(loop=rd.loop) | ||
|
||
rd.start() |