Skip to content
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

User should be able to get positions of devices from the REST client. #379

Open
DiamondJoseph opened this issue Feb 28, 2024 · 4 comments
Open
Labels
enhancement New feature or request python Pull requests that update Python code rest api Potential REST API changes

Comments

@DiamondJoseph
Copy link
Collaborator

We expose the move stub, which takes a mapping of device to value to move them to. But we don't expose what type value should be per device, and for those devices with a JSONable value (which is probably only those that are Movable) we currently do not have any way of getting the location of those devices without running a count plan.

There should be a REST endpoint that can be called to:
If there is a running task, return 503: Server Busy
Otherwise:
Create a task to read either a selection or all of the Movable devices
Return those values as a JSON blob {"device_name": device_value}.

@DiamondJoseph DiamondJoseph added enhancement New feature or request python Pull requests that update Python code rest api Potential REST API changes labels Feb 28, 2024
@callumforrester
Copy link
Collaborator

Yes, I've been wondering exactly what form this should take, and whether it should work while a plan is running...
On the one hand, making plans as atomic as possible is a good thing, on the other hand asynchronous monitoring would give feature parity with GDA

@DiamondJoseph
Copy link
Collaborator Author

DiamondJoseph commented Mar 4, 2024

Now that the RunEngine is in its own subprocess, can you call device.locate() while a plan is in progress?

@callumforrester
Copy link
Collaborator

Devices are also in the subprocess, see #371

@stan-dot
Copy link
Collaborator

stan-dot commented May 1, 2024

what if the ophyd devices stream kafka events?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request python Pull requests that update Python code rest api Potential REST API changes
Projects
None yet
Development

No branches or pull requests

3 participants