Zivid C++ API 2.19.0+b5c53d0f-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
1031
1032 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
1034 {
1035 public:
1038
1040 static constexpr const char *path{ "MaxTransferSpeed" };
1041
1043 static constexpr const char *name{ "MaxTransferSpeed" };
1044
1046 static constexpr const char *description{
1047 R"description(The end-to-end link speed between the camera and the host
1048computer, defined as the minimum of the camera's link speed
1049and the PC's link speed. The possible link speeds are 10 Mbps,
1050100 Mbps, 1 Gbps, 2.5 Gbps, 5 Gbps, 10 Gbps, 14 Gbps, 20 Gbps,
105125 Gbps, 40 Gbps, 50 Gbps, 56 Gbps, 80 Gbps, 100 Gbps, 200 Gbps,
1052400 Gbps, 800 Gbps and 1.6 Tbps.
1053
1054 - OK: Max transfer speed > 1 Gbps
1055 - Suboptimal: Max transfer speed = 1 Gbps
1056 - Error: Max transfer speed < 1 Gbps
1057 - Unknown: Max transfer speed could not be determined
1058)description"
1059 };
1060
1062
1063 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
1065 {
1066 public:
1069
1071 static constexpr const char *path{ "MaxTransferSpeed/Status" };
1072
1074 static constexpr const char *name{ "Status" };
1075
1077 static constexpr const char *description{
1078 R"description(Severity of the max transfer speed check.)description"
1079 };
1080
1082 enum class ValueType
1083 {
1088 };
1089 static const Status ok;
1090 static const Status suboptimal;
1091 static const Status error;
1092 static const Status unknown;
1093
1095 static std::set<ValueType> validValues()
1096 {
1098 }
1099
1101 Status() = default;
1102
1104 explicit constexpr Status(ValueType value)
1105 : m_value{ verifyValue(value) }
1106 {}
1107
1110
1112 std::string toString() const;
1113
1115 friend std::ostream &operator<<(std::ostream &stream, const Status::ValueType &value)
1116 {
1117 return stream << Status{ value }.toString();
1118 }
1119
1121 bool operator==(const Status &other) const
1122 {
1123 return m_value == other.m_value;
1124 }
1125
1127 bool operator!=(const Status &other) const
1128 {
1129 return m_value != other.m_value;
1130 }
1131
1133 friend std::ostream &operator<<(std::ostream &stream, const Status &value)
1134 {
1135 return stream << value.toString();
1136 }
1137
1138 private:
1139 void setFromString(const std::string &value);
1140
1141 constexpr ValueType static verifyValue(const ValueType &value)
1142 {
1143 return value == ValueType::ok || value == ValueType::suboptimal || value == ValueType::error
1144 || value == ValueType::unknown
1145 ? value
1146 : throw std::invalid_argument{
1147 "Invalid value: Status{ "
1148 + std::to_string(static_cast<std::underlying_type<ValueType>::type>(value)) + " }"
1149 };
1150 }
1151
1153
1154 friend struct DataModel::Detail::Befriend<Status>;
1155 };
1156
1158
1159 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
1161 {
1162 public:
1165
1167 static constexpr const char *path{ "MaxTransferSpeed/Value" };
1168
1170 static constexpr const char *name{ "Value" };
1171
1173 static constexpr const char *description{
1174 R"description(Max transfer speed in megabits per second (Mbps).)description"
1175 };
1176
1178 using ValueType = uint32_t;
1179
1181 static constexpr Range<uint32_t> validRange()
1182 {
1183 return { std::numeric_limits<uint32_t>::lowest(), std::numeric_limits<uint32_t>::max() };
1184 }
1185
1187 Value() = default;
1188
1190 explicit constexpr Value(uint32_t value)
1191 : m_opt{ value }
1192 {}
1193
1198 uint32_t value() const;
1199
1201 bool hasValue() const;
1202
1204 void reset();
1205
1207 std::string toString() const;
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 bool operator>=(const Value &other) const
1241 {
1242 return m_opt >= other.m_opt;
1243 }
1244
1246 friend std::ostream &operator<<(std::ostream &stream, const Value &value)
1247 {
1248 return stream << value.toString();
1249 }
1250
1251 private:
1252 void setFromString(const std::string &value);
1253
1254 std::optional<uint32_t> m_opt;
1255
1256 friend struct DataModel::Detail::Befriend<Value>;
1257 };
1258
1260 std::tuple<CameraHealth::MaxTransferSpeed::Status, CameraHealth::MaxTransferSpeed::Value>;
1261
1264
1277#ifndef NO_DOC
1278 template<
1279 typename... Args,
1280 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
1281 typename std::enable_if<
1282 Zivid::Detail::TypeTraits::AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::
1283 value,
1284 int>::type = 0>
1285#else
1286 template<typename... Args>
1287#endif
1288 explicit MaxTransferSpeed(Args &&...args)
1289 {
1290 using namespace Zivid::Detail::TypeTraits;
1291
1292 static_assert(
1293 AllArgsDecayedAreUnique<Args...>::value,
1294 "Found duplicate types among the arguments passed to MaxTransferSpeed(...). "
1295 "Types should be listed at most once.");
1296
1297 set(std::forward<Args>(args)...);
1298 }
1299
1311#ifndef NO_DOC
1312 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
1313#else
1314 template<typename... Args>
1315#endif
1316 void set(Args &&...args)
1317 {
1318 using namespace Zivid::Detail::TypeTraits;
1319
1320 using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
1321 static_assert(
1322 AllArgsAreDescendantNodes::value, "All arguments passed to set(...) must be descendant nodes.");
1323
1324 static_assert(
1325 AllArgsDecayedAreUnique<Args...>::value,
1326 "Found duplicate types among the arguments passed to set(...). "
1327 "Types should be listed at most once.");
1328
1329 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
1330 }
1331
1344#ifndef NO_DOC
1345 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
1346#else
1347 template<typename... Args>
1348#endif
1349 MaxTransferSpeed copyWith(Args &&...args) const
1350 {
1351 using namespace Zivid::Detail::TypeTraits;
1352
1353 using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
1354 static_assert(
1355 AllArgsAreDescendantNodes::value,
1356 "All arguments passed to copyWith(...) must be descendant nodes.");
1357
1358 static_assert(
1359 AllArgsDecayedAreUnique<Args...>::value,
1360 "Found duplicate types among the arguments passed to copyWith(...). "
1361 "Types should be listed at most once.");
1362
1363 auto copy{ *this };
1364 copy.set(std::forward<Args>(args)...);
1365 return copy;
1366 }
1367
1369 const Status &status() const
1370 {
1371 return m_status;
1372 }
1373
1376 {
1377 return m_status;
1378 }
1379
1382 {
1383 m_status = value;
1384 return *this;
1385 }
1386
1388 const Value &value() const
1389 {
1390 return m_value;
1391 }
1392
1395 {
1396 return m_value;
1397 }
1398
1401 {
1402 m_value = value;
1403 return *this;
1404 }
1405
1406 template<
1407 typename T,
1408 typename std::enable_if<std::is_same<T, CameraHealth::MaxTransferSpeed::Status>::value, int>::type = 0>
1410 {
1411 return m_status;
1412 }
1413
1414 template<
1415 typename T,
1416 typename std::enable_if<std::is_same<T, CameraHealth::MaxTransferSpeed::Value>::value, int>::type = 0>
1418 {
1419 return m_value;
1420 }
1421
1422 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
1424 {
1425 return m_status;
1426 }
1427
1428 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
1430 {
1431 return m_value;
1432 }
1433
1435 template<typename F>
1436 void forEach(const F &f) const
1437 {
1438 f(m_status);
1439 f(m_value);
1440 }
1441
1443 template<typename F>
1444 void forEach(const F &f)
1445 {
1446 f(m_status);
1447 f(m_value);
1448 }
1449
1451 bool operator==(const MaxTransferSpeed &other) const;
1452
1454 bool operator!=(const MaxTransferSpeed &other) const;
1455
1457 std::string toString() const;
1458
1460 friend std::ostream &operator<<(std::ostream &stream, const MaxTransferSpeed &value)
1461 {
1462 return stream << value.toString();
1463 }
1464
1465 private:
1466 void setFromString(const std::string &value);
1467
1468 void setFromString(const std::string &fullPath, const std::string &value);
1469
1470 std::string getString(const std::string &fullPath) const;
1471
1472 Status m_status;
1473 Value m_value;
1474
1475 friend struct DataModel::Detail::Befriend<MaxTransferSpeed>;
1476 };
1477
1484
1485 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
1487 {
1488 public:
1491
1493 static constexpr const char *path{ "Memory" };
1494
1496 static constexpr const char *name{ "Memory" };
1497
1499 static constexpr const char *description{ R"description(The status of the camera's memory test.
1500
1501 - OK: Memory was tested and reported zero errors
1502 - Error: Memory was tested and an error was located
1503 - Unknown: Memory test was not performed
1504)description" };
1505
1507
1508 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
1510 {
1511 public:
1514
1516 static constexpr const char *path{ "Memory/Status" };
1517
1519 static constexpr const char *name{ "Status" };
1520
1522 static constexpr const char *description{ R"description(Severity of the memory check.)description" };
1523
1525 enum class ValueType
1526 {
1531 };
1532 static const Status ok;
1533 static const Status suboptimal;
1534 static const Status error;
1535 static const Status unknown;
1536
1538 static std::set<ValueType> validValues()
1539 {
1541 }
1542
1544 Status() = default;
1545
1547 explicit constexpr Status(ValueType value)
1548 : m_value{ verifyValue(value) }
1549 {}
1550
1553
1555 std::string toString() const;
1556
1558 friend std::ostream &operator<<(std::ostream &stream, const Status::ValueType &value)
1559 {
1560 return stream << Status{ value }.toString();
1561 }
1562
1564 bool operator==(const Status &other) const
1565 {
1566 return m_value == other.m_value;
1567 }
1568
1570 bool operator!=(const Status &other) const
1571 {
1572 return m_value != other.m_value;
1573 }
1574
1576 friend std::ostream &operator<<(std::ostream &stream, const Status &value)
1577 {
1578 return stream << value.toString();
1579 }
1580
1581 private:
1582 void setFromString(const std::string &value);
1583
1584 constexpr ValueType static verifyValue(const ValueType &value)
1585 {
1586 return value == ValueType::ok || value == ValueType::suboptimal || value == ValueType::error
1587 || value == ValueType::unknown
1588 ? value
1589 : throw std::invalid_argument{
1590 "Invalid value: Status{ "
1591 + std::to_string(static_cast<std::underlying_type<ValueType>::type>(value)) + " }"
1592 };
1593 }
1594
1596
1597 friend struct DataModel::Detail::Befriend<Status>;
1598 };
1599
1601
1602 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
1604 {
1605 public:
1608
1610 static constexpr const char *path{ "Memory/Value" };
1611
1613 static constexpr const char *name{ "Value" };
1614
1616 static constexpr const char *description{
1617 R"description(Number of memory errors detected by the memory test.)description"
1618 };
1619
1621 using ValueType = uint32_t;
1622
1624 static constexpr Range<uint32_t> validRange()
1625 {
1626 return { std::numeric_limits<uint32_t>::lowest(), std::numeric_limits<uint32_t>::max() };
1627 }
1628
1630 Value() = default;
1631
1633 explicit constexpr Value(uint32_t value)
1634 : m_opt{ value }
1635 {}
1636
1641 uint32_t value() const;
1642
1644 bool hasValue() const;
1645
1647 void reset();
1648
1650 std::string toString() const;
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 bool operator>=(const Value &other) const
1684 {
1685 return m_opt >= other.m_opt;
1686 }
1687
1689 friend std::ostream &operator<<(std::ostream &stream, const Value &value)
1690 {
1691 return stream << value.toString();
1692 }
1693
1694 private:
1695 void setFromString(const std::string &value);
1696
1697 std::optional<uint32_t> m_opt;
1698
1699 friend struct DataModel::Detail::Befriend<Value>;
1700 };
1701
1702 using Descendants = std::tuple<CameraHealth::Memory::Status, CameraHealth::Memory::Value>;
1703
1706
1719#ifndef NO_DOC
1720 template<
1721 typename... Args,
1722 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
1723 typename std::enable_if<
1724 Zivid::Detail::TypeTraits::AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::
1725 value,
1726 int>::type = 0>
1727#else
1728 template<typename... Args>
1729#endif
1730 explicit Memory(Args &&...args)
1731 {
1732 using namespace Zivid::Detail::TypeTraits;
1733
1734 static_assert(
1735 AllArgsDecayedAreUnique<Args...>::value,
1736 "Found duplicate types among the arguments passed to Memory(...). "
1737 "Types should be listed at most once.");
1738
1739 set(std::forward<Args>(args)...);
1740 }
1741
1753#ifndef NO_DOC
1754 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
1755#else
1756 template<typename... Args>
1757#endif
1758 void set(Args &&...args)
1759 {
1760 using namespace Zivid::Detail::TypeTraits;
1761
1762 using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
1763 static_assert(
1764 AllArgsAreDescendantNodes::value, "All arguments passed to set(...) must be descendant nodes.");
1765
1766 static_assert(
1767 AllArgsDecayedAreUnique<Args...>::value,
1768 "Found duplicate types among the arguments passed to set(...). "
1769 "Types should be listed at most once.");
1770
1771 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
1772 }
1773
1786#ifndef NO_DOC
1787 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
1788#else
1789 template<typename... Args>
1790#endif
1791 Memory copyWith(Args &&...args) const
1792 {
1793 using namespace Zivid::Detail::TypeTraits;
1794
1795 using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
1796 static_assert(
1797 AllArgsAreDescendantNodes::value,
1798 "All arguments passed to copyWith(...) must be descendant nodes.");
1799
1800 static_assert(
1801 AllArgsDecayedAreUnique<Args...>::value,
1802 "Found duplicate types among the arguments passed to copyWith(...). "
1803 "Types should be listed at most once.");
1804
1805 auto copy{ *this };
1806 copy.set(std::forward<Args>(args)...);
1807 return copy;
1808 }
1809
1811 const Status &status() const
1812 {
1813 return m_status;
1814 }
1815
1818 {
1819 return m_status;
1820 }
1821
1824 {
1825 m_status = value;
1826 return *this;
1827 }
1828
1830 const Value &value() const
1831 {
1832 return m_value;
1833 }
1834
1837 {
1838 return m_value;
1839 }
1840
1843 {
1844 m_value = value;
1845 return *this;
1846 }
1847
1848 template<
1849 typename T,
1850 typename std::enable_if<std::is_same<T, CameraHealth::Memory::Status>::value, int>::type = 0>
1852 {
1853 return m_status;
1854 }
1855
1856 template<
1857 typename T,
1858 typename std::enable_if<std::is_same<T, CameraHealth::Memory::Value>::value, int>::type = 0>
1860 {
1861 return m_value;
1862 }
1863
1864 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
1866 {
1867 return m_status;
1868 }
1869
1870 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
1872 {
1873 return m_value;
1874 }
1875
1877 template<typename F>
1878 void forEach(const F &f) const
1879 {
1880 f(m_status);
1881 f(m_value);
1882 }
1883
1885 template<typename F>
1886 void forEach(const F &f)
1887 {
1888 f(m_status);
1889 f(m_value);
1890 }
1891
1893 bool operator==(const Memory &other) const;
1894
1896 bool operator!=(const Memory &other) const;
1897
1899 std::string toString() const;
1900
1902 friend std::ostream &operator<<(std::ostream &stream, const Memory &value)
1903 {
1904 return stream << value.toString();
1905 }
1906
1907 private:
1908 void setFromString(const std::string &value);
1909
1910 void setFromString(const std::string &fullPath, const std::string &value);
1911
1912 std::string getString(const std::string &fullPath) const;
1913
1914 Status m_status;
1915 Value m_value;
1916
1917 friend struct DataModel::Detail::Befriend<Memory>;
1918 };
1919
1926
1927 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
1929 {
1930 public:
1933
1935 static constexpr const char *path{ "Overall" };
1936
1938 static constexpr const char *name{ "Overall" };
1939
1941 static constexpr const char *description{
1942 R"description(The aggregated severity across all checks, taking the
1943highest-precedence severity among them. Precedence from highest to
1944lowest is Error, Unknown, Suboptimal, OK: a failing check is the
1945most important to surface, and a check whose outcome could not be
1946determined (Unknown) takes precedence over a Suboptimal one.
1947)description"
1948 };
1949
1951 enum class ValueType
1952 {
1957 };
1958 static const Overall ok;
1959 static const Overall suboptimal;
1960 static const Overall error;
1961 static const Overall unknown;
1962
1964 static std::set<ValueType> validValues()
1965 {
1967 }
1968
1970 Overall() = default;
1971
1973 explicit constexpr Overall(ValueType value)
1974 : m_value{ verifyValue(value) }
1975 {}
1976
1979
1981 std::string toString() const;
1982
1984 friend std::ostream &operator<<(std::ostream &stream, const Overall::ValueType &value)
1985 {
1986 return stream << Overall{ value }.toString();
1987 }
1988
1990 bool operator==(const Overall &other) const
1991 {
1992 return m_value == other.m_value;
1993 }
1994
1996 bool operator!=(const Overall &other) const
1997 {
1998 return m_value != other.m_value;
1999 }
2000
2002 friend std::ostream &operator<<(std::ostream &stream, const Overall &value)
2003 {
2004 return stream << value.toString();
2005 }
2006
2007 private:
2008 void setFromString(const std::string &value);
2009
2010 constexpr ValueType static verifyValue(const ValueType &value)
2011 {
2012 return value == ValueType::ok || value == ValueType::suboptimal || value == ValueType::error
2013 || value == ValueType::unknown
2014 ? value
2015 : throw std::invalid_argument{
2016 "Invalid value: Overall{ "
2017 + std::to_string(static_cast<std::underlying_type<ValueType>::type>(value)) + " }"
2018 };
2019 }
2020
2022
2023 friend struct DataModel::Detail::Befriend<Overall>;
2024 };
2025
2029
2030 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
2032 {
2033 public:
2036
2038 static constexpr const char *path{ "Temperature" };
2039
2041 static constexpr const char *name{ "Temperature" };
2042
2044 static constexpr const char *description{
2045 R"description(The status of the camera's temperatures. Each sub-status
2046reflects the temperature of a specific component.
2047)description"
2048 };
2049
2057
2058 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
2060 {
2061 public:
2064
2066 static constexpr const char *path{ "Temperature/DMD" };
2067
2069 static constexpr const char *name{ "DMD" };
2070
2072 static constexpr const char *description{
2073 R"description(The status of the DMD (Digital Micromirror Device)
2074temperature, in degrees Celsius.
2075
2076 - OK: Temperature in (0, 50)
2077 - Suboptimal: Temperature in [50, 60]
2078 - Error: Temperature < 0 or > 60
2079)description"
2080 };
2081
2083
2084 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
2086 {
2087 public:
2090
2092 static constexpr const char *path{ "Temperature/DMD/Status" };
2093
2095 static constexpr const char *name{ "Status" };
2096
2098 static constexpr const char *description{
2099 R"description(Severity of the DMD temperature check.)description"
2100 };
2101
2103 enum class ValueType
2104 {
2109 };
2110 static const Status ok;
2111 static const Status suboptimal;
2112 static const Status error;
2113 static const Status unknown;
2114
2116 static std::set<ValueType> validValues()
2117 {
2119 }
2120
2122 Status() = default;
2123
2125 explicit constexpr Status(ValueType value)
2126 : m_value{ verifyValue(value) }
2127 {}
2128
2131
2133 std::string toString() const;
2134
2136 friend std::ostream &operator<<(std::ostream &stream, const Status::ValueType &value)
2137 {
2138 return stream << Status{ value }.toString();
2139 }
2140
2142 bool operator==(const Status &other) const
2143 {
2144 return m_value == other.m_value;
2145 }
2146
2148 bool operator!=(const Status &other) const
2149 {
2150 return m_value != other.m_value;
2151 }
2152
2154 friend std::ostream &operator<<(std::ostream &stream, const Status &value)
2155 {
2156 return stream << value.toString();
2157 }
2158
2159 private:
2160 void setFromString(const std::string &value);
2161
2162 constexpr ValueType static verifyValue(const ValueType &value)
2163 {
2164 return value == ValueType::ok || value == ValueType::suboptimal || value == ValueType::error
2165 || value == ValueType::unknown
2166 ? value
2167 : throw std::invalid_argument{
2168 "Invalid value: Status{ "
2169 + std::to_string(static_cast<std::underlying_type<ValueType>::type>(value))
2170 + " }"
2171 };
2172 }
2173
2175
2176 friend struct DataModel::Detail::Befriend<Status>;
2177 };
2178
2180
2181 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
2183 {
2184 public:
2187
2189 static constexpr const char *path{ "Temperature/DMD/Value" };
2190
2192 static constexpr const char *name{ "Value" };
2193
2195 static constexpr const char *description{
2196 R"description(DMD temperature in degrees Celsius.)description"
2197 };
2198
2200 using ValueType = double;
2201
2203 static constexpr Range<double> validRange()
2204 {
2205 return { std::numeric_limits<double>::lowest(), std::numeric_limits<double>::max() };
2206 }
2207
2209 Value() = default;
2210
2212 explicit constexpr Value(double value)
2213 : m_opt{ value }
2214 {}
2215
2220 double value() const;
2221
2223 bool hasValue() const;
2224
2226 void reset();
2227
2229 std::string toString() const;
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 bool operator>=(const Value &other) const
2263 {
2264 return m_opt >= other.m_opt;
2265 }
2266
2268 friend std::ostream &operator<<(std::ostream &stream, const Value &value)
2269 {
2270 return stream << value.toString();
2271 }
2272
2273 private:
2274 void setFromString(const std::string &value);
2275
2276 std::optional<double> m_opt;
2277
2278 friend struct DataModel::Detail::Befriend<Value>;
2279 };
2280
2282 std::tuple<CameraHealth::Temperature::DMD::Status, CameraHealth::Temperature::DMD::Value>;
2283
2286
2299#ifndef NO_DOC
2300 template<
2301 typename... Args,
2302 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
2303 typename std::enable_if<
2304 Zivid::Detail::TypeTraits::AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::
2305 value,
2306 int>::type = 0>
2307#else
2308 template<typename... Args>
2309#endif
2310 explicit DMD(Args &&...args)
2311 {
2312 using namespace Zivid::Detail::TypeTraits;
2313
2314 static_assert(
2315 AllArgsDecayedAreUnique<Args...>::value,
2316 "Found duplicate types among the arguments passed to DMD(...). "
2317 "Types should be listed at most once.");
2318
2319 set(std::forward<Args>(args)...);
2320 }
2321
2333#ifndef NO_DOC
2334 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
2335#else
2336 template<typename... Args>
2337#endif
2338 void set(Args &&...args)
2339 {
2340 using namespace Zivid::Detail::TypeTraits;
2341
2342 using AllArgsAreDescendantNodes =
2343 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
2344 static_assert(
2345 AllArgsAreDescendantNodes::value, "All arguments passed to set(...) must be descendant nodes.");
2346
2347 static_assert(
2348 AllArgsDecayedAreUnique<Args...>::value,
2349 "Found duplicate types among the arguments passed to set(...). "
2350 "Types should be listed at most once.");
2351
2352 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
2353 }
2354
2367#ifndef NO_DOC
2368 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
2369#else
2370 template<typename... Args>
2371#endif
2372 DMD copyWith(Args &&...args) const
2373 {
2374 using namespace Zivid::Detail::TypeTraits;
2375
2376 using AllArgsAreDescendantNodes =
2377 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
2378 static_assert(
2379 AllArgsAreDescendantNodes::value,
2380 "All arguments passed to copyWith(...) must be descendant nodes.");
2381
2382 static_assert(
2383 AllArgsDecayedAreUnique<Args...>::value,
2384 "Found duplicate types among the arguments passed to copyWith(...). "
2385 "Types should be listed at most once.");
2386
2387 auto copy{ *this };
2388 copy.set(std::forward<Args>(args)...);
2389 return copy;
2390 }
2391
2393 const Status &status() const
2394 {
2395 return m_status;
2396 }
2397
2400 {
2401 return m_status;
2402 }
2403
2406 {
2407 m_status = value;
2408 return *this;
2409 }
2410
2412 const Value &value() const
2413 {
2414 return m_value;
2415 }
2416
2419 {
2420 return m_value;
2421 }
2422
2425 {
2426 m_value = value;
2427 return *this;
2428 }
2429
2430 template<
2431 typename T,
2432 typename std::enable_if<std::is_same<T, CameraHealth::Temperature::DMD::Status>::value, int>::type =
2433 0>
2435 {
2436 return m_status;
2437 }
2438
2439 template<
2440 typename T,
2441 typename std::enable_if<std::is_same<T, CameraHealth::Temperature::DMD::Value>::value, int>::type =
2442 0>
2444 {
2445 return m_value;
2446 }
2447
2448 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
2450 {
2451 return m_status;
2452 }
2453
2454 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
2456 {
2457 return m_value;
2458 }
2459
2461 template<typename F>
2462 void forEach(const F &f) const
2463 {
2464 f(m_status);
2465 f(m_value);
2466 }
2467
2469 template<typename F>
2470 void forEach(const F &f)
2471 {
2472 f(m_status);
2473 f(m_value);
2474 }
2475
2477 bool operator==(const DMD &other) const;
2478
2480 bool operator!=(const DMD &other) const;
2481
2483 std::string toString() const;
2484
2486 friend std::ostream &operator<<(std::ostream &stream, const DMD &value)
2487 {
2488 return stream << value.toString();
2489 }
2490
2491 private:
2492 void setFromString(const std::string &value);
2493
2494 void setFromString(const std::string &fullPath, const std::string &value);
2495
2496 std::string getString(const std::string &fullPath) const;
2497
2498 Status m_status;
2499 Value m_value;
2500
2501 friend struct DataModel::Detail::Befriend<DMD>;
2502 };
2503
2510
2511 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
2513 {
2514 public:
2517
2519 static constexpr const char *path{ "Temperature/LED" };
2520
2522 static constexpr const char *name{ "LED" };
2523
2525 static constexpr const char *description{
2526 R"description(The status of the LED temperature, in degrees Celsius.
2527
2528 - OK: Temperature in (0, 60)
2529 - Suboptimal: Temperature in [60, 70]
2530 - Error: Temperature < 0 or > 70
2531)description"
2532 };
2533
2535
2536 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
2538 {
2539 public:
2542
2544 static constexpr const char *path{ "Temperature/LED/Status" };
2545
2547 static constexpr const char *name{ "Status" };
2548
2550 static constexpr const char *description{
2551 R"description(Severity of the LED temperature check.)description"
2552 };
2553
2555 enum class ValueType
2556 {
2561 };
2562 static const Status ok;
2563 static const Status suboptimal;
2564 static const Status error;
2565 static const Status unknown;
2566
2568 static std::set<ValueType> validValues()
2569 {
2571 }
2572
2574 Status() = default;
2575
2577 explicit constexpr Status(ValueType value)
2578 : m_value{ verifyValue(value) }
2579 {}
2580
2583
2585 std::string toString() const;
2586
2588 friend std::ostream &operator<<(std::ostream &stream, const Status::ValueType &value)
2589 {
2590 return stream << Status{ value }.toString();
2591 }
2592
2594 bool operator==(const Status &other) const
2595 {
2596 return m_value == other.m_value;
2597 }
2598
2600 bool operator!=(const Status &other) const
2601 {
2602 return m_value != other.m_value;
2603 }
2604
2606 friend std::ostream &operator<<(std::ostream &stream, const Status &value)
2607 {
2608 return stream << value.toString();
2609 }
2610
2611 private:
2612 void setFromString(const std::string &value);
2613
2614 constexpr ValueType static verifyValue(const ValueType &value)
2615 {
2616 return value == ValueType::ok || value == ValueType::suboptimal || value == ValueType::error
2617 || value == ValueType::unknown
2618 ? value
2619 : throw std::invalid_argument{
2620 "Invalid value: Status{ "
2621 + std::to_string(static_cast<std::underlying_type<ValueType>::type>(value))
2622 + " }"
2623 };
2624 }
2625
2627
2628 friend struct DataModel::Detail::Befriend<Status>;
2629 };
2630
2632
2633 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
2635 {
2636 public:
2639
2641 static constexpr const char *path{ "Temperature/LED/Value" };
2642
2644 static constexpr const char *name{ "Value" };
2645
2647 static constexpr const char *description{
2648 R"description(LED temperature in degrees Celsius.)description"
2649 };
2650
2652 using ValueType = double;
2653
2655 static constexpr Range<double> validRange()
2656 {
2657 return { std::numeric_limits<double>::lowest(), std::numeric_limits<double>::max() };
2658 }
2659
2661 Value() = default;
2662
2664 explicit constexpr Value(double value)
2665 : m_opt{ value }
2666 {}
2667
2672 double value() const;
2673
2675 bool hasValue() const;
2676
2678 void reset();
2679
2681 std::string toString() const;
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 bool operator>=(const Value &other) const
2715 {
2716 return m_opt >= other.m_opt;
2717 }
2718
2720 friend std::ostream &operator<<(std::ostream &stream, const Value &value)
2721 {
2722 return stream << value.toString();
2723 }
2724
2725 private:
2726 void setFromString(const std::string &value);
2727
2728 std::optional<double> m_opt;
2729
2730 friend struct DataModel::Detail::Befriend<Value>;
2731 };
2732
2734 std::tuple<CameraHealth::Temperature::LED::Status, CameraHealth::Temperature::LED::Value>;
2735
2738
2751#ifndef NO_DOC
2752 template<
2753 typename... Args,
2754 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
2755 typename std::enable_if<
2756 Zivid::Detail::TypeTraits::AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::
2757 value,
2758 int>::type = 0>
2759#else
2760 template<typename... Args>
2761#endif
2762 explicit LED(Args &&...args)
2763 {
2764 using namespace Zivid::Detail::TypeTraits;
2765
2766 static_assert(
2767 AllArgsDecayedAreUnique<Args...>::value,
2768 "Found duplicate types among the arguments passed to LED(...). "
2769 "Types should be listed at most once.");
2770
2771 set(std::forward<Args>(args)...);
2772 }
2773
2785#ifndef NO_DOC
2786 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
2787#else
2788 template<typename... Args>
2789#endif
2790 void set(Args &&...args)
2791 {
2792 using namespace Zivid::Detail::TypeTraits;
2793
2794 using AllArgsAreDescendantNodes =
2795 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
2796 static_assert(
2797 AllArgsAreDescendantNodes::value, "All arguments passed to set(...) must be descendant nodes.");
2798
2799 static_assert(
2800 AllArgsDecayedAreUnique<Args...>::value,
2801 "Found duplicate types among the arguments passed to set(...). "
2802 "Types should be listed at most once.");
2803
2804 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
2805 }
2806
2819#ifndef NO_DOC
2820 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
2821#else
2822 template<typename... Args>
2823#endif
2824 LED copyWith(Args &&...args) const
2825 {
2826 using namespace Zivid::Detail::TypeTraits;
2827
2828 using AllArgsAreDescendantNodes =
2829 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
2830 static_assert(
2831 AllArgsAreDescendantNodes::value,
2832 "All arguments passed to copyWith(...) must be descendant nodes.");
2833
2834 static_assert(
2835 AllArgsDecayedAreUnique<Args...>::value,
2836 "Found duplicate types among the arguments passed to copyWith(...). "
2837 "Types should be listed at most once.");
2838
2839 auto copy{ *this };
2840 copy.set(std::forward<Args>(args)...);
2841 return copy;
2842 }
2843
2845 const Status &status() const
2846 {
2847 return m_status;
2848 }
2849
2852 {
2853 return m_status;
2854 }
2855
2858 {
2859 m_status = value;
2860 return *this;
2861 }
2862
2864 const Value &value() const
2865 {
2866 return m_value;
2867 }
2868
2871 {
2872 return m_value;
2873 }
2874
2877 {
2878 m_value = value;
2879 return *this;
2880 }
2881
2882 template<
2883 typename T,
2884 typename std::enable_if<std::is_same<T, CameraHealth::Temperature::LED::Status>::value, int>::type =
2885 0>
2887 {
2888 return m_status;
2889 }
2890
2891 template<
2892 typename T,
2893 typename std::enable_if<std::is_same<T, CameraHealth::Temperature::LED::Value>::value, int>::type =
2894 0>
2896 {
2897 return m_value;
2898 }
2899
2900 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
2902 {
2903 return m_status;
2904 }
2905
2906 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
2908 {
2909 return m_value;
2910 }
2911
2913 template<typename F>
2914 void forEach(const F &f) const
2915 {
2916 f(m_status);
2917 f(m_value);
2918 }
2919
2921 template<typename F>
2922 void forEach(const F &f)
2923 {
2924 f(m_status);
2925 f(m_value);
2926 }
2927
2929 bool operator==(const LED &other) const;
2930
2932 bool operator!=(const LED &other) const;
2933
2935 std::string toString() const;
2936
2938 friend std::ostream &operator<<(std::ostream &stream, const LED &value)
2939 {
2940 return stream << value.toString();
2941 }
2942
2943 private:
2944 void setFromString(const std::string &value);
2945
2946 void setFromString(const std::string &fullPath, const std::string &value);
2947
2948 std::string getString(const std::string &fullPath) const;
2949
2950 Status m_status;
2951 Value m_value;
2952
2953 friend struct DataModel::Detail::Befriend<LED>;
2954 };
2955
2962
2963 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
2965 {
2966 public:
2969
2971 static constexpr const char *path{ "Temperature/Lens" };
2972
2974 static constexpr const char *name{ "Lens" };
2975
2977 static constexpr const char *description{
2978 R"description(The status of the lens temperature, in degrees Celsius.
2979
2980 - OK: Temperature in (0, 50)
2981 - Suboptimal: Temperature in [50, 60]
2982 - Error: Temperature < 0 or > 60
2983)description"
2984 };
2985
2987
2988 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
2990 {
2991 public:
2994
2996 static constexpr const char *path{ "Temperature/Lens/Status" };
2997
2999 static constexpr const char *name{ "Status" };
3000
3002 static constexpr const char *description{
3003 R"description(Severity of the lens temperature check.)description"
3004 };
3005
3007 enum class ValueType
3008 {
3013 };
3014 static const Status ok;
3015 static const Status suboptimal;
3016 static const Status error;
3017 static const Status unknown;
3018
3020 static std::set<ValueType> validValues()
3021 {
3023 }
3024
3026 Status() = default;
3027
3029 explicit constexpr Status(ValueType value)
3030 : m_value{ verifyValue(value) }
3031 {}
3032
3035
3037 std::string toString() const;
3038
3040 friend std::ostream &operator<<(std::ostream &stream, const Status::ValueType &value)
3041 {
3042 return stream << Status{ value }.toString();
3043 }
3044
3046 bool operator==(const Status &other) const
3047 {
3048 return m_value == other.m_value;
3049 }
3050
3052 bool operator!=(const Status &other) const
3053 {
3054 return m_value != other.m_value;
3055 }
3056
3058 friend std::ostream &operator<<(std::ostream &stream, const Status &value)
3059 {
3060 return stream << value.toString();
3061 }
3062
3063 private:
3064 void setFromString(const std::string &value);
3065
3066 constexpr ValueType static verifyValue(const ValueType &value)
3067 {
3068 return value == ValueType::ok || value == ValueType::suboptimal || value == ValueType::error
3069 || value == ValueType::unknown
3070 ? value
3071 : throw std::invalid_argument{
3072 "Invalid value: Status{ "
3073 + std::to_string(static_cast<std::underlying_type<ValueType>::type>(value))
3074 + " }"
3075 };
3076 }
3077
3079
3080 friend struct DataModel::Detail::Befriend<Status>;
3081 };
3082
3084
3085 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
3087 {
3088 public:
3091
3093 static constexpr const char *path{ "Temperature/Lens/Value" };
3094
3096 static constexpr const char *name{ "Value" };
3097
3099 static constexpr const char *description{
3100 R"description(Lens temperature in degrees Celsius.)description"
3101 };
3102
3104 using ValueType = double;
3105
3107 static constexpr Range<double> validRange()
3108 {
3109 return { std::numeric_limits<double>::lowest(), std::numeric_limits<double>::max() };
3110 }
3111
3113 Value() = default;
3114
3116 explicit constexpr Value(double value)
3117 : m_opt{ value }
3118 {}
3119
3124 double value() const;
3125
3127 bool hasValue() const;
3128
3130 void reset();
3131
3133 std::string toString() const;
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 bool operator>=(const Value &other) const
3167 {
3168 return m_opt >= other.m_opt;
3169 }
3170
3172 friend std::ostream &operator<<(std::ostream &stream, const Value &value)
3173 {
3174 return stream << value.toString();
3175 }
3176
3177 private:
3178 void setFromString(const std::string &value);
3179
3180 std::optional<double> m_opt;
3181
3182 friend struct DataModel::Detail::Befriend<Value>;
3183 };
3184
3186 std::tuple<CameraHealth::Temperature::Lens::Status, CameraHealth::Temperature::Lens::Value>;
3187
3190
3203#ifndef NO_DOC
3204 template<
3205 typename... Args,
3206 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
3207 typename std::enable_if<
3208 Zivid::Detail::TypeTraits::AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::
3209 value,
3210 int>::type = 0>
3211#else
3212 template<typename... Args>
3213#endif
3214 explicit Lens(Args &&...args)
3215 {
3216 using namespace Zivid::Detail::TypeTraits;
3217
3218 static_assert(
3219 AllArgsDecayedAreUnique<Args...>::value,
3220 "Found duplicate types among the arguments passed to Lens(...). "
3221 "Types should be listed at most once.");
3222
3223 set(std::forward<Args>(args)...);
3224 }
3225
3237#ifndef NO_DOC
3238 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
3239#else
3240 template<typename... Args>
3241#endif
3242 void set(Args &&...args)
3243 {
3244 using namespace Zivid::Detail::TypeTraits;
3245
3246 using AllArgsAreDescendantNodes =
3247 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
3248 static_assert(
3249 AllArgsAreDescendantNodes::value, "All arguments passed to set(...) must be descendant nodes.");
3250
3251 static_assert(
3252 AllArgsDecayedAreUnique<Args...>::value,
3253 "Found duplicate types among the arguments passed to set(...). "
3254 "Types should be listed at most once.");
3255
3256 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
3257 }
3258
3271#ifndef NO_DOC
3272 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
3273#else
3274 template<typename... Args>
3275#endif
3276 Lens copyWith(Args &&...args) const
3277 {
3278 using namespace Zivid::Detail::TypeTraits;
3279
3280 using AllArgsAreDescendantNodes =
3281 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
3282 static_assert(
3283 AllArgsAreDescendantNodes::value,
3284 "All arguments passed to copyWith(...) must be descendant nodes.");
3285
3286 static_assert(
3287 AllArgsDecayedAreUnique<Args...>::value,
3288 "Found duplicate types among the arguments passed to copyWith(...). "
3289 "Types should be listed at most once.");
3290
3291 auto copy{ *this };
3292 copy.set(std::forward<Args>(args)...);
3293 return copy;
3294 }
3295
3297 const Status &status() const
3298 {
3299 return m_status;
3300 }
3301
3304 {
3305 return m_status;
3306 }
3307
3310 {
3311 m_status = value;
3312 return *this;
3313 }
3314
3316 const Value &value() const
3317 {
3318 return m_value;
3319 }
3320
3323 {
3324 return m_value;
3325 }
3326
3329 {
3330 m_value = value;
3331 return *this;
3332 }
3333
3334 template<
3335 typename T,
3336 typename std::enable_if<std::is_same<T, CameraHealth::Temperature::Lens::Status>::value, int>::
3337 type = 0>
3339 {
3340 return m_status;
3341 }
3342
3343 template<
3344 typename T,
3345 typename std::enable_if<std::is_same<T, CameraHealth::Temperature::Lens::Value>::value, int>::type =
3346 0>
3348 {
3349 return m_value;
3350 }
3351
3352 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
3354 {
3355 return m_status;
3356 }
3357
3358 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
3360 {
3361 return m_value;
3362 }
3363
3365 template<typename F>
3366 void forEach(const F &f) const
3367 {
3368 f(m_status);
3369 f(m_value);
3370 }
3371
3373 template<typename F>
3374 void forEach(const F &f)
3375 {
3376 f(m_status);
3377 f(m_value);
3378 }
3379
3381 bool operator==(const Lens &other) const;
3382
3384 bool operator!=(const Lens &other) const;
3385
3387 std::string toString() const;
3388
3390 friend std::ostream &operator<<(std::ostream &stream, const Lens &value)
3391 {
3392 return stream << value.toString();
3393 }
3394
3395 private:
3396 void setFromString(const std::string &value);
3397
3398 void setFromString(const std::string &fullPath, const std::string &value);
3399
3400 std::string getString(const std::string &fullPath) const;
3401
3402 Status m_status;
3403 Value m_value;
3404
3405 friend struct DataModel::Detail::Befriend<Lens>;
3406 };
3407
3408 using Descendants = std::tuple<
3418
3421
3441#ifndef NO_DOC
3442 template<
3443 typename... Args,
3444 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
3445 typename std::enable_if<
3446 Zivid::Detail::TypeTraits::AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::
3447 value,
3448 int>::type = 0>
3449#else
3450 template<typename... Args>
3451#endif
3452 explicit Temperature(Args &&...args)
3453 {
3454 using namespace Zivid::Detail::TypeTraits;
3455
3456 static_assert(
3457 AllArgsDecayedAreUnique<Args...>::value,
3458 "Found duplicate types among the arguments passed to Temperature(...). "
3459 "Types should be listed at most once.");
3460
3461 set(std::forward<Args>(args)...);
3462 }
3463
3482#ifndef NO_DOC
3483 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
3484#else
3485 template<typename... Args>
3486#endif
3487 void set(Args &&...args)
3488 {
3489 using namespace Zivid::Detail::TypeTraits;
3490
3491 using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
3492 static_assert(
3493 AllArgsAreDescendantNodes::value, "All arguments passed to set(...) must be descendant nodes.");
3494
3495 static_assert(
3496 AllArgsDecayedAreUnique<Args...>::value,
3497 "Found duplicate types among the arguments passed to set(...). "
3498 "Types should be listed at most once.");
3499
3500 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
3501 }
3502
3522#ifndef NO_DOC
3523 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
3524#else
3525 template<typename... Args>
3526#endif
3527 Temperature copyWith(Args &&...args) const
3528 {
3529 using namespace Zivid::Detail::TypeTraits;
3530
3531 using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
3532 static_assert(
3533 AllArgsAreDescendantNodes::value,
3534 "All arguments passed to copyWith(...) must be descendant nodes.");
3535
3536 static_assert(
3537 AllArgsDecayedAreUnique<Args...>::value,
3538 "Found duplicate types among the arguments passed to copyWith(...). "
3539 "Types should be listed at most once.");
3540
3541 auto copy{ *this };
3542 copy.set(std::forward<Args>(args)...);
3543 return copy;
3544 }
3545
3547 const DMD &dmd() const
3548 {
3549 return m_dmd;
3550 }
3551
3554 {
3555 return m_dmd;
3556 }
3557
3559 Temperature &set(const DMD &value)
3560 {
3561 m_dmd = value;
3562 return *this;
3563 }
3564
3567 {
3568 m_dmd.set(value);
3569 return *this;
3570 }
3571
3574 {
3575 m_dmd.set(value);
3576 return *this;
3577 }
3578
3580 const LED &led() const
3581 {
3582 return m_led;
3583 }
3584
3587 {
3588 return m_led;
3589 }
3590
3592 Temperature &set(const LED &value)
3593 {
3594 m_led = value;
3595 return *this;
3596 }
3597
3600 {
3601 m_led.set(value);
3602 return *this;
3603 }
3604
3607 {
3608 m_led.set(value);
3609 return *this;
3610 }
3611
3613 const Lens &lens() const
3614 {
3615 return m_lens;
3616 }
3617
3620 {
3621 return m_lens;
3622 }
3623
3625 Temperature &set(const Lens &value)
3626 {
3627 m_lens = value;
3628 return *this;
3629 }
3630
3633 {
3634 m_lens.set(value);
3635 return *this;
3636 }
3637
3640 {
3641 m_lens.set(value);
3642 return *this;
3643 }
3644
3645 template<
3646 typename T,
3647 typename std::enable_if<std::is_same<T, CameraHealth::Temperature::DMD>::value, int>::type = 0>
3649 {
3650 return m_dmd;
3651 }
3652
3653 template<
3654 typename T,
3655 typename std::enable_if<std::is_same<T, CameraHealth::Temperature::DMD::Status>::value, int>::type = 0>
3657 {
3658 return m_dmd.get<CameraHealth::Temperature::DMD::Status>();
3659 }
3660
3661 template<
3662 typename T,
3663 typename std::enable_if<std::is_same<T, CameraHealth::Temperature::DMD::Value>::value, int>::type = 0>
3665 {
3666 return m_dmd.get<CameraHealth::Temperature::DMD::Value>();
3667 }
3668
3669 template<
3670 typename T,
3671 typename std::enable_if<std::is_same<T, CameraHealth::Temperature::LED>::value, int>::type = 0>
3673 {
3674 return m_led;
3675 }
3676
3677 template<
3678 typename T,
3679 typename std::enable_if<std::is_same<T, CameraHealth::Temperature::LED::Status>::value, int>::type = 0>
3681 {
3682 return m_led.get<CameraHealth::Temperature::LED::Status>();
3683 }
3684
3685 template<
3686 typename T,
3687 typename std::enable_if<std::is_same<T, CameraHealth::Temperature::LED::Value>::value, int>::type = 0>
3689 {
3690 return m_led.get<CameraHealth::Temperature::LED::Value>();
3691 }
3692
3693 template<
3694 typename T,
3695 typename std::enable_if<std::is_same<T, CameraHealth::Temperature::Lens>::value, int>::type = 0>
3697 {
3698 return m_lens;
3699 }
3700
3701 template<
3702 typename T,
3703 typename std::enable_if<std::is_same<T, CameraHealth::Temperature::Lens::Status>::value, int>::type = 0>
3705 {
3706 return m_lens.get<CameraHealth::Temperature::Lens::Status>();
3707 }
3708
3709 template<
3710 typename T,
3711 typename std::enable_if<std::is_same<T, CameraHealth::Temperature::Lens::Value>::value, int>::type = 0>
3713 {
3714 return m_lens.get<CameraHealth::Temperature::Lens::Value>();
3715 }
3716
3717 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
3719 {
3720 return m_dmd;
3721 }
3722
3723 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
3725 {
3726 return m_led;
3727 }
3728
3729 template<size_t i, typename std::enable_if<i == 2, int>::type = 0>
3731 {
3732 return m_lens;
3733 }
3734
3736 template<typename F>
3737 void forEach(const F &f) const
3738 {
3739 f(m_dmd);
3740 f(m_led);
3741 f(m_lens);
3742 }
3743
3745 template<typename F>
3746 void forEach(const F &f)
3747 {
3748 f(m_dmd);
3749 f(m_led);
3750 f(m_lens);
3751 }
3752
3754 bool operator==(const Temperature &other) const;
3755
3757 bool operator!=(const Temperature &other) const;
3758
3760 std::string toString() const;
3761
3763 friend std::ostream &operator<<(std::ostream &stream, const Temperature &value)
3764 {
3765 return stream << value.toString();
3766 }
3767
3768 private:
3769 void setFromString(const std::string &value);
3770
3771 void setFromString(const std::string &fullPath, const std::string &value);
3772
3773 std::string getString(const std::string &fullPath) const;
3774
3775 DMD m_dmd;
3776 LED m_led;
3777 Lens m_lens;
3778
3779 friend struct DataModel::Detail::Befriend<Temperature>;
3780 };
3781
3782 using Descendants = std::tuple<
3806
3809
3811 explicit CameraHealth(const std::string &fileName);
3812
3818 [[nodiscard]] static CameraHealth fromSerialized(const std::string &value);
3819
3825 std::string serialize() const;
3826
3860#ifndef NO_DOC
3861 template<
3862 typename... Args,
3863 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
3864 typename std::enable_if<
3865 Zivid::Detail::TypeTraits::AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::value,
3866 int>::type = 0>
3867#else
3868 template<typename... Args>
3869#endif
3870 explicit CameraHealth(Args &&...args)
3871 {
3872 using namespace Zivid::Detail::TypeTraits;
3873
3874 static_assert(
3875 AllArgsDecayedAreUnique<Args...>::value,
3876 "Found duplicate types among the arguments passed to CameraHealth(...). "
3877 "Types should be listed at most once.");
3878
3879 set(std::forward<Args>(args)...);
3880 }
3881
3914#ifndef NO_DOC
3915 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
3916#else
3917 template<typename... Args>
3918#endif
3919 void set(Args &&...args)
3920 {
3921 using namespace Zivid::Detail::TypeTraits;
3922
3923 using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
3924 static_assert(
3925 AllArgsAreDescendantNodes::value, "All arguments passed to set(...) must be descendant nodes.");
3926
3927 static_assert(
3928 AllArgsDecayedAreUnique<Args...>::value,
3929 "Found duplicate types among the arguments passed to set(...). "
3930 "Types should be listed at most once.");
3931
3932 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
3933 }
3934
3968#ifndef NO_DOC
3969 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
3970#else
3971 template<typename... Args>
3972#endif
3973 CameraHealth copyWith(Args &&...args) const
3974 {
3975 using namespace Zivid::Detail::TypeTraits;
3976
3977 using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
3978 static_assert(
3979 AllArgsAreDescendantNodes::value, "All arguments passed to copyWith(...) must be descendant nodes.");
3980
3981 static_assert(
3982 AllArgsDecayedAreUnique<Args...>::value,
3983 "Found duplicate types among the arguments passed to copyWith(...). "
3984 "Types should be listed at most once.");
3985
3986 auto copy{ *this };
3987 copy.set(std::forward<Args>(args)...);
3988 return copy;
3989 }
3990
3992 const Fan &fan() const
3993 {
3994 return m_fan;
3995 }
3996
3999 {
4000 return m_fan;
4001 }
4002
4004 CameraHealth &set(const Fan &value)
4005 {
4006 m_fan = value;
4007 return *this;
4008 }
4009
4012 {
4013 m_fan.set(value);
4014 return *this;
4015 }
4016
4019 {
4020 m_fan.set(value);
4021 return *this;
4022 }
4023
4026 {
4027 return m_infieldVerification;
4028 }
4029
4032 {
4033 return m_infieldVerification;
4034 }
4035
4038 {
4039 m_infieldVerification = value;
4040 return *this;
4041 }
4042
4045 {
4046 m_infieldVerification.set(value);
4047 return *this;
4048 }
4049
4052 {
4053 m_infieldVerification.set(value);
4054 return *this;
4055 }
4056
4059 {
4060 return m_maxTransferSpeed;
4061 }
4062
4065 {
4066 return m_maxTransferSpeed;
4067 }
4068
4071 {
4072 m_maxTransferSpeed = value;
4073 return *this;
4074 }
4075
4078 {
4079 m_maxTransferSpeed.set(value);
4080 return *this;
4081 }
4082
4085 {
4086 m_maxTransferSpeed.set(value);
4087 return *this;
4088 }
4089
4091 const Memory &memory() const
4092 {
4093 return m_memory;
4094 }
4095
4098 {
4099 return m_memory;
4100 }
4101
4103 CameraHealth &set(const Memory &value)
4104 {
4105 m_memory = value;
4106 return *this;
4107 }
4108
4111 {
4112 m_memory.set(value);
4113 return *this;
4114 }
4115
4118 {
4119 m_memory.set(value);
4120 return *this;
4121 }
4122
4124 const Overall &overall() const
4125 {
4126 return m_overall;
4127 }
4128
4131 {
4132 return m_overall;
4133 }
4134
4136 CameraHealth &set(const Overall &value)
4137 {
4138 m_overall = value;
4139 return *this;
4140 }
4141
4144 {
4145 return m_temperature;
4146 }
4147
4150 {
4151 return m_temperature;
4152 }
4153
4156 {
4157 m_temperature = value;
4158 return *this;
4159 }
4160
4163 {
4164 m_temperature.set(value);
4165 return *this;
4166 }
4167
4170 {
4171 m_temperature.set(value);
4172 return *this;
4173 }
4174
4177 {
4178 m_temperature.set(value);
4179 return *this;
4180 }
4181
4184 {
4185 m_temperature.set(value);
4186 return *this;
4187 }
4188
4191 {
4192 m_temperature.set(value);
4193 return *this;
4194 }
4195
4198 {
4199 m_temperature.set(value);
4200 return *this;
4201 }
4202
4205 {
4206 m_temperature.set(value);
4207 return *this;
4208 }
4209
4212 {
4213 m_temperature.set(value);
4214 return *this;
4215 }
4216
4219 {
4220 m_temperature.set(value);
4221 return *this;
4222 }
4223
4224 template<typename T, typename std::enable_if<std::is_same<T, CameraHealth::Fan>::value, int>::type = 0>
4225 const CameraHealth::Fan &get() const
4226 {
4227 return m_fan;
4228 }
4229
4230 template<typename T, typename std::enable_if<std::is_same<T, CameraHealth::Fan::Status>::value, int>::type = 0>
4232 {
4233 return m_fan.get<CameraHealth::Fan::Status>();
4234 }
4235
4236 template<typename T, typename std::enable_if<std::is_same<T, CameraHealth::Fan::Value>::value, int>::type = 0>
4238 {
4239 return m_fan.get<CameraHealth::Fan::Value>();
4240 }
4241
4242 template<
4243 typename T,
4244 typename std::enable_if<std::is_same<T, CameraHealth::InfieldVerification>::value, int>::type = 0>
4246 {
4247 return m_infieldVerification;
4248 }
4249
4250 template<
4251 typename T,
4252 typename std::enable_if<std::is_same<T, CameraHealth::InfieldVerification::Status>::value, int>::type = 0>
4254 {
4255 return m_infieldVerification.get<CameraHealth::InfieldVerification::Status>();
4256 }
4257
4258 template<
4259 typename T,
4260 typename std::enable_if<std::is_same<T, CameraHealth::InfieldVerification::Value>::value, int>::type = 0>
4262 {
4263 return m_infieldVerification.get<CameraHealth::InfieldVerification::Value>();
4264 }
4265
4266 template<
4267 typename T,
4268 typename std::enable_if<std::is_same<T, CameraHealth::MaxTransferSpeed>::value, int>::type = 0>
4270 {
4271 return m_maxTransferSpeed;
4272 }
4273
4274 template<
4275 typename T,
4276 typename std::enable_if<std::is_same<T, CameraHealth::MaxTransferSpeed::Status>::value, int>::type = 0>
4278 {
4279 return m_maxTransferSpeed.get<CameraHealth::MaxTransferSpeed::Status>();
4280 }
4281
4282 template<
4283 typename T,
4284 typename std::enable_if<std::is_same<T, CameraHealth::MaxTransferSpeed::Value>::value, int>::type = 0>
4286 {
4287 return m_maxTransferSpeed.get<CameraHealth::MaxTransferSpeed::Value>();
4288 }
4289
4290 template<typename T, typename std::enable_if<std::is_same<T, CameraHealth::Memory>::value, int>::type = 0>
4292 {
4293 return m_memory;
4294 }
4295
4296 template<
4297 typename T,
4298 typename std::enable_if<std::is_same<T, CameraHealth::Memory::Status>::value, int>::type = 0>
4300 {
4301 return m_memory.get<CameraHealth::Memory::Status>();
4302 }
4303
4304 template<
4305 typename T,
4306 typename std::enable_if<std::is_same<T, CameraHealth::Memory::Value>::value, int>::type = 0>
4308 {
4309 return m_memory.get<CameraHealth::Memory::Value>();
4310 }
4311
4312 template<typename T, typename std::enable_if<std::is_same<T, CameraHealth::Overall>::value, int>::type = 0>
4314 {
4315 return m_overall;
4316 }
4317
4318 template<typename T, typename std::enable_if<std::is_same<T, CameraHealth::Temperature>::value, int>::type = 0>
4320 {
4321 return m_temperature;
4322 }
4323
4324 template<
4325 typename T,
4326 typename std::enable_if<std::is_same<T, CameraHealth::Temperature::DMD>::value, int>::type = 0>
4328 {
4329 return m_temperature.get<CameraHealth::Temperature::DMD>();
4330 }
4331
4332 template<
4333 typename T,
4334 typename std::enable_if<std::is_same<T, CameraHealth::Temperature::DMD::Status>::value, int>::type = 0>
4336 {
4337 return m_temperature.get<CameraHealth::Temperature::DMD::Status>();
4338 }
4339
4340 template<
4341 typename T,
4342 typename std::enable_if<std::is_same<T, CameraHealth::Temperature::DMD::Value>::value, int>::type = 0>
4344 {
4345 return m_temperature.get<CameraHealth::Temperature::DMD::Value>();
4346 }
4347
4348 template<
4349 typename T,
4350 typename std::enable_if<std::is_same<T, CameraHealth::Temperature::LED>::value, int>::type = 0>
4352 {
4353 return m_temperature.get<CameraHealth::Temperature::LED>();
4354 }
4355
4356 template<
4357 typename T,
4358 typename std::enable_if<std::is_same<T, CameraHealth::Temperature::LED::Status>::value, int>::type = 0>
4360 {
4361 return m_temperature.get<CameraHealth::Temperature::LED::Status>();
4362 }
4363
4364 template<
4365 typename T,
4366 typename std::enable_if<std::is_same<T, CameraHealth::Temperature::LED::Value>::value, int>::type = 0>
4368 {
4369 return m_temperature.get<CameraHealth::Temperature::LED::Value>();
4370 }
4371
4372 template<
4373 typename T,
4374 typename std::enable_if<std::is_same<T, CameraHealth::Temperature::Lens>::value, int>::type = 0>
4376 {
4377 return m_temperature.get<CameraHealth::Temperature::Lens>();
4378 }
4379
4380 template<
4381 typename T,
4382 typename std::enable_if<std::is_same<T, CameraHealth::Temperature::Lens::Status>::value, int>::type = 0>
4384 {
4385 return m_temperature.get<CameraHealth::Temperature::Lens::Status>();
4386 }
4387
4388 template<
4389 typename T,
4390 typename std::enable_if<std::is_same<T, CameraHealth::Temperature::Lens::Value>::value, int>::type = 0>
4392 {
4393 return m_temperature.get<CameraHealth::Temperature::Lens::Value>();
4394 }
4395
4396 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
4397 const CameraHealth::Fan &get() const
4398 {
4399 return m_fan;
4400 }
4401
4402 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
4404 {
4405 return m_infieldVerification;
4406 }
4407
4408 template<size_t i, typename std::enable_if<i == 2, int>::type = 0>
4410 {
4411 return m_maxTransferSpeed;
4412 }
4413
4414 template<size_t i, typename std::enable_if<i == 3, int>::type = 0>
4416 {
4417 return m_memory;
4418 }
4419
4420 template<size_t i, typename std::enable_if<i == 4, int>::type = 0>
4422 {
4423 return m_overall;
4424 }
4425
4426 template<size_t i, typename std::enable_if<i == 5, int>::type = 0>
4428 {
4429 return m_temperature;
4430 }
4431
4433 template<typename F>
4434 void forEach(const F &f) const
4435 {
4436 f(m_fan);
4437 f(m_infieldVerification);
4438 f(m_maxTransferSpeed);
4439 f(m_memory);
4440 f(m_overall);
4441 f(m_temperature);
4442 }
4443
4445 template<typename F>
4446 void forEach(const F &f)
4447 {
4448 f(m_fan);
4449 f(m_infieldVerification);
4450 f(m_maxTransferSpeed);
4451 f(m_memory);
4452 f(m_overall);
4453 f(m_temperature);
4454 }
4455
4457 bool operator==(const CameraHealth &other) const;
4458
4460 bool operator!=(const CameraHealth &other) const;
4461
4463 std::string toString() const;
4464
4466 friend std::ostream &operator<<(std::ostream &stream, const CameraHealth &value)
4467 {
4468 return stream << value.toString();
4469 }
4470
4472 void save(const std::string &fileName) const;
4473
4475 void load(const std::string &fileName);
4476
4477 private:
4478 void setFromString(const std::string &value);
4479
4480 void setFromString(const std::string &fullPath, const std::string &value);
4481
4482 std::string getString(const std::string &fullPath) const;
4483
4484 Fan m_fan;
4485 InfieldVerification m_infieldVerification;
4486 MaxTransferSpeed m_maxTransferSpeed;
4487 Memory m_memory;
4488 Overall m_overall;
4489 Temperature m_temperature;
4490
4491 friend struct DataModel::Detail::Befriend<CameraHealth>;
4492 };
4493
4494#ifndef NO_DOC
4495 template<>
4496 struct CameraHealth::Version<1>
4497 {
4498 using Type = CameraHealth;
4499 };
4500#endif
4501
4502} // namespace Zivid
4503
4504#ifndef NO_DOC
4506namespace Zivid::Detail
4507{
4508
4509 ZIVID_CORE_EXPORT void save(const Zivid::CameraHealth &dataModel, std::ostream &ostream);
4510 ZIVID_CORE_EXPORT void load(Zivid::CameraHealth &dataModel, std::istream &istream);
4511
4512} // namespace Zivid::Detail
4513#endif
4514
4515#ifdef _MSC_VER
4516# pragma warning(pop)
4517#endif
4518
4519#ifndef NO_DOC
4520# if !(defined(_MSC_VER) && (_MSC_VER <= 1900))
4521namespace std // NOLINT
4522{
4523
4524 template<>
4525 struct tuple_size<Zivid::CameraHealth::Fan> : integral_constant<size_t, 2>
4526 {};
4527
4528 template<size_t i>
4529 struct tuple_element<i, Zivid::CameraHealth::Fan>
4530 {
4531 static_assert(i < tuple_size<Zivid::CameraHealth::Fan>::value, "Index must be less than 2");
4532
4533 using type // NOLINT
4534 = decltype(declval<Zivid::CameraHealth::Fan>().get<i>());
4535 };
4536
4537 template<>
4538 struct tuple_size<Zivid::CameraHealth::InfieldVerification> : integral_constant<size_t, 2>
4539 {};
4540
4541 template<size_t i>
4542 struct tuple_element<i, Zivid::CameraHealth::InfieldVerification>
4543 {
4544 static_assert(i < tuple_size<Zivid::CameraHealth::InfieldVerification>::value, "Index must be less than 2");
4545
4546 using type // NOLINT
4547 = decltype(declval<Zivid::CameraHealth::InfieldVerification>().get<i>());
4548 };
4549
4550 template<>
4551 struct tuple_size<Zivid::CameraHealth::MaxTransferSpeed> : integral_constant<size_t, 2>
4552 {};
4553
4554 template<size_t i>
4555 struct tuple_element<i, Zivid::CameraHealth::MaxTransferSpeed>
4556 {
4557 static_assert(i < tuple_size<Zivid::CameraHealth::MaxTransferSpeed>::value, "Index must be less than 2");
4558
4559 using type // NOLINT
4560 = decltype(declval<Zivid::CameraHealth::MaxTransferSpeed>().get<i>());
4561 };
4562
4563 template<>
4564 struct tuple_size<Zivid::CameraHealth::Memory> : integral_constant<size_t, 2>
4565 {};
4566
4567 template<size_t i>
4568 struct tuple_element<i, Zivid::CameraHealth::Memory>
4569 {
4570 static_assert(i < tuple_size<Zivid::CameraHealth::Memory>::value, "Index must be less than 2");
4571
4572 using type // NOLINT
4573 = decltype(declval<Zivid::CameraHealth::Memory>().get<i>());
4574 };
4575
4576 template<>
4577 struct tuple_size<Zivid::CameraHealth::Temperature> : integral_constant<size_t, 3>
4578 {};
4579
4580 template<size_t i>
4581 struct tuple_element<i, Zivid::CameraHealth::Temperature>
4582 {
4583 static_assert(i < tuple_size<Zivid::CameraHealth::Temperature>::value, "Index must be less than 3");
4584
4585 using type // NOLINT
4586 = decltype(declval<Zivid::CameraHealth::Temperature>().get<i>());
4587 };
4588
4589 template<>
4590 struct tuple_size<Zivid::CameraHealth::Temperature::DMD> : integral_constant<size_t, 2>
4591 {};
4592
4593 template<size_t i>
4594 struct tuple_element<i, Zivid::CameraHealth::Temperature::DMD>
4595 {
4596 static_assert(i < tuple_size<Zivid::CameraHealth::Temperature::DMD>::value, "Index must be less than 2");
4597
4598 using type // NOLINT
4599 = decltype(declval<Zivid::CameraHealth::Temperature::DMD>().get<i>());
4600 };
4601
4602 template<>
4603 struct tuple_size<Zivid::CameraHealth::Temperature::LED> : integral_constant<size_t, 2>
4604 {};
4605
4606 template<size_t i>
4607 struct tuple_element<i, Zivid::CameraHealth::Temperature::LED>
4608 {
4609 static_assert(i < tuple_size<Zivid::CameraHealth::Temperature::LED>::value, "Index must be less than 2");
4610
4611 using type // NOLINT
4612 = decltype(declval<Zivid::CameraHealth::Temperature::LED>().get<i>());
4613 };
4614
4615 template<>
4616 struct tuple_size<Zivid::CameraHealth::Temperature::Lens> : integral_constant<size_t, 2>
4617 {};
4618
4619 template<size_t i>
4620 struct tuple_element<i, Zivid::CameraHealth::Temperature::Lens>
4621 {
4622 static_assert(i < tuple_size<Zivid::CameraHealth::Temperature::Lens>::value, "Index must be less than 2");
4623
4624 using type // NOLINT
4625 = decltype(declval<Zivid::CameraHealth::Temperature::Lens>().get<i>());
4626 };
4627
4628 template<>
4629 struct tuple_size<Zivid::CameraHealth> : integral_constant<size_t, 6>
4630 {};
4631
4632 template<size_t i>
4633 struct tuple_element<i, Zivid::CameraHealth>
4634 {
4635 static_assert(i < tuple_size<Zivid::CameraHealth>::value, "Index must be less than 6");
4636
4637 using type // NOLINT
4638 = decltype(declval<Zivid::CameraHealth>().get<i>());
4639 };
4640
4641} // namespace std
4642# endif
4643#endif
4644
4645// If we have access to the DataModel library, automatically include internal DataModel
4646// header. This header is necessary for serialization and deserialization.
4647#if defined(__has_include) && !defined(NO_DOC)
4648# if __has_include("Zivid/CameraHealthInternal.h") && __has_include("Zivid/DataModelNodeMetaData.h")
4649# include "Zivid/CameraHealthInternal.h"
4650# endif
4651#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:1065
bool operator==(const Status &other) const
Comparison operator.
Definition CameraHealth.h:1121
static const Status error
error
Definition CameraHealth.h:1091
ValueType value() const
Get the value.
Status()=default
Default constructor.
bool operator!=(const Status &other) const
Comparison operator.
Definition CameraHealth.h:1127
friend std::ostream & operator<<(std::ostream &stream, const Status &value)
Operator to serialize the value to a stream.
Definition CameraHealth.h:1133
static const Status ok
ok
Definition CameraHealth.h:1089
static constexpr const char * name
The name of this value.
Definition CameraHealth.h:1074
ValueType
The type of the underlying value.
Definition CameraHealth.h:1083
static constexpr const char * description
The description for this value.
Definition CameraHealth.h:1077
static std::set< ValueType > validValues()
All valid values of Status.
Definition CameraHealth.h:1095
std::string toString() const
Get the value as string.
static constexpr DataModel::NodeType nodeType
The type of this node.
Definition CameraHealth.h:1068
static constexpr const char * path
The full path for this value.
Definition CameraHealth.h:1071
constexpr Status(ValueType value)
Constructor.
Definition CameraHealth.h:1104
static const Status suboptimal
suboptimal
Definition CameraHealth.h:1090
static const Status unknown
unknown
Definition CameraHealth.h:1092
friend std::ostream & operator<<(std::ostream &stream, const Status::ValueType &value)
Operator to serialize ValueType to a stream.
Definition CameraHealth.h:1115
Max transfer speed in megabits per second (Mbps).
Definition CameraHealth.h:1161
bool operator<(const Value &other) const
Comparison operator.
Definition CameraHealth.h:1222
bool operator<=(const Value &other) const
Comparison operator.
Definition CameraHealth.h:1234
static constexpr DataModel::NodeType nodeType
The type of this node.
Definition CameraHealth.h:1164
friend std::ostream & operator<<(std::ostream &stream, const Value &value)
Operator to serialize the value to a stream.
Definition CameraHealth.h:1246
static constexpr Range< uint32_t > validRange()
The range of valid values for Value.
Definition CameraHealth.h:1181
bool operator>=(const Value &other) const
Comparison operator.
Definition CameraHealth.h:1240
uint32_t ValueType
The type of the underlying value.
Definition CameraHealth.h:1178
Value()=default
Default constructor.
static constexpr const char * path
The full path for this value.
Definition CameraHealth.h:1167
bool operator!=(const Value &other) const
Comparison operator.
Definition CameraHealth.h:1216
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:1190
bool operator==(const Value &other) const
Comparison operator.
Definition CameraHealth.h:1210
uint32_t value() const
Get the value.
bool operator>(const Value &other) const
Comparison operator.
Definition CameraHealth.h:1228
static constexpr const char * name
The name of this value.
Definition CameraHealth.h:1170
static constexpr const char * description
The description for this value.
Definition CameraHealth.h:1173
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:1034
const CameraHealth::MaxTransferSpeed::Value & get() const
Definition CameraHealth.h:1417
Value & value()
Get Value.
Definition CameraHealth.h:1394
Status & status()
Get Status.
Definition CameraHealth.h:1375
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:1444
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:1349
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:1436
friend std::ostream & operator<<(std::ostream &stream, const MaxTransferSpeed &value)
Operator to send the value as string to a stream.
Definition CameraHealth.h:1460
const Value & value() const
Get Value.
Definition CameraHealth.h:1388
static constexpr const char * description
The description for this value.
Definition CameraHealth.h:1046
bool operator!=(const MaxTransferSpeed &other) const
Inequality operator.
MaxTransferSpeed & set(const Status &value)
Set Status.
Definition CameraHealth.h:1381
const CameraHealth::MaxTransferSpeed::Status & get() const
Definition CameraHealth.h:1409
const Status & status() const
Get Status.
Definition CameraHealth.h:1369
static constexpr const char * name
The name of this value.
Definition CameraHealth.h:1043
void set(Args &&...args)
Set multiple arguments.
Definition CameraHealth.h:1316
static constexpr DataModel::NodeType nodeType
The type of this node.
Definition CameraHealth.h:1037
static constexpr const char * path
The full path for this value.
Definition CameraHealth.h:1040
std::tuple< CameraHealth::MaxTransferSpeed::Status, CameraHealth::MaxTransferSpeed::Value > Descendants
Definition CameraHealth.h:1259
MaxTransferSpeed & set(const Value &value)
Set Value.
Definition CameraHealth.h:1400
Severity of the memory check.
Definition CameraHealth.h:1510
static constexpr const char * name
The name of this value.
Definition CameraHealth.h:1519
static constexpr DataModel::NodeType nodeType
The type of this node.
Definition CameraHealth.h:1513
static const Status unknown
unknown
Definition CameraHealth.h:1535
static std::set< ValueType > validValues()
All valid values of Status.
Definition CameraHealth.h:1538
bool operator!=(const Status &other) const
Comparison operator.
Definition CameraHealth.h:1570
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:1576
constexpr Status(ValueType value)
Constructor.
Definition CameraHealth.h:1547
static const Status error
error
Definition CameraHealth.h:1534
static constexpr const char * description
The description for this value.
Definition CameraHealth.h:1522
ValueType value() const
Get the value.
Status()=default
Default constructor.
static const Status ok
ok
Definition CameraHealth.h:1532
ValueType
The type of the underlying value.
Definition CameraHealth.h:1526
@ ok
Definition CameraHealth.h:1527
@ suboptimal
Definition CameraHealth.h:1528
@ unknown
Definition CameraHealth.h:1530
@ error
Definition CameraHealth.h:1529
static const Status suboptimal
suboptimal
Definition CameraHealth.h:1533
friend std::ostream & operator<<(std::ostream &stream, const Status::ValueType &value)
Operator to serialize ValueType to a stream.
Definition CameraHealth.h:1558
static constexpr const char * path
The full path for this value.
Definition CameraHealth.h:1516
bool operator==(const Status &other) const
Comparison operator.
Definition CameraHealth.h:1564
Number of memory errors detected by the memory test.
Definition CameraHealth.h:1604
static constexpr const char * description
The description for this value.
Definition CameraHealth.h:1616
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:1689
static constexpr const char * path
The full path for this value.
Definition CameraHealth.h:1610
constexpr Value(uint32_t value)
Constructor.
Definition CameraHealth.h:1633
std::string toString() const
Get the value as string.
bool operator==(const Value &other) const
Comparison operator.
Definition CameraHealth.h:1653
bool operator<=(const Value &other) const
Comparison operator.
Definition CameraHealth.h:1677
static constexpr DataModel::NodeType nodeType
The type of this node.
Definition CameraHealth.h:1607
static constexpr Range< uint32_t > validRange()
The range of valid values for Value.
Definition CameraHealth.h:1624
uint32_t ValueType
The type of the underlying value.
Definition CameraHealth.h:1621
bool operator!=(const Value &other) const
Comparison operator.
Definition CameraHealth.h:1659
Value()=default
Default constructor.
uint32_t value() const
Get the value.
static constexpr const char * name
The name of this value.
Definition CameraHealth.h:1613
bool hasValue() const
Check if the value is set.
bool operator>=(const Value &other) const
Comparison operator.
Definition CameraHealth.h:1683
bool operator<(const Value &other) const
Comparison operator.
Definition CameraHealth.h:1665
bool operator>(const Value &other) const
Comparison operator.
Definition CameraHealth.h:1671
The status of the camera's memory test.
Definition CameraHealth.h:1487
friend std::ostream & operator<<(std::ostream &stream, const Memory &value)
Operator to send the value as string to a stream.
Definition CameraHealth.h:1902
bool operator!=(const Memory &other) const
Inequality operator.
const CameraHealth::Memory::Value & get() const
Definition CameraHealth.h:1859
static constexpr const char * description
The description for this value.
Definition CameraHealth.h:1499
bool operator==(const Memory &other) const
Equality operator.
const Value & value() const
Get Value.
Definition CameraHealth.h:1830
static constexpr const char * name
The name of this value.
Definition CameraHealth.h:1496
Value & value()
Get Value.
Definition CameraHealth.h:1836
Memory & set(const Status &value)
Set Status.
Definition CameraHealth.h:1823
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:1791
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition CameraHealth.h:1886
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:1878
std::string toString() const
Get the value as string.
std::tuple< CameraHealth::Memory::Status, CameraHealth::Memory::Value > Descendants
Definition CameraHealth.h:1702
const Status & status() const
Get Status.
Definition CameraHealth.h:1811
const CameraHealth::Memory::Status & get() const
Definition CameraHealth.h:1851
static constexpr const char * path
The full path for this value.
Definition CameraHealth.h:1493
Status & status()
Get Status.
Definition CameraHealth.h:1817
void set(Args &&...args)
Set multiple arguments.
Definition CameraHealth.h:1758
Memory()
Default constructor.
static constexpr DataModel::NodeType nodeType
The type of this node.
Definition CameraHealth.h:1490
Memory & set(const Value &value)
Set Value.
Definition CameraHealth.h:1842
The aggregated severity across all checks, taking the highest-precedence severity among them....
Definition CameraHealth.h:1929
static constexpr const char * name
The name of this value.
Definition CameraHealth.h:1938
friend std::ostream & operator<<(std::ostream &stream, const Overall &value)
Operator to serialize the value to a stream.
Definition CameraHealth.h:2002
ValueType value() const
Get the value.
static constexpr const char * path
The full path for this value.
Definition CameraHealth.h:1935
static const Overall suboptimal
suboptimal
Definition CameraHealth.h:1959
constexpr Overall(ValueType value)
Constructor.
Definition CameraHealth.h:1973
friend std::ostream & operator<<(std::ostream &stream, const Overall::ValueType &value)
Operator to serialize ValueType to a stream.
Definition CameraHealth.h:1984
bool operator!=(const Overall &other) const
Comparison operator.
Definition CameraHealth.h:1996
ValueType
The type of the underlying value.
Definition CameraHealth.h:1952
@ ok
Definition CameraHealth.h:1953
@ suboptimal
Definition CameraHealth.h:1954
@ unknown
Definition CameraHealth.h:1956
@ error
Definition CameraHealth.h:1955
bool operator==(const Overall &other) const
Comparison operator.
Definition CameraHealth.h:1990
static constexpr DataModel::NodeType nodeType
The type of this node.
Definition CameraHealth.h:1932
Overall()=default
Default constructor.
static const Overall ok
ok
Definition CameraHealth.h:1958
static const Overall error
error
Definition CameraHealth.h:1960
static std::set< ValueType > validValues()
All valid values of Overall.
Definition CameraHealth.h:1964
static constexpr const char * description
The description for this value.
Definition CameraHealth.h:1941
std::string toString() const
Get the value as string.
static const Overall unknown
unknown
Definition CameraHealth.h:1961
Severity of the DMD temperature check.
Definition CameraHealth.h:2086
Status()=default
Default constructor.
std::string toString() const
Get the value as string.
static const Status error
error
Definition CameraHealth.h:2112
bool operator==(const Status &other) const
Comparison operator.
Definition CameraHealth.h:2142
static constexpr const char * name
The name of this value.
Definition CameraHealth.h:2095
ValueType value() const
Get the value.
static const Status unknown
unknown
Definition CameraHealth.h:2113
constexpr Status(ValueType value)
Constructor.
Definition CameraHealth.h:2125
friend std::ostream & operator<<(std::ostream &stream, const Status &value)
Operator to serialize the value to a stream.
Definition CameraHealth.h:2154
static constexpr DataModel::NodeType nodeType
The type of this node.
Definition CameraHealth.h:2089
bool operator!=(const Status &other) const
Comparison operator.
Definition CameraHealth.h:2148
static constexpr const char * description
The description for this value.
Definition CameraHealth.h:2098
static const Status ok
ok
Definition CameraHealth.h:2110
ValueType
The type of the underlying value.
Definition CameraHealth.h:2104
static std::set< ValueType > validValues()
All valid values of Status.
Definition CameraHealth.h:2116
static constexpr const char * path
The full path for this value.
Definition CameraHealth.h:2092
static const Status suboptimal
suboptimal
Definition CameraHealth.h:2111
friend std::ostream & operator<<(std::ostream &stream, const Status::ValueType &value)
Operator to serialize ValueType to a stream.
Definition CameraHealth.h:2136
DMD temperature in degrees Celsius.
Definition CameraHealth.h:2183
static constexpr const char * name
The name of this value.
Definition CameraHealth.h:2192
bool operator<=(const Value &other) const
Comparison operator.
Definition CameraHealth.h:2256
double ValueType
The type of the underlying value.
Definition CameraHealth.h:2200
friend std::ostream & operator<<(std::ostream &stream, const Value &value)
Operator to serialize the value to a stream.
Definition CameraHealth.h:2268
std::string toString() const
Get the value as string.
bool operator==(const Value &other) const
Comparison operator.
Definition CameraHealth.h:2232
bool operator>=(const Value &other) const
Comparison operator.
Definition CameraHealth.h:2262
static constexpr const char * path
The full path for this value.
Definition CameraHealth.h:2189
bool operator!=(const Value &other) const
Comparison operator.
Definition CameraHealth.h:2238
bool operator>(const Value &other) const
Comparison operator.
Definition CameraHealth.h:2250
Value()=default
Default constructor.
static constexpr const char * description
The description for this value.
Definition CameraHealth.h:2195
constexpr Value(double value)
Constructor.
Definition CameraHealth.h:2212
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:2244
static constexpr Range< double > validRange()
The range of valid values for Value.
Definition CameraHealth.h:2203
static constexpr DataModel::NodeType nodeType
The type of this node.
Definition CameraHealth.h:2186
The status of the DMD (Digital Micromirror Device) temperature, in degrees Celsius.
Definition CameraHealth.h:2060
const CameraHealth::Temperature::DMD::Value & get() const
Definition CameraHealth.h:2443
bool operator!=(const DMD &other) const
Inequality operator.
static constexpr const char * description
The description for this value.
Definition CameraHealth.h:2072
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition CameraHealth.h:2470
bool operator==(const DMD &other) const
Equality operator.
const Status & status() const
Get Status.
Definition CameraHealth.h:2393
std::tuple< CameraHealth::Temperature::DMD::Status, CameraHealth::Temperature::DMD::Value > Descendants
Definition CameraHealth.h:2281
const Value & value() const
Get Value.
Definition CameraHealth.h:2412
static constexpr const char * path
The full path for this value.
Definition CameraHealth.h:2066
DMD & set(const Status &value)
Set Status.
Definition CameraHealth.h:2405
static constexpr const char * name
The name of this value.
Definition CameraHealth.h:2069
friend std::ostream & operator<<(std::ostream &stream, const DMD &value)
Operator to send the value as string to a stream.
Definition CameraHealth.h:2486
Status & status()
Get Status.
Definition CameraHealth.h:2399
void set(Args &&...args)
Set multiple arguments.
Definition CameraHealth.h:2338
DMD & set(const Value &value)
Set Value.
Definition CameraHealth.h:2424
static constexpr DataModel::NodeType nodeType
The type of this node.
Definition CameraHealth.h:2063
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:2462
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:2372
Value & value()
Get Value.
Definition CameraHealth.h:2418
const CameraHealth::Temperature::DMD::Status & get() const
Definition CameraHealth.h:2434
Severity of the LED temperature check.
Definition CameraHealth.h:2538
ValueType value() const
Get the value.
static const Status suboptimal
suboptimal
Definition CameraHealth.h:2563
constexpr Status(ValueType value)
Constructor.
Definition CameraHealth.h:2577
Status()=default
Default constructor.
static const Status error
error
Definition CameraHealth.h:2564
friend std::ostream & operator<<(std::ostream &stream, const Status &value)
Operator to serialize the value to a stream.
Definition CameraHealth.h:2606
static constexpr const char * description
The description for this value.
Definition CameraHealth.h:2550
static const Status unknown
unknown
Definition CameraHealth.h:2565
static constexpr const char * path
The full path for this value.
Definition CameraHealth.h:2544
bool operator!=(const Status &other) const
Comparison operator.
Definition CameraHealth.h:2600
static std::set< ValueType > validValues()
All valid values of Status.
Definition CameraHealth.h:2568
static constexpr DataModel::NodeType nodeType
The type of this node.
Definition CameraHealth.h:2541
std::string toString() const
Get the value as string.
static constexpr const char * name
The name of this value.
Definition CameraHealth.h:2547
bool operator==(const Status &other) const
Comparison operator.
Definition CameraHealth.h:2594
static const Status ok
ok
Definition CameraHealth.h:2562
friend std::ostream & operator<<(std::ostream &stream, const Status::ValueType &value)
Operator to serialize ValueType to a stream.
Definition CameraHealth.h:2588
ValueType
The type of the underlying value.
Definition CameraHealth.h:2556
LED temperature in degrees Celsius.
Definition CameraHealth.h:2635
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:2647
friend std::ostream & operator<<(std::ostream &stream, const Value &value)
Operator to serialize the value to a stream.
Definition CameraHealth.h:2720
double value() const
Get the value.
bool operator!=(const Value &other) const
Comparison operator.
Definition CameraHealth.h:2690
bool operator<=(const Value &other) const
Comparison operator.
Definition CameraHealth.h:2708
static constexpr const char * name
The name of this value.
Definition CameraHealth.h:2644
bool operator>(const Value &other) const
Comparison operator.
Definition CameraHealth.h:2702
static constexpr DataModel::NodeType nodeType
The type of this node.
Definition CameraHealth.h:2638
double ValueType
The type of the underlying value.
Definition CameraHealth.h:2652
bool hasValue() const
Check if the value is set.
bool operator>=(const Value &other) const
Comparison operator.
Definition CameraHealth.h:2714
static constexpr Range< double > validRange()
The range of valid values for Value.
Definition CameraHealth.h:2655
std::string toString() const
Get the value as string.
static constexpr const char * path
The full path for this value.
Definition CameraHealth.h:2641
bool operator==(const Value &other) const
Comparison operator.
Definition CameraHealth.h:2684
bool operator<(const Value &other) const
Comparison operator.
Definition CameraHealth.h:2696
constexpr Value(double value)
Constructor.
Definition CameraHealth.h:2664
The status of the LED temperature, in degrees Celsius.
Definition CameraHealth.h:2513
std::string toString() const
Get the value as string.
void set(Args &&...args)
Set multiple arguments.
Definition CameraHealth.h:2790
Status & status()
Get Status.
Definition CameraHealth.h:2851
const CameraHealth::Temperature::LED::Value & get() const
Definition CameraHealth.h:2895
LED & set(const Value &value)
Set Value.
Definition CameraHealth.h:2876
LED & set(const Status &value)
Set Status.
Definition CameraHealth.h:2857
const Value & value() const
Get Value.
Definition CameraHealth.h:2864
std::tuple< CameraHealth::Temperature::LED::Status, CameraHealth::Temperature::LED::Value > Descendants
Definition CameraHealth.h:2733
const CameraHealth::Temperature::LED::Status & get() const
Definition CameraHealth.h:2886
static constexpr DataModel::NodeType nodeType
The type of this node.
Definition CameraHealth.h:2516
friend std::ostream & operator<<(std::ostream &stream, const LED &value)
Operator to send the value as string to a stream.
Definition CameraHealth.h:2938
static constexpr const char * path
The full path for this value.
Definition CameraHealth.h:2519
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition CameraHealth.h:2922
bool operator!=(const LED &other) const
Inequality operator.
static constexpr const char * name
The name of this value.
Definition CameraHealth.h:2522
Value & value()
Get Value.
Definition CameraHealth.h:2870
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:2914
static constexpr const char * description
The description for this value.
Definition CameraHealth.h:2525
const Status & status() const
Get Status.
Definition CameraHealth.h:2845
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:2824
bool operator==(const LED &other) const
Equality operator.
Severity of the lens temperature check.
Definition CameraHealth.h:2990
static constexpr const char * description
The description for this value.
Definition CameraHealth.h:3002
std::string toString() const
Get the value as string.
static std::set< ValueType > validValues()
All valid values of Status.
Definition CameraHealth.h:3020
static const Status unknown
unknown
Definition CameraHealth.h:3017
static const Status error
error
Definition CameraHealth.h:3016
ValueType
The type of the underlying value.
Definition CameraHealth.h:3008
constexpr Status(ValueType value)
Constructor.
Definition CameraHealth.h:3029
static const Status suboptimal
suboptimal
Definition CameraHealth.h:3015
friend std::ostream & operator<<(std::ostream &stream, const Status &value)
Operator to serialize the value to a stream.
Definition CameraHealth.h:3058
Status()=default
Default constructor.
static constexpr DataModel::NodeType nodeType
The type of this node.
Definition CameraHealth.h:2993
bool operator==(const Status &other) const
Comparison operator.
Definition CameraHealth.h:3046
ValueType value() const
Get the value.
bool operator!=(const Status &other) const
Comparison operator.
Definition CameraHealth.h:3052
static constexpr const char * path
The full path for this value.
Definition CameraHealth.h:2996
static constexpr const char * name
The name of this value.
Definition CameraHealth.h:2999
static const Status ok
ok
Definition CameraHealth.h:3014
friend std::ostream & operator<<(std::ostream &stream, const Status::ValueType &value)
Operator to serialize ValueType to a stream.
Definition CameraHealth.h:3040
Lens temperature in degrees Celsius.
Definition CameraHealth.h:3087
static constexpr DataModel::NodeType nodeType
The type of this node.
Definition CameraHealth.h:3090
friend std::ostream & operator<<(std::ostream &stream, const Value &value)
Operator to serialize the value to a stream.
Definition CameraHealth.h:3172
bool operator==(const Value &other) const
Comparison operator.
Definition CameraHealth.h:3136
static constexpr Range< double > validRange()
The range of valid values for Value.
Definition CameraHealth.h:3107
static constexpr const char * path
The full path for this value.
Definition CameraHealth.h:3093
bool hasValue() const
Check if the value is set.
static constexpr const char * name
The name of this value.
Definition CameraHealth.h:3096
void reset()
Reset the node to unset state.
bool operator<=(const Value &other) const
Comparison operator.
Definition CameraHealth.h:3160
Value()=default
Default constructor.
bool operator>(const Value &other) const
Comparison operator.
Definition CameraHealth.h:3154
bool operator<(const Value &other) const
Comparison operator.
Definition CameraHealth.h:3148
static constexpr const char * description
The description for this value.
Definition CameraHealth.h:3099
constexpr Value(double value)
Constructor.
Definition CameraHealth.h:3116
std::string toString() const
Get the value as string.
bool operator>=(const Value &other) const
Comparison operator.
Definition CameraHealth.h:3166
bool operator!=(const Value &other) const
Comparison operator.
Definition CameraHealth.h:3142
double ValueType
The type of the underlying value.
Definition CameraHealth.h:3104
The status of the lens temperature, in degrees Celsius.
Definition CameraHealth.h:2965
void set(Args &&...args)
Set multiple arguments.
Definition CameraHealth.h:3242
static constexpr const char * description
The description for this value.
Definition CameraHealth.h:2977
const CameraHealth::Temperature::Lens::Value & get() const
Definition CameraHealth.h:3347
Value & value()
Get Value.
Definition CameraHealth.h:3322
const CameraHealth::Temperature::Lens::Status & get() const
Definition CameraHealth.h:3338
static constexpr const char * path
The full path for this value.
Definition CameraHealth.h:2971
std::tuple< CameraHealth::Temperature::Lens::Status, CameraHealth::Temperature::Lens::Value > Descendants
Definition CameraHealth.h:3185
static constexpr DataModel::NodeType nodeType
The type of this node.
Definition CameraHealth.h:2968
Lens & set(const Status &value)
Set Status.
Definition CameraHealth.h:3309
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:3374
Status & status()
Get Status.
Definition CameraHealth.h:3303
Lens & set(const Value &value)
Set Value.
Definition CameraHealth.h:3328
std::string toString() const
Get the value as string.
const Value & value() const
Get Value.
Definition CameraHealth.h:3316
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:3276
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:3366
friend std::ostream & operator<<(std::ostream &stream, const Lens &value)
Operator to send the value as string to a stream.
Definition CameraHealth.h:3390
bool operator==(const Lens &other) const
Equality operator.
const Status & status() const
Get Status.
Definition CameraHealth.h:3297
static constexpr const char * name
The name of this value.
Definition CameraHealth.h:2974
The status of the camera's temperatures. Each sub-status reflects the temperature of a specific compo...
Definition CameraHealth.h:2032
Temperature & set(const Lens::Status &value)
Set Lens::Status.
Definition CameraHealth.h:3632
const CameraHealth::Temperature::DMD::Value & get() const
Definition CameraHealth.h:3664
Lens & lens()
Get Lens.
Definition CameraHealth.h:3619
static constexpr const char * path
The full path for this value.
Definition CameraHealth.h:2038
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:3527
Temperature & set(const Lens &value)
Set Lens.
Definition CameraHealth.h:3625
bool operator!=(const Temperature &other) const
Inequality operator.
const CameraHealth::Temperature::DMD::Status & get() const
Definition CameraHealth.h:3656
static constexpr const char * name
The name of this value.
Definition CameraHealth.h:2041
const CameraHealth::Temperature::Lens & get() const
Definition CameraHealth.h:3696
Temperature()
Default constructor.
const Lens & lens() const
Get Lens.
Definition CameraHealth.h:3613
const CameraHealth::Temperature::LED::Status & get() const
Definition CameraHealth.h:3680
Temperature & set(const DMD::Value &value)
Set DMD::Value.
Definition CameraHealth.h:3573
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition CameraHealth.h:3746
Temperature & set(const LED &value)
Set LED.
Definition CameraHealth.h:3592
friend std::ostream & operator<<(std::ostream &stream, const Temperature &value)
Operator to send the value as string to a stream.
Definition CameraHealth.h:3763
const CameraHealth::Temperature::Lens::Status & get() const
Definition CameraHealth.h:3704
const CameraHealth::Temperature::LED::Value & get() const
Definition CameraHealth.h:3688
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:3737
std::string toString() const
Get the value as string.
const CameraHealth::Temperature::Lens::Value & get() const
Definition CameraHealth.h:3712
Temperature & set(const LED::Status &value)
Set LED::Status.
Definition CameraHealth.h:3599
static constexpr DataModel::NodeType nodeType
The type of this node.
Definition CameraHealth.h:2035
Temperature & set(const DMD &value)
Set DMD.
Definition CameraHealth.h:3559
Temperature & set(const Lens::Value &value)
Set Lens::Value.
Definition CameraHealth.h:3639
void set(Args &&...args)
Set multiple arguments.
Definition CameraHealth.h:3487
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:3408
const DMD & dmd() const
Get DMD.
Definition CameraHealth.h:3547
const CameraHealth::Temperature::LED & get() const
Definition CameraHealth.h:3672
static constexpr const char * description
The description for this value.
Definition CameraHealth.h:2044
const CameraHealth::Temperature::DMD & get() const
Definition CameraHealth.h:3648
bool operator==(const Temperature &other) const
Equality operator.
DMD & dmd()
Get DMD.
Definition CameraHealth.h:3553
Temperature & set(const DMD::Status &value)
Set DMD::Status.
Definition CameraHealth.h:3566
Temperature & set(const LED::Value &value)
Set LED::Value.
Definition CameraHealth.h:3606
const LED & led() const
Get LED.
Definition CameraHealth.h:3580
LED & led()
Get LED.
Definition CameraHealth.h:3586
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:4162
const CameraHealth::Memory & get() const
Definition CameraHealth.h:4291
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:4031
CameraHealth & set(const Temperature::DMD::Status &value)
Set Temperature::DMD::Status.
Definition CameraHealth.h:4169
CameraHealth & set(const MaxTransferSpeed::Value &value)
Set MaxTransferSpeed::Value.
Definition CameraHealth.h:4084
const CameraHealth::MaxTransferSpeed & get() const
Definition CameraHealth.h:4269
void save(const std::string &fileName) const
Save to the given file.
const CameraHealth::Fan::Value & get() const
Definition CameraHealth.h:4237
static constexpr DataModel::NodeType nodeType
The type of this node.
Definition CameraHealth.h:92
const CameraHealth::Fan & get() const
Definition CameraHealth.h:4225
const CameraHealth::Temperature::Lens & get() const
Definition CameraHealth.h:4375
CameraHealth & set(const Memory::Value &value)
Set Memory::Value.
Definition CameraHealth.h:4117
CameraHealth & set(const Temperature::LED &value)
Set Temperature::LED.
Definition CameraHealth.h:4183
const Memory & memory() const
Get Memory.
Definition CameraHealth.h:4091
void load(const std::string &fileName)
Load from the given file.
CameraHealth & set(const Memory::Status &value)
Set Memory::Status.
Definition CameraHealth.h:4110
CameraHealth & set(const InfieldVerification::Value &value)
Set InfieldVerification::Value.
Definition CameraHealth.h:4051
MaxTransferSpeed & maxTransferSpeed()
Get MaxTransferSpeed.
Definition CameraHealth.h:4064
CameraHealth & set(const Temperature::Lens::Value &value)
Set Temperature::Lens::Value.
Definition CameraHealth.h:4218
CameraHealth & set(const Overall &value)
Set Overall.
Definition CameraHealth.h:4136
Fan & fan()
Get Fan.
Definition CameraHealth.h:3998
CameraHealth & set(const Temperature &value)
Set Temperature.
Definition CameraHealth.h:4155
const CameraHealth::Memory::Status & get() const
Definition CameraHealth.h:4299
const Overall & overall() const
Get Overall.
Definition CameraHealth.h:4124
CameraHealth(Args &&...args)
Constructor taking variadic number of arguments.
Definition CameraHealth.h:3870
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:4058
const CameraHealth::Fan::Status & get() const
Definition CameraHealth.h:4231
CameraHealth & set(const Temperature::DMD::Value &value)
Set Temperature::DMD::Value.
Definition CameraHealth.h:4176
const CameraHealth::InfieldVerification & get() const
Definition CameraHealth.h:4245
const CameraHealth::Temperature::Lens::Value & get() const
Definition CameraHealth.h:4391
CameraHealth & set(const InfieldVerification::Status &value)
Set InfieldVerification::Status.
Definition CameraHealth.h:4044
const CameraHealth::Temperature::DMD::Value & get() const
Definition CameraHealth.h:4343
CameraHealth & set(const Fan::Status &value)
Set Fan::Status.
Definition CameraHealth.h:4011
const CameraHealth::MaxTransferSpeed::Status & get() const
Definition CameraHealth.h:4277
const CameraHealth::InfieldVerification::Status & get() const
Definition CameraHealth.h:4253
const CameraHealth::Temperature::DMD & get() const
Definition CameraHealth.h:4327
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:4103
const CameraHealth::Memory::Value & get() const
Definition CameraHealth.h:4307
static constexpr const char * name
The name of this value.
Definition CameraHealth.h:98
Temperature & temperature()
Get Temperature.
Definition CameraHealth.h:4149
Overall & overall()
Get Overall.
Definition CameraHealth.h:4130
Memory & memory()
Get Memory.
Definition CameraHealth.h:4097
static constexpr const char * description
The description for this value.
Definition CameraHealth.h:101
const Temperature & temperature() const
Get Temperature.
Definition CameraHealth.h:4143
bool operator==(const CameraHealth &other) const
Equality operator.
const CameraHealth::MaxTransferSpeed::Value & get() const
Definition CameraHealth.h:4285
void set(Args &&...args)
Set multiple arguments.
Definition CameraHealth.h:3919
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:4383
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:4434
const CameraHealth::Temperature::LED & get() const
Definition CameraHealth.h:4351
CameraHealth & set(const Temperature::Lens &value)
Set Temperature::Lens.
Definition CameraHealth.h:4204
CameraHealth & set(const Fan::Value &value)
Set Fan::Value.
Definition CameraHealth.h:4018
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition CameraHealth.h:4446
const CameraHealth::Temperature::DMD::Status & get() const
Definition CameraHealth.h:4335
std::string toString() const
Get the value as string.
CameraHealth & set(const InfieldVerification &value)
Set InfieldVerification.
Definition CameraHealth.h:4037
CameraHealth()
Default constructor.
const CameraHealth::Temperature::LED::Value & get() const
Definition CameraHealth.h:4367
CameraHealth & set(const Temperature::LED::Status &value)
Set Temperature::LED::Status.
Definition CameraHealth.h:4190
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:3782
CameraHealth & set(const Fan &value)
Set Fan.
Definition CameraHealth.h:4004
friend std::ostream & operator<<(std::ostream &stream, const CameraHealth &value)
Operator to send the value as string to a stream.
Definition CameraHealth.h:4466
const CameraHealth::Temperature & get() const
Definition CameraHealth.h:4319
const Fan & fan() const
Get Fan.
Definition CameraHealth.h:3992
CameraHealth & set(const MaxTransferSpeed &value)
Set MaxTransferSpeed.
Definition CameraHealth.h:4070
CameraHealth & set(const Temperature::Lens::Status &value)
Set Temperature::Lens::Status.
Definition CameraHealth.h:4211
CameraHealth & set(const Temperature::LED::Value &value)
Set Temperature::LED::Value.
Definition CameraHealth.h:4197
const InfieldVerification & infieldVerification() const
Get InfieldVerification.
Definition CameraHealth.h:4025
const CameraHealth::Temperature::LED::Status & get() const
Definition CameraHealth.h:4359
CameraHealth & set(const MaxTransferSpeed::Status &value)
Set MaxTransferSpeed::Status.
Definition CameraHealth.h:4077
const CameraHealth::InfieldVerification::Value & get() const
Definition CameraHealth.h:4261
const CameraHealth::Overall & get() const
Definition CameraHealth.h:4313
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:3973
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