camcom 1.0.3
 
Loading...
Searching...
No Matches
parameterMetadata.hpp
Go to the documentation of this file.
1
8
9#ifndef CAMCOM_COMMON_PARAMETER_METADATA_HPP
10#define CAMCOM_COMMON_PARAMETER_METADATA_HPP
11
12#include <optional>
13#include <string>
14#include <vector>
15
17
18namespace camcom::common {
19
34 std::string camera_name;
35
37 std::optional<double> min;
38
40 std::optional<double> max;
41
43 std::optional<double> increment;
44
46 std::vector<std::string> allowed;
47
49 std::string unit;
50
52 std::string description;
53
55 bool readable{true};
56
58 bool writable{true};
59
61 std::optional<Value> default_value;
62
64 bool HasData() const {
65 return !camera_name.empty() || min.has_value() || max.has_value() ||
66 increment.has_value() || !allowed.empty() || !unit.empty() ||
67 !description.empty() || default_value.has_value() ||
68 !readable || !writable;
69 }
70
72 std::string ToString() const;
73};
74
75} // namespace camcom::common
76
77#endif // CAMCOM_COMMON_PARAMETER_METADATA_HPP
Definition adapterBase.cpp:18
Parameter metadata containing constraints and descriptive information.
Definition parameterMetadata.hpp:32
std::string description
Human-readable description of the parameter.
Definition parameterMetadata.hpp:52
std::string camera_name
Original camera-native parameter name (before mapping to generic name)
Definition parameterMetadata.hpp:34
std::string unit
Unit of measurement (e.g., "microseconds", "Hz", "dB")
Definition parameterMetadata.hpp:49
std::optional< double > min
Minimum value (for numeric types)
Definition parameterMetadata.hpp:37
std::string ToString() const
Convert to string for debugging.
Definition parameter.cpp:99
std::optional< double > max
Maximum value (for numeric types)
Definition parameterMetadata.hpp:40
bool writable
Whether the parameter can be written.
Definition parameterMetadata.hpp:58
std::optional< double > increment
Increment/step size (for slider UI controls)
Definition parameterMetadata.hpp:43
std::optional< Value > default_value
Default value (if known)
Definition parameterMetadata.hpp:61
std::vector< std::string > allowed
Allowed values (for enumeration types)
Definition parameterMetadata.hpp:46
bool HasData() const
Check if any metadata is populated.
Definition parameterMetadata.hpp:64
bool readable
Whether the parameter can be read.
Definition parameterMetadata.hpp:55
Header file for the CamCom Common Library.