Use qudi.util.constraints.ScalarConstraint in more (if not all) interface-specific hardware constraint classes. It is a great class to use as a building block. It comes with useful features such as type and value checking, clipping and more.
It is not yet used in
FiniteSamplingInputConstraints
FiniteSamplingIOConstraints
and many more
It is already used in
DataInStreamConstraints
and more
Related Problem
Extra code needs to be written for in-range or type checking of variables against constraints if ScalarConstraint is not used and the interface-specific hardware constraint class does not implement this functionality.
Considered Alternatives
Do nothing: works but requires extra code to be written for each hardware or logic module.
Additional Context
This must not necessarily be a breaking change. It should be possible to implement this in a backwards-compatible way.
Feature Description
Use
qudi.util.constraints.ScalarConstraint
in more (if not all) interface-specific hardware constraint classes. It is a great class to use as a building block. It comes with useful features such as type and value checking, clipping and more.It is not yet used in
FiniteSamplingInputConstraints
FiniteSamplingIOConstraints
It is already used in
DataInStreamConstraints
Related Problem
Extra code needs to be written for in-range or type checking of variables against constraints if
ScalarConstraint
is not used and the interface-specific hardware constraint class does not implement this functionality.Considered Alternatives
Do nothing: works but requires extra code to be written for each hardware or logic module.
Additional Context
This must not necessarily be a breaking change. It should be possible to implement this in a backwards-compatible way.
Contact Details
No response