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

Simplify the mock(simulated) device connection in blueapi #759

Open
ZohebShaikh opened this issue Dec 16, 2024 · 0 comments
Open

Simplify the mock(simulated) device connection in blueapi #759

ZohebShaikh opened this issue Dec 16, 2024 · 0 comments

Comments

@ZohebShaikh
Copy link
Contributor

This issue should be addressed once the this issue in dodal is resolved.

def is_simulated_device(name, factory, **kwargs):
device = devices.get(name, None)
mock_flag = kwargs.get("mock", kwargs.get("fake_with_ophyd_sim", False))
return device is not None and (
isinstance(factory, DeviceInitializationController)
and (factory._mock or mock_flag) # noqa: SLF001
and isinstance(device, AnyDevice)
)

Currently, determining if a device is a mock (simulation) requires checking the device’s factory, which adds unnecessary complexity. This process should be simplified.

Acceptance Criteria

  • Utilizing the simplified device connection approach from dodal for simulated devices.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant