19 using Value = std::variant<int64_t, double, std::string>;
34 static std::string toString(
ControlId control) {
37 return "ExposureTimeAb";
49 std::optional<Value> default_value;
65 std::vector<std::optional<Value>> get(
const std::vector<std::string>& control_names)
const;
66 std::optional<Value> get(
const std::string& control_name)
const;
67 std::optional<Value> get(
const ControlId& control)
const {
return get(toString(control)); }
73 bool set(
const std::vector<std::string>& control_names,
const std::vector<Value>& values)
const;
74 bool set(
const std::string& control_name,
const Value& value)
const;
75 bool set(
const ControlId& control,
const Value& value)
const {
76 return set(toString(control), value);
88 using EnumerateCallback =
89 std::function<void(
const std::optional<std::vector<Control>>& controls)>;
90 using GetCallback = std::function<void(
const std::vector<std::optional<Value>>& values)>;
91 using SetCallback = std::function<void(
const std::vector<bool>& accepted)>;
98 void get(
const std::vector<std::string>& control_names, GetCallback callback)
const;
101 void set(
const std::vector<std::string>& control_names,
const std::vector<Value>& values,
102 SetCallback callback)
const;
106 std::unique_ptr<CameraControlImpl> _impl;
void get(const std::vector< std::string > &control_names, GetCallback callback) const
callback gets a value per control, nullopt where a control failed
bool set(const std::vector< std::string > &control_names, const std::vector< Value > &values) const
Set controls, applied in the given order.