Associate a list of ControlId with their values for an object.
More...
|
using | iterator = ControlListMap::iterator |
| Iterator for the controls contained within the list.
|
|
using | const_iterator = ControlListMap::const_iterator |
| Const iterator for the controls contained within the list.
|
|
Associate a list of ControlId with their values for an object.
The ControlList class stores values of controls exposed by an object. The lists returned by the Request::controls() and Request::metadata() methods refer to the camera that the request belongs to.
Control lists are constructed with a map of all the controls supported by their object, and an optional ControlValidator to further validate the controls.
◆ ControlList() [1/3]
libcamera::ControlList::ControlList |
( |
| ) |
|
Construct a ControlList not associated with any object.
This constructor is meant to support ControlList serialization and shall not be used directly by application.
◆ ControlList() [2/3]
Construct a ControlList with an optional control validator.
- Parameters
-
[in] | idmap | The ControlId map for the control list target object |
[in] | validator | The validator (may be null) |
For ControlList containing libcamera controls, a global map of all libcamera controls is provided by controls::controls and can be used as the idmap argument.
◆ ControlList() [3/3]
Construct a ControlList with the idmap of a control info map.
- Parameters
-
[in] | infoMap | The ControlInfoMap for the control list target object |
[in] | validator | The validator (may be null) |
◆ begin() [1/2]
iterator libcamera::ControlList::begin |
( |
| ) |
|
|
inline |
Retrieve an iterator to the first Control in the list.
- Returns
- An iterator to the first Control in the list
◆ begin() [2/2]
Retrieve a const_iterator to the first Control in the list.
- Returns
- A const_iterator to the first Control in the list
◆ contains() [1/2]
bool libcamera::ControlList::contains |
( |
const ControlId & |
id | ) |
const |
Check if the list contains a control with the specified id.
- Parameters
-
- Returns
- True if the list contains a matching control, false otherwise
◆ contains() [2/2]
bool libcamera::ControlList::contains |
( |
unsigned int |
id | ) |
const |
Check if the list contains a control with the specified id.
- Parameters
-
[in] | id | The control numerical ID |
- Returns
- True if the list contains a matching control, false otherwise
◆ empty()
libcamera::ControlList::empty |
( |
| ) |
const |
|
inline |
Identify if the list is empty.
- Returns
- True if the list does not contain any control, false otherwise
◆ end() [1/2]
iterator libcamera::ControlList::end |
( |
| ) |
|
|
inline |
Retrieve an iterator pointing to the past-the-end control in the list.
- Returns
- An iterator to the element following the last control in the list
◆ end() [2/2]
Retrieve a const iterator pointing to the past-the-end control in the list.
- Returns
- A const iterator to the element following the last control in the list
◆ get() [1/2]
template<typename T >
template< typename T > T libcamera::ControlList::get |
( |
const Control< T > & |
ctrl | ) |
const |
|
inline |
Get the value of control ctrl.
- Parameters
-
The behaviour is undefined if the control ctrl is not present in the list. Use ControlList::contains() to test for the presence of a control in the list before retrieving its value.
The control value type shall match the type T, otherwise the behaviour is undefined.
- Returns
- The control value
◆ get() [2/2]
const ControlValue & libcamera::ControlList::get |
( |
unsigned int |
id | ) |
const |
Get the value of control id.
- Parameters
-
[in] | id | The control numerical ID |
The behaviour is undefined if the control id is not present in the list. Use ControlList::contains() to test for the presence of a control in the list before retrieving its value.
- Returns
- The control value
◆ infoMap()
libcamera::ControlList::infoMap |
( |
| ) |
const |
|
inline |
◆ set() [1/3]
template<typename T , typename V >
template< typename T, typename V > void libcamera::ControlList::set |
( |
const Control< T > & |
ctrl, |
|
|
const std::initializer_list< V > & |
value |
|
) |
| |
|
inline |
Set the control ctrl value to value.
- Parameters
-
[in] | ctrl | The control |
[in] | value | The control value |
This method sets the value of a control in the control list. If the control is already present in the list, its value is updated, otherwise it is added to the list.
The behaviour is undefined if the control ctrl is not supported by the object that the list refers to.
◆ set() [2/3]
template<typename T , typename V >
template< typename T, typename V > void libcamera::ControlList::set |
( |
const Control< T > & |
ctrl, |
|
|
const V & |
value |
|
) |
| |
|
inline |
Set the control ctrl value to value.
- Parameters
-
[in] | ctrl | The control |
[in] | value | The control value |
This method sets the value of a control in the control list. If the control is already present in the list, its value is updated, otherwise it is added to the list.
The behaviour is undefined if the control ctrl is not supported by the object that the list refers to.
◆ set() [3/3]
void libcamera::ControlList::set |
( |
unsigned int |
id, |
|
|
const ControlValue & |
value |
|
) |
| |
Set the value of control id to value.
- Parameters
-
[in] | id | The control ID |
[in] | value | The control value |
This method sets the value of a control in the control list. If the control is already present in the list, its value is updated, otherwise it is added to the list.
The behaviour is undefined if the control id is not supported by the object that the list refers to.
◆ size()
libcamera::ControlList::size |
( |
| ) |
const |
|
inline |
Retrieve the number of controls in the list.
- Returns
- The number of Control entries stored in the list
The documentation for this class was generated from the following files:
- include/libcamera/controls.h
- src/libcamera/controls.cpp