68# pragma warning(disable : 4251)
84 static constexpr const char *path{
"" };
87 static constexpr const char *name{
"CameraInfo" };
90 static constexpr const char *description{
91 R
"description(Information about camera model, serial number etc.)description"
94 static constexpr size_t version{ 4 };
104 static constexpr std::array<uint8_t, 3> binaryId{
'n',
'f',
'o' };
118 static constexpr const char *path{
"FirmwareVersion" };
121 static constexpr const char *name{
"FirmwareVersion" };
124 static constexpr const char *description{ R
"description(The firmware version on the camera)description" };
132 return { 0, std::numeric_limits<ValueType::size_type>::max() };
140 : m_value{ std::move(value) }
152 return m_value == other.m_value;
158 return m_value != other.m_value;
164 return m_value < other.m_value;
170 return m_value > other.m_value;
176 return m_value <= other.m_value;
182 return m_value >= other.m_value;
192 void setFromString(
const std::string &value);
194 std::string m_value{};
209 static constexpr const char *path{
"Model" };
212 static constexpr const char *name{
"Model" };
215 static constexpr const char *description{ R
"description(The model of the camera)description" };
241 return { ValueType::zividOnePlusSmall, ValueType::zividOnePlusMedium, ValueType::zividOnePlusLarge,
242 ValueType::zividTwo, ValueType::zividTwoL100, ValueType::zivid2PlusM130,
243 ValueType::zivid2PlusM60, ValueType::zivid2PlusL110 };
251 : m_value{ verifyValue(value) }
269 return m_value == other.m_value;
275 return m_value != other.m_value;
285 void setFromString(
const std::string &value);
287 constexpr ValueType
static verifyValue(
const ValueType &value)
289 return value == ValueType::zividOnePlusSmall || value == ValueType::zividOnePlusMedium
290 || value == ValueType::zividOnePlusLarge || value == ValueType::zividTwo
291 || value == ValueType::zividTwoL100 || value == ValueType::zivid2PlusM130
292 || value == ValueType::zivid2PlusM60 || value == ValueType::zivid2PlusL110
294 :
throw std::invalid_argument{
295 "Invalid value: Model{ "
296 + std::to_string(
static_cast<std::underlying_type<ValueType>::type
>(value)) +
" }"
302 friend struct DataModel::Detail::Befriend<
Model>;
317 static constexpr const char *path{
"ModelName" };
320 static constexpr const char *name{
"ModelName" };
323 static constexpr const char *description{
324 R
"description(The model name of the camera. This is a user-friendly display name that may contain spaces and special
325characters. We recommend to use `Model` instead if you want to programmatically check for camera model.
335 return { 0, std::numeric_limits<ValueType::size_type>::max() };
343 : m_value{ std::move(value) }
355 return m_value == other.m_value;
361 return m_value != other.m_value;
367 return m_value < other.m_value;
373 return m_value > other.m_value;
379 return m_value <= other.m_value;
385 return m_value >= other.m_value;
395 void setFromString(
const std::string &value);
397 std::string m_value{};
399 friend struct DataModel::Detail::Befriend<
ModelName>;
412 static constexpr const char *path{
"Revision" };
415 static constexpr const char *name{
"Revision" };
418 static constexpr const char *description{ R
"description(The hardware revision of the camera)description" };
430 static constexpr const char *path{
"Revision/Major" };
433 static constexpr const char *name{
"Major" };
436 static constexpr const char *description{ R
"description(Major hardware revision number)description" };
444 return { std::numeric_limits<uint32_t>::lowest(), std::numeric_limits<uint32_t>::max() };
451 explicit constexpr Major(uint32_t value)
464 return m_value == other.m_value;
470 return m_value != other.m_value;
476 return m_value < other.m_value;
482 return m_value > other.m_value;
488 return m_value <= other.m_value;
494 return m_value >= other.m_value;
504 void setFromString(
const std::string &value);
506 uint32_t m_value{ 0 };
508 friend struct DataModel::Detail::Befriend<
Major>;
521 static constexpr const char *path{
"Revision/Minor" };
524 static constexpr const char *name{
"Minor" };
527 static constexpr const char *description{ R
"description(Minor hardware revision number)description" };
535 return { std::numeric_limits<uint32_t>::lowest(), std::numeric_limits<uint32_t>::max() };
542 explicit constexpr Minor(uint32_t value)
555 return m_value == other.m_value;
561 return m_value != other.m_value;
567 return m_value < other.m_value;
573 return m_value > other.m_value;
579 return m_value <= other.m_value;
585 return m_value >= other.m_value;
595 void setFromString(
const std::string &value);
597 uint32_t m_value{ 0 };
599 friend struct DataModel::Detail::Befriend<
Minor>;
602 using Descendants = std::tuple<CameraInfo::Revision::Major, CameraInfo::Revision::Minor>;
622 typename std::enable_if<
sizeof...(Args) >= 1,
int>::type = 0,
623 typename std::enable_if<
624 Zivid::Detail::TypeTraits::AllArgsAreInTuple<
Descendants,
typename std::decay<Args>::type...>::
628 template<typename... Args>
632 using namespace Zivid::Detail::TypeTraits;
635 AllArgsDecayedAreUnique<Args...>::value,
636 "Found duplicate types among the arguments passed to Revision(...). "
637 "Types should be listed at most once.");
639 set(std::forward<Args>(args)...);
654 template<
typename... Args,
typename std::enable_if<
sizeof...(Args) >= 2,
int>::type = 0>
656 template<typename... Args>
660 using namespace Zivid::Detail::TypeTraits;
662 using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
664 AllArgsAreDescendantNodes::value,
"All arguments passed to set(...) must be descendant nodes.");
667 AllArgsDecayedAreUnique<Args...>::value,
668 "Found duplicate types among the arguments passed to set(...). "
669 "Types should be listed at most once.");
671 Zivid::DataModel::Detail::invokeSetWithEachArgument(*
this, std::forward<Args>(args)...);
687 template<
typename... Args,
typename std::enable_if<
sizeof...(Args) >= 1,
int>::type = 0>
689 template<typename... Args>
693 using namespace Zivid::Detail::TypeTraits;
695 using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
697 AllArgsAreDescendantNodes::value,
698 "All arguments passed to copyWith(...) must be descendant nodes.");
701 AllArgsDecayedAreUnique<Args...>::value,
702 "Found duplicate types among the arguments passed to copyWith(...). "
703 "Types should be listed at most once.");
706 copy.
set(std::forward<Args>(args)...);
750 typename std::enable_if<std::is_same<T, CameraInfo::Revision::Major>::value,
int>::type = 0>
758 typename std::enable_if<std::is_same<T, CameraInfo::Revision::Minor>::value,
int>::type = 0>
764 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
770 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
808 void setFromString(
const std::string &value);
810 void setFromString(
const std::string &fullPath,
const std::string &value);
812 std::string getString(
const std::string &fullPath)
const;
817 friend struct DataModel::Detail::Befriend<
Revision>;
830 static constexpr const char *path{
"SerialNumber" };
833 static constexpr const char *name{
"SerialNumber" };
836 static constexpr const char *description{ R
"description(The serial number of the camera)description" };
844 return { 0, std::numeric_limits<ValueType::size_type>::max() };
852 : m_value{ std::move(value) }
864 return m_value == other.m_value;
870 return m_value != other.m_value;
876 return m_value < other.m_value;
882 return m_value > other.m_value;
888 return m_value <= other.m_value;
894 return m_value >= other.m_value;
904 void setFromString(
const std::string &value);
906 std::string m_value{};
908 friend struct DataModel::Detail::Befriend<
SerialNumber>;
921 static constexpr const char *path{
"UserData" };
924 static constexpr const char *name{
"UserData" };
927 static constexpr const char *description{
928 R
"description(Information about user data capabilities of the camera)description"
941 static constexpr const char *path{
"UserData/MaxSizeBytes" };
944 static constexpr const char *name{
"MaxSizeBytes" };
947 static constexpr const char *description{
948 R
"description(The maximum number of bytes of user data that can be stored in the camera)description"
957 return { std::numeric_limits<uint64_t>::lowest(), std::numeric_limits<uint64_t>::max() };
977 return m_value == other.m_value;
983 return m_value != other.m_value;
989 return m_value < other.m_value;
995 return m_value > other.m_value;
1001 return m_value <= other.m_value;
1007 return m_value >= other.m_value;
1017 void setFromString(
const std::string &value);
1019 uint64_t m_value{ 0 };
1021 friend struct DataModel::Detail::Befriend<
MaxSizeBytes>;
1043 typename std::enable_if<
sizeof...(Args) >= 1,
int>::type = 0,
1044 typename std::enable_if<
1045 Zivid::Detail::TypeTraits::AllArgsAreInTuple<
Descendants,
typename std::decay<Args>::type...>::
1049 template<typename... Args>
1053 using namespace Zivid::Detail::TypeTraits;
1056 AllArgsDecayedAreUnique<Args...>::value,
1057 "Found duplicate types among the arguments passed to UserData(...). "
1058 "Types should be listed at most once.");
1060 set(std::forward<Args>(args)...);
1074 template<
typename... Args,
typename std::enable_if<
sizeof...(Args) >= 2,
int>::type = 0>
1076 template<typename... Args>
1080 using namespace Zivid::Detail::TypeTraits;
1082 using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
1084 AllArgsAreDescendantNodes::value,
"All arguments passed to set(...) must be descendant nodes.");
1087 AllArgsDecayedAreUnique<Args...>::value,
1088 "Found duplicate types among the arguments passed to set(...). "
1089 "Types should be listed at most once.");
1091 Zivid::DataModel::Detail::invokeSetWithEachArgument(*
this, std::forward<Args>(args)...);
1106 template<
typename... Args,
typename std::enable_if<
sizeof...(Args) >= 1,
int>::type = 0>
1108 template<typename... Args>
1112 using namespace Zivid::Detail::TypeTraits;
1114 using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
1116 AllArgsAreDescendantNodes::value,
1117 "All arguments passed to copyWith(...) must be descendant nodes.");
1120 AllArgsDecayedAreUnique<Args...>::value,
1121 "Found duplicate types among the arguments passed to copyWith(...). "
1122 "Types should be listed at most once.");
1125 copy.
set(std::forward<Args>(args)...);
1132 return m_maxSizeBytes;
1138 return m_maxSizeBytes;
1144 m_maxSizeBytes = value;
1150 typename std::enable_if<std::is_same<T, CameraInfo::UserData::MaxSizeBytes>::value,
int>::type = 0>
1153 return m_maxSizeBytes;
1156 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
1159 return m_maxSizeBytes;
1163 template<
typename F>
1170 template<
typename F>
1192 void setFromString(
const std::string &value);
1194 void setFromString(
const std::string &fullPath,
const std::string &value);
1196 std::string getString(
const std::string &fullPath)
const;
1200 friend struct DataModel::Detail::Befriend<
UserData>;
1242 typename std::enable_if<
sizeof...(Args) >= 1,
int>::type = 0,
1243 typename std::enable_if<
1244 Zivid::Detail::TypeTraits::AllArgsAreInTuple<
Descendants,
typename std::decay<Args>::type...>::value,
1247 template<typename... Args>
1251 using namespace Zivid::Detail::TypeTraits;
1254 AllArgsDecayedAreUnique<Args...>::value,
1255 "Found duplicate types among the arguments passed to CameraInfo(...). "
1256 "Types should be listed at most once.");
1258 set(std::forward<Args>(args)...);
1280 template<
typename... Args,
typename std::enable_if<
sizeof...(Args) >= 2,
int>::type = 0>
1282 template<typename... Args>
1286 using namespace Zivid::Detail::TypeTraits;
1288 using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
1290 AllArgsAreDescendantNodes::value,
"All arguments passed to set(...) must be descendant nodes.");
1293 AllArgsDecayedAreUnique<Args...>::value,
1294 "Found duplicate types among the arguments passed to set(...). "
1295 "Types should be listed at most once.");
1297 Zivid::DataModel::Detail::invokeSetWithEachArgument(*
this, std::forward<Args>(args)...);
1320 template<
typename... Args,
typename std::enable_if<
sizeof...(Args) >= 1,
int>::type = 0>
1322 template<typename... Args>
1326 using namespace Zivid::Detail::TypeTraits;
1328 using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
1330 AllArgsAreDescendantNodes::value,
"All arguments passed to copyWith(...) must be descendant nodes.");
1333 AllArgsDecayedAreUnique<Args...>::value,
1334 "Found duplicate types among the arguments passed to copyWith(...). "
1335 "Types should be listed at most once.");
1338 copy.
set(std::forward<Args>(args)...);
1345 return m_firmwareVersion;
1351 return m_firmwareVersion;
1357 m_firmwareVersion = value;
1395 m_modelName = value;
1421 m_revision.
set(value);
1428 m_revision.
set(value);
1435 return m_serialNumber;
1441 return m_serialNumber;
1447 m_serialNumber = value;
1473 m_userData.
set(value);
1479 typename std::enable_if<std::is_same<T, CameraInfo::FirmwareVersion>::value,
int>::type = 0>
1482 return m_firmwareVersion;
1485 template<typename T, typename std::enable_if<std::is_same<T, CameraInfo::Model>::value,
int>::type = 0>
1491 template<typename T, typename std::enable_if<std::is_same<T, CameraInfo::ModelName>::value,
int>::type = 0>
1497 template<typename T, typename std::enable_if<std::is_same<T, CameraInfo::Revision>::value,
int>::type = 0>
1505 typename std::enable_if<std::is_same<T, CameraInfo::Revision::Major>::value,
int>::type = 0>
1513 typename std::enable_if<std::is_same<T, CameraInfo::Revision::Minor>::value,
int>::type = 0>
1519 template<typename T, typename std::enable_if<std::is_same<T, CameraInfo::SerialNumber>::value,
int>::type = 0>
1522 return m_serialNumber;
1525 template<typename T, typename std::enable_if<std::is_same<T, CameraInfo::UserData>::value,
int>::type = 0>
1533 typename std::enable_if<std::is_same<T, CameraInfo::UserData::MaxSizeBytes>::value,
int>::type = 0>
1539 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
1542 return m_firmwareVersion;
1545 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
1551 template<size_t i, typename std::enable_if<i == 2, int>::type = 0>
1557 template<size_t i, typename std::enable_if<i == 3, int>::type = 0>
1563 template<size_t i, typename std::enable_if<i == 4, int>::type = 0>
1566 return m_serialNumber;
1569 template<size_t i, typename std::enable_if<i == 5, int>::type = 0>
1576 template<
typename F>
1579 f(m_firmwareVersion);
1588 template<
typename F>
1591 f(m_firmwareVersion);
1615 void save(
const std::string &fileName)
const;
1618 void load(
const std::string &fileName);
1621 void setFromString(
const std::string &value);
1623 void setFromString(
const std::string &fullPath,
const std::string &value);
1625 std::string getString(
const std::string &fullPath)
const;
1634 friend struct DataModel::Detail::Befriend<
CameraInfo>;
1648 struct CameraInfo::Version<4>
1650 using Type = CameraInfo;
1657# pragma warning(pop)
1661# if !(defined(_MSC_VER) && (_MSC_VER <= 1900))
1666 struct tuple_size<
Zivid::CameraInfo::Revision> : integral_constant<size_t, 2>
1670 struct tuple_element<i,
Zivid::CameraInfo::Revision>
1672 static_assert(i < tuple_size<Zivid::CameraInfo::Revision>::value,
"Index must be less than 2");
1675 =
decltype(declval<Zivid::CameraInfo::Revision>().get<i>());
1679 struct tuple_size<
Zivid::CameraInfo::UserData> : integral_constant<size_t, 1>
1683 struct tuple_element<i,
Zivid::CameraInfo::UserData>
1685 static_assert(i < tuple_size<Zivid::CameraInfo::UserData>::value,
"Index must be less than 1");
1688 =
decltype(declval<Zivid::CameraInfo::UserData>().get<i>());
1692 struct tuple_size<
Zivid::CameraInfo> : integral_constant<size_t, 6>
1696 struct tuple_element<i,
Zivid::CameraInfo>
1698 static_assert(i < tuple_size<Zivid::CameraInfo>::value,
"Index must be less than 6");
1701 =
decltype(declval<Zivid::CameraInfo>().get<i>());
1710#if defined(__has_include) && !defined(NO_DOC)
1711# if __has_include("Zivid/CameraInfoInternal.h") && __has_include("Zivid/DataModelNodeMetaData.h")
1712# include "Zivid/CameraInfoInternal.h"
#define ZIVID_CORE_EXPORT
Definition CoreExport.h:56
The firmware version on the camera.
Definition CameraInfo.h:112
std::string toString() const
Get the value as string.
bool operator==(const FirmwareVersion &other) const
Comparison operator.
Definition CameraInfo.h:150
FirmwareVersion(std::string value)
Constructor.
Definition CameraInfo.h:139
static constexpr Range< ValueType::size_type > validSize()
The valid sizes for FirmwareVersion.
Definition CameraInfo.h:130
bool operator<(const FirmwareVersion &other) const
Comparison operator.
Definition CameraInfo.h:162
bool operator<=(const FirmwareVersion &other) const
Comparison operator.
Definition CameraInfo.h:174
bool operator>=(const FirmwareVersion &other) const
Comparison operator.
Definition CameraInfo.h:180
const std::string & value() const
Get the value.
friend std::ostream & operator<<(std::ostream &stream, const FirmwareVersion &value)
Operator to serialize the value to a stream.
Definition CameraInfo.h:186
bool operator>(const FirmwareVersion &other) const
Comparison operator.
Definition CameraInfo.h:168
bool operator!=(const FirmwareVersion &other) const
Comparison operator.
Definition CameraInfo.h:156
std::string ValueType
The type of the underlying value.
Definition CameraInfo.h:127
FirmwareVersion()=default
Default constructor.
The model name of the camera. This is a user-friendly display name that may contain spaces and specia...
Definition CameraInfo.h:311
bool operator==(const ModelName &other) const
Comparison operator.
Definition CameraInfo.h:353
ModelName()=default
Default constructor.
bool operator<=(const ModelName &other) const
Comparison operator.
Definition CameraInfo.h:377
std::string toString() const
Get the value as string.
ModelName(std::string value)
Constructor.
Definition CameraInfo.h:342
std::string ValueType
The type of the underlying value.
Definition CameraInfo.h:330
bool operator<(const ModelName &other) const
Comparison operator.
Definition CameraInfo.h:365
bool operator>(const ModelName &other) const
Comparison operator.
Definition CameraInfo.h:371
friend std::ostream & operator<<(std::ostream &stream, const ModelName &value)
Operator to serialize the value to a stream.
Definition CameraInfo.h:389
const std::string & value() const
Get the value.
static constexpr Range< ValueType::size_type > validSize()
The valid sizes for ModelName.
Definition CameraInfo.h:333
bool operator>=(const ModelName &other) const
Comparison operator.
Definition CameraInfo.h:383
bool operator!=(const ModelName &other) const
Comparison operator.
Definition CameraInfo.h:359
The model of the camera.
Definition CameraInfo.h:203
static const Model zividOnePlusSmall
zividOnePlusSmall
Definition CameraInfo.h:229
static const Model zivid2PlusM130
zivid2PlusM130
Definition CameraInfo.h:234
static const Model zividTwo
zividTwo
Definition CameraInfo.h:232
static const Model zivid2PlusL110
zivid2PlusL110
Definition CameraInfo.h:236
std::string toString() const
Get the value as string.
constexpr Model(ValueType value)
Constructor.
Definition CameraInfo.h:250
Model()=default
Default constructor.
static const Model zividOnePlusMedium
zividOnePlusMedium
Definition CameraInfo.h:230
ValueType value() const
Get the value.
friend std::ostream & operator<<(std::ostream &stream, const Model::ValueType &value)
Operator to serialize ValueType to a stream.
Definition CameraInfo.h:261
static const Model zivid2PlusM60
zivid2PlusM60
Definition CameraInfo.h:235
friend std::ostream & operator<<(std::ostream &stream, const Model &value)
Operator to serialize the value to a stream.
Definition CameraInfo.h:279
static std::set< ValueType > validValues()
All valid values of Model.
Definition CameraInfo.h:239
ValueType
The type of the underlying value.
Definition CameraInfo.h:219
static const Model zividOnePlusLarge
zividOnePlusLarge
Definition CameraInfo.h:231
bool operator!=(const Model &other) const
Comparison operator.
Definition CameraInfo.h:273
static const Model zividTwoL100
zividTwoL100
Definition CameraInfo.h:233
bool operator==(const Model &other) const
Comparison operator.
Definition CameraInfo.h:267
Major hardware revision number.
Definition CameraInfo.h:424
std::string toString() const
Get the value as string.
bool operator!=(const Major &other) const
Comparison operator.
Definition CameraInfo.h:468
uint32_t ValueType
The type of the underlying value.
Definition CameraInfo.h:439
friend std::ostream & operator<<(std::ostream &stream, const Major &value)
Operator to serialize the value to a stream.
Definition CameraInfo.h:498
static constexpr Range< uint32_t > validRange()
The range of valid values for Major.
Definition CameraInfo.h:442
bool operator>=(const Major &other) const
Comparison operator.
Definition CameraInfo.h:492
bool operator<=(const Major &other) const
Comparison operator.
Definition CameraInfo.h:486
bool operator>(const Major &other) const
Comparison operator.
Definition CameraInfo.h:480
uint32_t value() const
Get the value.
constexpr Major(uint32_t value)
Constructor.
Definition CameraInfo.h:451
bool operator<(const Major &other) const
Comparison operator.
Definition CameraInfo.h:474
Major()=default
Default constructor.
bool operator==(const Major &other) const
Comparison operator.
Definition CameraInfo.h:462
Minor hardware revision number.
Definition CameraInfo.h:515
bool operator>(const Minor &other) const
Comparison operator.
Definition CameraInfo.h:571
bool operator!=(const Minor &other) const
Comparison operator.
Definition CameraInfo.h:559
bool operator<=(const Minor &other) const
Comparison operator.
Definition CameraInfo.h:577
constexpr Minor(uint32_t value)
Constructor.
Definition CameraInfo.h:542
uint32_t ValueType
The type of the underlying value.
Definition CameraInfo.h:530
friend std::ostream & operator<<(std::ostream &stream, const Minor &value)
Operator to serialize the value to a stream.
Definition CameraInfo.h:589
bool operator==(const Minor &other) const
Comparison operator.
Definition CameraInfo.h:553
std::string toString() const
Get the value as string.
Minor()=default
Default constructor.
bool operator>=(const Minor &other) const
Comparison operator.
Definition CameraInfo.h:583
bool operator<(const Minor &other) const
Comparison operator.
Definition CameraInfo.h:565
static constexpr Range< uint32_t > validRange()
The range of valid values for Minor.
Definition CameraInfo.h:533
uint32_t value() const
Get the value.
The hardware revision of the camera.
Definition CameraInfo.h:406
const Major & major() const
Get Major.
Definition CameraInfo.h:711
Revision copyWith(Args &&...args) const
Returns a copy of this object with the given argument(s) set to the new value(s)
Definition CameraInfo.h:691
Minor & minor()
Get Minor.
Definition CameraInfo.h:736
Revision & set(const Minor &value)
Set Minor.
Definition CameraInfo.h:742
std::tuple< CameraInfo::Revision::Major, CameraInfo::Revision::Minor > Descendants
Definition CameraInfo.h:602
Revision & set(const Major &value)
Set Major.
Definition CameraInfo.h:723
bool operator==(const Revision &other) const
Equality operator.
const CameraInfo::Revision::Minor & get() const
Definition CameraInfo.h:759
std::string toString() const
Get the value as string.
const Minor & minor() const
Get Minor.
Definition CameraInfo.h:730
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition CameraInfo.h:786
Major & major()
Get Major.
Definition CameraInfo.h:717
const CameraInfo::Revision::Major & get() const
Definition CameraInfo.h:751
Revision()
Default constructor.
void forEach(const F &f) const
Run the given function on each direct member with the value of the member as parameter.
Definition CameraInfo.h:778
friend std::ostream & operator<<(std::ostream &stream, const Revision &value)
Operator to send the value as string to a stream.
Definition CameraInfo.h:802
void set(Args &&...args)
Set multiple arguments.
Definition CameraInfo.h:658
bool operator!=(const Revision &other) const
Inequality operator.
The serial number of the camera.
Definition CameraInfo.h:824
SerialNumber(std::string value)
Constructor.
Definition CameraInfo.h:851
const std::string & value() const
Get the value.
bool operator==(const SerialNumber &other) const
Comparison operator.
Definition CameraInfo.h:862
std::string ValueType
The type of the underlying value.
Definition CameraInfo.h:839
SerialNumber()=default
Default constructor.
friend std::ostream & operator<<(std::ostream &stream, const SerialNumber &value)
Operator to serialize the value to a stream.
Definition CameraInfo.h:898
std::string toString() const
Get the value as string.
bool operator>(const SerialNumber &other) const
Comparison operator.
Definition CameraInfo.h:880
bool operator<(const SerialNumber &other) const
Comparison operator.
Definition CameraInfo.h:874
bool operator<=(const SerialNumber &other) const
Comparison operator.
Definition CameraInfo.h:886
static constexpr Range< ValueType::size_type > validSize()
The valid sizes for SerialNumber.
Definition CameraInfo.h:842
bool operator>=(const SerialNumber &other) const
Comparison operator.
Definition CameraInfo.h:892
bool operator!=(const SerialNumber &other) const
Comparison operator.
Definition CameraInfo.h:868
The maximum number of bytes of user data that can be stored in the camera.
Definition CameraInfo.h:935
bool operator!=(const MaxSizeBytes &other) const
Comparison operator.
Definition CameraInfo.h:981
bool operator<=(const MaxSizeBytes &other) const
Comparison operator.
Definition CameraInfo.h:999
bool operator>(const MaxSizeBytes &other) const
Comparison operator.
Definition CameraInfo.h:993
MaxSizeBytes()=default
Default constructor.
constexpr MaxSizeBytes(uint64_t value)
Constructor.
Definition CameraInfo.h:964
uint64_t value() const
Get the value.
bool operator<(const MaxSizeBytes &other) const
Comparison operator.
Definition CameraInfo.h:987
bool operator==(const MaxSizeBytes &other) const
Comparison operator.
Definition CameraInfo.h:975
std::string toString() const
Get the value as string.
friend std::ostream & operator<<(std::ostream &stream, const MaxSizeBytes &value)
Operator to serialize the value to a stream.
Definition CameraInfo.h:1011
static constexpr Range< uint64_t > validRange()
The range of valid values for MaxSizeBytes.
Definition CameraInfo.h:955
uint64_t ValueType
The type of the underlying value.
Definition CameraInfo.h:952
bool operator>=(const MaxSizeBytes &other) const
Comparison operator.
Definition CameraInfo.h:1005
Information about user data capabilities of the camera.
Definition CameraInfo.h:915
bool operator==(const UserData &other) const
Equality operator.
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition CameraInfo.h:1171
MaxSizeBytes & maxSizeBytes()
Get MaxSizeBytes.
Definition CameraInfo.h:1136
UserData copyWith(Args &&...args) const
Returns a copy of this object with the given argument(s) set to the new value(s)
Definition CameraInfo.h:1110
friend std::ostream & operator<<(std::ostream &stream, const UserData &value)
Operator to send the value as string to a stream.
Definition CameraInfo.h:1186
std::string toString() const
Get the value as string.
void forEach(const F &f) const
Run the given function on each direct member with the value of the member as parameter.
Definition CameraInfo.h:1164
const CameraInfo::UserData::MaxSizeBytes & get() const
Definition CameraInfo.h:1151
std::tuple< CameraInfo::UserData::MaxSizeBytes > Descendants
Definition CameraInfo.h:1024
bool operator!=(const UserData &other) const
Inequality operator.
UserData()
Default constructor.
const MaxSizeBytes & maxSizeBytes() const
Get MaxSizeBytes.
Definition CameraInfo.h:1130
UserData & set(const MaxSizeBytes &value)
Set MaxSizeBytes.
Definition CameraInfo.h:1142
void set(Args &&...args)
Set multiple arguments.
Definition CameraInfo.h:1078
Information about camera model, serial number etc.
Definition CameraInfo.h:78
bool operator==(const CameraInfo &other) const
Equality operator.
Revision & revision()
Get Revision.
Definition CameraInfo.h:1406
const ModelName & modelName() const
Get ModelName.
Definition CameraInfo.h:1381
FirmwareVersion & firmwareVersion()
Get FirmwareVersion.
Definition CameraInfo.h:1349
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition CameraInfo.h:1589
const UserData & userData() const
Get UserData.
Definition CameraInfo.h:1452
ModelName & modelName()
Get ModelName.
Definition CameraInfo.h:1387
bool operator!=(const CameraInfo &other) const
Inequality operator.
CameraInfo & set(const Model &value)
Set Model.
Definition CameraInfo.h:1374
const CameraInfo::FirmwareVersion & get() const
Definition CameraInfo.h:1480
const CameraInfo::Model & get() const
Definition CameraInfo.h:1486
CameraInfo(const std::string &fileName)
Construct CameraInfo by loading from file.
UserData & userData()
Get UserData.
Definition CameraInfo.h:1458
CameraInfo & set(const ModelName &value)
Set ModelName.
Definition CameraInfo.h:1393
const FirmwareVersion & firmwareVersion() const
Get FirmwareVersion.
Definition CameraInfo.h:1343
const CameraInfo::UserData::MaxSizeBytes & get() const
Definition CameraInfo.h:1534
const Model & model() const
Get Model.
Definition CameraInfo.h:1362
CameraInfo copyWith(Args &&...args) const
Returns a copy of this object with the given argument(s) set to the new value(s)
Definition CameraInfo.h:1324
void forEach(const F &f) const
Run the given function on each direct member with the value of the member as parameter.
Definition CameraInfo.h:1577
Model & model()
Get Model.
Definition CameraInfo.h:1368
friend std::ostream & operator<<(std::ostream &stream, const CameraInfo &value)
Operator to send the value as string to a stream.
Definition CameraInfo.h:1609
const CameraInfo::ModelName & get() const
Definition CameraInfo.h:1492
CameraInfo & set(const UserData &value)
Set UserData.
Definition CameraInfo.h:1464
CameraInfo & set(const UserData::MaxSizeBytes &value)
Set UserData::MaxSizeBytes.
Definition CameraInfo.h:1471
CameraInfo(Args &&...args)
Constructor taking variadic number of arguments.
Definition CameraInfo.h:1249
const CameraInfo::UserData & get() const
Definition CameraInfo.h:1526
const CameraInfo::Revision::Minor & get() const
Definition CameraInfo.h:1514
const SerialNumber & serialNumber() const
Get SerialNumber.
Definition CameraInfo.h:1433
SerialNumber & serialNumber()
Get SerialNumber.
Definition CameraInfo.h:1439
const Revision & revision() const
Get Revision.
Definition CameraInfo.h:1400
std::tuple< CameraInfo::FirmwareVersion, CameraInfo::Model, CameraInfo::ModelName, CameraInfo::Revision, CameraInfo::Revision::Major, CameraInfo::Revision::Minor, CameraInfo::SerialNumber, CameraInfo::UserData, CameraInfo::UserData::MaxSizeBytes > Descendants
Definition CameraInfo.h:1212
void load(const std::string &fileName)
Load from the given file.
CameraInfo & set(const FirmwareVersion &value)
Set FirmwareVersion.
Definition CameraInfo.h:1355
const CameraInfo::Revision::Major & get() const
Definition CameraInfo.h:1506
void set(Args &&...args)
Set multiple arguments.
Definition CameraInfo.h:1284
CameraInfo & set(const Revision &value)
Set Revision.
Definition CameraInfo.h:1412
CameraInfo & set(const Revision::Major &value)
Set Revision::Major.
Definition CameraInfo.h:1419
CameraInfo & set(const SerialNumber &value)
Set SerialNumber.
Definition CameraInfo.h:1445
const CameraInfo::SerialNumber & get() const
Definition CameraInfo.h:1520
const CameraInfo::Revision & get() const
Definition CameraInfo.h:1498
std::string toString() const
Get the value as string.
CameraInfo()
Default constructor.
CameraInfo & set(const Revision::Minor &value)
Set Revision::Minor.
Definition CameraInfo.h:1426
void save(const std::string &fileName) const
Save to the given file.
Class describing a range of values for a given type T.
Definition Range.h:73
NodeType
Definition NodeType.h:55
The main Zivid namespace. All Zivid code is found here.
Definition Application.h:54