libcamera: libcamera::ControlInfo Class Reference

libcamera v0.7.2 Supporting cameras in Linux since 2019

Loading...
Searching...
No Matches
libcamera::ControlInfo Class Reference

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.
| ControlInfo (Span< const ControlValue > values, const ControlValue &def={})
| Construct a ControlInfo from the list of valid values.
const ControlValue & | min () const
| Retrieve the minimum value of the control.
const ControlValue & | max () const
| Retrieve the maximum value of the control.
const ControlValue & | def () const
| Retrieve the default value of the control.
const std::vector< ControlValue > & | values () const
| Retrieve the list of valid values.
std::string | toString () const
| Provide a string representation of the ControlInfo.
bool | operator== (const ControlInfo &other) const
| Compare ControlInfo instances for equality.
bool | operator!= (const ControlInfo &other) const
| Compare ControlInfo instances for non equality.

## Detailed Description

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.

## Constructor & Destructor Documentation

## ◆ ControlInfo() [1/2]

libcamera::ControlInfo::ControlInfo | ( | const ControlValue & | min = {},
|  | const ControlValue & | max = {},
|  | const ControlValue & | def = {} )
| explicit

Construct a ControlInfo with minimum and maximum range parameters.

Parameters

  [in] | min | The control minimum value
  [in] | max | The control maximum value
  [in] | def | The control default value

## ◆ ControlInfo() [2/2]

libcamera::ControlInfo::ControlInfo | ( | Span< const ControlValue > | values,
|  | const ControlValue & | def = {} )
| explicit

Construct a ControlInfo from the list of valid values.

Parameters

  [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.

## Member Function Documentation

## ◆ def()

const ControlValue & libcamera::ControlInfo::def | ( |  | ) | const
| inline

Retrieve the default value of the control.

Returns
  A ControlValue with the default value for the control

## ◆ max()

const ControlValue & libcamera::ControlInfo::max | ( |  | ) | const
| 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.

Returns
  A ControlValue with the maximum value for the control

## ◆ min()

const ControlValue & libcamera::ControlInfo::min | ( |  | ) | const
| 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.

Returns
  A ControlValue with the minimum value for the control

## ◆ operator!=()

bool libcamera::ControlInfo::operator!= | ( | const ControlInfo & | other | ) | const
| inline

Compare ControlInfo instances for non equality.

Returns
  True if the constraints have different min and max, false otherwise

## ◆ operator==()

bool libcamera::ControlInfo::operator== | ( | const ControlInfo & | other | ) | const
| inline

Compare ControlInfo instances for equality.

Returns
  True if the constraints have identical min and max, false otherwise

## ◆ values()

const std::vector< ControlValue > & libcamera::ControlInfo::values | ( |  | ) | const
| 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.

Returns
  A vector of ControlValue representing the control valid values

The documentation for this class was generated from the following files:

- include/libcamera/controls.h
- src/libcamera/controls.cpp