-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ENH: Baton IOC #72
base: master
Are you sure you want to change the base?
ENH: Baton IOC #72
Conversation
So it works with the threading in bs1.6
Somewhere, can you define in very plain terms, what is a `baton`?
…On Wed, Aug 21, 2019, 6:48 PM Thomas A Caswell ***@***.***> wrote:
This is the companion PR to
bluesky/bluesky#1246 <bluesky/bluesky#1246>
Adds:
- updates configure_base for bluesky changes
- a Baton caproto IOC and matching ohpyd object with the hooks to
interact with bluesky
- a read only version of the ophyd object to back a typhon window
from nslsii import configure_basefrom nslsii.baton import Batonfrom ophyd.sim import *
b = Baton('XF31ID:', name='b')
names = configure_base(get_ipython().user_ns, 'temp', baton=b)
import os
os.environ['PYDM_EPICS_LIB'] = 'caproto'from nslsii.baton import BatonDisplay
from qtpy.QtWidgets import QApplicationimport typhon
app = QApplication.instance() or QApplication(['bluesky'])
bd = BatonDisplay('XF31ID:', name='b')
suite = typhon.TyphonSuite.from_device(bd)
suite.show()
app.exec_()
------------------------------
You can view, comment on, or merge this pull request online at:
#72
Commit Summary
- ENH: add IOC and ohpyd Device to act as a 'baton'
- MNT: adjust configure_base to not use history dict
- MNT: don't try to install the kicker for bs >= 1.6
- ENH: tweak the Baton IOC a bit
- ENH: add a ReadOnly Device to back a typhon object
File Changes
- *M* nslsii/__init__.py
<https://github.com/NSLS-II/nslsii/pull/72/files#diff-0> (53)
- *A* nslsii/baton.py
<https://github.com/NSLS-II/nslsii/pull/72/files#diff-1> (104)
- *A* nslsii/iocs/baton.py
<https://github.com/NSLS-II/nslsii/pull/72/files#diff-2> (69)
- *M* setup.py <https://github.com/NSLS-II/nslsii/pull/72/files#diff-3>
(5)
Patch Links:
- https://github.com/NSLS-II/nslsii/pull/72.patch
- https://github.com/NSLS-II/nslsii/pull/72.diff
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#72?email_source=notifications&email_token=AARMUMG5RKACACUH4JJSOFLQFXH53A5CNFSM4IOPK722YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HGUWMXA>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AARMUMCC6MBZLM6HRNBTBYLQFXH53ANCNFSM4IOPK72Q>
.
|
I am a former track runner and orchestra player so I am either thinking the relay baton or a conductors baton. It's the thing that means you are in charge 😉 |
Got it. So in the context of how Bluesky is used, the process in posession of the figurative baton is the only one authorized to control the hardware on the instrument (beam line, whatever). Any other bluesky process must be passive and not command the hardware to change. Right? |
Later in that file is the use of the baton: https://github.com/APS-2BM-MIC/ipython-user2bmb/blob/master/profile_2bmb/startup/20-signals.py#L52-L95 Basically, if has baton, attach to hardware, else attach to simulators. |
@prjemian Yes, same idea. That looks like that is an end-station / instrument deconfliction tool, this is to prevent a second RE on the same instrument from starting up and if it get stolen (which being EPICS is something we can not actually protect against), prevents an existing RE from running. Could you push https://github.com/APS-2BM-MIC/ipython-user2bmb/blob/9b7f7b134d0173cfd3a3398b79146cf7478071d2/profile_2bmb/startup/18-suspenders.py#L8-L58 upstream to bluesky? That looks generically useful. |
Sure
…On 2019-08-22 7:41 AM, Thomas A Caswell wrote:
@prjemian <https://github.com/prjemian> Yes, same idea. That looks like
that is an end-station / instrument deconfliction tool, this is to
prevent a second RE on the same instrument from starting up and if it
get stolen (which being EPICS is something we can not actually protect
against), prevents an existing RE from running.
Could you push
https://github.com/APS-2BM-MIC/ipython-user2bmb/blob/9b7f7b134d0173cfd3a3398b79146cf7478071d2/profile_2bmb/startup/18-suspenders.py#L8-L58
upstream to bluesky? That looks generically useful.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#72?email_source=notifications&email_token=AARMUMGPSW4LSWY6TMHQSCLQF2CQDA5CNFSM4IOPK722YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD446PNY#issuecomment-523888567>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AARMUMHIPCOS2AF6IPLJGZDQF2CQDANCNFSM4IOPK72Q>.
|
This is the companion PR to
bluesky/bluesky#1246
Adds:
interact with bluesky