Zivid C++ API 2.18.0+1b44dbef-1
CameraHealth.h
Go to the documentation of this file.
1/*******************************************************************************
2 * This file is part of the Zivid API
3 *
4 * Copyright 2015-2026 (C) Zivid AS
5 * All rights reserved.
6 *
7 * Zivid Software License, v1.0
8 *
9 * Redistribution and use in source and binary forms, with or without
10 * modification, are permitted provided that the following conditions are met:
11 *
12 * 1. Redistributions of source code must retain the above copyright notice,
13 * this list of conditions and the following disclaimer.
14 *
15 * 2. Redistributions in binary form must reproduce the above copyright notice,
16 * this list of conditions and the following disclaimer in the documentation
17 * and/or other materials provided with the distribution.
18 *
19 * 3. Neither the name of Zivid AS nor the names of its contributors may be used
20 * to endorse or promote products derived from this software without specific
21 * prior written permission.
22 *
23 * 4. This software, with or without modification, must not be used with any
24 * other 3D camera than from Zivid AS.
25 *
26 * 5. Any software provided in binary form under this license must not be
27 * reverse engineered, decompiled, modified and/or disassembled.
28 *
29 * THIS SOFTWARE IS PROVIDED BY ZIVID AS "AS IS" AND ANY EXPRESS OR IMPLIED
30 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
31 * MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE ARE
32 * DISCLAIMED. IN NO EVENT SHALL ZIVID AS OR CONTRIBUTORS BE LIABLE FOR ANY
33 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
34 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
35 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
36 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
37 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
38 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
39 *
40 * Contact: Zivid Customer Success Team <customersuccess@zivid.com>
41 * Info: http://www.zivid.com
42 ******************************************************************************/
43
44#pragma once
45
46#include <array>
47#include <chrono>
48#include <cmath>
49#include <ctime>
50#include <iomanip>
51#include <memory>
52#include <optional>
53#include <set>
54#include <sstream>
55#include <string>
56#include <tuple>
57#include <utility>
58#include <vector>
59
65#include "Zivid/Range.h"
66
67#ifdef _MSC_VER
68# pragma warning(push)
69# pragma warning(disable : 4251) // "X needs to have dll-interface to be used by clients of class Y."
70#endif
71
72namespace Zivid
73{
74
86
87 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
89 {
90 public:
93
95 static constexpr const char *path{ "" };
96
98 static constexpr const char *name{ "CameraHealth" };
99
101 static constexpr const char *description{
102 R"description(Result of running the camera's health checks. Each check has a
103`Status` (severity) and a `Value` (the underlying measurement, when
104available). The `Overall` field aggregates the worst severity across
105all populated checks.
106
107Status values:
108 - OK: Optimal.
109 - Suboptimal: Degraded but functional.
110 - Error: Faulty or out of spec.
111 - Unknown: Check was not performed, or its outcome could not be determined.
112)description"
113 };
114
115 static constexpr size_t version{ 1 };
116
117#ifndef NO_DOC
118 template<size_t>
119 struct Version;
120
121 using LatestVersion = Zivid::CameraHealth;
122
123 // Short identifier. This value is not guaranteed to be universally unique
124 // Todo(ZIVID-2808): Move this to internal DataModelExt header
125 static constexpr std::array<uint8_t, 3> binaryId{ 'h', 'c', 'k' };
126
127#endif
128
135
136 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
138 {
139 public:
142
144 static constexpr const char *path{ "Fan" };
145
147 static constexpr const char *name{ "Fan" };
148
150 static constexpr const char *description{ R"description(The status of the camera's fan.
151
152 - OK: Fan operating as expected.
153 - Error: Unexpected fan stop.
154 - Unknown: Fan status could not be determined.
155)description" };
156
158
159 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
161 {
162 public:
165
167 static constexpr const char *path{ "Fan/Status" };
168
170 static constexpr const char *name{ "Status" };
171
173 static constexpr const char *description{ R"description(Severity of the fan check.)description" };
174
176 enum class ValueType
177 {
182 };
183 static const Status ok;
184 static const Status suboptimal;
185 static const Status error;
186 static const Status unknown;
187
189 static std::set<ValueType> validValues()
190 {
192 }
193
195 Status() = default;
196
198 explicit constexpr Status(ValueType value)
199 : m_value{ verifyValue(value) }
200 {}
201
204
206 std::string toString() const;
207
209 friend std::ostream &operator<<(std::ostream &stream, const Status::ValueType &value)
210 {
211 return stream << Status{ value }.toString();
212 }
213
215 bool operator==(const Status &other) const
216 {
217 return m_value == other.m_value;
218 }
219
221 bool operator!=(const Status &other) const
222 {
223 return m_value != other.m_value;
224 }
225
227 friend std::ostream &operator<<(std::ostream &stream, const Status &value)
228 {
229 return stream << value.toString();
230 }
231
232 private:
233 void setFromString(const std::string &value);
234
235 constexpr ValueType static verifyValue(const ValueType &value)
236 {
237 return value == ValueType::ok || value == ValueType::suboptimal || value == ValueType::error
238 || value == ValueType::unknown
239 ? value
240 : throw std::invalid_argument{
241 "Invalid value: Status{ "
242 + std::to_string(static_cast<std::underlying_type<ValueType>::type>(value)) + " }"
243 };
244 }
245
247
248 friend struct DataModel::Detail::Befriend<Status>;
249 };
250
252
253 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
255 {
256 public:
259
261 static constexpr const char *path{ "Fan/Value" };
262
264 static constexpr const char *name{ "Value" };
265
267 static constexpr const char *description{
268 R"description(Whether the fan is operating as expected, or stopped unexpectedly.)description"
269 };
270
272 enum class ValueType
273 {
276 };
277 static const Value ok;
279
281 static std::set<ValueType> validValues()
282 {
284 }
285
287 Value() = default;
288
290 explicit constexpr Value(ValueType value)
291 : m_opt{ verifyValue(value) }
292 {}
293
299
301 bool hasValue() const;
302
304 void reset();
305
307 std::string toString() const;
308
310 friend std::ostream &operator<<(std::ostream &stream, const Value::ValueType &value)
311 {
312 return stream << Value{ value }.toString();
313 }
314
316 bool operator==(const Value &other) const
317 {
318 return m_opt == other.m_opt;
319 }
320
322 bool operator!=(const Value &other) const
323 {
324 return m_opt != other.m_opt;
325 }
326
328 friend std::ostream &operator<<(std::ostream &stream, const Value &value)
329 {
330 return stream << value.toString();
331 }
332
333 private:
334 void setFromString(const std::string &value);
335
336 constexpr ValueType static verifyValue(const ValueType &value)
337 {
338 return value == ValueType::ok || value == ValueType::unexpectedFanStop
339 ? value
340 : throw std::invalid_argument{
341 "Invalid value: Value{ "
342 + std::to_string(static_cast<std::underlying_type<ValueType>::type>(value)) + " }"
343 };
344 }
345
346 std::optional<ValueType> m_opt;
347
348 friend struct DataModel::Detail::Befriend<Value>;
349 };
350
351 using Descendants = std::tuple<CameraHealth::Fan::Status, CameraHealth::Fan::Value>;
352
355
368#ifndef NO_DOC
369 template<
370 typename... Args,
371 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
372 typename std::enable_if<
373 Zivid::Detail::TypeTraits::AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::
374 value,
375 int>::type = 0>
376#else
377 template<typename... Args>
378#endif
379 explicit Fan(Args &&...args)
380 {
381 using namespace Zivid::Detail::TypeTraits;
382
383 static_assert(
384 AllArgsDecayedAreUnique<Args...>::value,
385 "Found duplicate types among the arguments passed to Fan(...). "
386 "Types should be listed at most once.");
387
388 set(std::forward<Args>(args)...);
389 }
390
402#ifndef NO_DOC
403 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
404#else
405 template<typename... Args>
406#endif
407 void set(Args &&...args)
408 {
409 using namespace Zivid::Detail::TypeTraits;
410
411 using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
412 static_assert(
413 AllArgsAreDescendantNodes::value, "All arguments passed to set(...) must be descendant nodes.");
414
415 static_assert(
416 AllArgsDecayedAreUnique<Args...>::value,
417 "Found duplicate types among the arguments passed to set(...). "
418 "Types should be listed at most once.");
419
420 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
421 }
422
435#ifndef NO_DOC
436 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
437#else
438 template<typename... Args>
439#endif
440 Fan copyWith(Args &&...args) const
441 {
442 using namespace Zivid::Detail::TypeTraits;
443
444 using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
445 static_assert(
446 AllArgsAreDescendantNodes::value,
447 "All arguments passed to copyWith(...) must be descendant nodes.");
448
449 static_assert(
450 AllArgsDecayedAreUnique<Args...>::value,
451 "Found duplicate types among the arguments passed to copyWith(...). "
452 "Types should be listed at most once.");
453
454 auto copy{ *this };
455 copy.set(std::forward<Args>(args)...);
456 return copy;
457 }
458
460 const Status &status() const
461 {
462 return m_status;
463 }
464
467 {
468 return m_status;
469 }
470
473 {
474 m_status = value;
475 return *this;
476 }
477
479 const Value &value() const
480 {
481 return m_value;
482 }
483
486 {
487 return m_value;
488 }
489
492 {
493 m_value = value;
494 return *this;
495 }
496
497 template<
498 typename T,
499 typename std::enable_if<std::is_same<T, CameraHealth::Fan::Status>::value, int>::type = 0>
501 {
502 return m_status;
503 }
504
505 template<
506 typename T,
507 typename std::enable_if<std::is_same<T, CameraHealth::Fan::Value>::value, int>::type = 0>
509 {
510 return m_value;
511 }
512
513 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
515 {
516 return m_status;
517 }
518
519 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
521 {
522 return m_value;
523 }
524
526 template<typename F>
527 void forEach(const F &f) const
528 {
529 f(m_status);
530 f(m_value);
531 }
532
534 template<typename F>
535 void forEach(const F &f)
536 {
537 f(m_status);
538 f(m_value);
539 }
540
542 bool operator==(const Fan &other) const;
543
545 bool operator!=(const Fan &other) const;
546
548 std::string toString() const;
549
551 friend std::ostream &operator<<(std::ostream &stream, const Fan &value)
552 {
553 return stream << value.toString();
554 }
555
556 private:
557 void setFromString(const std::string &value);
558
559 void setFromString(const std::string &fullPath, const std::string &value);
560
561 std::string getString(const std::string &fullPath) const;
562
563 Status m_status;
564 Value m_value;
565
566 friend struct DataModel::Detail::Befriend<Fan>;
567 };
568
575
576 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
578 {
579 public:
582
584 static constexpr const char *path{ "InfieldVerification" };
585
587 static constexpr const char *name{ "InfieldVerification" };
588
590 static constexpr const char *description{
591 R"description(The status of the camera's most recent infield verification.
592
593 - OK: Last verification performed within the past year
594 - Suboptimal: Last verification older than one year
595 - Unknown: Camera has never been verified in the field
596)description"
597 };
598
600
601 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
603 {
604 public:
607
609 static constexpr const char *path{ "InfieldVerification/Status" };
610
612 static constexpr const char *name{ "Status" };
613
615 static constexpr const char *description{
616 R"description(Severity of the infield verification check.)description"
617 };
618
620 enum class ValueType
621 {
626 };
627 static const Status ok;
628 static const Status suboptimal;
629 static const Status error;
630 static const Status unknown;
631
633 static std::set<ValueType> validValues()
634 {
636 }
637
639 Status() = default;
640
642 explicit constexpr Status(ValueType value)
643 : m_value{ verifyValue(value) }
644 {}
645
648
650 std::string toString() const;
651
653 friend std::ostream &operator<<(std::ostream &stream, const Status::ValueType &value)
654 {
655 return stream << Status{ value }.toString();
656 }
657
659 bool operator==(const Status &other) const
660 {
661 return m_value == other.m_value;
662 }
663
665 bool operator!=(const Status &other) const
666 {
667 return m_value != other.m_value;
668 }
669
671 friend std::ostream &operator<<(std::ostream &stream, const Status &value)
672 {
673 return stream << value.toString();
674 }
675
676 private:
677 void setFromString(const std::string &value);
678
679 constexpr ValueType static verifyValue(const ValueType &value)
680 {
681 return value == ValueType::ok || value == ValueType::suboptimal || value == ValueType::error
682 || value == ValueType::unknown
683 ? value
684 : throw std::invalid_argument{
685 "Invalid value: Status{ "
686 + std::to_string(static_cast<std::underlying_type<ValueType>::type>(value)) + " }"
687 };
688 }
689
691
692 friend struct DataModel::Detail::Befriend<Status>;
693 };
694
696
697 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
699 {
700 public:
703
705 static constexpr const char *path{ "InfieldVerification/Value" };
706
708 static constexpr const char *name{ "Value" };
709
711 static constexpr const char *description{
712 R"description(Time of the most recent infield verification.)description"
713 };
714
716 using ValueType = std::chrono::system_clock::time_point;
717
720 {
721 return { std::chrono::system_clock::time_point::min(),
722 std::chrono::system_clock::time_point::max() };
723 }
724
726 Value() = default;
727
729 explicit constexpr Value(std::chrono::system_clock::time_point value)
730 : m_opt{ value }
731 {}
732
737 std::chrono::system_clock::time_point value() const;
738
740 bool hasValue() const;
741
743 void reset();
744
746 std::string toString() const;
747
749 bool operator==(const Value &other) const
750 {
751 return m_opt == other.m_opt;
752 }
753
755 bool operator!=(const Value &other) const
756 {
757 return m_opt != other.m_opt;
758 }
759
761 bool operator<(const Value &other) const
762 {
763 return m_opt < other.m_opt;
764 }
765
767 bool operator>(const Value &other) const
768 {
769 return m_opt > other.m_opt;
770 }
771
773 bool operator<=(const Value &other) const
774 {
775 return m_opt <= other.m_opt;
776 }
777
779 bool operator>=(const Value &other) const
780 {
781 return m_opt >= other.m_opt;
782 }
783
785 friend std::ostream &operator<<(std::ostream &stream, const Value &value)
786 {
787 return stream << value.toString();
788 }
789
790 private:
791 void setFromString(const std::string &value);
792
793 std::optional<std::chrono::system_clock::time_point> m_opt;
794
795 friend struct DataModel::Detail::Befriend<Value>;
796 };
797
799 std::tuple<CameraHealth::InfieldVerification::Status, CameraHealth::InfieldVerification::Value>;
800
803
816#ifndef NO_DOC
817 template<
818 typename... Args,
819 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
820 typename std::enable_if<
821 Zivid::Detail::TypeTraits::AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::
822 value,
823 int>::type = 0>
824#else
825 template<typename... Args>
826#endif
827 explicit InfieldVerification(Args &&...args)
828 {
829 using namespace Zivid::Detail::TypeTraits;
830
831 static_assert(
832 AllArgsDecayedAreUnique<Args...>::value,
833 "Found duplicate types among the arguments passed to InfieldVerification(...). "
834 "Types should be listed at most once.");
835
836 set(std::forward<Args>(args)...);
837 }
838
850#ifndef NO_DOC
851 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
852#else
853 template<typename... Args>
854#endif
855 void set(Args &&...args)
856 {
857 using namespace Zivid::Detail::TypeTraits;
858
859 using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
860 static_assert(
861 AllArgsAreDescendantNodes::value, "All arguments passed to set(...) must be descendant nodes.");
862
863 static_assert(
864 AllArgsDecayedAreUnique<Args...>::value,
865 "Found duplicate types among the arguments passed to set(...). "
866 "Types should be listed at most once.");
867
868 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
869 }
870
883#ifndef NO_DOC
884 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
885#else
886 template<typename... Args>
887#endif
888 InfieldVerification copyWith(Args &&...args) const
889 {
890 using namespace Zivid::Detail::TypeTraits;
891
892 using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
893 static_assert(
894 AllArgsAreDescendantNodes::value,
895 "All arguments passed to copyWith(...) must be descendant nodes.");
896
897 static_assert(
898 AllArgsDecayedAreUnique<Args...>::value,
899 "Found duplicate types among the arguments passed to copyWith(...). "
900 "Types should be listed at most once.");
901
902 auto copy{ *this };
903 copy.set(std::forward<Args>(args)...);
904 return copy;
905 }
906
908 const Status &status() const
909 {
910 return m_status;
911 }
912
915 {
916 return m_status;
917 }
918
921 {
922 m_status = value;
923 return *this;
924 }
925
927 const Value &value() const
928 {
929 return m_value;
930 }
931
934 {
935 return m_value;
936 }
937
940 {
941 m_value = value;
942 return *this;
943 }
944
945 template<
946 typename T,
947 typename std::enable_if<std::is_same<T, CameraHealth::InfieldVerification::Status>::value, int>::type =
948 0>
950 {
951 return m_status;
952 }
953
954 template<
955 typename T,
956 typename std::enable_if<std::is_same<T, CameraHealth::InfieldVerification::Value>::value, int>::type =
957 0>
959 {
960 return m_value;
961 }
962
963 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
965 {
966 return m_status;
967 }
968
969 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
971 {
972 return m_value;
973 }
974
976 template<typename F>
977 void forEach(const F &f) const
978 {
979 f(m_status);
980 f(m_value);
981 }
982
984 template<typename F>
985 void forEach(const F &f)
986 {
987 f(m_status);
988 f(m_value);
989 }
990
992 bool operator==(const InfieldVerification &other) const;
993
995 bool operator!=(const InfieldVerification &other) const;
996
998 std::string toString() const;
999
1001 friend std::ostream &operator<<(std::ostream &stream, const InfieldVerification &value)
1002 {
1003 return stream << value.toString();
1004 }
1005
1006 private:
1007 void setFromString(const std::string &value);
1008
1009 void setFromString(const std::string &fullPath, const std::string &value);
1010
1011 std::string getString(const std::string &fullPath) const;
1012
1013 Status m_status;
1014 Value m_value;
1015
1016 friend struct DataModel::Detail::Befriend<InfieldVerification>;
1017 };
1018
1028
1029 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
1031 {
1032 public:
1035
1037 static constexpr const char *path{ "MaxTransferSpeed" };
1038
1040 static constexpr const char *name{ "MaxTransferSpeed" };
1041
1043 static constexpr const char *description{
1044 R"description(The end-to-end link speed between the camera and the host
1045computer, defined as the minimum of the camera's link speed
1046and the PC's link speed.
1047
1048 - OK: Max transfer speed > 1 Gbps
1049 - Suboptimal: Max transfer speed = 1 Gbps
1050 - Error: Max transfer speed < 1 Gbps
1051 - Unknown: Max transfer speed could not be determined
1052)description"
1053 };
1054
1056
1057 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
1059 {
1060 public:
1063
1065 static constexpr const char *path{ "MaxTransferSpeed/Status" };
1066
1068 static constexpr const char *name{ "Status" };
1069
1071 static constexpr const char *description{
1072 R"description(Severity of the max transfer speed check.)description"
1073 };
1074
1076 enum class ValueType
1077 {
1082 };
1083 static const Status ok;
1084 static const Status suboptimal;
1085 static const Status error;
1086 static const Status unknown;
1087
1089 static std::set<ValueType> validValues()
1090 {
1092 }
1093
1095 Status() = default;
1096
1098 explicit constexpr Status(ValueType value)
1099 : m_value{ verifyValue(value) }
1100 {}
1101
1104
1106 std::string toString() const;
1107
1109 friend std::ostream &operator<<(std::ostream &stream, const Status::ValueType &value)
1110 {
1111 return stream << Status{ value }.toString();
1112 }
1113
1115 bool operator==(const Status &other) const
1116 {
1117 return m_value == other.m_value;
1118 }
1119
1121 bool operator!=(const Status &other) const
1122 {
1123 return m_value != other.m_value;
1124 }
1125
1127 friend std::ostream &operator<<(std::ostream &stream, const Status &value)
1128 {
1129 return stream << value.toString();
1130 }
1131
1132 private:
1133 void setFromString(const std::string &value);
1134
1135 constexpr ValueType static verifyValue(const ValueType &value)
1136 {
1137 return value == ValueType::ok || value == ValueType::suboptimal || value == ValueType::error
1138 || value == ValueType::unknown
1139 ? value
1140 : throw std::invalid_argument{
1141 "Invalid value: Status{ "
1142 + std::to_string(static_cast<std::underlying_type<ValueType>::type>(value)) + " }"
1143 };
1144 }
1145
1147
1148 friend struct DataModel::Detail::Befriend<Status>;
1149 };
1150
1152
1153 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
1155 {
1156 public:
1159
1161 static constexpr const char *path{ "MaxTransferSpeed/Value" };
1162
1164 static constexpr const char *name{ "Value" };
1165
1167 static constexpr const char *description{
1168 R"description(Max transfer speed in megabits per second (Mbps).)description"
1169 };
1170
1172 using ValueType = uint32_t;
1173
1175 static constexpr Range<uint32_t> validRange()
1176 {
1177 return { std::numeric_limits<uint32_t>::lowest(), std::numeric_limits<uint32_t>::max() };
1178 }
1179
1181 Value() = default;
1182
1184 explicit constexpr Value(uint32_t value)
1185 : m_opt{ value }
1186 {}
1187
1192 uint32_t value() const;
1193
1195 bool hasValue() const;
1196
1198 void reset();
1199
1201 std::string toString() const;
1202
1204 bool operator==(const Value &other) const
1205 {
1206 return m_opt == other.m_opt;
1207 }
1208
1210 bool operator!=(const Value &other) const
1211 {
1212 return m_opt != other.m_opt;
1213 }
1214
1216 bool operator<(const Value &other) const
1217 {
1218 return m_opt < other.m_opt;
1219 }
1220
1222 bool operator>(const Value &other) const
1223 {
1224 return m_opt > other.m_opt;
1225 }
1226
1228 bool operator<=(const Value &other) const
1229 {
1230 return m_opt <= other.m_opt;
1231 }
1232
1234 bool operator>=(const Value &other) const
1235 {
1236 return m_opt >= other.m_opt;
1237 }
1238
1240 friend std::ostream &operator<<(std::ostream &stream, const Value &value)
1241 {
1242 return stream << value.toString();
1243 }
1244
1245 private:
1246 void setFromString(const std::string &value);
1247
1248 std::optional<uint32_t> m_opt;
1249
1250 friend struct DataModel::Detail::Befriend<Value>;
1251 };
1252
1254 std::tuple<CameraHealth::MaxTransferSpeed::Status, CameraHealth::MaxTransferSpeed::Value>;
1255
1258
1271#ifndef NO_DOC
1272 template<
1273 typename... Args,
1274 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
1275 typename std::enable_if<
1276 Zivid::Detail::TypeTraits::AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::
1277 value,
1278 int>::type = 0>
1279#else
1280 template<typename... Args>
1281#endif
1282 explicit MaxTransferSpeed(Args &&...args)
1283 {
1284 using namespace Zivid::Detail::TypeTraits;
1285
1286 static_assert(
1287 AllArgsDecayedAreUnique<Args...>::value,
1288 "Found duplicate types among the arguments passed to MaxTransferSpeed(...). "
1289 "Types should be listed at most once.");
1290
1291 set(std::forward<Args>(args)...);
1292 }
1293
1305#ifndef NO_DOC
1306 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
1307#else
1308 template<typename... Args>
1309#endif
1310 void set(Args &&...args)
1311 {
1312 using namespace Zivid::Detail::TypeTraits;
1313
1314 using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
1315 static_assert(
1316 AllArgsAreDescendantNodes::value, "All arguments passed to set(...) must be descendant nodes.");
1317
1318 static_assert(
1319 AllArgsDecayedAreUnique<Args...>::value,
1320 "Found duplicate types among the arguments passed to set(...). "
1321 "Types should be listed at most once.");
1322
1323 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
1324 }
1325
1338#ifndef NO_DOC
1339 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
1340#else
1341 template<typename... Args>
1342#endif
1343 MaxTransferSpeed copyWith(Args &&...args) const
1344 {
1345 using namespace Zivid::Detail::TypeTraits;
1346
1347 using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
1348 static_assert(
1349 AllArgsAreDescendantNodes::value,
1350 "All arguments passed to copyWith(...) must be descendant nodes.");
1351
1352 static_assert(
1353 AllArgsDecayedAreUnique<Args...>::value,
1354 "Found duplicate types among the arguments passed to copyWith(...). "
1355 "Types should be listed at most once.");
1356
1357 auto copy{ *this };
1358 copy.set(std::forward<Args>(args)...);
1359 return copy;
1360 }
1361
1363 const Status &status() const
1364 {
1365 return m_status;
1366 }
1367
1370 {
1371 return m_status;
1372 }
1373
1376 {
1377 m_status = value;
1378 return *this;
1379 }
1380
1382 const Value &value() const
1383 {
1384 return m_value;
1385 }
1386
1389 {
1390 return m_value;
1391 }
1392
1395 {
1396 m_value = value;
1397 return *this;
1398 }
1399
1400 template<
1401 typename T,
1402 typename std::enable_if<std::is_same<T, CameraHealth::MaxTransferSpeed::Status>::value, int>::type = 0>
1404 {
1405 return m_status;
1406 }
1407
1408 template<
1409 typename T,
1410 typename std::enable_if<std::is_same<T, CameraHealth::MaxTransferSpeed::Value>::value, int>::type = 0>
1412 {
1413 return m_value;
1414 }
1415
1416 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
1418 {
1419 return m_status;
1420 }
1421
1422 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
1424 {
1425 return m_value;
1426 }
1427
1429 template<typename F>
1430 void forEach(const F &f) const
1431 {
1432 f(m_status);
1433 f(m_value);
1434 }
1435
1437 template<typename F>
1438 void forEach(const F &f)
1439 {
1440 f(m_status);
1441 f(m_value);
1442 }
1443
1445 bool operator==(const MaxTransferSpeed &other) const;
1446
1448 bool operator!=(const MaxTransferSpeed &other) const;
1449
1451 std::string toString() const;
1452
1454 friend std::ostream &operator<<(std::ostream &stream, const MaxTransferSpeed &value)
1455 {
1456 return stream << value.toString();
1457 }
1458
1459 private:
1460 void setFromString(const std::string &value);
1461
1462 void setFromString(const std::string &fullPath, const std::string &value);
1463
1464 std::string getString(const std::string &fullPath) const;
1465
1466 Status m_status;
1467 Value m_value;
1468
1469 friend struct DataModel::Detail::Befriend<MaxTransferSpeed>;
1470 };
1471
1478
1479 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
1481 {
1482 public:
1485
1487 static constexpr const char *path{ "Memory" };
1488
1490 static constexpr const char *name{ "Memory" };
1491
1493 static constexpr const char *description{ R"description(The status of the camera's memory test.
1494
1495 - OK: Memory was tested and reported zero errors
1496 - Error: Memory was tested and an error was located
1497 - Unknown: Memory test was not performed
1498)description" };
1499
1501
1502 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
1504 {
1505 public:
1508
1510 static constexpr const char *path{ "Memory/Status" };
1511
1513 static constexpr const char *name{ "Status" };
1514
1516 static constexpr const char *description{ R"description(Severity of the memory check.)description" };
1517
1519 enum class ValueType
1520 {
1525 };
1526 static const Status ok;
1527 static const Status suboptimal;
1528 static const Status error;
1529 static const Status unknown;
1530
1532 static std::set<ValueType> validValues()
1533 {
1535 }
1536
1538 Status() = default;
1539
1541 explicit constexpr Status(ValueType value)
1542 : m_value{ verifyValue(value) }
1543 {}
1544
1547
1549 std::string toString() const;
1550
1552 friend std::ostream &operator<<(std::ostream &stream, const Status::ValueType &value)
1553 {
1554 return stream << Status{ value }.toString();
1555 }
1556
1558 bool operator==(const Status &other) const
1559 {
1560 return m_value == other.m_value;
1561 }
1562
1564 bool operator!=(const Status &other) const
1565 {
1566 return m_value != other.m_value;
1567 }
1568
1570 friend std::ostream &operator<<(std::ostream &stream, const Status &value)
1571 {
1572 return stream << value.toString();
1573 }
1574
1575 private:
1576 void setFromString(const std::string &value);
1577
1578 constexpr ValueType static verifyValue(const ValueType &value)
1579 {
1580 return value == ValueType::ok || value == ValueType::suboptimal || value == ValueType::error
1581 || value == ValueType::unknown
1582 ? value
1583 : throw std::invalid_argument{
1584 "Invalid value: Status{ "
1585 + std::to_string(static_cast<std::underlying_type<ValueType>::type>(value)) + " }"
1586 };
1587 }
1588
1590
1591 friend struct DataModel::Detail::Befriend<Status>;
1592 };
1593
1595
1596 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
1598 {
1599 public:
1602
1604 static constexpr const char *path{ "Memory/Value" };
1605
1607 static constexpr const char *name{ "Value" };
1608
1610 static constexpr const char *description{
1611 R"description(Number of memory errors detected by the memory test.)description"
1612 };
1613
1615 using ValueType = uint32_t;
1616
1618 static constexpr Range<uint32_t> validRange()
1619 {
1620 return { std::numeric_limits<uint32_t>::lowest(), std::numeric_limits<uint32_t>::max() };
1621 }
1622
1624 Value() = default;
1625
1627 explicit constexpr Value(uint32_t value)
1628 : m_opt{ value }
1629 {}
1630
1635 uint32_t value() const;
1636
1638 bool hasValue() const;
1639
1641 void reset();
1642
1644 std::string toString() const;
1645
1647 bool operator==(const Value &other) const
1648 {
1649 return m_opt == other.m_opt;
1650 }
1651
1653 bool operator!=(const Value &other) const
1654 {
1655 return m_opt != other.m_opt;
1656 }
1657
1659 bool operator<(const Value &other) const
1660 {
1661 return m_opt < other.m_opt;
1662 }
1663
1665 bool operator>(const Value &other) const
1666 {
1667 return m_opt > other.m_opt;
1668 }
1669
1671 bool operator<=(const Value &other) const
1672 {
1673 return m_opt <= other.m_opt;
1674 }
1675
1677 bool operator>=(const Value &other) const
1678 {
1679 return m_opt >= other.m_opt;
1680 }
1681
1683 friend std::ostream &operator<<(std::ostream &stream, const Value &value)
1684 {
1685 return stream << value.toString();
1686 }
1687
1688 private:
1689 void setFromString(const std::string &value);
1690
1691 std::optional<uint32_t> m_opt;
1692
1693 friend struct DataModel::Detail::Befriend<Value>;
1694 };
1695
1696 using Descendants = std::tuple<CameraHealth::Memory::Status, CameraHealth::Memory::Value>;
1697
1700
1713#ifndef NO_DOC
1714 template<
1715 typename... Args,
1716 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
1717 typename std::enable_if<
1718 Zivid::Detail::TypeTraits::AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::
1719 value,
1720 int>::type = 0>
1721#else
1722 template<typename... Args>
1723#endif
1724 explicit Memory(Args &&...args)
1725 {
1726 using namespace Zivid::Detail::TypeTraits;
1727
1728 static_assert(
1729 AllArgsDecayedAreUnique<Args...>::value,
1730 "Found duplicate types among the arguments passed to Memory(...). "
1731 "Types should be listed at most once.");
1732
1733 set(std::forward<Args>(args)...);
1734 }
1735
1747#ifndef NO_DOC
1748 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
1749#else
1750 template<typename... Args>
1751#endif
1752 void set(Args &&...args)
1753 {
1754 using namespace Zivid::Detail::TypeTraits;
1755
1756 using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
1757 static_assert(
1758 AllArgsAreDescendantNodes::value, "All arguments passed to set(...) must be descendant nodes.");
1759
1760 static_assert(
1761 AllArgsDecayedAreUnique<Args...>::value,
1762 "Found duplicate types among the arguments passed to set(...). "
1763 "Types should be listed at most once.");
1764
1765 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
1766 }
1767
1780#ifndef NO_DOC
1781 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
1782#else
1783 template<typename... Args>
1784#endif
1785 Memory copyWith(Args &&...args) const
1786 {
1787 using namespace Zivid::Detail::TypeTraits;
1788
1789 using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
1790 static_assert(
1791 AllArgsAreDescendantNodes::value,
1792 "All arguments passed to copyWith(...) must be descendant nodes.");
1793
1794 static_assert(
1795 AllArgsDecayedAreUnique<Args...>::value,
1796 "Found duplicate types among the arguments passed to copyWith(...). "
1797 "Types should be listed at most once.");
1798
1799 auto copy{ *this };
1800 copy.set(std::forward<Args>(args)...);
1801 return copy;
1802 }
1803
1805 const Status &status() const
1806 {
1807 return m_status;
1808 }
1809
1812 {
1813 return m_status;
1814 }
1815
1818 {
1819 m_status = value;
1820 return *this;
1821 }
1822
1824 const Value &value() const
1825 {
1826 return m_value;
1827 }
1828
1831 {
1832 return m_value;
1833 }
1834
1837 {
1838 m_value = value;
1839 return *this;
1840 }
1841
1842 template<
1843 typename T,
1844 typename std::enable_if<std::is_same<T, CameraHealth::Memory::Status>::value, int>::type = 0>
1846 {
1847 return m_status;
1848 }
1849
1850 template<
1851 typename T,
1852 typename std::enable_if<std::is_same<T, CameraHealth::Memory::Value>::value, int>::type = 0>
1854 {
1855 return m_value;
1856 }
1857
1858 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
1860 {
1861 return m_status;
1862 }
1863
1864 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
1866 {
1867 return m_value;
1868 }
1869
1871 template<typename F>
1872 void forEach(const F &f) const
1873 {
1874 f(m_status);
1875 f(m_value);
1876 }
1877
1879 template<typename F>
1880 void forEach(const F &f)
1881 {
1882 f(m_status);
1883 f(m_value);
1884 }
1885
1887 bool operator==(const Memory &other) const;
1888
1890 bool operator!=(const Memory &other) const;
1891
1893 std::string toString() const;
1894
1896 friend std::ostream &operator<<(std::ostream &stream, const Memory &value)
1897 {
1898 return stream << value.toString();
1899 }
1900
1901 private:
1902 void setFromString(const std::string &value);
1903
1904 void setFromString(const std::string &fullPath, const std::string &value);
1905
1906 std::string getString(const std::string &fullPath) const;
1907
1908 Status m_status;
1909 Value m_value;
1910
1911 friend struct DataModel::Detail::Befriend<Memory>;
1912 };
1913
1920
1921 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
1923 {
1924 public:
1927
1929 static constexpr const char *path{ "Overall" };
1930
1932 static constexpr const char *name{ "Overall" };
1933
1935 static constexpr const char *description{
1936 R"description(The aggregated severity across all checks, taking the
1937highest-precedence severity among them. Precedence from highest to
1938lowest is Error, Unknown, Suboptimal, OK: a failing check is the
1939most important to surface, and a check whose outcome could not be
1940determined (Unknown) takes precedence over a Suboptimal one.
1941)description"
1942 };
1943
1945 enum class ValueType
1946 {
1951 };
1952 static const Overall ok;
1953 static const Overall suboptimal;
1954 static const Overall error;
1955 static const Overall unknown;
1956
1958 static std::set<ValueType> validValues()
1959 {
1961 }
1962
1964 Overall() = default;
1965
1967 explicit constexpr Overall(ValueType value)
1968 : m_value{ verifyValue(value) }
1969 {}
1970
1973
1975 std::string toString() const;
1976
1978 friend std::ostream &operator<<(std::ostream &stream, const Overall::ValueType &value)
1979 {
1980 return stream << Overall{ value }.toString();
1981 }
1982
1984 bool operator==(const Overall &other) const
1985 {
1986 return m_value == other.m_value;
1987 }
1988
1990 bool operator!=(const Overall &other) const
1991 {
1992 return m_value != other.m_value;
1993 }
1994
1996 friend std::ostream &operator<<(std::ostream &stream, const Overall &value)
1997 {
1998 return stream << value.toString();
1999 }
2000
2001 private:
2002 void setFromString(const std::string &value);
2003
2004 constexpr ValueType static verifyValue(const ValueType &value)
2005 {
2006 return value == ValueType::ok || value == ValueType::suboptimal || value == ValueType::error
2007 || value == ValueType::unknown
2008 ? value
2009 : throw std::invalid_argument{
2010 "Invalid value: Overall{ "
2011 + std::to_string(static_cast<std::underlying_type<ValueType>::type>(value)) + " }"
2012 };
2013 }
2014
2016
2017 friend struct DataModel::Detail::Befriend<Overall>;
2018 };
2019
2023
2024 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
2026 {
2027 public:
2030
2032 static constexpr const char *path{ "Temperature" };
2033
2035 static constexpr const char *name{ "Temperature" };
2036
2038 static constexpr const char *description{
2039 R"description(The status of the camera's temperatures. Each sub-status
2040reflects the temperature of a specific component.
2041)description"
2042 };
2043
2051
2052 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
2054 {
2055 public:
2058
2060 static constexpr const char *path{ "Temperature/DMD" };
2061
2063 static constexpr const char *name{ "DMD" };
2064
2066 static constexpr const char *description{
2067 R"description(The status of the DMD (Digital Micromirror Device)
2068temperature, in degrees Celsius.
2069
2070 - OK: Temperature in (0, 50)
2071 - Suboptimal: Temperature in [50, 60]
2072 - Error: Temperature < 0 or > 60
2073)description"
2074 };
2075
2077
2078 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
2080 {
2081 public:
2084
2086 static constexpr const char *path{ "Temperature/DMD/Status" };
2087
2089 static constexpr const char *name{ "Status" };
2090
2092 static constexpr const char *description{
2093 R"description(Severity of the DMD temperature check.)description"
2094 };
2095
2097 enum class ValueType
2098 {
2103 };
2104 static const Status ok;
2105 static const Status suboptimal;
2106 static const Status error;
2107 static const Status unknown;
2108
2110 static std::set<ValueType> validValues()
2111 {
2113 }
2114
2116 Status() = default;
2117
2119 explicit constexpr Status(ValueType value)
2120 : m_value{ verifyValue(value) }
2121 {}
2122
2125
2127 std::string toString() const;
2128
2130 friend std::ostream &operator<<(std::ostream &stream, const Status::ValueType &value)
2131 {
2132 return stream << Status{ value }.toString();
2133 }
2134
2136 bool operator==(const Status &other) const
2137 {
2138 return m_value == other.m_value;
2139 }
2140
2142 bool operator!=(const Status &other) const
2143 {
2144 return m_value != other.m_value;
2145 }
2146
2148 friend std::ostream &operator<<(std::ostream &stream, const Status &value)
2149 {
2150 return stream << value.toString();
2151 }
2152
2153 private:
2154 void setFromString(const std::string &value);
2155
2156 constexpr ValueType static verifyValue(const ValueType &value)
2157 {
2158 return value == ValueType::ok || value == ValueType::suboptimal || value == ValueType::error
2159 || value == ValueType::unknown
2160 ? value
2161 : throw std::invalid_argument{
2162 "Invalid value: Status{ "
2163 + std::to_string(static_cast<std::underlying_type<ValueType>::type>(value))
2164 + " }"
2165 };
2166 }
2167
2169
2170 friend struct DataModel::Detail::Befriend<Status>;
2171 };
2172
2174
2175 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
2177 {
2178 public:
2181
2183 static constexpr const char *path{ "Temperature/DMD/Value" };
2184
2186 static constexpr const char *name{ "Value" };
2187
2189 static constexpr const char *description{
2190 R"description(DMD temperature in degrees Celsius.)description"
2191 };
2192
2194 using ValueType = double;
2195
2197 static constexpr Range<double> validRange()
2198 {
2199 return { std::numeric_limits<double>::lowest(), std::numeric_limits<double>::max() };
2200 }
2201
2203 Value() = default;
2204
2206 explicit constexpr Value(double value)
2207 : m_opt{ value }
2208 {}
2209
2214 double value() const;
2215
2217 bool hasValue() const;
2218
2220 void reset();
2221
2223 std::string toString() const;
2224
2226 bool operator==(const Value &other) const
2227 {
2228 return m_opt == other.m_opt;
2229 }
2230
2232 bool operator!=(const Value &other) const
2233 {
2234 return m_opt != other.m_opt;
2235 }
2236
2238 bool operator<(const Value &other) const
2239 {
2240 return m_opt < other.m_opt;
2241 }
2242
2244 bool operator>(const Value &other) const
2245 {
2246 return m_opt > other.m_opt;
2247 }
2248
2250 bool operator<=(const Value &other) const
2251 {
2252 return m_opt <= other.m_opt;
2253 }
2254
2256 bool operator>=(const Value &other) const
2257 {
2258 return m_opt >= other.m_opt;
2259 }
2260
2262 friend std::ostream &operator<<(std::ostream &stream, const Value &value)
2263 {
2264 return stream << value.toString();
2265 }
2266
2267 private:
2268 void setFromString(const std::string &value);
2269
2270 std::optional<double> m_opt;
2271
2272 friend struct DataModel::Detail::Befriend<Value>;
2273 };
2274
2276 std::tuple<CameraHealth::Temperature::DMD::Status, CameraHealth::Temperature::DMD::Value>;
2277
2280
2293#ifndef NO_DOC
2294 template<
2295 typename... Args,
2296 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
2297 typename std::enable_if<
2298 Zivid::Detail::TypeTraits::AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::
2299 value,
2300 int>::type = 0>
2301#else
2302 template<typename... Args>
2303#endif
2304 explicit DMD(Args &&...args)
2305 {
2306 using namespace Zivid::Detail::TypeTraits;
2307
2308 static_assert(
2309 AllArgsDecayedAreUnique<Args...>::value,
2310 "Found duplicate types among the arguments passed to DMD(...). "
2311 "Types should be listed at most once.");
2312
2313 set(std::forward<Args>(args)...);
2314 }
2315
2327#ifndef NO_DOC
2328 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
2329#else
2330 template<typename... Args>
2331#endif
2332 void set(Args &&...args)
2333 {
2334 using namespace Zivid::Detail::TypeTraits;
2335
2336 using AllArgsAreDescendantNodes =
2337 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
2338 static_assert(
2339 AllArgsAreDescendantNodes::value, "All arguments passed to set(...) must be descendant nodes.");
2340
2341 static_assert(
2342 AllArgsDecayedAreUnique<Args...>::value,
2343 "Found duplicate types among the arguments passed to set(...). "
2344 "Types should be listed at most once.");
2345
2346 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
2347 }
2348
2361#ifndef NO_DOC
2362 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
2363#else
2364 template<typename... Args>
2365#endif
2366 DMD copyWith(Args &&...args) const
2367 {
2368 using namespace Zivid::Detail::TypeTraits;
2369
2370 using AllArgsAreDescendantNodes =
2371 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
2372 static_assert(
2373 AllArgsAreDescendantNodes::value,
2374 "All arguments passed to copyWith(...) must be descendant nodes.");
2375
2376 static_assert(
2377 AllArgsDecayedAreUnique<Args...>::value,
2378 "Found duplicate types among the arguments passed to copyWith(...). "
2379 "Types should be listed at most once.");
2380
2381 auto copy{ *this };
2382 copy.set(std::forward<Args>(args)...);
2383 return copy;
2384 }
2385
2387 const Status &status() const
2388 {
2389 return m_status;
2390 }
2391
2394 {
2395 return m_status;
2396 }
2397
2400 {
2401 m_status = value;
2402 return *this;
2403 }
2404
2406 const Value &value() const
2407 {
2408 return m_value;
2409 }
2410
2413 {
2414 return m_value;
2415 }
2416
2419 {
2420 m_value = value;
2421 return *this;
2422 }
2423
2424 template<
2425 typename T,
2426 typename std::enable_if<std::is_same<T, CameraHealth::Temperature::DMD::Status>::value, int>::type =
2427 0>
2429 {
2430 return m_status;
2431 }
2432
2433 template<
2434 typename T,
2435 typename std::enable_if<std::is_same<T, CameraHealth::Temperature::DMD::Value>::value, int>::type =
2436 0>
2438 {
2439 return m_value;
2440 }
2441
2442 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
2444 {
2445 return m_status;
2446 }
2447
2448 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
2450 {
2451 return m_value;
2452 }
2453
2455 template<typename F>
2456 void forEach(const F &f) const
2457 {
2458 f(m_status);
2459 f(m_value);
2460 }
2461
2463 template<typename F>
2464 void forEach(const F &f)
2465 {
2466 f(m_status);
2467 f(m_value);
2468 }
2469
2471 bool operator==(const DMD &other) const;
2472
2474 bool operator!=(const DMD &other) const;
2475
2477 std::string toString() const;
2478
2480 friend std::ostream &operator<<(std::ostream &stream, const DMD &value)
2481 {
2482 return stream << value.toString();
2483 }
2484
2485 private:
2486 void setFromString(const std::string &value);
2487
2488 void setFromString(const std::string &fullPath, const std::string &value);
2489
2490 std::string getString(const std::string &fullPath) const;
2491
2492 Status m_status;
2493 Value m_value;
2494
2495 friend struct DataModel::Detail::Befriend<DMD>;
2496 };
2497
2504
2505 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
2507 {
2508 public:
2511
2513 static constexpr const char *path{ "Temperature/LED" };
2514
2516 static constexpr const char *name{ "LED" };
2517
2519 static constexpr const char *description{
2520 R"description(The status of the LED temperature, in degrees Celsius.
2521
2522 - OK: Temperature in (0, 60)
2523 - Suboptimal: Temperature in [60, 70]
2524 - Error: Temperature < 0 or > 70
2525)description"
2526 };
2527
2529
2530 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
2532 {
2533 public:
2536
2538 static constexpr const char *path{ "Temperature/LED/Status" };
2539
2541 static constexpr const char *name{ "Status" };
2542
2544 static constexpr const char *description{
2545 R"description(Severity of the LED temperature check.)description"
2546 };
2547
2549 enum class ValueType
2550 {
2555 };
2556 static const Status ok;
2557 static const Status suboptimal;
2558 static const Status error;
2559 static const Status unknown;
2560
2562 static std::set<ValueType> validValues()
2563 {
2565 }
2566
2568 Status() = default;
2569
2571 explicit constexpr Status(ValueType value)
2572 : m_value{ verifyValue(value) }
2573 {}
2574
2577
2579 std::string toString() const;
2580
2582 friend std::ostream &operator<<(std::ostream &stream, const Status::ValueType &value)
2583 {
2584 return stream << Status{ value }.toString();
2585 }
2586
2588 bool operator==(const Status &other) const
2589 {
2590 return m_value == other.m_value;
2591 }
2592
2594 bool operator!=(const Status &other) const
2595 {
2596 return m_value != other.m_value;
2597 }
2598
2600 friend std::ostream &operator<<(std::ostream &stream, const Status &value)
2601 {
2602 return stream << value.toString();
2603 }
2604
2605 private:
2606 void setFromString(const std::string &value);
2607
2608 constexpr ValueType static verifyValue(const ValueType &value)
2609 {
2610 return value == ValueType::ok || value == ValueType::suboptimal || value == ValueType::error
2611 || value == ValueType::unknown
2612 ? value
2613 : throw std::invalid_argument{
2614 "Invalid value: Status{ "
2615 + std::to_string(static_cast<std::underlying_type<ValueType>::type>(value))
2616 + " }"
2617 };
2618 }
2619
2621
2622 friend struct DataModel::Detail::Befriend<Status>;
2623 };
2624
2626
2627 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
2629 {
2630 public:
2633
2635 static constexpr const char *path{ "Temperature/LED/Value" };
2636
2638 static constexpr const char *name{ "Value" };
2639
2641 static constexpr const char *description{
2642 R"description(LED temperature in degrees Celsius.)description"
2643 };
2644
2646 using ValueType = double;
2647
2649 static constexpr Range<double> validRange()
2650 {
2651 return { std::numeric_limits<double>::lowest(), std::numeric_limits<double>::max() };
2652 }
2653
2655 Value() = default;
2656
2658 explicit constexpr Value(double value)
2659 : m_opt{ value }
2660 {}
2661
2666 double value() const;
2667
2669 bool hasValue() const;
2670
2672 void reset();
2673
2675 std::string toString() const;
2676
2678 bool operator==(const Value &other) const
2679 {
2680 return m_opt == other.m_opt;
2681 }
2682
2684 bool operator!=(const Value &other) const
2685 {
2686 return m_opt != other.m_opt;
2687 }
2688
2690 bool operator<(const Value &other) const
2691 {
2692 return m_opt < other.m_opt;
2693 }
2694
2696 bool operator>(const Value &other) const
2697 {
2698 return m_opt > other.m_opt;
2699 }
2700
2702 bool operator<=(const Value &other) const
2703 {
2704 return m_opt <= other.m_opt;
2705 }
2706
2708 bool operator>=(const Value &other) const
2709 {
2710 return m_opt >= other.m_opt;
2711 }
2712
2714 friend std::ostream &operator<<(std::ostream &stream, const Value &value)
2715 {
2716 return stream << value.toString();
2717 }
2718
2719 private:
2720 void setFromString(const std::string &value);
2721
2722 std::optional<double> m_opt;
2723
2724 friend struct DataModel::Detail::Befriend<Value>;
2725 };
2726
2728 std::tuple<CameraHealth::Temperature::LED::Status, CameraHealth::Temperature::LED::Value>;
2729
2732
2745#ifndef NO_DOC
2746 template<
2747 typename... Args,
2748 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
2749 typename std::enable_if<
2750 Zivid::Detail::TypeTraits::AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::
2751 value,
2752 int>::type = 0>
2753#else
2754 template<typename... Args>
2755#endif
2756 explicit LED(Args &&...args)
2757 {
2758 using namespace Zivid::Detail::TypeTraits;
2759
2760 static_assert(
2761 AllArgsDecayedAreUnique<Args...>::value,
2762 "Found duplicate types among the arguments passed to LED(...). "
2763 "Types should be listed at most once.");
2764
2765 set(std::forward<Args>(args)...);
2766 }
2767
2779#ifndef NO_DOC
2780 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
2781#else
2782 template<typename... Args>
2783#endif
2784 void set(Args &&...args)
2785 {
2786 using namespace Zivid::Detail::TypeTraits;
2787
2788 using AllArgsAreDescendantNodes =
2789 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
2790 static_assert(
2791 AllArgsAreDescendantNodes::value, "All arguments passed to set(...) must be descendant nodes.");
2792
2793 static_assert(
2794 AllArgsDecayedAreUnique<Args...>::value,
2795 "Found duplicate types among the arguments passed to set(...). "
2796 "Types should be listed at most once.");
2797
2798 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
2799 }
2800
2813#ifndef NO_DOC
2814 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
2815#else
2816 template<typename... Args>
2817#endif
2818 LED copyWith(Args &&...args) const
2819 {
2820 using namespace Zivid::Detail::TypeTraits;
2821
2822 using AllArgsAreDescendantNodes =
2823 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
2824 static_assert(
2825 AllArgsAreDescendantNodes::value,
2826 "All arguments passed to copyWith(...) must be descendant nodes.");
2827
2828 static_assert(
2829 AllArgsDecayedAreUnique<Args...>::value,
2830 "Found duplicate types among the arguments passed to copyWith(...). "
2831 "Types should be listed at most once.");
2832
2833 auto copy{ *this };
2834 copy.set(std::forward<Args>(args)...);
2835 return copy;
2836 }
2837
2839 const Status &status() const
2840 {
2841 return m_status;
2842 }
2843
2846 {
2847 return m_status;
2848 }
2849
2852 {
2853 m_status = value;
2854 return *this;
2855 }
2856
2858 const Value &value() const
2859 {
2860 return m_value;
2861 }
2862
2865 {
2866 return m_value;
2867 }
2868
2871 {
2872 m_value = value;
2873 return *this;
2874 }
2875
2876 template<
2877 typename T,
2878 typename std::enable_if<std::is_same<T, CameraHealth::Temperature::LED::Status>::value, int>::type =
2879 0>
2881 {
2882 return m_status;
2883 }
2884
2885 template<
2886 typename T,
2887 typename std::enable_if<std::is_same<T, CameraHealth::Temperature::LED::Value>::value, int>::type =
2888 0>
2890 {
2891 return m_value;
2892 }
2893
2894 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
2896 {
2897 return m_status;
2898 }
2899
2900 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
2902 {
2903 return m_value;
2904 }
2905
2907 template<typename F>
2908 void forEach(const F &f) const
2909 {
2910 f(m_status);
2911 f(m_value);
2912 }
2913
2915 template<typename F>
2916 void forEach(const F &f)
2917 {
2918 f(m_status);
2919 f(m_value);
2920 }
2921
2923 bool operator==(const LED &other) const;
2924
2926 bool operator!=(const LED &other) const;
2927
2929 std::string toString() const;
2930
2932 friend std::ostream &operator<<(std::ostream &stream, const LED &value)
2933 {
2934 return stream << value.toString();
2935 }
2936
2937 private:
2938 void setFromString(const std::string &value);
2939
2940 void setFromString(const std::string &fullPath, const std::string &value);
2941
2942 std::string getString(const std::string &fullPath) const;
2943
2944 Status m_status;
2945 Value m_value;
2946
2947 friend struct DataModel::Detail::Befriend<LED>;
2948 };
2949
2956
2957 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
2959 {
2960 public:
2963
2965 static constexpr const char *path{ "Temperature/Lens" };
2966
2968 static constexpr const char *name{ "Lens" };
2969
2971 static constexpr const char *description{
2972 R"description(The status of the lens temperature, in degrees Celsius.
2973
2974 - OK: Temperature in (0, 50)
2975 - Suboptimal: Temperature in [50, 60]
2976 - Error: Temperature < 0 or > 60
2977)description"
2978 };
2979
2981
2982 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
2984 {
2985 public:
2988
2990 static constexpr const char *path{ "Temperature/Lens/Status" };
2991
2993 static constexpr const char *name{ "Status" };
2994
2996 static constexpr const char *description{
2997 R"description(Severity of the lens temperature check.)description"
2998 };
2999
3001 enum class ValueType
3002 {
3007 };
3008 static const Status ok;
3009 static const Status suboptimal;
3010 static const Status error;
3011 static const Status unknown;
3012
3014 static std::set<ValueType> validValues()
3015 {
3017 }
3018
3020 Status() = default;
3021
3023 explicit constexpr Status(ValueType value)
3024 : m_value{ verifyValue(value) }
3025 {}
3026
3029
3031 std::string toString() const;
3032
3034 friend std::ostream &operator<<(std::ostream &stream, const Status::ValueType &value)
3035 {
3036 return stream << Status{ value }.toString();
3037 }
3038
3040 bool operator==(const Status &other) const
3041 {
3042 return m_value == other.m_value;
3043 }
3044
3046 bool operator!=(const Status &other) const
3047 {
3048 return m_value != other.m_value;
3049 }
3050
3052 friend std::ostream &operator<<(std::ostream &stream, const Status &value)
3053 {
3054 return stream << value.toString();
3055 }
3056
3057 private:
3058 void setFromString(const std::string &value);
3059
3060 constexpr ValueType static verifyValue(const ValueType &value)
3061 {
3062 return value == ValueType::ok || value == ValueType::suboptimal || value == ValueType::error
3063 || value == ValueType::unknown
3064 ? value
3065 : throw std::invalid_argument{
3066 "Invalid value: Status{ "
3067 + std::to_string(static_cast<std::underlying_type<ValueType>::type>(value))
3068 + " }"
3069 };
3070 }
3071
3073
3074 friend struct DataModel::Detail::Befriend<Status>;
3075 };
3076
3078
3079 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
3081 {
3082 public:
3085
3087 static constexpr const char *path{ "Temperature/Lens/Value" };
3088
3090 static constexpr const char *name{ "Value" };
3091
3093 static constexpr const char *description{
3094 R"description(Lens temperature in degrees Celsius.)description"
3095 };
3096
3098 using ValueType = double;
3099
3101 static constexpr Range<double> validRange()
3102 {
3103 return { std::numeric_limits<double>::lowest(), std::numeric_limits<double>::max() };
3104 }
3105
3107 Value() = default;
3108
3110 explicit constexpr Value(double value)
3111 : m_opt{ value }
3112 {}
3113
3118 double value() const;
3119
3121 bool hasValue() const;
3122
3124 void reset();
3125
3127 std::string toString() const;
3128
3130 bool operator==(const Value &other) const
3131 {
3132 return m_opt == other.m_opt;
3133 }
3134
3136 bool operator!=(const Value &other) const
3137 {
3138 return m_opt != other.m_opt;
3139 }
3140
3142 bool operator<(const Value &other) const
3143 {
3144 return m_opt < other.m_opt;
3145 }
3146
3148 bool operator>(const Value &other) const
3149 {
3150 return m_opt > other.m_opt;
3151 }
3152
3154 bool operator<=(const Value &other) const
3155 {
3156 return m_opt <= other.m_opt;
3157 }
3158
3160 bool operator>=(const Value &other) const
3161 {
3162 return m_opt >= other.m_opt;
3163 }
3164
3166 friend std::ostream &operator<<(std::ostream &stream, const Value &value)
3167 {
3168 return stream << value.toString();
3169 }
3170
3171 private:
3172 void setFromString(const std::string &value);
3173
3174 std::optional<double> m_opt;
3175
3176 friend struct DataModel::Detail::Befriend<Value>;
3177 };
3178
3180 std::tuple<CameraHealth::Temperature::Lens::Status, CameraHealth::Temperature::Lens::Value>;
3181
3184
3197#ifndef NO_DOC
3198 template<
3199 typename... Args,
3200 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
3201 typename std::enable_if<
3202 Zivid::Detail::TypeTraits::AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::
3203 value,
3204 int>::type = 0>
3205#else
3206 template<typename... Args>
3207#endif
3208 explicit Lens(Args &&...args)
3209 {
3210 using namespace Zivid::Detail::TypeTraits;
3211
3212 static_assert(
3213 AllArgsDecayedAreUnique<Args...>::value,
3214 "Found duplicate types among the arguments passed to Lens(...). "
3215 "Types should be listed at most once.");
3216
3217 set(std::forward<Args>(args)...);
3218 }
3219
3231#ifndef NO_DOC
3232 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
3233#else
3234 template<typename... Args>
3235#endif
3236 void set(Args &&...args)
3237 {
3238 using namespace Zivid::Detail::TypeTraits;
3239
3240 using AllArgsAreDescendantNodes =
3241 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
3242 static_assert(
3243 AllArgsAreDescendantNodes::value, "All arguments passed to set(...) must be descendant nodes.");
3244
3245 static_assert(
3246 AllArgsDecayedAreUnique<Args...>::value,
3247 "Found duplicate types among the arguments passed to set(...). "
3248 "Types should be listed at most once.");
3249
3250 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
3251 }
3252
3265#ifndef NO_DOC
3266 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
3267#else
3268 template<typename... Args>
3269#endif
3270 Lens copyWith(Args &&...args) const
3271 {
3272 using namespace Zivid::Detail::TypeTraits;
3273
3274 using AllArgsAreDescendantNodes =
3275 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
3276 static_assert(
3277 AllArgsAreDescendantNodes::value,
3278 "All arguments passed to copyWith(...) must be descendant nodes.");
3279
3280 static_assert(
3281 AllArgsDecayedAreUnique<Args...>::value,
3282 "Found duplicate types among the arguments passed to copyWith(...). "
3283 "Types should be listed at most once.");
3284
3285 auto copy{ *this };
3286 copy.set(std::forward<Args>(args)...);
3287 return copy;
3288 }
3289
3291 const Status &status() const
3292 {
3293 return m_status;
3294 }
3295
3298 {
3299 return m_status;
3300 }
3301
3304 {
3305 m_status = value;
3306 return *this;
3307 }
3308
3310 const Value &value() const
3311 {
3312 return m_value;
3313 }
3314
3317 {
3318 return m_value;
3319 }
3320
3323 {
3324 m_value = value;
3325 return *this;
3326 }
3327
3328 template<
3329 typename T,
3330 typename std::enable_if<std::is_same<T, CameraHealth::Temperature::Lens::Status>::value, int>::
3331 type = 0>
3333 {
3334 return m_status;
3335 }
3336
3337 template<
3338 typename T,
3339 typename std::enable_if<std::is_same<T, CameraHealth::Temperature::Lens::Value>::value, int>::type =
3340 0>
3342 {
3343 return m_value;
3344 }
3345
3346 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
3348 {
3349 return m_status;
3350 }
3351
3352 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
3354 {
3355 return m_value;
3356 }
3357
3359 template<typename F>
3360 void forEach(const F &f) const
3361 {
3362 f(m_status);
3363 f(m_value);
3364 }
3365
3367 template<typename F>
3368 void forEach(const F &f)
3369 {
3370 f(m_status);
3371 f(m_value);
3372 }
3373
3375 bool operator==(const Lens &other) const;
3376
3378 bool operator!=(const Lens &other) const;
3379
3381 std::string toString() const;
3382
3384 friend std::ostream &operator<<(std::ostream &stream, const Lens &value)
3385 {
3386 return stream << value.toString();
3387 }
3388
3389 private:
3390 void setFromString(const std::string &value);
3391
3392 void setFromString(const std::string &fullPath, const std::string &value);
3393
3394 std::string getString(const std::string &fullPath) const;
3395
3396 Status m_status;
3397 Value m_value;
3398
3399 friend struct DataModel::Detail::Befriend<Lens>;
3400 };
3401
3402 using Descendants = std::tuple<
3412
3415
3435#ifndef NO_DOC
3436 template<
3437 typename... Args,
3438 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
3439 typename std::enable_if<
3440 Zivid::Detail::TypeTraits::AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::
3441 value,
3442 int>::type = 0>
3443#else
3444 template<typename... Args>
3445#endif
3446 explicit Temperature(Args &&...args)
3447 {
3448 using namespace Zivid::Detail::TypeTraits;
3449
3450 static_assert(
3451 AllArgsDecayedAreUnique<Args...>::value,
3452 "Found duplicate types among the arguments passed to Temperature(...). "
3453 "Types should be listed at most once.");
3454
3455 set(std::forward<Args>(args)...);
3456 }
3457
3476#ifndef NO_DOC
3477 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
3478#else
3479 template<typename... Args>
3480#endif
3481 void set(Args &&...args)
3482 {
3483 using namespace Zivid::Detail::TypeTraits;
3484
3485 using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
3486 static_assert(
3487 AllArgsAreDescendantNodes::value, "All arguments passed to set(...) must be descendant nodes.");
3488
3489 static_assert(
3490 AllArgsDecayedAreUnique<Args...>::value,
3491 "Found duplicate types among the arguments passed to set(...). "
3492 "Types should be listed at most once.");
3493
3494 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
3495 }
3496
3516#ifndef NO_DOC
3517 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
3518#else
3519 template<typename... Args>
3520#endif
3521 Temperature copyWith(Args &&...args) const
3522 {
3523 using namespace Zivid::Detail::TypeTraits;
3524
3525 using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
3526 static_assert(
3527 AllArgsAreDescendantNodes::value,
3528 "All arguments passed to copyWith(...) must be descendant nodes.");
3529
3530 static_assert(
3531 AllArgsDecayedAreUnique<Args...>::value,
3532 "Found duplicate types among the arguments passed to copyWith(...). "
3533 "Types should be listed at most once.");
3534
3535 auto copy{ *this };
3536 copy.set(std::forward<Args>(args)...);
3537 return copy;
3538 }
3539
3541 const DMD &dmd() const
3542 {
3543 return m_dmd;
3544 }
3545
3548 {
3549 return m_dmd;
3550 }
3551
3553 Temperature &set(const DMD &value)
3554 {
3555 m_dmd = value;
3556 return *this;
3557 }
3558
3561 {
3562 m_dmd.set(value);
3563 return *this;
3564 }
3565
3568 {
3569 m_dmd.set(value);
3570 return *this;
3571 }
3572
3574 const LED &led() const
3575 {
3576 return m_led;
3577 }
3578
3581 {
3582 return m_led;
3583 }
3584
3586 Temperature &set(const LED &value)
3587 {
3588 m_led = value;
3589 return *this;
3590 }
3591
3594 {
3595 m_led.set(value);
3596 return *this;
3597 }
3598
3601 {
3602 m_led.set(value);
3603 return *this;
3604 }
3605
3607 const Lens &lens() const
3608 {
3609 return m_lens;
3610 }
3611
3614 {
3615 return m_lens;
3616 }
3617
3619 Temperature &set(const Lens &value)
3620 {
3621 m_lens = value;
3622 return *this;
3623 }
3624
3627 {
3628 m_lens.set(value);
3629 return *this;
3630 }
3631
3634 {
3635 m_lens.set(value);
3636 return *this;
3637 }
3638
3639 template<
3640 typename T,
3641 typename std::enable_if<std::is_same<T, CameraHealth::Temperature::DMD>::value, int>::type = 0>
3643 {
3644 return m_dmd;
3645 }
3646
3647 template<
3648 typename T,
3649 typename std::enable_if<std::is_same<T, CameraHealth::Temperature::DMD::Status>::value, int>::type = 0>
3651 {
3652 return m_dmd.get<CameraHealth::Temperature::DMD::Status>();
3653 }
3654
3655 template<
3656 typename T,
3657 typename std::enable_if<std::is_same<T, CameraHealth::Temperature::DMD::Value>::value, int>::type = 0>
3659 {
3660 return m_dmd.get<CameraHealth::Temperature::DMD::Value>();
3661 }
3662
3663 template<
3664 typename T,
3665 typename std::enable_if<std::is_same<T, CameraHealth::Temperature::LED>::value, int>::type = 0>
3667 {
3668 return m_led;
3669 }
3670
3671 template<
3672 typename T,
3673 typename std::enable_if<std::is_same<T, CameraHealth::Temperature::LED::Status>::value, int>::type = 0>
3675 {
3676 return m_led.get<CameraHealth::Temperature::LED::Status>();
3677 }
3678
3679 template<
3680 typename T,
3681 typename std::enable_if<std::is_same<T, CameraHealth::Temperature::LED::Value>::value, int>::type = 0>
3683 {
3684 return m_led.get<CameraHealth::Temperature::LED::Value>();
3685 }
3686
3687 template<
3688 typename T,
3689 typename std::enable_if<std::is_same<T, CameraHealth::Temperature::Lens>::value, int>::type = 0>
3691 {
3692 return m_lens;
3693 }
3694
3695 template<
3696 typename T,
3697 typename std::enable_if<std::is_same<T, CameraHealth::Temperature::Lens::Status>::value, int>::type = 0>
3699 {
3700 return m_lens.get<CameraHealth::Temperature::Lens::Status>();
3701 }
3702
3703 template<
3704 typename T,
3705 typename std::enable_if<std::is_same<T, CameraHealth::Temperature::Lens::Value>::value, int>::type = 0>
3707 {
3708 return m_lens.get<CameraHealth::Temperature::Lens::Value>();
3709 }
3710
3711 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
3713 {
3714 return m_dmd;
3715 }
3716
3717 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
3719 {
3720 return m_led;
3721 }
3722
3723 template<size_t i, typename std::enable_if<i == 2, int>::type = 0>
3725 {
3726 return m_lens;
3727 }
3728
3730 template<typename F>
3731 void forEach(const F &f) const
3732 {
3733 f(m_dmd);
3734 f(m_led);
3735 f(m_lens);
3736 }
3737
3739 template<typename F>
3740 void forEach(const F &f)
3741 {
3742 f(m_dmd);
3743 f(m_led);
3744 f(m_lens);
3745 }
3746
3748 bool operator==(const Temperature &other) const;
3749
3751 bool operator!=(const Temperature &other) const;
3752
3754 std::string toString() const;
3755
3757 friend std::ostream &operator<<(std::ostream &stream, const Temperature &value)
3758 {
3759 return stream << value.toString();
3760 }
3761
3762 private:
3763 void setFromString(const std::string &value);
3764
3765 void setFromString(const std::string &fullPath, const std::string &value);
3766
3767 std::string getString(const std::string &fullPath) const;
3768
3769 DMD m_dmd;
3770 LED m_led;
3771 Lens m_lens;
3772
3773 friend struct DataModel::Detail::Befriend<Temperature>;
3774 };
3775
3776 using Descendants = std::tuple<
3800
3803
3805 explicit CameraHealth(const std::string &fileName);
3806
3812 [[nodiscard]] static CameraHealth fromSerialized(const std::string &value);
3813
3819 std::string serialize() const;
3820
3854#ifndef NO_DOC
3855 template<
3856 typename... Args,
3857 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
3858 typename std::enable_if<
3859 Zivid::Detail::TypeTraits::AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::value,
3860 int>::type = 0>
3861#else
3862 template<typename... Args>
3863#endif
3864 explicit CameraHealth(Args &&...args)
3865 {
3866 using namespace Zivid::Detail::TypeTraits;
3867
3868 static_assert(
3869 AllArgsDecayedAreUnique<Args...>::value,
3870 "Found duplicate types among the arguments passed to CameraHealth(...). "
3871 "Types should be listed at most once.");
3872
3873 set(std::forward<Args>(args)...);
3874 }
3875
3908#ifndef NO_DOC
3909 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
3910#else
3911 template<typename... Args>
3912#endif
3913 void set(Args &&...args)
3914 {
3915 using namespace Zivid::Detail::TypeTraits;
3916
3917 using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
3918 static_assert(
3919 AllArgsAreDescendantNodes::value, "All arguments passed to set(...) must be descendant nodes.");
3920
3921 static_assert(
3922 AllArgsDecayedAreUnique<Args...>::value,
3923 "Found duplicate types among the arguments passed to set(...). "
3924 "Types should be listed at most once.");
3925
3926 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
3927 }
3928
3962#ifndef NO_DOC
3963 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
3964#else
3965 template<typename... Args>
3966#endif
3967 CameraHealth copyWith(Args &&...args) const
3968 {
3969 using namespace Zivid::Detail::TypeTraits;
3970
3971 using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
3972 static_assert(
3973 AllArgsAreDescendantNodes::value, "All arguments passed to copyWith(...) must be descendant nodes.");
3974
3975 static_assert(
3976 AllArgsDecayedAreUnique<Args...>::value,
3977 "Found duplicate types among the arguments passed to copyWith(...). "
3978 "Types should be listed at most once.");
3979
3980 auto copy{ *this };
3981 copy.set(std::forward<Args>(args)...);
3982 return copy;
3983 }
3984
3986 const Fan &fan() const
3987 {
3988 return m_fan;
3989 }
3990
3993 {
3994 return m_fan;
3995 }
3996
3998 CameraHealth &set(const Fan &value)
3999 {
4000 m_fan = value;
4001 return *this;
4002 }
4003
4006 {
4007 m_fan.set(value);
4008 return *this;
4009 }
4010
4013 {
4014 m_fan.set(value);
4015 return *this;
4016 }
4017
4020 {
4021 return m_infieldVerification;
4022 }
4023
4026 {
4027 return m_infieldVerification;
4028 }
4029
4032 {
4033 m_infieldVerification = value;
4034 return *this;
4035 }
4036
4039 {
4040 m_infieldVerification.set(value);
4041 return *this;
4042 }
4043
4046 {
4047 m_infieldVerification.set(value);
4048 return *this;
4049 }
4050
4053 {
4054 return m_maxTransferSpeed;
4055 }
4056
4059 {
4060 return m_maxTransferSpeed;
4061 }
4062
4065 {
4066 m_maxTransferSpeed = value;
4067 return *this;
4068 }
4069
4072 {
4073 m_maxTransferSpeed.set(value);
4074 return *this;
4075 }
4076
4079 {
4080 m_maxTransferSpeed.set(value);
4081 return *this;
4082 }
4083
4085 const Memory &memory() const
4086 {
4087 return m_memory;
4088 }
4089
4092 {
4093 return m_memory;
4094 }
4095
4097 CameraHealth &set(const Memory &value)
4098 {
4099 m_memory = value;
4100 return *this;
4101 }
4102
4105 {
4106 m_memory.set(value);
4107 return *this;
4108 }
4109
4112 {
4113 m_memory.set(value);
4114 return *this;
4115 }
4116
4118 const Overall &overall() const
4119 {
4120 return m_overall;
4121 }
4122
4125 {
4126 return m_overall;
4127 }
4128
4130 CameraHealth &set(const Overall &value)
4131 {
4132 m_overall = value;
4133 return *this;
4134 }
4135
4138 {
4139 return m_temperature;
4140 }
4141
4144 {
4145 return m_temperature;
4146 }
4147
4150 {
4151 m_temperature = value;
4152 return *this;
4153 }
4154
4157 {
4158 m_temperature.set(value);
4159 return *this;
4160 }
4161
4164 {
4165 m_temperature.set(value);
4166 return *this;
4167 }
4168
4171 {
4172 m_temperature.set(value);
4173 return *this;
4174 }
4175
4178 {
4179 m_temperature.set(value);
4180 return *this;
4181 }
4182
4185 {
4186 m_temperature.set(value);
4187 return *this;
4188 }
4189
4192 {
4193 m_temperature.set(value);
4194 return *this;
4195 }
4196
4199 {
4200 m_temperature.set(value);
4201 return *this;
4202 }
4203
4206 {
4207 m_temperature.set(value);
4208 return *this;
4209 }
4210
4213 {
4214 m_temperature.set(value);
4215 return *this;
4216 }
4217
4218 template<typename T, typename std::enable_if<std::is_same<T, CameraHealth::Fan>::value, int>::type = 0>
4219 const CameraHealth::Fan &get() const
4220 {
4221 return m_fan;
4222 }
4223
4224 template<typename T, typename std::enable_if<std::is_same<T, CameraHealth::Fan::Status>::value, int>::type = 0>
4226 {
4227 return m_fan.get<CameraHealth::Fan::Status>();
4228 }
4229
4230 template<typename T, typename std::enable_if<std::is_same<T, CameraHealth::Fan::Value>::value, int>::type = 0>
4232 {
4233 return m_fan.get<CameraHealth::Fan::Value>();
4234 }
4235
4236 template<
4237 typename T,
4238 typename std::enable_if<std::is_same<T, CameraHealth::InfieldVerification>::value, int>::type = 0>
4240 {
4241 return m_infieldVerification;
4242 }
4243
4244 template<
4245 typename T,
4246 typename std::enable_if<std::is_same<T, CameraHealth::InfieldVerification::Status>::value, int>::type = 0>
4248 {
4249 return m_infieldVerification.get<CameraHealth::InfieldVerification::Status>();
4250 }
4251
4252 template<
4253 typename T,
4254 typename std::enable_if<std::is_same<T, CameraHealth::InfieldVerification::Value>::value, int>::type = 0>
4256 {
4257 return m_infieldVerification.get<CameraHealth::InfieldVerification::Value>();
4258 }
4259
4260 template<
4261 typename T,
4262 typename std::enable_if<std::is_same<T, CameraHealth::MaxTransferSpeed>::value, int>::type = 0>
4264 {
4265 return m_maxTransferSpeed;
4266 }
4267
4268 template<
4269 typename T,
4270 typename std::enable_if<std::is_same<T, CameraHealth::MaxTransferSpeed::Status>::value, int>::type = 0>
4272 {
4273 return m_maxTransferSpeed.get<CameraHealth::MaxTransferSpeed::Status>();
4274 }
4275
4276 template<
4277 typename T,
4278 typename std::enable_if<std::is_same<T, CameraHealth::MaxTransferSpeed::Value>::value, int>::type = 0>
4280 {
4281 return m_maxTransferSpeed.get<CameraHealth::MaxTransferSpeed::Value>();
4282 }
4283
4284 template<typename T, typename std::enable_if<std::is_same<T, CameraHealth::Memory>::value, int>::type = 0>
4286 {
4287 return m_memory;
4288 }
4289
4290 template<
4291 typename T,
4292 typename std::enable_if<std::is_same<T, CameraHealth::Memory::Status>::value, int>::type = 0>
4294 {
4295 return m_memory.get<CameraHealth::Memory::Status>();
4296 }
4297
4298 template<
4299 typename T,
4300 typename std::enable_if<std::is_same<T, CameraHealth::Memory::Value>::value, int>::type = 0>
4302 {
4303 return m_memory.get<CameraHealth::Memory::Value>();
4304 }
4305
4306 template<typename T, typename std::enable_if<std::is_same<T, CameraHealth::Overall>::value, int>::type = 0>
4308 {
4309 return m_overall;
4310 }
4311
4312 template<typename T, typename std::enable_if<std::is_same<T, CameraHealth::Temperature>::value, int>::type = 0>
4314 {
4315 return m_temperature;
4316 }
4317
4318 template<
4319 typename T,
4320 typename std::enable_if<std::is_same<T, CameraHealth::Temperature::DMD>::value, int>::type = 0>
4322 {
4323 return m_temperature.get<CameraHealth::Temperature::DMD>();
4324 }
4325
4326 template<
4327 typename T,
4328 typename std::enable_if<std::is_same<T, CameraHealth::Temperature::DMD::Status>::value, int>::type = 0>
4330 {
4331 return m_temperature.get<CameraHealth::Temperature::DMD::Status>();
4332 }
4333
4334 template<
4335 typename T,
4336 typename std::enable_if<std::is_same<T, CameraHealth::Temperature::DMD::Value>::value, int>::type = 0>
4338 {
4339 return m_temperature.get<CameraHealth::Temperature::DMD::Value>();
4340 }
4341
4342 template<
4343 typename T,
4344 typename std::enable_if<std::is_same<T, CameraHealth::Temperature::LED>::value, int>::type = 0>
4346 {
4347 return m_temperature.get<CameraHealth::Temperature::LED>();
4348 }
4349
4350 template<
4351 typename T,
4352 typename std::enable_if<std::is_same<T, CameraHealth::Temperature::LED::Status>::value, int>::type = 0>
4354 {
4355 return m_temperature.get<CameraHealth::Temperature::LED::Status>();
4356 }
4357
4358 template<
4359 typename T,
4360 typename std::enable_if<std::is_same<T, CameraHealth::Temperature::LED::Value>::value, int>::type = 0>
4362 {
4363 return m_temperature.get<CameraHealth::Temperature::LED::Value>();
4364 }
4365
4366 template<
4367 typename T,
4368 typename std::enable_if<std::is_same<T, CameraHealth::Temperature::Lens>::value, int>::type = 0>
4370 {
4371 return m_temperature.get<CameraHealth::Temperature::Lens>();
4372 }
4373
4374 template<
4375 typename T,
4376 typename std::enable_if<std::is_same<T, CameraHealth::Temperature::Lens::Status>::value, int>::type = 0>
4378 {
4379 return m_temperature.get<CameraHealth::Temperature::Lens::Status>();
4380 }
4381
4382 template<
4383 typename T,
4384 typename std::enable_if<std::is_same<T, CameraHealth::Temperature::Lens::Value>::value, int>::type = 0>
4386 {
4387 return m_temperature.get<CameraHealth::Temperature::Lens::Value>();
4388 }
4389
4390 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
4391 const CameraHealth::Fan &get() const
4392 {
4393 return m_fan;
4394 }
4395
4396 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
4398 {
4399 return m_infieldVerification;
4400 }
4401
4402 template<size_t i, typename std::enable_if<i == 2, int>::type = 0>
4404 {
4405 return m_maxTransferSpeed;
4406 }
4407
4408 template<size_t i, typename std::enable_if<i == 3, int>::type = 0>
4410 {
4411 return m_memory;
4412 }
4413
4414 template<size_t i, typename std::enable_if<i == 4, int>::type = 0>
4416 {
4417 return m_overall;
4418 }
4419
4420 template<size_t i, typename std::enable_if<i == 5, int>::type = 0>
4422 {
4423 return m_temperature;
4424 }
4425
4427 template<typename F>
4428 void forEach(const F &f) const
4429 {
4430 f(m_fan);
4431 f(m_infieldVerification);
4432 f(m_maxTransferSpeed);
4433 f(m_memory);
4434 f(m_overall);
4435 f(m_temperature);
4436 }
4437
4439 template<typename F>
4440 void forEach(const F &f)
4441 {
4442 f(m_fan);
4443 f(m_infieldVerification);
4444 f(m_maxTransferSpeed);
4445 f(m_memory);
4446 f(m_overall);
4447 f(m_temperature);
4448 }
4449
4451 bool operator==(const CameraHealth &other) const;
4452
4454 bool operator!=(const CameraHealth &other) const;
4455
4457 std::string toString() const;
4458
4460 friend std::ostream &operator<<(std::ostream &stream, const CameraHealth &value)
4461 {
4462 return stream << value.toString();
4463 }
4464
4466 void save(const std::string &fileName) const;
4467
4469 void load(const std::string &fileName);
4470
4471 private:
4472 void setFromString(const std::string &value);
4473
4474 void setFromString(const std::string &fullPath, const std::string &value);
4475
4476 std::string getString(const std::string &fullPath) const;
4477
4478 Fan m_fan;
4479 InfieldVerification m_infieldVerification;
4480 MaxTransferSpeed m_maxTransferSpeed;
4481 Memory m_memory;
4482 Overall m_overall;
4483 Temperature m_temperature;
4484
4485 friend struct DataModel::Detail::Befriend<CameraHealth>;
4486 };
4487
4488#ifndef NO_DOC
4489 template<>
4490 struct CameraHealth::Version<1>
4491 {
4492 using Type = CameraHealth;
4493 };
4494#endif
4495
4496} // namespace Zivid
4497
4498#ifndef NO_DOC
4500namespace Zivid::Detail
4501{
4502
4503 ZIVID_CORE_EXPORT void save(const Zivid::CameraHealth &dataModel, std::ostream &ostream);
4504 ZIVID_CORE_EXPORT void load(Zivid::CameraHealth &dataModel, std::istream &istream);
4505
4506} // namespace Zivid::Detail
4507#endif
4508
4509#ifdef _MSC_VER
4510# pragma warning(pop)
4511#endif
4512
4513#ifndef NO_DOC
4514# if !(defined(_MSC_VER) && (_MSC_VER <= 1900))
4515namespace std // NOLINT
4516{
4517
4518 template<>
4519 struct tuple_size<Zivid::CameraHealth::Fan> : integral_constant<size_t, 2>
4520 {};
4521
4522 template<size_t i>
4523 struct tuple_element<i, Zivid::CameraHealth::Fan>
4524 {
4525 static_assert(i < tuple_size<Zivid::CameraHealth::Fan>::value, "Index must be less than 2");
4526
4527 using type // NOLINT
4528 = decltype(declval<Zivid::CameraHealth::Fan>().get<i>());
4529 };
4530
4531 template<>
4532 struct tuple_size<Zivid::CameraHealth::InfieldVerification> : integral_constant<size_t, 2>
4533 {};
4534
4535 template<size_t i>
4536 struct tuple_element<i, Zivid::CameraHealth::InfieldVerification>
4537 {
4538 static_assert(i < tuple_size<Zivid::CameraHealth::InfieldVerification>::value, "Index must be less than 2");
4539
4540 using type // NOLINT
4541 = decltype(declval<Zivid::CameraHealth::InfieldVerification>().get<i>());
4542 };
4543
4544 template<>
4545 struct tuple_size<Zivid::CameraHealth::MaxTransferSpeed> : integral_constant<size_t, 2>
4546 {};
4547
4548 template<size_t i>
4549 struct tuple_element<i, Zivid::CameraHealth::MaxTransferSpeed>
4550 {
4551 static_assert(i < tuple_size<Zivid::CameraHealth::MaxTransferSpeed>::value, "Index must be less than 2");
4552
4553 using type // NOLINT
4554 = decltype(declval<Zivid::CameraHealth::MaxTransferSpeed>().get<i>());
4555 };
4556
4557 template<>
4558 struct tuple_size<Zivid::CameraHealth::Memory> : integral_constant<size_t, 2>
4559 {};
4560
4561 template<size_t i>
4562 struct tuple_element<i, Zivid::CameraHealth::Memory>
4563 {
4564 static_assert(i < tuple_size<Zivid::CameraHealth::Memory>::value, "Index must be less than 2");
4565
4566 using type // NOLINT
4567 = decltype(declval<Zivid::CameraHealth::Memory>().get<i>());
4568 };
4569
4570 template<>
4571 struct tuple_size<Zivid::CameraHealth::Temperature> : integral_constant<size_t, 3>
4572 {};
4573
4574 template<size_t i>
4575 struct tuple_element<i, Zivid::CameraHealth::Temperature>
4576 {
4577 static_assert(i < tuple_size<Zivid::CameraHealth::Temperature>::value, "Index must be less than 3");
4578
4579 using type // NOLINT
4580 = decltype(declval<Zivid::CameraHealth::Temperature>().get<i>());
4581 };
4582
4583 template<>
4584 struct tuple_size<Zivid::CameraHealth::Temperature::DMD> : integral_constant<size_t, 2>
4585 {};
4586
4587 template<size_t i>
4588 struct tuple_element<i, Zivid::CameraHealth::Temperature::DMD>
4589 {
4590 static_assert(i < tuple_size<Zivid::CameraHealth::Temperature::DMD>::value, "Index must be less than 2");
4591
4592 using type // NOLINT
4593 = decltype(declval<Zivid::CameraHealth::Temperature::DMD>().get<i>());
4594 };
4595
4596 template<>
4597 struct tuple_size<Zivid::CameraHealth::Temperature::LED> : integral_constant<size_t, 2>
4598 {};
4599
4600 template<size_t i>
4601 struct tuple_element<i, Zivid::CameraHealth::Temperature::LED>
4602 {
4603 static_assert(i < tuple_size<Zivid::CameraHealth::Temperature::LED>::value, "Index must be less than 2");
4604
4605 using type // NOLINT
4606 = decltype(declval<Zivid::CameraHealth::Temperature::LED>().get<i>());
4607 };
4608
4609 template<>
4610 struct tuple_size<Zivid::CameraHealth::Temperature::Lens> : integral_constant<size_t, 2>
4611 {};
4612
4613 template<size_t i>
4614 struct tuple_element<i, Zivid::CameraHealth::Temperature::Lens>
4615 {
4616 static_assert(i < tuple_size<Zivid::CameraHealth::Temperature::Lens>::value, "Index must be less than 2");
4617
4618 using type // NOLINT
4619 = decltype(declval<Zivid::CameraHealth::Temperature::Lens>().get<i>());
4620 };
4621
4622 template<>
4623 struct tuple_size<Zivid::CameraHealth> : integral_constant<size_t, 6>
4624 {};
4625
4626 template<size_t i>
4627 struct tuple_element<i, Zivid::CameraHealth>
4628 {
4629 static_assert(i < tuple_size<Zivid::CameraHealth>::value, "Index must be less than 6");
4630
4631 using type // NOLINT
4632 = decltype(declval<Zivid::CameraHealth>().get<i>());
4633 };
4634
4635} // namespace std
4636# endif
4637#endif
4638
4639// If we have access to the DataModel library, automatically include internal DataModel
4640// header. This header is necessary for serialization and deserialization.
4641#if defined(__has_include) && !defined(NO_DOC)
4642# if __has_include("Zivid/CameraHealthInternal.h") && __has_include("Zivid/DataModelNodeMetaData.h")
4643# include "Zivid/CameraHealthInternal.h"
4644# endif
4645#endif
#define ZIVID_CORE_EXPORT
Definition CoreExport.h:56
Severity of the fan check.
Definition CameraHealth.h:161
Status()=default
Default constructor.
static const Status error
error
Definition CameraHealth.h:185
constexpr Status(ValueType value)
Constructor.
Definition CameraHealth.h:198
static constexpr const char * name
The name of this value.
Definition CameraHealth.h:170
ValueType
The type of the underlying value.
Definition CameraHealth.h:177
@ ok
Definition CameraHealth.h:178
@ suboptimal
Definition CameraHealth.h:179
@ unknown
Definition CameraHealth.h:181
@ error
Definition CameraHealth.h:180
friend std::ostream & operator<<(std::ostream &stream, const Status &value)
Operator to serialize the value to a stream.
Definition CameraHealth.h:227
std::string toString() const
Get the value as string.
static const Status ok
ok
Definition CameraHealth.h:183
static const Status suboptimal
suboptimal
Definition CameraHealth.h:184
ValueType value() const
Get the value.
static constexpr const char * description
The description for this value.
Definition CameraHealth.h:173
static constexpr const char * path
The full path for this value.
Definition CameraHealth.h:167
static std::set< ValueType > validValues()
All valid values of Status.
Definition CameraHealth.h:189
bool operator==(const Status &other) const
Comparison operator.
Definition CameraHealth.h:215
bool operator!=(const Status &other) const
Comparison operator.
Definition CameraHealth.h:221
static constexpr DataModel::NodeType nodeType
The type of this node.
Definition CameraHealth.h:164
static const Status unknown
unknown
Definition CameraHealth.h:186
friend std::ostream & operator<<(std::ostream &stream, const Status::ValueType &value)
Operator to serialize ValueType to a stream.
Definition CameraHealth.h:209
Whether the fan is operating as expected, or stopped unexpectedly.
Definition CameraHealth.h:255
bool hasValue() const
Check if the value is set.
friend std::ostream & operator<<(std::ostream &stream, const Value &value)
Operator to serialize the value to a stream.
Definition CameraHealth.h:328
bool operator==(const Value &other) const
Comparison operator.
Definition CameraHealth.h:316
ValueType value() const
Get the value.
static constexpr DataModel::NodeType nodeType
The type of this node.
Definition CameraHealth.h:258
static constexpr const char * path
The full path for this value.
Definition CameraHealth.h:261
friend std::ostream & operator<<(std::ostream &stream, const Value::ValueType &value)
Operator to serialize ValueType to a stream.
Definition CameraHealth.h:310
static std::set< ValueType > validValues()
All valid values of Value.
Definition CameraHealth.h:281
constexpr Value(ValueType value)
Constructor.
Definition CameraHealth.h:290
Value()=default
Default constructor.
static const Value unexpectedFanStop
unexpectedFanStop
Definition CameraHealth.h:278
void reset()
Reset the node to unset state.
static const Value ok
ok
Definition CameraHealth.h:277
static constexpr const char * name
The name of this value.
Definition CameraHealth.h:264
ValueType
The type of the underlying value.
Definition CameraHealth.h:273
@ ok
Definition CameraHealth.h:274
@ unexpectedFanStop
Definition CameraHealth.h:275
std::string toString() const
Get the value as string.
bool operator!=(const Value &other) const
Comparison operator.
Definition CameraHealth.h:322
static constexpr const char * description
The description for this value.
Definition CameraHealth.h:267
The status of the camera's fan.
Definition CameraHealth.h:138
bool operator==(const Fan &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 CameraHealth.h:535
void forEach(const F &f) const
Run the given function on each direct member with the value of the member as parameter.
Definition CameraHealth.h:527
const CameraHealth::Fan::Status & get() const
Definition CameraHealth.h:500
std::tuple< CameraHealth::Fan::Status, CameraHealth::Fan::Value > Descendants
Definition CameraHealth.h:351
const CameraHealth::Fan::Value & get() const
Definition CameraHealth.h:508
static constexpr const char * description
The description for this value.
Definition CameraHealth.h:150
Fan()
Default constructor.
Fan & set(const Value &value)
Set Value.
Definition CameraHealth.h:491
const Status & status() const
Get Status.
Definition CameraHealth.h:460
Status & status()
Get Status.
Definition CameraHealth.h:466
friend std::ostream & operator<<(std::ostream &stream, const Fan &value)
Operator to send the value as string to a stream.
Definition CameraHealth.h:551
static constexpr const char * name
The name of this value.
Definition CameraHealth.h:147
bool operator!=(const Fan &other) const
Inequality operator.
Value & value()
Get Value.
Definition CameraHealth.h:485
std::string toString() const
Get the value as string.
void set(Args &&...args)
Set multiple arguments.
Definition CameraHealth.h:407
Fan copyWith(Args &&...args) const
Returns a copy of this object with the given argument(s) set to the new value(s)
Definition CameraHealth.h:440
Fan & set(const Status &value)
Set Status.
Definition CameraHealth.h:472
static constexpr const char * path
The full path for this value.
Definition CameraHealth.h:144
const Value & value() const
Get Value.
Definition CameraHealth.h:479
static constexpr DataModel::NodeType nodeType
The type of this node.
Definition CameraHealth.h:141
Severity of the infield verification check.
Definition CameraHealth.h:603
static const Status suboptimal
suboptimal
Definition CameraHealth.h:628
ValueType
The type of the underlying value.
Definition CameraHealth.h:621
bool operator==(const Status &other) const
Comparison operator.
Definition CameraHealth.h:659
ValueType value() const
Get the value.
constexpr Status(ValueType value)
Constructor.
Definition CameraHealth.h:642
friend std::ostream & operator<<(std::ostream &stream, const Status &value)
Operator to serialize the value to a stream.
Definition CameraHealth.h:671
static const Status error
error
Definition CameraHealth.h:629
static const Status ok
ok
Definition CameraHealth.h:627
static constexpr DataModel::NodeType nodeType
The type of this node.
Definition CameraHealth.h:606
static const Status unknown
unknown
Definition CameraHealth.h:630
bool operator!=(const Status &other) const
Comparison operator.
Definition CameraHealth.h:665
std::string toString() const
Get the value as string.
static constexpr const char * name
The name of this value.
Definition CameraHealth.h:612
static constexpr const char * path
The full path for this value.
Definition CameraHealth.h:609
static constexpr const char * description
The description for this value.
Definition CameraHealth.h:615
friend std::ostream & operator<<(std::ostream &stream, const Status::ValueType &value)
Operator to serialize ValueType to a stream.
Definition CameraHealth.h:653
static std::set< ValueType > validValues()
All valid values of Status.
Definition CameraHealth.h:633
Time of the most recent infield verification.
Definition CameraHealth.h:699
bool operator==(const Value &other) const
Comparison operator.
Definition CameraHealth.h:749
friend std::ostream & operator<<(std::ostream &stream, const Value &value)
Operator to serialize the value to a stream.
Definition CameraHealth.h:785
static constexpr const char * name
The name of this value.
Definition CameraHealth.h:708
static constexpr const char * description
The description for this value.
Definition CameraHealth.h:711
static constexpr const char * path
The full path for this value.
Definition CameraHealth.h:705
std::chrono::system_clock::time_point value() const
Get the value.
static constexpr Range< std::chrono::system_clock::time_point > validRange()
The range of valid values for Value.
Definition CameraHealth.h:719
std::chrono::system_clock::time_point ValueType
The type of the underlying value.
Definition CameraHealth.h:716
bool operator!=(const Value &other) const
Comparison operator.
Definition CameraHealth.h:755
static constexpr DataModel::NodeType nodeType
The type of this node.
Definition CameraHealth.h:702
bool operator>=(const Value &other) const
Comparison operator.
Definition CameraHealth.h:779
bool hasValue() const
Check if the value is set.
std::string toString() const
Get the value as string.
bool operator>(const Value &other) const
Comparison operator.
Definition CameraHealth.h:767
bool operator<(const Value &other) const
Comparison operator.
Definition CameraHealth.h:761
bool operator<=(const Value &other) const
Comparison operator.
Definition CameraHealth.h:773
void reset()
Reset the node to unset state.
constexpr Value(std::chrono::system_clock::time_point value)
Constructor.
Definition CameraHealth.h:729
The status of the camera's most recent infield verification.
Definition CameraHealth.h:578
const CameraHealth::InfieldVerification::Status & get() const
Definition CameraHealth.h:949
const Status & status() const
Get Status.
Definition CameraHealth.h:908
static constexpr const char * description
The description for this value.
Definition CameraHealth.h:590
InfieldVerification & set(const Status &value)
Set Status.
Definition CameraHealth.h:920
std::string toString() const
Get the value as string.
InfieldVerification & set(const Value &value)
Set Value.
Definition CameraHealth.h:939
const CameraHealth::InfieldVerification::Value & get() const
Definition CameraHealth.h:958
InfieldVerification copyWith(Args &&...args) const
Returns a copy of this object with the given argument(s) set to the new value(s)
Definition CameraHealth.h:888
bool operator==(const InfieldVerification &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 CameraHealth.h:985
Status & status()
Get Status.
Definition CameraHealth.h:914
static constexpr DataModel::NodeType nodeType
The type of this node.
Definition CameraHealth.h:581
const Value & value() const
Get Value.
Definition CameraHealth.h:927
void forEach(const F &f) const
Run the given function on each direct member with the value of the member as parameter.
Definition CameraHealth.h:977
Value & value()
Get Value.
Definition CameraHealth.h:933
void set(Args &&...args)
Set multiple arguments.
Definition CameraHealth.h:855
static constexpr const char * name
The name of this value.
Definition CameraHealth.h:587
InfieldVerification()
Default constructor.
friend std::ostream & operator<<(std::ostream &stream, const InfieldVerification &value)
Operator to send the value as string to a stream.
Definition CameraHealth.h:1001
std::tuple< CameraHealth::InfieldVerification::Status, CameraHealth::InfieldVerification::Value > Descendants
Definition CameraHealth.h:798
static constexpr const char * path
The full path for this value.
Definition CameraHealth.h:584
bool operator!=(const InfieldVerification &other) const
Inequality operator.
Severity of the max transfer speed check.
Definition CameraHealth.h:1059
bool operator==(const Status &other) const
Comparison operator.
Definition CameraHealth.h:1115
static const Status error
error
Definition CameraHealth.h:1085
ValueType value() const
Get the value.
Status()=default
Default constructor.
bool operator!=(const Status &other) const
Comparison operator.
Definition CameraHealth.h:1121
friend std::ostream & operator<<(std::ostream &stream, const Status &value)
Operator to serialize the value to a stream.
Definition CameraHealth.h:1127
static const Status ok
ok
Definition CameraHealth.h:1083
static constexpr const char * name
The name of this value.
Definition CameraHealth.h:1068
ValueType
The type of the underlying value.
Definition CameraHealth.h:1077
static constexpr const char * description
The description for this value.
Definition CameraHealth.h:1071
static std::set< ValueType > validValues()
All valid values of Status.
Definition CameraHealth.h:1089
std::string toString() const
Get the value as string.
static constexpr DataModel::NodeType nodeType
The type of this node.
Definition CameraHealth.h:1062
static constexpr const char * path
The full path for this value.
Definition CameraHealth.h:1065
constexpr Status(ValueType value)
Constructor.
Definition CameraHealth.h:1098
static const Status suboptimal
suboptimal
Definition CameraHealth.h:1084
static const Status unknown
unknown
Definition CameraHealth.h:1086
friend std::ostream & operator<<(std::ostream &stream, const Status::ValueType &value)
Operator to serialize ValueType to a stream.
Definition CameraHealth.h:1109
Max transfer speed in megabits per second (Mbps).
Definition CameraHealth.h:1155
bool operator<(const Value &other) const
Comparison operator.
Definition CameraHealth.h:1216
bool operator<=(const Value &other) const
Comparison operator.
Definition CameraHealth.h:1228
static constexpr DataModel::NodeType nodeType
The type of this node.
Definition CameraHealth.h:1158
friend std::ostream & operator<<(std::ostream &stream, const Value &value)
Operator to serialize the value to a stream.
Definition CameraHealth.h:1240
static constexpr Range< uint32_t > validRange()
The range of valid values for Value.
Definition CameraHealth.h:1175
bool operator>=(const Value &other) const
Comparison operator.
Definition CameraHealth.h:1234
uint32_t ValueType
The type of the underlying value.
Definition CameraHealth.h:1172
Value()=default
Default constructor.
static constexpr const char * path
The full path for this value.
Definition CameraHealth.h:1161
bool operator!=(const Value &other) const
Comparison operator.
Definition CameraHealth.h:1210
void reset()
Reset the node to unset state.
bool hasValue() const
Check if the value is set.
constexpr Value(uint32_t value)
Constructor.
Definition CameraHealth.h:1184
bool operator==(const Value &other) const
Comparison operator.
Definition CameraHealth.h:1204
uint32_t value() const
Get the value.
bool operator>(const Value &other) const
Comparison operator.
Definition CameraHealth.h:1222
static constexpr const char * name
The name of this value.
Definition CameraHealth.h:1164
static constexpr const char * description
The description for this value.
Definition CameraHealth.h:1167
std::string toString() const
Get the value as string.
The end-to-end link speed between the camera and the host computer, defined as the minimum of the cam...
Definition CameraHealth.h:1031
const CameraHealth::MaxTransferSpeed::Value & get() const
Definition CameraHealth.h:1411
Value & value()
Get Value.
Definition CameraHealth.h:1388
Status & status()
Get Status.
Definition CameraHealth.h:1369
bool operator==(const MaxTransferSpeed &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 CameraHealth.h:1438
MaxTransferSpeed()
Default constructor.
std::string toString() const
Get the value as string.
MaxTransferSpeed copyWith(Args &&...args) const
Returns a copy of this object with the given argument(s) set to the new value(s)
Definition CameraHealth.h:1343
void forEach(const F &f) const
Run the given function on each direct member with the value of the member as parameter.
Definition CameraHealth.h:1430
friend std::ostream & operator<<(std::ostream &stream, const MaxTransferSpeed &value)
Operator to send the value as string to a stream.
Definition CameraHealth.h:1454
const Value & value() const
Get Value.
Definition CameraHealth.h:1382
static constexpr const char * description
The description for this value.
Definition CameraHealth.h:1043
bool operator!=(const MaxTransferSpeed &other) const
Inequality operator.
MaxTransferSpeed & set(const Status &value)
Set Status.
Definition CameraHealth.h:1375
const CameraHealth::MaxTransferSpeed::Status & get() const
Definition CameraHealth.h:1403
const Status & status() const
Get Status.
Definition CameraHealth.h:1363
static constexpr const char * name
The name of this value.
Definition CameraHealth.h:1040
void set(Args &&...args)
Set multiple arguments.
Definition CameraHealth.h:1310
static constexpr DataModel::NodeType nodeType
The type of this node.
Definition CameraHealth.h:1034
static constexpr const char * path
The full path for this value.
Definition CameraHealth.h:1037
std::tuple< CameraHealth::MaxTransferSpeed::Status, CameraHealth::MaxTransferSpeed::Value > Descendants
Definition CameraHealth.h:1253
MaxTransferSpeed & set(const Value &value)
Set Value.
Definition CameraHealth.h:1394
Severity of the memory check.
Definition CameraHealth.h:1504
static constexpr const char * name
The name of this value.
Definition CameraHealth.h:1513
static constexpr DataModel::NodeType nodeType
The type of this node.
Definition CameraHealth.h:1507
static const Status unknown
unknown
Definition CameraHealth.h:1529
static std::set< ValueType > validValues()
All valid values of Status.
Definition CameraHealth.h:1532
bool operator!=(const Status &other) const
Comparison operator.
Definition CameraHealth.h:1564
std::string toString() const
Get the value as string.
friend std::ostream & operator<<(std::ostream &stream, const Status &value)
Operator to serialize the value to a stream.
Definition CameraHealth.h:1570
constexpr Status(ValueType value)
Constructor.
Definition CameraHealth.h:1541
static const Status error
error
Definition CameraHealth.h:1528
static constexpr const char * description
The description for this value.
Definition CameraHealth.h:1516
ValueType value() const
Get the value.
Status()=default
Default constructor.
static const Status ok
ok
Definition CameraHealth.h:1526
ValueType
The type of the underlying value.
Definition CameraHealth.h:1520
@ ok
Definition CameraHealth.h:1521
@ suboptimal
Definition CameraHealth.h:1522
@ unknown
Definition CameraHealth.h:1524
@ error
Definition CameraHealth.h:1523
static const Status suboptimal
suboptimal
Definition CameraHealth.h:1527
friend std::ostream & operator<<(std::ostream &stream, const Status::ValueType &value)
Operator to serialize ValueType to a stream.
Definition CameraHealth.h:1552
static constexpr const char * path
The full path for this value.
Definition CameraHealth.h:1510
bool operator==(const Status &other) const
Comparison operator.
Definition CameraHealth.h:1558
Number of memory errors detected by the memory test.
Definition CameraHealth.h:1598
static constexpr const char * description
The description for this value.
Definition CameraHealth.h:1610
void reset()
Reset the node to unset state.
friend std::ostream & operator<<(std::ostream &stream, const Value &value)
Operator to serialize the value to a stream.
Definition CameraHealth.h:1683
static constexpr const char * path
The full path for this value.
Definition CameraHealth.h:1604
constexpr Value(uint32_t value)
Constructor.
Definition CameraHealth.h:1627
std::string toString() const
Get the value as string.
bool operator==(const Value &other) const
Comparison operator.
Definition CameraHealth.h:1647
bool operator<=(const Value &other) const
Comparison operator.
Definition CameraHealth.h:1671
static constexpr DataModel::NodeType nodeType
The type of this node.
Definition CameraHealth.h:1601
static constexpr Range< uint32_t > validRange()
The range of valid values for Value.
Definition CameraHealth.h:1618
uint32_t ValueType
The type of the underlying value.
Definition CameraHealth.h:1615
bool operator!=(const Value &other) const
Comparison operator.
Definition CameraHealth.h:1653
Value()=default
Default constructor.
uint32_t value() const
Get the value.
static constexpr const char * name
The name of this value.
Definition CameraHealth.h:1607
bool hasValue() const
Check if the value is set.
bool operator>=(const Value &other) const
Comparison operator.
Definition CameraHealth.h:1677
bool operator<(const Value &other) const
Comparison operator.
Definition CameraHealth.h:1659
bool operator>(const Value &other) const
Comparison operator.
Definition CameraHealth.h:1665
The status of the camera's memory test.
Definition CameraHealth.h:1481
friend std::ostream & operator<<(std::ostream &stream, const Memory &value)
Operator to send the value as string to a stream.
Definition CameraHealth.h:1896
bool operator!=(const Memory &other) const
Inequality operator.
const CameraHealth::Memory::Value & get() const
Definition CameraHealth.h:1853
static constexpr const char * description
The description for this value.
Definition CameraHealth.h:1493
bool operator==(const Memory &other) const
Equality operator.
const Value & value() const
Get Value.
Definition CameraHealth.h:1824
static constexpr const char * name
The name of this value.
Definition CameraHealth.h:1490
Value & value()
Get Value.
Definition CameraHealth.h:1830
Memory & set(const Status &value)
Set Status.
Definition CameraHealth.h:1817
Memory copyWith(Args &&...args) const
Returns a copy of this object with the given argument(s) set to the new value(s)
Definition CameraHealth.h:1785
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition CameraHealth.h:1880
void forEach(const F &f) const
Run the given function on each direct member with the value of the member as parameter.
Definition CameraHealth.h:1872
std::string toString() const
Get the value as string.
std::tuple< CameraHealth::Memory::Status, CameraHealth::Memory::Value > Descendants
Definition CameraHealth.h:1696
const Status & status() const
Get Status.
Definition CameraHealth.h:1805
const CameraHealth::Memory::Status & get() const
Definition CameraHealth.h:1845
static constexpr const char * path
The full path for this value.
Definition CameraHealth.h:1487
Status & status()
Get Status.
Definition CameraHealth.h:1811
void set(Args &&...args)
Set multiple arguments.
Definition CameraHealth.h:1752
Memory()
Default constructor.
static constexpr DataModel::NodeType nodeType
The type of this node.
Definition CameraHealth.h:1484
Memory & set(const Value &value)
Set Value.
Definition CameraHealth.h:1836
The aggregated severity across all checks, taking the highest-precedence severity among them....
Definition CameraHealth.h:1923
static constexpr const char * name
The name of this value.
Definition CameraHealth.h:1932
friend std::ostream & operator<<(std::ostream &stream, const Overall &value)
Operator to serialize the value to a stream.
Definition CameraHealth.h:1996
ValueType value() const
Get the value.
static constexpr const char * path
The full path for this value.
Definition CameraHealth.h:1929
static const Overall suboptimal
suboptimal
Definition CameraHealth.h:1953
constexpr Overall(ValueType value)
Constructor.
Definition CameraHealth.h:1967
friend std::ostream & operator<<(std::ostream &stream, const Overall::ValueType &value)
Operator to serialize ValueType to a stream.
Definition CameraHealth.h:1978
bool operator!=(const Overall &other) const
Comparison operator.
Definition CameraHealth.h:1990
ValueType
The type of the underlying value.
Definition CameraHealth.h:1946
@ ok
Definition CameraHealth.h:1947
@ suboptimal
Definition CameraHealth.h:1948
@ unknown
Definition CameraHealth.h:1950
@ error
Definition CameraHealth.h:1949
bool operator==(const Overall &other) const
Comparison operator.
Definition CameraHealth.h:1984
static constexpr DataModel::NodeType nodeType
The type of this node.
Definition CameraHealth.h:1926
Overall()=default
Default constructor.
static const Overall ok
ok
Definition CameraHealth.h:1952
static const Overall error
error
Definition CameraHealth.h:1954
static std::set< ValueType > validValues()
All valid values of Overall.
Definition CameraHealth.h:1958
static constexpr const char * description
The description for this value.
Definition CameraHealth.h:1935
std::string toString() const
Get the value as string.
static const Overall unknown
unknown
Definition CameraHealth.h:1955
Severity of the DMD temperature check.
Definition CameraHealth.h:2080
Status()=default
Default constructor.
std::string toString() const
Get the value as string.
static const Status error
error
Definition CameraHealth.h:2106
bool operator==(const Status &other) const
Comparison operator.
Definition CameraHealth.h:2136
static constexpr const char * name
The name of this value.
Definition CameraHealth.h:2089
ValueType value() const
Get the value.
static const Status unknown
unknown
Definition CameraHealth.h:2107
constexpr Status(ValueType value)
Constructor.
Definition CameraHealth.h:2119
friend std::ostream & operator<<(std::ostream &stream, const Status &value)
Operator to serialize the value to a stream.
Definition CameraHealth.h:2148
static constexpr DataModel::NodeType nodeType
The type of this node.
Definition CameraHealth.h:2083
bool operator!=(const Status &other) const
Comparison operator.
Definition CameraHealth.h:2142
static constexpr const char * description
The description for this value.
Definition CameraHealth.h:2092
static const Status ok
ok
Definition CameraHealth.h:2104
ValueType
The type of the underlying value.
Definition CameraHealth.h:2098
static std::set< ValueType > validValues()
All valid values of Status.
Definition CameraHealth.h:2110
static constexpr const char * path
The full path for this value.
Definition CameraHealth.h:2086
static const Status suboptimal
suboptimal
Definition CameraHealth.h:2105
friend std::ostream & operator<<(std::ostream &stream, const Status::ValueType &value)
Operator to serialize ValueType to a stream.
Definition CameraHealth.h:2130
DMD temperature in degrees Celsius.
Definition CameraHealth.h:2177
static constexpr const char * name
The name of this value.
Definition CameraHealth.h:2186
bool operator<=(const Value &other) const
Comparison operator.
Definition CameraHealth.h:2250
double ValueType
The type of the underlying value.
Definition CameraHealth.h:2194
friend std::ostream & operator<<(std::ostream &stream, const Value &value)
Operator to serialize the value to a stream.
Definition CameraHealth.h:2262
std::string toString() const
Get the value as string.
bool operator==(const Value &other) const
Comparison operator.
Definition CameraHealth.h:2226
bool operator>=(const Value &other) const
Comparison operator.
Definition CameraHealth.h:2256
static constexpr const char * path
The full path for this value.
Definition CameraHealth.h:2183
bool operator!=(const Value &other) const
Comparison operator.
Definition CameraHealth.h:2232
bool operator>(const Value &other) const
Comparison operator.
Definition CameraHealth.h:2244
Value()=default
Default constructor.
static constexpr const char * description
The description for this value.
Definition CameraHealth.h:2189
constexpr Value(double value)
Constructor.
Definition CameraHealth.h:2206
bool hasValue() const
Check if the value is set.
double value() const
Get the value.
void reset()
Reset the node to unset state.
bool operator<(const Value &other) const
Comparison operator.
Definition CameraHealth.h:2238
static constexpr Range< double > validRange()
The range of valid values for Value.
Definition CameraHealth.h:2197
static constexpr DataModel::NodeType nodeType
The type of this node.
Definition CameraHealth.h:2180
The status of the DMD (Digital Micromirror Device) temperature, in degrees Celsius.
Definition CameraHealth.h:2054
const CameraHealth::Temperature::DMD::Value & get() const
Definition CameraHealth.h:2437
bool operator!=(const DMD &other) const
Inequality operator.
static constexpr const char * description
The description for this value.
Definition CameraHealth.h:2066
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition CameraHealth.h:2464
bool operator==(const DMD &other) const
Equality operator.
const Status & status() const
Get Status.
Definition CameraHealth.h:2387
std::tuple< CameraHealth::Temperature::DMD::Status, CameraHealth::Temperature::DMD::Value > Descendants
Definition CameraHealth.h:2275
const Value & value() const
Get Value.
Definition CameraHealth.h:2406
static constexpr const char * path
The full path for this value.
Definition CameraHealth.h:2060
DMD & set(const Status &value)
Set Status.
Definition CameraHealth.h:2399
static constexpr const char * name
The name of this value.
Definition CameraHealth.h:2063
friend std::ostream & operator<<(std::ostream &stream, const DMD &value)
Operator to send the value as string to a stream.
Definition CameraHealth.h:2480
Status & status()
Get Status.
Definition CameraHealth.h:2393
void set(Args &&...args)
Set multiple arguments.
Definition CameraHealth.h:2332
DMD & set(const Value &value)
Set Value.
Definition CameraHealth.h:2418
static constexpr DataModel::NodeType nodeType
The type of this node.
Definition CameraHealth.h:2057
void forEach(const F &f) const
Run the given function on each direct member with the value of the member as parameter.
Definition CameraHealth.h:2456
std::string toString() const
Get the value as string.
DMD copyWith(Args &&...args) const
Returns a copy of this object with the given argument(s) set to the new value(s)
Definition CameraHealth.h:2366
Value & value()
Get Value.
Definition CameraHealth.h:2412
const CameraHealth::Temperature::DMD::Status & get() const
Definition CameraHealth.h:2428
Severity of the LED temperature check.
Definition CameraHealth.h:2532
ValueType value() const
Get the value.
static const Status suboptimal
suboptimal
Definition CameraHealth.h:2557
constexpr Status(ValueType value)
Constructor.
Definition CameraHealth.h:2571
Status()=default
Default constructor.
static const Status error
error
Definition CameraHealth.h:2558
friend std::ostream & operator<<(std::ostream &stream, const Status &value)
Operator to serialize the value to a stream.
Definition CameraHealth.h:2600
static constexpr const char * description
The description for this value.
Definition CameraHealth.h:2544
static const Status unknown
unknown
Definition CameraHealth.h:2559
static constexpr const char * path
The full path for this value.
Definition CameraHealth.h:2538
bool operator!=(const Status &other) const
Comparison operator.
Definition CameraHealth.h:2594
static std::set< ValueType > validValues()
All valid values of Status.
Definition CameraHealth.h:2562
static constexpr DataModel::NodeType nodeType
The type of this node.
Definition CameraHealth.h:2535
std::string toString() const
Get the value as string.
static constexpr const char * name
The name of this value.
Definition CameraHealth.h:2541
bool operator==(const Status &other) const
Comparison operator.
Definition CameraHealth.h:2588
static const Status ok
ok
Definition CameraHealth.h:2556
friend std::ostream & operator<<(std::ostream &stream, const Status::ValueType &value)
Operator to serialize ValueType to a stream.
Definition CameraHealth.h:2582
ValueType
The type of the underlying value.
Definition CameraHealth.h:2550
LED temperature in degrees Celsius.
Definition CameraHealth.h:2629
Value()=default
Default constructor.
void reset()
Reset the node to unset state.
static constexpr const char * description
The description for this value.
Definition CameraHealth.h:2641
friend std::ostream & operator<<(std::ostream &stream, const Value &value)
Operator to serialize the value to a stream.
Definition CameraHealth.h:2714
double value() const
Get the value.
bool operator!=(const Value &other) const
Comparison operator.
Definition CameraHealth.h:2684
bool operator<=(const Value &other) const
Comparison operator.
Definition CameraHealth.h:2702
static constexpr const char * name
The name of this value.
Definition CameraHealth.h:2638
bool operator>(const Value &other) const
Comparison operator.
Definition CameraHealth.h:2696
static constexpr DataModel::NodeType nodeType
The type of this node.
Definition CameraHealth.h:2632
double ValueType
The type of the underlying value.
Definition CameraHealth.h:2646
bool hasValue() const
Check if the value is set.
bool operator>=(const Value &other) const
Comparison operator.
Definition CameraHealth.h:2708
static constexpr Range< double > validRange()
The range of valid values for Value.
Definition CameraHealth.h:2649
std::string toString() const
Get the value as string.
static constexpr const char * path
The full path for this value.
Definition CameraHealth.h:2635
bool operator==(const Value &other) const
Comparison operator.
Definition CameraHealth.h:2678
bool operator<(const Value &other) const
Comparison operator.
Definition CameraHealth.h:2690
constexpr Value(double value)
Constructor.
Definition CameraHealth.h:2658
The status of the LED temperature, in degrees Celsius.
Definition CameraHealth.h:2507
std::string toString() const
Get the value as string.
void set(Args &&...args)
Set multiple arguments.
Definition CameraHealth.h:2784
Status & status()
Get Status.
Definition CameraHealth.h:2845
const CameraHealth::Temperature::LED::Value & get() const
Definition CameraHealth.h:2889
LED & set(const Value &value)
Set Value.
Definition CameraHealth.h:2870
LED & set(const Status &value)
Set Status.
Definition CameraHealth.h:2851
const Value & value() const
Get Value.
Definition CameraHealth.h:2858
std::tuple< CameraHealth::Temperature::LED::Status, CameraHealth::Temperature::LED::Value > Descendants
Definition CameraHealth.h:2727
const CameraHealth::Temperature::LED::Status & get() const
Definition CameraHealth.h:2880
static constexpr DataModel::NodeType nodeType
The type of this node.
Definition CameraHealth.h:2510
friend std::ostream & operator<<(std::ostream &stream, const LED &value)
Operator to send the value as string to a stream.
Definition CameraHealth.h:2932
static constexpr const char * path
The full path for this value.
Definition CameraHealth.h:2513
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition CameraHealth.h:2916
bool operator!=(const LED &other) const
Inequality operator.
static constexpr const char * name
The name of this value.
Definition CameraHealth.h:2516
Value & value()
Get Value.
Definition CameraHealth.h:2864
void forEach(const F &f) const
Run the given function on each direct member with the value of the member as parameter.
Definition CameraHealth.h:2908
static constexpr const char * description
The description for this value.
Definition CameraHealth.h:2519
const Status & status() const
Get Status.
Definition CameraHealth.h:2839
LED copyWith(Args &&...args) const
Returns a copy of this object with the given argument(s) set to the new value(s)
Definition CameraHealth.h:2818
bool operator==(const LED &other) const
Equality operator.
Severity of the lens temperature check.
Definition CameraHealth.h:2984
static constexpr const char * description
The description for this value.
Definition CameraHealth.h:2996
std::string toString() const
Get the value as string.
static std::set< ValueType > validValues()
All valid values of Status.
Definition CameraHealth.h:3014
static const Status unknown
unknown
Definition CameraHealth.h:3011
static const Status error
error
Definition CameraHealth.h:3010
ValueType
The type of the underlying value.
Definition CameraHealth.h:3002
constexpr Status(ValueType value)
Constructor.
Definition CameraHealth.h:3023
static const Status suboptimal
suboptimal
Definition CameraHealth.h:3009
friend std::ostream & operator<<(std::ostream &stream, const Status &value)
Operator to serialize the value to a stream.
Definition CameraHealth.h:3052
Status()=default
Default constructor.
static constexpr DataModel::NodeType nodeType
The type of this node.
Definition CameraHealth.h:2987
bool operator==(const Status &other) const
Comparison operator.
Definition CameraHealth.h:3040
ValueType value() const
Get the value.
bool operator!=(const Status &other) const
Comparison operator.
Definition CameraHealth.h:3046
static constexpr const char * path
The full path for this value.
Definition CameraHealth.h:2990
static constexpr const char * name
The name of this value.
Definition CameraHealth.h:2993
static const Status ok
ok
Definition CameraHealth.h:3008
friend std::ostream & operator<<(std::ostream &stream, const Status::ValueType &value)
Operator to serialize ValueType to a stream.
Definition CameraHealth.h:3034
Lens temperature in degrees Celsius.
Definition CameraHealth.h:3081
static constexpr DataModel::NodeType nodeType
The type of this node.
Definition CameraHealth.h:3084
friend std::ostream & operator<<(std::ostream &stream, const Value &value)
Operator to serialize the value to a stream.
Definition CameraHealth.h:3166
bool operator==(const Value &other) const
Comparison operator.
Definition CameraHealth.h:3130
static constexpr Range< double > validRange()
The range of valid values for Value.
Definition CameraHealth.h:3101
static constexpr const char * path
The full path for this value.
Definition CameraHealth.h:3087
bool hasValue() const
Check if the value is set.
static constexpr const char * name
The name of this value.
Definition CameraHealth.h:3090
void reset()
Reset the node to unset state.
bool operator<=(const Value &other) const
Comparison operator.
Definition CameraHealth.h:3154
Value()=default
Default constructor.
bool operator>(const Value &other) const
Comparison operator.
Definition CameraHealth.h:3148
bool operator<(const Value &other) const
Comparison operator.
Definition CameraHealth.h:3142
static constexpr const char * description
The description for this value.
Definition CameraHealth.h:3093
constexpr Value(double value)
Constructor.
Definition CameraHealth.h:3110
std::string toString() const
Get the value as string.
bool operator>=(const Value &other) const
Comparison operator.
Definition CameraHealth.h:3160
bool operator!=(const Value &other) const
Comparison operator.
Definition CameraHealth.h:3136
double ValueType
The type of the underlying value.
Definition CameraHealth.h:3098
The status of the lens temperature, in degrees Celsius.
Definition CameraHealth.h:2959
void set(Args &&...args)
Set multiple arguments.
Definition CameraHealth.h:3236
static constexpr const char * description
The description for this value.
Definition CameraHealth.h:2971
const CameraHealth::Temperature::Lens::Value & get() const
Definition CameraHealth.h:3341
Value & value()
Get Value.
Definition CameraHealth.h:3316
const CameraHealth::Temperature::Lens::Status & get() const
Definition CameraHealth.h:3332
static constexpr const char * path
The full path for this value.
Definition CameraHealth.h:2965
std::tuple< CameraHealth::Temperature::Lens::Status, CameraHealth::Temperature::Lens::Value > Descendants
Definition CameraHealth.h:3179
static constexpr DataModel::NodeType nodeType
The type of this node.
Definition CameraHealth.h:2962
Lens & set(const Status &value)
Set Status.
Definition CameraHealth.h:3303
bool operator!=(const Lens &other) const
Inequality operator.
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition CameraHealth.h:3368
Status & status()
Get Status.
Definition CameraHealth.h:3297
Lens & set(const Value &value)
Set Value.
Definition CameraHealth.h:3322
std::string toString() const
Get the value as string.
const Value & value() const
Get Value.
Definition CameraHealth.h:3310
Lens copyWith(Args &&...args) const
Returns a copy of this object with the given argument(s) set to the new value(s)
Definition CameraHealth.h:3270
void forEach(const F &f) const
Run the given function on each direct member with the value of the member as parameter.
Definition CameraHealth.h:3360
friend std::ostream & operator<<(std::ostream &stream, const Lens &value)
Operator to send the value as string to a stream.
Definition CameraHealth.h:3384
bool operator==(const Lens &other) const
Equality operator.
const Status & status() const
Get Status.
Definition CameraHealth.h:3291
static constexpr const char * name
The name of this value.
Definition CameraHealth.h:2968
The status of the camera's temperatures. Each sub-status reflects the temperature of a specific compo...
Definition CameraHealth.h:2026
Temperature & set(const Lens::Status &value)
Set Lens::Status.
Definition CameraHealth.h:3626
const CameraHealth::Temperature::DMD::Value & get() const
Definition CameraHealth.h:3658
Lens & lens()
Get Lens.
Definition CameraHealth.h:3613
static constexpr const char * path
The full path for this value.
Definition CameraHealth.h:2032
Temperature copyWith(Args &&...args) const
Returns a copy of this object with the given argument(s) set to the new value(s)
Definition CameraHealth.h:3521
Temperature & set(const Lens &value)
Set Lens.
Definition CameraHealth.h:3619
bool operator!=(const Temperature &other) const
Inequality operator.
const CameraHealth::Temperature::DMD::Status & get() const
Definition CameraHealth.h:3650
static constexpr const char * name
The name of this value.
Definition CameraHealth.h:2035
const CameraHealth::Temperature::Lens & get() const
Definition CameraHealth.h:3690
Temperature()
Default constructor.
const Lens & lens() const
Get Lens.
Definition CameraHealth.h:3607
const CameraHealth::Temperature::LED::Status & get() const
Definition CameraHealth.h:3674
Temperature & set(const DMD::Value &value)
Set DMD::Value.
Definition CameraHealth.h:3567
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition CameraHealth.h:3740
Temperature & set(const LED &value)
Set LED.
Definition CameraHealth.h:3586
friend std::ostream & operator<<(std::ostream &stream, const Temperature &value)
Operator to send the value as string to a stream.
Definition CameraHealth.h:3757
const CameraHealth::Temperature::Lens::Status & get() const
Definition CameraHealth.h:3698
const CameraHealth::Temperature::LED::Value & get() const
Definition CameraHealth.h:3682
void forEach(const F &f) const
Run the given function on each direct member with the value of the member as parameter.
Definition CameraHealth.h:3731
std::string toString() const
Get the value as string.
const CameraHealth::Temperature::Lens::Value & get() const
Definition CameraHealth.h:3706
Temperature & set(const LED::Status &value)
Set LED::Status.
Definition CameraHealth.h:3593
static constexpr DataModel::NodeType nodeType
The type of this node.
Definition CameraHealth.h:2029
Temperature & set(const DMD &value)
Set DMD.
Definition CameraHealth.h:3553
Temperature & set(const Lens::Value &value)
Set Lens::Value.
Definition CameraHealth.h:3633
void set(Args &&...args)
Set multiple arguments.
Definition CameraHealth.h:3481
std::tuple< CameraHealth::Temperature::DMD, CameraHealth::Temperature::DMD::Status, CameraHealth::Temperature::DMD::Value, CameraHealth::Temperature::LED, CameraHealth::Temperature::LED::Status, CameraHealth::Temperature::LED::Value, CameraHealth::Temperature::Lens, CameraHealth::Temperature::Lens::Status, CameraHealth::Temperature::Lens::Value > Descendants
Definition CameraHealth.h:3402
const DMD & dmd() const
Get DMD.
Definition CameraHealth.h:3541
const CameraHealth::Temperature::LED & get() const
Definition CameraHealth.h:3666
static constexpr const char * description
The description for this value.
Definition CameraHealth.h:2038
const CameraHealth::Temperature::DMD & get() const
Definition CameraHealth.h:3642
bool operator==(const Temperature &other) const
Equality operator.
DMD & dmd()
Get DMD.
Definition CameraHealth.h:3547
Temperature & set(const DMD::Status &value)
Set DMD::Status.
Definition CameraHealth.h:3560
Temperature & set(const LED::Value &value)
Set LED::Value.
Definition CameraHealth.h:3600
const LED & led() const
Get LED.
Definition CameraHealth.h:3574
LED & led()
Get LED.
Definition CameraHealth.h:3580
Result of running the camera's health checks. Each check has a Status (severity) and a Value (the und...
Definition CameraHealth.h:89
CameraHealth & set(const Temperature::DMD &value)
Set Temperature::DMD.
Definition CameraHealth.h:4156
const CameraHealth::Memory & get() const
Definition CameraHealth.h:4285
CameraHealth(const std::string &fileName)
Construct CameraHealth by loading from file.
static constexpr size_t version
Definition CameraHealth.h:115
InfieldVerification & infieldVerification()
Get InfieldVerification.
Definition CameraHealth.h:4025
CameraHealth & set(const Temperature::DMD::Status &value)
Set Temperature::DMD::Status.
Definition CameraHealth.h:4163
CameraHealth & set(const MaxTransferSpeed::Value &value)
Set MaxTransferSpeed::Value.
Definition CameraHealth.h:4078
const CameraHealth::MaxTransferSpeed & get() const
Definition CameraHealth.h:4263
void save(const std::string &fileName) const
Save to the given file.
const CameraHealth::Fan::Value & get() const
Definition CameraHealth.h:4231
static constexpr DataModel::NodeType nodeType
The type of this node.
Definition CameraHealth.h:92
const CameraHealth::Fan & get() const
Definition CameraHealth.h:4219
const CameraHealth::Temperature::Lens & get() const
Definition CameraHealth.h:4369
CameraHealth & set(const Memory::Value &value)
Set Memory::Value.
Definition CameraHealth.h:4111
CameraHealth & set(const Temperature::LED &value)
Set Temperature::LED.
Definition CameraHealth.h:4177
const Memory & memory() const
Get Memory.
Definition CameraHealth.h:4085
void load(const std::string &fileName)
Load from the given file.
CameraHealth & set(const Memory::Status &value)
Set Memory::Status.
Definition CameraHealth.h:4104
CameraHealth & set(const InfieldVerification::Value &value)
Set InfieldVerification::Value.
Definition CameraHealth.h:4045
MaxTransferSpeed & maxTransferSpeed()
Get MaxTransferSpeed.
Definition CameraHealth.h:4058
CameraHealth & set(const Temperature::Lens::Value &value)
Set Temperature::Lens::Value.
Definition CameraHealth.h:4212
CameraHealth & set(const Overall &value)
Set Overall.
Definition CameraHealth.h:4130
Fan & fan()
Get Fan.
Definition CameraHealth.h:3992
CameraHealth & set(const Temperature &value)
Set Temperature.
Definition CameraHealth.h:4149
const CameraHealth::Memory::Status & get() const
Definition CameraHealth.h:4293
const Overall & overall() const
Get Overall.
Definition CameraHealth.h:4118
CameraHealth(Args &&...args)
Constructor taking variadic number of arguments.
Definition CameraHealth.h:3864
static CameraHealth fromSerialized(const std::string &value)
Construct a new CameraHealth instance from a previously serialized string.
const MaxTransferSpeed & maxTransferSpeed() const
Get MaxTransferSpeed.
Definition CameraHealth.h:4052
const CameraHealth::Fan::Status & get() const
Definition CameraHealth.h:4225
CameraHealth & set(const Temperature::DMD::Value &value)
Set Temperature::DMD::Value.
Definition CameraHealth.h:4170
const CameraHealth::InfieldVerification & get() const
Definition CameraHealth.h:4239
const CameraHealth::Temperature::Lens::Value & get() const
Definition CameraHealth.h:4385
CameraHealth & set(const InfieldVerification::Status &value)
Set InfieldVerification::Status.
Definition CameraHealth.h:4038
const CameraHealth::Temperature::DMD::Value & get() const
Definition CameraHealth.h:4337
CameraHealth & set(const Fan::Status &value)
Set Fan::Status.
Definition CameraHealth.h:4005
const CameraHealth::MaxTransferSpeed::Status & get() const
Definition CameraHealth.h:4271
const CameraHealth::InfieldVerification::Status & get() const
Definition CameraHealth.h:4247
const CameraHealth::Temperature::DMD & get() const
Definition CameraHealth.h:4321
static constexpr const char * path
The full path for this value.
Definition CameraHealth.h:95
CameraHealth & set(const Memory &value)
Set Memory.
Definition CameraHealth.h:4097
const CameraHealth::Memory::Value & get() const
Definition CameraHealth.h:4301
static constexpr const char * name
The name of this value.
Definition CameraHealth.h:98
Temperature & temperature()
Get Temperature.
Definition CameraHealth.h:4143
Overall & overall()
Get Overall.
Definition CameraHealth.h:4124
Memory & memory()
Get Memory.
Definition CameraHealth.h:4091
static constexpr const char * description
The description for this value.
Definition CameraHealth.h:101
const Temperature & temperature() const
Get Temperature.
Definition CameraHealth.h:4137
bool operator==(const CameraHealth &other) const
Equality operator.
const CameraHealth::MaxTransferSpeed::Value & get() const
Definition CameraHealth.h:4279
void set(Args &&...args)
Set multiple arguments.
Definition CameraHealth.h:3913
bool operator!=(const CameraHealth &other) const
Inequality operator.
std::string serialize() const
Serialize to a string.
const CameraHealth::Temperature::Lens::Status & get() const
Definition CameraHealth.h:4377
void forEach(const F &f) const
Run the given function on each direct member with the value of the member as parameter.
Definition CameraHealth.h:4428
const CameraHealth::Temperature::LED & get() const
Definition CameraHealth.h:4345
CameraHealth & set(const Temperature::Lens &value)
Set Temperature::Lens.
Definition CameraHealth.h:4198
CameraHealth & set(const Fan::Value &value)
Set Fan::Value.
Definition CameraHealth.h:4012
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition CameraHealth.h:4440
const CameraHealth::Temperature::DMD::Status & get() const
Definition CameraHealth.h:4329
std::string toString() const
Get the value as string.
CameraHealth & set(const InfieldVerification &value)
Set InfieldVerification.
Definition CameraHealth.h:4031
CameraHealth()
Default constructor.
const CameraHealth::Temperature::LED::Value & get() const
Definition CameraHealth.h:4361
CameraHealth & set(const Temperature::LED::Status &value)
Set Temperature::LED::Status.
Definition CameraHealth.h:4184
std::tuple< CameraHealth::Fan, CameraHealth::Fan::Status, CameraHealth::Fan::Value, CameraHealth::InfieldVerification, CameraHealth::InfieldVerification::Status, CameraHealth::InfieldVerification::Value, CameraHealth::MaxTransferSpeed, CameraHealth::MaxTransferSpeed::Status, CameraHealth::MaxTransferSpeed::Value, CameraHealth::Memory, CameraHealth::Memory::Status, CameraHealth::Memory::Value, CameraHealth::Overall, CameraHealth::Temperature, CameraHealth::Temperature::DMD, CameraHealth::Temperature::DMD::Status, CameraHealth::Temperature::DMD::Value, CameraHealth::Temperature::LED, CameraHealth::Temperature::LED::Status, CameraHealth::Temperature::LED::Value, CameraHealth::Temperature::Lens, CameraHealth::Temperature::Lens::Status, CameraHealth::Temperature::Lens::Value > Descendants
Definition CameraHealth.h:3776
CameraHealth & set(const Fan &value)
Set Fan.
Definition CameraHealth.h:3998
friend std::ostream & operator<<(std::ostream &stream, const CameraHealth &value)
Operator to send the value as string to a stream.
Definition CameraHealth.h:4460
const CameraHealth::Temperature & get() const
Definition CameraHealth.h:4313
const Fan & fan() const
Get Fan.
Definition CameraHealth.h:3986
CameraHealth & set(const MaxTransferSpeed &value)
Set MaxTransferSpeed.
Definition CameraHealth.h:4064
CameraHealth & set(const Temperature::Lens::Status &value)
Set Temperature::Lens::Status.
Definition CameraHealth.h:4205
CameraHealth & set(const Temperature::LED::Value &value)
Set Temperature::LED::Value.
Definition CameraHealth.h:4191
const InfieldVerification & infieldVerification() const
Get InfieldVerification.
Definition CameraHealth.h:4019
const CameraHealth::Temperature::LED::Status & get() const
Definition CameraHealth.h:4353
CameraHealth & set(const MaxTransferSpeed::Status &value)
Set MaxTransferSpeed::Status.
Definition CameraHealth.h:4071
const CameraHealth::InfieldVerification::Value & get() const
Definition CameraHealth.h:4255
const CameraHealth::Overall & get() const
Definition CameraHealth.h:4307
CameraHealth copyWith(Args &&...args) const
Returns a copy of this object with the given argument(s) set to the new value(s)
Definition CameraHealth.h:3967
Class describing a range of values for a given type T.
Definition Range.h:75
NodeType
Definition NodeType.h:49
@ leafValue
Definition NodeType.h:52
@ group
Definition NodeType.h:50
Definition EnvironmentInfo.h:74
Get version information for the library.
Definition Version.h:58
The main Zivid namespace. All Zivid code is found here.
Definition Application.h:85