Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Added new mixin abstract class
qudi.interface.mixins.process_control_switch.ProcessControlSwitchMixin
for hardware modules implementingProcessControlInterface
,ProcessSetpointInterface
orProcessValueInterface
.Provides default implementations satisfying the
SwitchInterface
when mixed into an implementation of the above mentioned process control interfaces so it can be accessed as process control device and as switch to toggle the device on/off.Usage is simple... just inherit the mixin alongside
ProcessControlInterface
,ProcessSetpointInterface
orProcessValueInterface
:An implementation example is showcased using the
dummy.cfg
and loading the switch GUI. The dummy modulequdi.hardware.dummy.process_control_dummy.ProcessControlDummy
has been expanded using the new mixin to additionally satisfy theSwitchInterface
.Motivation and Context
The interfaces contained in
qudi.interface.process_control_interface
provide the ability to enable and disable the hardware device viaUsing the new mixin, this functionality can be accessed by the switch toolchain of qudi without additional implementation efforts for each hardware module.
Addresses part of the discussion in PR #31
How Has This Been Tested?
On Win 10 pro 21H2 using the qudi-iqo-modules
default.cfg
Screenshots:
Types of changes
Checklist:
/docs/changelog.md
.(syntax, indentation, mutable default values, etc.).