libcamera
v0.3.2+116-83c5ad0f
Supporting cameras in Linux since 2019
|
Describe the limits of valid values for a Control. More...
Public Member Functions | |
ControlInfo (const ControlValue &min={}, const ControlValue &max={}, const ControlValue &def={}) | |
Construct a ControlInfo with minimum and maximum range parameters. More... | |
ControlInfo (Span< const ControlValue > values, const ControlValue &def={}) | |
Construct a ControlInfo from the list of valid values. More... | |
ControlInfo (std::set< bool > values, bool def) | |
Construct a boolean ControlInfo with both boolean values. More... | |
ControlInfo (bool value) | |
Construct a boolean ControlInfo with only one valid value. More... | |
const ControlValue & | min () const |
Retrieve the minimum value of the control. More... | |
const ControlValue & | max () const |
Retrieve the maximum value of the control. More... | |
const ControlValue & | def () const |
Retrieve the default value of the control. More... | |
const std::vector< ControlValue > & | values () const |
Retrieve the list of valid values. More... | |
std::string | toString () const |
Provide a string representation of the ControlInfo. | |
bool | operator== (const ControlInfo &other) const |
Compare ControlInfo instances for equality. More... | |
bool | operator!= (const ControlInfo &other) const |
Compare ControlInfo instances for non equality. More... | |
Describe the limits of valid values for a Control.
The ControlInfo expresses the constraints on valid values for a control. The constraints depend on the object the control applies to, and are constant for the lifetime of that object. They are typically constructed by pipeline handlers to describe the controls they support.
|
explicit |
Construct a ControlInfo with minimum and maximum range parameters.
[in] | min | The control minimum value |
[in] | max | The control maximum value |
[in] | def | The control default value |
|
explicit |
Construct a ControlInfo from the list of valid values.
[in] | values | The control valid values |
[in] | def | The control default value |
Construct a ControlInfo from a list of valid values. The ControlInfo minimum and maximum values are set to the first and last members of the values list respectively. The default value is set to def if provided, or to the minimum value otherwise.
|
explicit |
Construct a boolean ControlInfo with both boolean values.
[in] | values | The control valid boolean values (both true and false) |
[in] | def | The control default boolean value |
Construct a ControlInfo for a boolean control, where both true and false are valid values. values must be { false, true } (the order is irrelevant). The minimum value will always be false, and the maximum always true. The default value is def.
|
explicit |
Construct a boolean ControlInfo with only one valid value.
[in] | value | The control valid boolean value |
Construct a ControlInfo for a boolean control, where there is only valid value. The minimum, maximum, and default values will all be value.
|
inline |
Retrieve the default value of the control.
|
inline |
Retrieve the maximum value of the control.
For string controls, this is the maximum length of the string, not counting the terminating '\0'. For all other control types, this is the maximum value of each element.
|
inline |
Retrieve the minimum value of the control.
For string controls, this is the minimum length of the string, not counting the terminating '\0'. For all other control types, this is the minimum value of each element.
|
inline |
Compare ControlInfo instances for non equality.
|
inline |
Compare ControlInfo instances for equality.
|
inline |
Retrieve the list of valid values.
For controls that support a pre-defined number of values, the enumeration of those is reported through a vector of ControlValue instances accessible with this function.