Zivid C++ API 2.18.0+1b44dbef-1
FrameInfo.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
76
77 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
79 {
80 public:
83
85 static constexpr const char *path{ "" };
86
88 static constexpr const char *name{ "FrameInfo" };
89
91 static constexpr const char *description{ R"description(Various information for a frame)description" };
92
93 static constexpr size_t version{ 8 };
94
95#ifndef NO_DOC
96 template<size_t>
97 struct Version;
98
99 using LatestVersion = Zivid::FrameInfo;
100
101 // Short identifier. This value is not guaranteed to be universally unique
102 // Todo(ZIVID-2808): Move this to internal DataModelExt header
103 static constexpr std::array<uint8_t, 3> binaryId{ 'f', 'i', 'f' };
104
105#endif
106
108
109 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
111 {
112 public:
115
117 static constexpr const char *path{ "Diagnostics" };
118
120 static constexpr const char *name{ "Diagnostics" };
121
123 static constexpr const char *description{ R"description(Diagnostic information for frame)description" };
124
126
127 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
129 {
130 public:
133
135 static constexpr const char *path{ "Diagnostics/PacketLoss" };
136
138 static constexpr const char *name{ "PacketLoss" };
139
141 static constexpr const char *description{ R"description(Is frame missing any data)description" };
142
144 using ValueType = bool;
145 static const PacketLoss yes;
146 static const PacketLoss no;
147
149 static std::set<bool> validValues()
150 {
151 return { false, true };
152 }
153
155 PacketLoss() = default;
156
158 explicit constexpr PacketLoss(bool value)
159 : m_value{ value }
160 {}
161
163 bool value() const;
164
166 std::string toString() const;
167
169 explicit operator bool() const
170 {
171 return m_value;
172 }
173
175 bool operator==(const PacketLoss &other) const
176 {
177 return m_value == other.m_value;
178 }
179
181 bool operator!=(const PacketLoss &other) const
182 {
183 return m_value != other.m_value;
184 }
185
187 friend std::ostream &operator<<(std::ostream &stream, const PacketLoss &value)
188 {
189 return stream << value.toString();
190 }
191
192 private:
193 void setFromString(const std::string &value);
194
195 bool m_value{ false };
196
197 friend struct DataModel::Detail::Befriend<PacketLoss>;
198 };
199
200 using Descendants = std::tuple<FrameInfo::Diagnostics::PacketLoss>;
201
204
216#ifndef NO_DOC
217 template<
218 typename... Args,
219 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
220 typename std::enable_if<
221 Zivid::Detail::TypeTraits::AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::
222 value,
223 int>::type = 0>
224#else
225 template<typename... Args>
226#endif
227 explicit Diagnostics(Args &&...args)
228 {
229 using namespace Zivid::Detail::TypeTraits;
230
231 static_assert(
232 AllArgsDecayedAreUnique<Args...>::value,
233 "Found duplicate types among the arguments passed to Diagnostics(...). "
234 "Types should be listed at most once.");
235
236 set(std::forward<Args>(args)...);
237 }
238
249#ifndef NO_DOC
250 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
251#else
252 template<typename... Args>
253#endif
254 void set(Args &&...args)
255 {
256 using namespace Zivid::Detail::TypeTraits;
257
258 using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
259 static_assert(
260 AllArgsAreDescendantNodes::value, "All arguments passed to set(...) must be descendant nodes.");
261
262 static_assert(
263 AllArgsDecayedAreUnique<Args...>::value,
264 "Found duplicate types among the arguments passed to set(...). "
265 "Types should be listed at most once.");
266
267 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
268 }
269
281#ifndef NO_DOC
282 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
283#else
284 template<typename... Args>
285#endif
286 Diagnostics copyWith(Args &&...args) const
287 {
288 using namespace Zivid::Detail::TypeTraits;
289
290 using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
291 static_assert(
292 AllArgsAreDescendantNodes::value,
293 "All arguments passed to copyWith(...) must be descendant nodes.");
294
295 static_assert(
296 AllArgsDecayedAreUnique<Args...>::value,
297 "Found duplicate types among the arguments passed to copyWith(...). "
298 "Types should be listed at most once.");
299
300 auto copy{ *this };
301 copy.set(std::forward<Args>(args)...);
302 return copy;
303 }
304
306 const PacketLoss &packetLoss() const
307 {
308 return m_packetLoss;
309 }
310
313 {
314 return m_packetLoss;
315 }
316
319 {
320 m_packetLoss = value;
321 return *this;
322 }
323
324 template<
325 typename T,
326 typename std::enable_if<std::is_same<T, FrameInfo::Diagnostics::PacketLoss>::value, int>::type = 0>
328 {
329 return m_packetLoss;
330 }
331
332 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
334 {
335 return m_packetLoss;
336 }
337
339 template<typename F>
340 void forEach(const F &f) const
341 {
342 f(m_packetLoss);
343 }
344
346 template<typename F>
347 void forEach(const F &f)
348 {
349 f(m_packetLoss);
350 }
351
353 bool operator==(const Diagnostics &other) const;
354
356 bool operator!=(const Diagnostics &other) const;
357
359 std::string toString() const;
360
362 friend std::ostream &operator<<(std::ostream &stream, const Diagnostics &value)
363 {
364 return stream << value.toString();
365 }
366
367 private:
368 void setFromString(const std::string &value);
369
370 void setFromString(const std::string &fullPath, const std::string &value);
371
372 std::string getString(const std::string &fullPath) const;
373
374 PacketLoss m_packetLoss;
375
376 friend struct DataModel::Detail::Befriend<Diagnostics>;
377 };
378
380
381 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
383 {
384 public:
387
389 static constexpr const char *path{ "Metrics" };
390
392 static constexpr const char *name{ "Metrics" };
393
395 static constexpr const char *description{ R"description(Metrics related to this capture.)description" };
396
402
403 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
405 {
406 public:
409
411 static constexpr const char *path{ "Metrics/AcquisitionTime" };
412
414 static constexpr const char *name{ "AcquisitionTime" };
415
417 static constexpr const char *description{
418 R"description(Acquisition Time is the duration from the start of the capture to when the camera has acquired the
419last image. After this time, the camera has finished its acquisition and you can move the robot,
420or capture with another camera with overlapping field of view. Acquisition Time is equal to the
421time it takes for the Camera::capture(settings) API function call to return.
422)description"
423 };
424
426 using ValueType = std::chrono::microseconds;
427
430 {
431 return { std::chrono::microseconds::min(), std::chrono::microseconds::max() };
432 }
433
435 AcquisitionTime() = default;
436
438 explicit constexpr AcquisitionTime(std::chrono::microseconds value)
439 : m_value{ value }
440 {}
441
443 std::chrono::microseconds value() const;
444
446 std::string toString() const;
447
449 bool operator==(const AcquisitionTime &other) const
450 {
451 return m_value == other.m_value;
452 }
453
455 bool operator!=(const AcquisitionTime &other) const
456 {
457 return m_value != other.m_value;
458 }
459
461 bool operator<(const AcquisitionTime &other) const
462 {
463 return m_value < other.m_value;
464 }
465
467 bool operator>(const AcquisitionTime &other) const
468 {
469 return m_value > other.m_value;
470 }
471
473 bool operator<=(const AcquisitionTime &other) const
474 {
475 return m_value <= other.m_value;
476 }
477
479 bool operator>=(const AcquisitionTime &other) const
480 {
481 return m_value >= other.m_value;
482 }
483
485 friend std::ostream &operator<<(std::ostream &stream, const AcquisitionTime &value)
486 {
487 return stream << value.toString();
488 }
489
490 private:
491 void setFromString(const std::string &value);
492
493 std::chrono::microseconds m_value{ -1 };
494
495 friend struct DataModel::Detail::Befriend<AcquisitionTime>;
496 };
497
502
503 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
505 {
506 public:
509
511 static constexpr const char *path{ "Metrics/CaptureTime" };
512
514 static constexpr const char *name{ "CaptureTime" };
515
517 static constexpr const char *description{
518 R"description(Capture Time is the duration from the start of the capture to when all of the data transfer and
519processing has completed. After this time the 3D point cloud and/or 2D color image is ready and
520available on the GPU memory, and can be copied to the system memory (RAM).
521)description"
522 };
523
525 using ValueType = std::chrono::microseconds;
526
529 {
530 return { std::chrono::microseconds::min(), std::chrono::microseconds::max() };
531 }
532
534 CaptureTime() = default;
535
537 explicit constexpr CaptureTime(std::chrono::microseconds value)
538 : m_value{ value }
539 {}
540
542 std::chrono::microseconds value() const;
543
545 std::string toString() const;
546
548 bool operator==(const CaptureTime &other) const
549 {
550 return m_value == other.m_value;
551 }
552
554 bool operator!=(const CaptureTime &other) const
555 {
556 return m_value != other.m_value;
557 }
558
560 bool operator<(const CaptureTime &other) const
561 {
562 return m_value < other.m_value;
563 }
564
566 bool operator>(const CaptureTime &other) const
567 {
568 return m_value > other.m_value;
569 }
570
572 bool operator<=(const CaptureTime &other) const
573 {
574 return m_value <= other.m_value;
575 }
576
578 bool operator>=(const CaptureTime &other) const
579 {
580 return m_value >= other.m_value;
581 }
582
584 friend std::ostream &operator<<(std::ostream &stream, const CaptureTime &value)
585 {
586 return stream << value.toString();
587 }
588
589 private:
590 void setFromString(const std::string &value);
591
592 std::chrono::microseconds m_value{ -1 };
593
594 friend struct DataModel::Detail::Befriend<CaptureTime>;
595 };
596
602
603 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
605 {
606 public:
609
611 static constexpr const char *path{ "Metrics/KernelComputeTime" };
612
614 static constexpr const char *name{ "KernelComputeTime" };
615
617 static constexpr const char *description{
618 R"description(Kernel Compute Time is the duration of the compute on the GPU. It is a subset of Capture Time. Kernel
619Compute Time depends on the capture settings and the compute power of the GPU. Note that Kernel Compute
620Time + Acquisition Time is not equal to Capture Time, as acquisition and processing operations can be
621performed in parallel.
622)description"
623 };
624
626 using ValueType = std::chrono::microseconds;
627
630 {
631 return { std::chrono::microseconds::min(), std::chrono::microseconds::max() };
632 }
633
635 KernelComputeTime() = default;
636
638 explicit constexpr KernelComputeTime(std::chrono::microseconds value)
639 : m_value{ value }
640 {}
641
643 std::chrono::microseconds value() const;
644
646 std::string toString() const;
647
649 bool operator==(const KernelComputeTime &other) const
650 {
651 return m_value == other.m_value;
652 }
653
655 bool operator!=(const KernelComputeTime &other) const
656 {
657 return m_value != other.m_value;
658 }
659
661 bool operator<(const KernelComputeTime &other) const
662 {
663 return m_value < other.m_value;
664 }
665
667 bool operator>(const KernelComputeTime &other) const
668 {
669 return m_value > other.m_value;
670 }
671
673 bool operator<=(const KernelComputeTime &other) const
674 {
675 return m_value <= other.m_value;
676 }
677
679 bool operator>=(const KernelComputeTime &other) const
680 {
681 return m_value >= other.m_value;
682 }
683
685 friend std::ostream &operator<<(std::ostream &stream, const KernelComputeTime &value)
686 {
687 return stream << value.toString();
688 }
689
690 private:
691 void setFromString(const std::string &value);
692
693 std::chrono::microseconds m_value{ -1 };
694
695 friend struct DataModel::Detail::Befriend<KernelComputeTime>;
696 };
697
714
715 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
717 {
718 public:
721
723 static constexpr const char *path{ "Metrics/ReprocessingTime" };
724
726 static constexpr const char *name{ "ReprocessingTime" };
727
729 static constexpr const char *description{
730 R"description(Reprocessing re-runs the entire processing pipeline (including filters, color balance etc.) on a
731previously acquired frame. Reprocessing is available in Zivid Studio for captures with Diagnostics Mode
732enabled. The ReprocessingTime field is only set if this frame was reprocessed after it was initially
733captured, otherwise it will be unset.
734
735Reprocessing Time is the duration from the start of the reprocessing action and until all processing
736of the new frame has finished. After this time the 3D point cloud and/or 2D color image is ready and
737available on the GPU memory and can be copied to the system memory (RAM).
738
739Reprocessing Time depends on the processing settings that are enabled, which capture engine that was
740used, the pixel sampling setting and the number of acquisitions used. Reprocessing Time also depends on
741the compute power of the compute device.
742
743Note that for a frame that has been re-processed, the Acquisition Time and Capture Time refers to
744the originally captured frame. Only Reprocessing Time is updated in a reprocessed frame.
745)description"
746 };
747
749 using ValueType = std::chrono::microseconds;
750
753 {
754 return { std::chrono::microseconds::min(), std::chrono::microseconds::max() };
755 }
756
758 ReprocessingTime() = default;
759
761 explicit constexpr ReprocessingTime(std::chrono::microseconds value)
762 : m_opt{ value }
763 {}
764
769 std::chrono::microseconds value() const;
770
772 bool hasValue() const;
773
775 void reset();
776
778 std::string toString() const;
779
781 bool operator==(const ReprocessingTime &other) const
782 {
783 return m_opt == other.m_opt;
784 }
785
787 bool operator!=(const ReprocessingTime &other) const
788 {
789 return m_opt != other.m_opt;
790 }
791
793 bool operator<(const ReprocessingTime &other) const
794 {
795 return m_opt < other.m_opt;
796 }
797
799 bool operator>(const ReprocessingTime &other) const
800 {
801 return m_opt > other.m_opt;
802 }
803
805 bool operator<=(const ReprocessingTime &other) const
806 {
807 return m_opt <= other.m_opt;
808 }
809
811 bool operator>=(const ReprocessingTime &other) const
812 {
813 return m_opt >= other.m_opt;
814 }
815
817 friend std::ostream &operator<<(std::ostream &stream, const ReprocessingTime &value)
818 {
819 return stream << value.toString();
820 }
821
822 private:
823 void setFromString(const std::string &value);
824
825 std::optional<std::chrono::microseconds> m_opt;
826
827 friend struct DataModel::Detail::Befriend<ReprocessingTime>;
828 };
829
837
838 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
840 {
841 public:
844
846 static constexpr const char *path{ "Metrics/ThrottlingTime" };
847
849 static constexpr const char *name{ "ThrottlingTime" };
850
852 static constexpr const char *description{
853 R"description(Throttling Time is the duration that the capture was paused due to thermal or other constraints on the
854camera's components while it was capturing this frame. This duration is part of the overall Acquisition
855Time. If the camera throttled during a capture, it will result in a longer Acquisition Time.
856
857Whether or not the camera will throttle depends on the ambient temperature, the capture settings, and
858the how frequently the camera is capturing.
859)description"
860 };
861
863 using ValueType = std::chrono::microseconds;
864
867 {
868 return { std::chrono::microseconds::min(), std::chrono::microseconds::max() };
869 }
870
872 ThrottlingTime() = default;
873
875 explicit constexpr ThrottlingTime(std::chrono::microseconds value)
876 : m_value{ value }
877 {}
878
880 std::chrono::microseconds value() const;
881
883 std::string toString() const;
884
886 bool operator==(const ThrottlingTime &other) const
887 {
888 return m_value == other.m_value;
889 }
890
892 bool operator!=(const ThrottlingTime &other) const
893 {
894 return m_value != other.m_value;
895 }
896
898 bool operator<(const ThrottlingTime &other) const
899 {
900 return m_value < other.m_value;
901 }
902
904 bool operator>(const ThrottlingTime &other) const
905 {
906 return m_value > other.m_value;
907 }
908
910 bool operator<=(const ThrottlingTime &other) const
911 {
912 return m_value <= other.m_value;
913 }
914
916 bool operator>=(const ThrottlingTime &other) const
917 {
918 return m_value >= other.m_value;
919 }
920
922 friend std::ostream &operator<<(std::ostream &stream, const ThrottlingTime &value)
923 {
924 return stream << value.toString();
925 }
926
927 private:
928 void setFromString(const std::string &value);
929
930 std::chrono::microseconds m_value{ -1 };
931
932 friend struct DataModel::Detail::Befriend<ThrottlingTime>;
933 };
934
935 using Descendants = std::tuple<
941
944
960#ifndef NO_DOC
961 template<
962 typename... Args,
963 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
964 typename std::enable_if<
965 Zivid::Detail::TypeTraits::AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::
966 value,
967 int>::type = 0>
968#else
969 template<typename... Args>
970#endif
971 explicit Metrics(Args &&...args)
972 {
973 using namespace Zivid::Detail::TypeTraits;
974
975 static_assert(
976 AllArgsDecayedAreUnique<Args...>::value,
977 "Found duplicate types among the arguments passed to Metrics(...). "
978 "Types should be listed at most once.");
979
980 set(std::forward<Args>(args)...);
981 }
982
997#ifndef NO_DOC
998 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
999#else
1000 template<typename... Args>
1001#endif
1002 void set(Args &&...args)
1003 {
1004 using namespace Zivid::Detail::TypeTraits;
1005
1006 using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
1007 static_assert(
1008 AllArgsAreDescendantNodes::value, "All arguments passed to set(...) must be descendant nodes.");
1009
1010 static_assert(
1011 AllArgsDecayedAreUnique<Args...>::value,
1012 "Found duplicate types among the arguments passed to set(...). "
1013 "Types should be listed at most once.");
1014
1015 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
1016 }
1017
1033#ifndef NO_DOC
1034 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
1035#else
1036 template<typename... Args>
1037#endif
1038 Metrics copyWith(Args &&...args) const
1039 {
1040 using namespace Zivid::Detail::TypeTraits;
1041
1042 using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
1043 static_assert(
1044 AllArgsAreDescendantNodes::value,
1045 "All arguments passed to copyWith(...) must be descendant nodes.");
1046
1047 static_assert(
1048 AllArgsDecayedAreUnique<Args...>::value,
1049 "Found duplicate types among the arguments passed to copyWith(...). "
1050 "Types should be listed at most once.");
1051
1052 auto copy{ *this };
1053 copy.set(std::forward<Args>(args)...);
1054 return copy;
1055 }
1056
1059 {
1060 return m_acquisitionTime;
1061 }
1062
1065 {
1066 return m_acquisitionTime;
1067 }
1068
1071 {
1072 m_acquisitionTime = value;
1073 return *this;
1074 }
1075
1078 {
1079 return m_captureTime;
1080 }
1081
1084 {
1085 return m_captureTime;
1086 }
1087
1089 Metrics &set(const CaptureTime &value)
1090 {
1091 m_captureTime = value;
1092 return *this;
1093 }
1094
1097 {
1098 return m_kernelComputeTime;
1099 }
1100
1103 {
1104 return m_kernelComputeTime;
1105 }
1106
1109 {
1110 m_kernelComputeTime = value;
1111 return *this;
1112 }
1113
1116 {
1117 return m_reprocessingTime;
1118 }
1119
1122 {
1123 return m_reprocessingTime;
1124 }
1125
1128 {
1129 m_reprocessingTime = value;
1130 return *this;
1131 }
1132
1135 {
1136 return m_throttlingTime;
1137 }
1138
1141 {
1142 return m_throttlingTime;
1143 }
1144
1147 {
1148 m_throttlingTime = value;
1149 return *this;
1150 }
1151
1152 template<
1153 typename T,
1154 typename std::enable_if<std::is_same<T, FrameInfo::Metrics::AcquisitionTime>::value, int>::type = 0>
1156 {
1157 return m_acquisitionTime;
1158 }
1159
1160 template<
1161 typename T,
1162 typename std::enable_if<std::is_same<T, FrameInfo::Metrics::CaptureTime>::value, int>::type = 0>
1164 {
1165 return m_captureTime;
1166 }
1167
1168 template<
1169 typename T,
1170 typename std::enable_if<std::is_same<T, FrameInfo::Metrics::KernelComputeTime>::value, int>::type = 0>
1172 {
1173 return m_kernelComputeTime;
1174 }
1175
1176 template<
1177 typename T,
1178 typename std::enable_if<std::is_same<T, FrameInfo::Metrics::ReprocessingTime>::value, int>::type = 0>
1180 {
1181 return m_reprocessingTime;
1182 }
1183
1184 template<
1185 typename T,
1186 typename std::enable_if<std::is_same<T, FrameInfo::Metrics::ThrottlingTime>::value, int>::type = 0>
1188 {
1189 return m_throttlingTime;
1190 }
1191
1192 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
1194 {
1195 return m_acquisitionTime;
1196 }
1197
1198 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
1200 {
1201 return m_captureTime;
1202 }
1203
1204 template<size_t i, typename std::enable_if<i == 2, int>::type = 0>
1206 {
1207 return m_kernelComputeTime;
1208 }
1209
1210 template<size_t i, typename std::enable_if<i == 3, int>::type = 0>
1212 {
1213 return m_reprocessingTime;
1214 }
1215
1216 template<size_t i, typename std::enable_if<i == 4, int>::type = 0>
1218 {
1219 return m_throttlingTime;
1220 }
1221
1223 template<typename F>
1224 void forEach(const F &f) const
1225 {
1226 f(m_acquisitionTime);
1227 f(m_captureTime);
1228 f(m_kernelComputeTime);
1229 f(m_reprocessingTime);
1230 f(m_throttlingTime);
1231 }
1232
1234 template<typename F>
1235 void forEach(const F &f)
1236 {
1237 f(m_acquisitionTime);
1238 f(m_captureTime);
1239 f(m_kernelComputeTime);
1240 f(m_reprocessingTime);
1241 f(m_throttlingTime);
1242 }
1243
1245 bool operator==(const Metrics &other) const;
1246
1248 bool operator!=(const Metrics &other) const;
1249
1251 std::string toString() const;
1252
1254 friend std::ostream &operator<<(std::ostream &stream, const Metrics &value)
1255 {
1256 return stream << value.toString();
1257 }
1258
1259 private:
1260 void setFromString(const std::string &value);
1261
1262 void setFromString(const std::string &fullPath, const std::string &value);
1263
1264 std::string getString(const std::string &fullPath) const;
1265
1266 AcquisitionTime m_acquisitionTime;
1267 CaptureTime m_captureTime;
1268 KernelComputeTime m_kernelComputeTime;
1269 ReprocessingTime m_reprocessingTime;
1270 ThrottlingTime m_throttlingTime;
1271
1272 friend struct DataModel::Detail::Befriend<Metrics>;
1273 };
1274
1276
1277 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
1279 {
1280 public:
1283
1285 static constexpr const char *path{ "SoftwareVersion" };
1286
1288 static constexpr const char *name{ "SoftwareVersion" };
1289
1291 static constexpr const char *description{
1292 R"description(The version information for installed software at the time of image capture)description"
1293 };
1294
1296
1297 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
1299 {
1300 public:
1303
1305 static constexpr const char *path{ "SoftwareVersion/Core" };
1306
1308 static constexpr const char *name{ "Core" };
1309
1311 static constexpr const char *description{ R"description(Core version)description" };
1312
1314 using ValueType = std::string;
1315
1318 {
1319 return { 0, std::numeric_limits<ValueType::size_type>::max() };
1320 }
1321
1323 Core() = default;
1324
1326 explicit Core(std::string value)
1327 : m_value{ std::move(value) }
1328 {}
1329
1331 const std::string &value() const;
1332
1334 std::string toString() const;
1335
1337 bool operator==(const Core &other) const
1338 {
1339 return m_value == other.m_value;
1340 }
1341
1343 bool operator!=(const Core &other) const
1344 {
1345 return m_value != other.m_value;
1346 }
1347
1349 bool operator<(const Core &other) const
1350 {
1351 return m_value < other.m_value;
1352 }
1353
1355 bool operator>(const Core &other) const
1356 {
1357 return m_value > other.m_value;
1358 }
1359
1361 bool operator<=(const Core &other) const
1362 {
1363 return m_value <= other.m_value;
1364 }
1365
1367 bool operator>=(const Core &other) const
1368 {
1369 return m_value >= other.m_value;
1370 }
1371
1373 friend std::ostream &operator<<(std::ostream &stream, const Core &value)
1374 {
1375 return stream << value.toString();
1376 }
1377
1378 private:
1379 void setFromString(const std::string &value);
1380
1381 std::string m_value{ "No-version" };
1382
1383 friend struct DataModel::Detail::Befriend<Core>;
1384 };
1385
1386 using Descendants = std::tuple<FrameInfo::SoftwareVersion::Core>;
1387
1390
1402#ifndef NO_DOC
1403 template<
1404 typename... Args,
1405 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
1406 typename std::enable_if<
1407 Zivid::Detail::TypeTraits::AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::
1408 value,
1409 int>::type = 0>
1410#else
1411 template<typename... Args>
1412#endif
1413 explicit SoftwareVersion(Args &&...args)
1414 {
1415 using namespace Zivid::Detail::TypeTraits;
1416
1417 static_assert(
1418 AllArgsDecayedAreUnique<Args...>::value,
1419 "Found duplicate types among the arguments passed to SoftwareVersion(...). "
1420 "Types should be listed at most once.");
1421
1422 set(std::forward<Args>(args)...);
1423 }
1424
1435#ifndef NO_DOC
1436 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
1437#else
1438 template<typename... Args>
1439#endif
1440 void set(Args &&...args)
1441 {
1442 using namespace Zivid::Detail::TypeTraits;
1443
1444 using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
1445 static_assert(
1446 AllArgsAreDescendantNodes::value, "All arguments passed to set(...) must be descendant nodes.");
1447
1448 static_assert(
1449 AllArgsDecayedAreUnique<Args...>::value,
1450 "Found duplicate types among the arguments passed to set(...). "
1451 "Types should be listed at most once.");
1452
1453 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
1454 }
1455
1467#ifndef NO_DOC
1468 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
1469#else
1470 template<typename... Args>
1471#endif
1472 SoftwareVersion copyWith(Args &&...args) const
1473 {
1474 using namespace Zivid::Detail::TypeTraits;
1475
1476 using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
1477 static_assert(
1478 AllArgsAreDescendantNodes::value,
1479 "All arguments passed to copyWith(...) must be descendant nodes.");
1480
1481 static_assert(
1482 AllArgsDecayedAreUnique<Args...>::value,
1483 "Found duplicate types among the arguments passed to copyWith(...). "
1484 "Types should be listed at most once.");
1485
1486 auto copy{ *this };
1487 copy.set(std::forward<Args>(args)...);
1488 return copy;
1489 }
1490
1492 const Core &core() const
1493 {
1494 return m_core;
1495 }
1496
1499 {
1500 return m_core;
1501 }
1502
1504 SoftwareVersion &set(const Core &value)
1505 {
1506 m_core = value;
1507 return *this;
1508 }
1509
1510 template<
1511 typename T,
1512 typename std::enable_if<std::is_same<T, FrameInfo::SoftwareVersion::Core>::value, int>::type = 0>
1514 {
1515 return m_core;
1516 }
1517
1518 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
1520 {
1521 return m_core;
1522 }
1523
1525 template<typename F>
1526 void forEach(const F &f) const
1527 {
1528 f(m_core);
1529 }
1530
1532 template<typename F>
1533 void forEach(const F &f)
1534 {
1535 f(m_core);
1536 }
1537
1539 bool operator==(const SoftwareVersion &other) const;
1540
1542 bool operator!=(const SoftwareVersion &other) const;
1543
1545 std::string toString() const;
1546
1548 friend std::ostream &operator<<(std::ostream &stream, const SoftwareVersion &value)
1549 {
1550 return stream << value.toString();
1551 }
1552
1553 private:
1554 void setFromString(const std::string &value);
1555
1556 void setFromString(const std::string &fullPath, const std::string &value);
1557
1558 std::string getString(const std::string &fullPath) const;
1559
1560 Core m_core;
1561
1562 friend struct DataModel::Detail::Befriend<SoftwareVersion>;
1563 };
1564
1566
1567 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
1569 {
1570 public:
1573
1575 static constexpr const char *path{ "SystemInfo" };
1576
1578 static constexpr const char *name{ "SystemInfo" };
1579
1581 static constexpr const char *description{
1582 R"description(Information about the system that captured this frame)description"
1583 };
1584
1586
1587 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
1589 {
1590 public:
1593
1595 static constexpr const char *path{ "SystemInfo/CPU" };
1596
1598 static constexpr const char *name{ "CPU" };
1599
1601 static constexpr const char *description{ R"description(CPU)description" };
1602
1604
1605 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
1607 {
1608 public:
1611
1613 static constexpr const char *path{ "SystemInfo/CPU/Model" };
1614
1616 static constexpr const char *name{ "Model" };
1617
1619 static constexpr const char *description{ R"description(CPU model)description" };
1620
1622 using ValueType = std::string;
1623
1626 {
1627 return { 0, std::numeric_limits<ValueType::size_type>::max() };
1628 }
1629
1631 Model() = default;
1632
1634 explicit Model(std::string value)
1635 : m_value{ std::move(value) }
1636 {}
1637
1639 const std::string &value() const;
1640
1642 std::string toString() const;
1643
1645 bool operator==(const Model &other) const
1646 {
1647 return m_value == other.m_value;
1648 }
1649
1651 bool operator!=(const Model &other) const
1652 {
1653 return m_value != other.m_value;
1654 }
1655
1657 bool operator<(const Model &other) const
1658 {
1659 return m_value < other.m_value;
1660 }
1661
1663 bool operator>(const Model &other) const
1664 {
1665 return m_value > other.m_value;
1666 }
1667
1669 bool operator<=(const Model &other) const
1670 {
1671 return m_value <= other.m_value;
1672 }
1673
1675 bool operator>=(const Model &other) const
1676 {
1677 return m_value >= other.m_value;
1678 }
1679
1681 friend std::ostream &operator<<(std::ostream &stream, const Model &value)
1682 {
1683 return stream << value.toString();
1684 }
1685
1686 private:
1687 void setFromString(const std::string &value);
1688
1689 std::string m_value{};
1690
1691 friend struct DataModel::Detail::Befriend<Model>;
1692 };
1693
1694 using Descendants = std::tuple<FrameInfo::SystemInfo::CPU::Model>;
1695
1698
1710#ifndef NO_DOC
1711 template<
1712 typename... Args,
1713 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
1714 typename std::enable_if<
1715 Zivid::Detail::TypeTraits::AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::
1716 value,
1717 int>::type = 0>
1718#else
1719 template<typename... Args>
1720#endif
1721 explicit CPU(Args &&...args)
1722 {
1723 using namespace Zivid::Detail::TypeTraits;
1724
1725 static_assert(
1726 AllArgsDecayedAreUnique<Args...>::value,
1727 "Found duplicate types among the arguments passed to CPU(...). "
1728 "Types should be listed at most once.");
1729
1730 set(std::forward<Args>(args)...);
1731 }
1732
1743#ifndef NO_DOC
1744 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
1745#else
1746 template<typename... Args>
1747#endif
1748 void set(Args &&...args)
1749 {
1750 using namespace Zivid::Detail::TypeTraits;
1751
1752 using AllArgsAreDescendantNodes =
1753 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
1754 static_assert(
1755 AllArgsAreDescendantNodes::value, "All arguments passed to set(...) must be descendant nodes.");
1756
1757 static_assert(
1758 AllArgsDecayedAreUnique<Args...>::value,
1759 "Found duplicate types among the arguments passed to set(...). "
1760 "Types should be listed at most once.");
1761
1762 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
1763 }
1764
1776#ifndef NO_DOC
1777 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
1778#else
1779 template<typename... Args>
1780#endif
1781 CPU copyWith(Args &&...args) const
1782 {
1783 using namespace Zivid::Detail::TypeTraits;
1784
1785 using AllArgsAreDescendantNodes =
1786 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
1787 static_assert(
1788 AllArgsAreDescendantNodes::value,
1789 "All arguments passed to copyWith(...) must be descendant nodes.");
1790
1791 static_assert(
1792 AllArgsDecayedAreUnique<Args...>::value,
1793 "Found duplicate types among the arguments passed to copyWith(...). "
1794 "Types should be listed at most once.");
1795
1796 auto copy{ *this };
1797 copy.set(std::forward<Args>(args)...);
1798 return copy;
1799 }
1800
1802 const Model &model() const
1803 {
1804 return m_model;
1805 }
1806
1809 {
1810 return m_model;
1811 }
1812
1814 CPU &set(const Model &value)
1815 {
1816 m_model = value;
1817 return *this;
1818 }
1819
1820 template<
1821 typename T,
1822 typename std::enable_if<std::is_same<T, FrameInfo::SystemInfo::CPU::Model>::value, int>::type = 0>
1824 {
1825 return m_model;
1826 }
1827
1828 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
1830 {
1831 return m_model;
1832 }
1833
1835 template<typename F>
1836 void forEach(const F &f) const
1837 {
1838 f(m_model);
1839 }
1840
1842 template<typename F>
1843 void forEach(const F &f)
1844 {
1845 f(m_model);
1846 }
1847
1849 bool operator==(const CPU &other) const;
1850
1852 bool operator!=(const CPU &other) const;
1853
1855 std::string toString() const;
1856
1858 friend std::ostream &operator<<(std::ostream &stream, const CPU &value)
1859 {
1860 return stream << value.toString();
1861 }
1862
1863 private:
1864 void setFromString(const std::string &value);
1865
1866 void setFromString(const std::string &fullPath, const std::string &value);
1867
1868 std::string getString(const std::string &fullPath) const;
1869
1870 Model m_model;
1871
1872 friend struct DataModel::Detail::Befriend<CPU>;
1873 };
1874
1876
1877 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
1879 {
1880 public:
1883
1885 static constexpr const char *path{ "SystemInfo/ComputeDevice" };
1886
1888 static constexpr const char *name{ "ComputeDevice" };
1889
1891 static constexpr const char *description{ R"description(Compute device)description" };
1892
1894
1895 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
1897 {
1898 public:
1901
1903 static constexpr const char *path{ "SystemInfo/ComputeDevice/Model" };
1904
1906 static constexpr const char *name{ "Model" };
1907
1909 static constexpr const char *description{ R"description(Compute device model)description" };
1910
1912 using ValueType = std::string;
1913
1916 {
1917 return { 0, std::numeric_limits<ValueType::size_type>::max() };
1918 }
1919
1921 Model() = default;
1922
1924 explicit Model(std::string value)
1925 : m_value{ std::move(value) }
1926 {}
1927
1929 const std::string &value() const;
1930
1932 std::string toString() const;
1933
1935 bool operator==(const Model &other) const
1936 {
1937 return m_value == other.m_value;
1938 }
1939
1941 bool operator!=(const Model &other) const
1942 {
1943 return m_value != other.m_value;
1944 }
1945
1947 bool operator<(const Model &other) const
1948 {
1949 return m_value < other.m_value;
1950 }
1951
1953 bool operator>(const Model &other) const
1954 {
1955 return m_value > other.m_value;
1956 }
1957
1959 bool operator<=(const Model &other) const
1960 {
1961 return m_value <= other.m_value;
1962 }
1963
1965 bool operator>=(const Model &other) const
1966 {
1967 return m_value >= other.m_value;
1968 }
1969
1971 friend std::ostream &operator<<(std::ostream &stream, const Model &value)
1972 {
1973 return stream << value.toString();
1974 }
1975
1976 private:
1977 void setFromString(const std::string &value);
1978
1979 std::string m_value{};
1980
1981 friend struct DataModel::Detail::Befriend<Model>;
1982 };
1983
1985
1986 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
1988 {
1989 public:
1992
1994 static constexpr const char *path{ "SystemInfo/ComputeDevice/Vendor" };
1995
1997 static constexpr const char *name{ "Vendor" };
1998
2000 static constexpr const char *description{ R"description(Compute device vendor)description" };
2001
2003 using ValueType = std::string;
2004
2007 {
2008 return { 0, std::numeric_limits<ValueType::size_type>::max() };
2009 }
2010
2012 Vendor() = default;
2013
2015 explicit Vendor(std::string value)
2016 : m_value{ std::move(value) }
2017 {}
2018
2020 const std::string &value() const;
2021
2023 std::string toString() const;
2024
2026 bool operator==(const Vendor &other) const
2027 {
2028 return m_value == other.m_value;
2029 }
2030
2032 bool operator!=(const Vendor &other) const
2033 {
2034 return m_value != other.m_value;
2035 }
2036
2038 bool operator<(const Vendor &other) const
2039 {
2040 return m_value < other.m_value;
2041 }
2042
2044 bool operator>(const Vendor &other) const
2045 {
2046 return m_value > other.m_value;
2047 }
2048
2050 bool operator<=(const Vendor &other) const
2051 {
2052 return m_value <= other.m_value;
2053 }
2054
2056 bool operator>=(const Vendor &other) const
2057 {
2058 return m_value >= other.m_value;
2059 }
2060
2062 friend std::ostream &operator<<(std::ostream &stream, const Vendor &value)
2063 {
2064 return stream << value.toString();
2065 }
2066
2067 private:
2068 void setFromString(const std::string &value);
2069
2070 std::string m_value{};
2071
2072 friend struct DataModel::Detail::Befriend<Vendor>;
2073 };
2074
2075 using Descendants = std::
2076 tuple<FrameInfo::SystemInfo::ComputeDevice::Model, FrameInfo::SystemInfo::ComputeDevice::Vendor>;
2077
2080
2093#ifndef NO_DOC
2094 template<
2095 typename... Args,
2096 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
2097 typename std::enable_if<
2098 Zivid::Detail::TypeTraits::AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::
2099 value,
2100 int>::type = 0>
2101#else
2102 template<typename... Args>
2103#endif
2104 explicit ComputeDevice(Args &&...args)
2105 {
2106 using namespace Zivid::Detail::TypeTraits;
2107
2108 static_assert(
2109 AllArgsDecayedAreUnique<Args...>::value,
2110 "Found duplicate types among the arguments passed to ComputeDevice(...). "
2111 "Types should be listed at most once.");
2112
2113 set(std::forward<Args>(args)...);
2114 }
2115
2127#ifndef NO_DOC
2128 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
2129#else
2130 template<typename... Args>
2131#endif
2132 void set(Args &&...args)
2133 {
2134 using namespace Zivid::Detail::TypeTraits;
2135
2136 using AllArgsAreDescendantNodes =
2137 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
2138 static_assert(
2139 AllArgsAreDescendantNodes::value, "All arguments passed to set(...) must be descendant nodes.");
2140
2141 static_assert(
2142 AllArgsDecayedAreUnique<Args...>::value,
2143 "Found duplicate types among the arguments passed to set(...). "
2144 "Types should be listed at most once.");
2145
2146 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
2147 }
2148
2161#ifndef NO_DOC
2162 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
2163#else
2164 template<typename... Args>
2165#endif
2166 ComputeDevice copyWith(Args &&...args) const
2167 {
2168 using namespace Zivid::Detail::TypeTraits;
2169
2170 using AllArgsAreDescendantNodes =
2171 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
2172 static_assert(
2173 AllArgsAreDescendantNodes::value,
2174 "All arguments passed to copyWith(...) must be descendant nodes.");
2175
2176 static_assert(
2177 AllArgsDecayedAreUnique<Args...>::value,
2178 "Found duplicate types among the arguments passed to copyWith(...). "
2179 "Types should be listed at most once.");
2180
2181 auto copy{ *this };
2182 copy.set(std::forward<Args>(args)...);
2183 return copy;
2184 }
2185
2187 const Model &model() const
2188 {
2189 return m_model;
2190 }
2191
2194 {
2195 return m_model;
2196 }
2197
2199 ComputeDevice &set(const Model &value)
2200 {
2201 m_model = value;
2202 return *this;
2203 }
2204
2206 const Vendor &vendor() const
2207 {
2208 return m_vendor;
2209 }
2210
2213 {
2214 return m_vendor;
2215 }
2216
2218 ComputeDevice &set(const Vendor &value)
2219 {
2220 m_vendor = value;
2221 return *this;
2222 }
2223
2224 template<
2225 typename T,
2226 typename std::enable_if<std::is_same<T, FrameInfo::SystemInfo::ComputeDevice::Model>::value, int>::
2227 type = 0>
2229 {
2230 return m_model;
2231 }
2232
2233 template<
2234 typename T,
2235 typename std::enable_if<std::is_same<T, FrameInfo::SystemInfo::ComputeDevice::Vendor>::value, int>::
2236 type = 0>
2238 {
2239 return m_vendor;
2240 }
2241
2242 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
2244 {
2245 return m_model;
2246 }
2247
2248 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
2250 {
2251 return m_vendor;
2252 }
2253
2255 template<typename F>
2256 void forEach(const F &f) const
2257 {
2258 f(m_model);
2259 f(m_vendor);
2260 }
2261
2263 template<typename F>
2264 void forEach(const F &f)
2265 {
2266 f(m_model);
2267 f(m_vendor);
2268 }
2269
2271 bool operator==(const ComputeDevice &other) const;
2272
2274 bool operator!=(const ComputeDevice &other) const;
2275
2277 std::string toString() const;
2278
2280 friend std::ostream &operator<<(std::ostream &stream, const ComputeDevice &value)
2281 {
2282 return stream << value.toString();
2283 }
2284
2285 private:
2286 void setFromString(const std::string &value);
2287
2288 void setFromString(const std::string &fullPath, const std::string &value);
2289
2290 std::string getString(const std::string &fullPath) const;
2291
2292 Model m_model;
2293 Vendor m_vendor;
2294
2295 friend struct DataModel::Detail::Befriend<ComputeDevice>;
2296 };
2297
2299
2300 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
2302 {
2303 public:
2306
2308 static constexpr const char *path{ "SystemInfo/OperatingSystem" };
2309
2311 static constexpr const char *name{ "OperatingSystem" };
2312
2314 static constexpr const char *description{ R"description(Operating system)description" };
2315
2317 using ValueType = std::string;
2318
2321 {
2322 return { 0, std::numeric_limits<ValueType::size_type>::max() };
2323 }
2324
2326 OperatingSystem() = default;
2327
2329 explicit OperatingSystem(std::string value)
2330 : m_value{ std::move(value) }
2331 {}
2332
2334 const std::string &value() const;
2335
2337 std::string toString() const;
2338
2340 bool operator==(const OperatingSystem &other) const
2341 {
2342 return m_value == other.m_value;
2343 }
2344
2346 bool operator!=(const OperatingSystem &other) const
2347 {
2348 return m_value != other.m_value;
2349 }
2350
2352 bool operator<(const OperatingSystem &other) const
2353 {
2354 return m_value < other.m_value;
2355 }
2356
2358 bool operator>(const OperatingSystem &other) const
2359 {
2360 return m_value > other.m_value;
2361 }
2362
2364 bool operator<=(const OperatingSystem &other) const
2365 {
2366 return m_value <= other.m_value;
2367 }
2368
2370 bool operator>=(const OperatingSystem &other) const
2371 {
2372 return m_value >= other.m_value;
2373 }
2374
2376 friend std::ostream &operator<<(std::ostream &stream, const OperatingSystem &value)
2377 {
2378 return stream << value.toString();
2379 }
2380
2381 private:
2382 void setFromString(const std::string &value);
2383
2384 std::string m_value{};
2385
2386 friend struct DataModel::Detail::Befriend<OperatingSystem>;
2387 };
2388
2389 using Descendants = std::tuple<
2396
2399
2416#ifndef NO_DOC
2417 template<
2418 typename... Args,
2419 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
2420 typename std::enable_if<
2421 Zivid::Detail::TypeTraits::AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::
2422 value,
2423 int>::type = 0>
2424#else
2425 template<typename... Args>
2426#endif
2427 explicit SystemInfo(Args &&...args)
2428 {
2429 using namespace Zivid::Detail::TypeTraits;
2430
2431 static_assert(
2432 AllArgsDecayedAreUnique<Args...>::value,
2433 "Found duplicate types among the arguments passed to SystemInfo(...). "
2434 "Types should be listed at most once.");
2435
2436 set(std::forward<Args>(args)...);
2437 }
2438
2454#ifndef NO_DOC
2455 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
2456#else
2457 template<typename... Args>
2458#endif
2459 void set(Args &&...args)
2460 {
2461 using namespace Zivid::Detail::TypeTraits;
2462
2463 using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
2464 static_assert(
2465 AllArgsAreDescendantNodes::value, "All arguments passed to set(...) must be descendant nodes.");
2466
2467 static_assert(
2468 AllArgsDecayedAreUnique<Args...>::value,
2469 "Found duplicate types among the arguments passed to set(...). "
2470 "Types should be listed at most once.");
2471
2472 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
2473 }
2474
2491#ifndef NO_DOC
2492 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
2493#else
2494 template<typename... Args>
2495#endif
2496 SystemInfo copyWith(Args &&...args) const
2497 {
2498 using namespace Zivid::Detail::TypeTraits;
2499
2500 using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
2501 static_assert(
2502 AllArgsAreDescendantNodes::value,
2503 "All arguments passed to copyWith(...) must be descendant nodes.");
2504
2505 static_assert(
2506 AllArgsDecayedAreUnique<Args...>::value,
2507 "Found duplicate types among the arguments passed to copyWith(...). "
2508 "Types should be listed at most once.");
2509
2510 auto copy{ *this };
2511 copy.set(std::forward<Args>(args)...);
2512 return copy;
2513 }
2514
2516 const CPU &cpu() const
2517 {
2518 return m_cpu;
2519 }
2520
2523 {
2524 return m_cpu;
2525 }
2526
2528 SystemInfo &set(const CPU &value)
2529 {
2530 m_cpu = value;
2531 return *this;
2532 }
2533
2536 {
2537 m_cpu.set(value);
2538 return *this;
2539 }
2540
2543 {
2544 return m_computeDevice;
2545 }
2546
2549 {
2550 return m_computeDevice;
2551 }
2552
2555 {
2556 m_computeDevice = value;
2557 return *this;
2558 }
2559
2562 {
2563 m_computeDevice.set(value);
2564 return *this;
2565 }
2566
2569 {
2570 m_computeDevice.set(value);
2571 return *this;
2572 }
2573
2576 {
2577 return m_operatingSystem;
2578 }
2579
2582 {
2583 return m_operatingSystem;
2584 }
2585
2588 {
2589 m_operatingSystem = value;
2590 return *this;
2591 }
2592
2593 template<
2594 typename T,
2595 typename std::enable_if<std::is_same<T, FrameInfo::SystemInfo::CPU>::value, int>::type = 0>
2597 {
2598 return m_cpu;
2599 }
2600
2601 template<
2602 typename T,
2603 typename std::enable_if<std::is_same<T, FrameInfo::SystemInfo::CPU::Model>::value, int>::type = 0>
2605 {
2606 return m_cpu.get<FrameInfo::SystemInfo::CPU::Model>();
2607 }
2608
2609 template<
2610 typename T,
2611 typename std::enable_if<std::is_same<T, FrameInfo::SystemInfo::ComputeDevice>::value, int>::type = 0>
2613 {
2614 return m_computeDevice;
2615 }
2616
2617 template<
2618 typename T,
2619 typename std::enable_if<std::is_same<T, FrameInfo::SystemInfo::ComputeDevice::Model>::value, int>::
2620 type = 0>
2622 {
2623 return m_computeDevice.get<FrameInfo::SystemInfo::ComputeDevice::Model>();
2624 }
2625
2626 template<
2627 typename T,
2628 typename std::enable_if<std::is_same<T, FrameInfo::SystemInfo::ComputeDevice::Vendor>::value, int>::
2629 type = 0>
2631 {
2632 return m_computeDevice.get<FrameInfo::SystemInfo::ComputeDevice::Vendor>();
2633 }
2634
2635 template<
2636 typename T,
2637 typename std::enable_if<std::is_same<T, FrameInfo::SystemInfo::OperatingSystem>::value, int>::type = 0>
2639 {
2640 return m_operatingSystem;
2641 }
2642
2643 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
2645 {
2646 return m_cpu;
2647 }
2648
2649 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
2651 {
2652 return m_computeDevice;
2653 }
2654
2655 template<size_t i, typename std::enable_if<i == 2, int>::type = 0>
2657 {
2658 return m_operatingSystem;
2659 }
2660
2662 template<typename F>
2663 void forEach(const F &f) const
2664 {
2665 f(m_cpu);
2666 f(m_computeDevice);
2667 f(m_operatingSystem);
2668 }
2669
2671 template<typename F>
2672 void forEach(const F &f)
2673 {
2674 f(m_cpu);
2675 f(m_computeDevice);
2676 f(m_operatingSystem);
2677 }
2678
2680 bool operator==(const SystemInfo &other) const;
2681
2683 bool operator!=(const SystemInfo &other) const;
2684
2686 std::string toString() const;
2687
2689 friend std::ostream &operator<<(std::ostream &stream, const SystemInfo &value)
2690 {
2691 return stream << value.toString();
2692 }
2693
2694 private:
2695 void setFromString(const std::string &value);
2696
2697 void setFromString(const std::string &fullPath, const std::string &value);
2698
2699 std::string getString(const std::string &fullPath) const;
2700
2701 CPU m_cpu;
2702 ComputeDevice m_computeDevice;
2703 OperatingSystem m_operatingSystem;
2704
2705 friend struct DataModel::Detail::Befriend<SystemInfo>;
2706 };
2707
2709
2710 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
2712 {
2713 public:
2716
2718 static constexpr const char *path{ "TimeStamp" };
2719
2721 static constexpr const char *name{ "TimeStamp" };
2722
2724 static constexpr const char *description{ R"description(The time of frame capture)description" };
2725
2727 using ValueType = std::chrono::system_clock::time_point;
2728
2731 {
2732 return { std::chrono::system_clock::time_point::min(), std::chrono::system_clock::time_point::max() };
2733 }
2734
2736 TimeStamp() = default;
2737
2739 explicit constexpr TimeStamp(std::chrono::system_clock::time_point value)
2740 : m_value{ value }
2741 {}
2742
2744 std::chrono::system_clock::time_point value() const;
2745
2747 std::string toString() const;
2748
2750 bool operator==(const TimeStamp &other) const
2751 {
2752 return m_value == other.m_value;
2753 }
2754
2756 bool operator!=(const TimeStamp &other) const
2757 {
2758 return m_value != other.m_value;
2759 }
2760
2762 bool operator<(const TimeStamp &other) const
2763 {
2764 return m_value < other.m_value;
2765 }
2766
2768 bool operator>(const TimeStamp &other) const
2769 {
2770 return m_value > other.m_value;
2771 }
2772
2774 bool operator<=(const TimeStamp &other) const
2775 {
2776 return m_value <= other.m_value;
2777 }
2778
2780 bool operator>=(const TimeStamp &other) const
2781 {
2782 return m_value >= other.m_value;
2783 }
2784
2786 friend std::ostream &operator<<(std::ostream &stream, const TimeStamp &value)
2787 {
2788 return stream << value.toString();
2789 }
2790
2791 private:
2792 void setFromString(const std::string &value);
2793
2794 std::chrono::system_clock::time_point m_value{};
2795
2796 friend struct DataModel::Detail::Befriend<TimeStamp>;
2797 };
2798
2799 using Descendants = std::tuple<
2818
2821
2823 explicit FrameInfo(const std::string &fileName);
2824
2830 [[nodiscard]] static FrameInfo fromSerialized(const std::string &value);
2831
2837 std::string serialize() const;
2838
2867#ifndef NO_DOC
2868 template<
2869 typename... Args,
2870 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
2871 typename std::enable_if<
2872 Zivid::Detail::TypeTraits::AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::value,
2873 int>::type = 0>
2874#else
2875 template<typename... Args>
2876#endif
2877 explicit FrameInfo(Args &&...args)
2878 {
2879 using namespace Zivid::Detail::TypeTraits;
2880
2881 static_assert(
2882 AllArgsDecayedAreUnique<Args...>::value,
2883 "Found duplicate types among the arguments passed to FrameInfo(...). "
2884 "Types should be listed at most once.");
2885
2886 set(std::forward<Args>(args)...);
2887 }
2888
2916#ifndef NO_DOC
2917 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
2918#else
2919 template<typename... Args>
2920#endif
2921 void set(Args &&...args)
2922 {
2923 using namespace Zivid::Detail::TypeTraits;
2924
2925 using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
2926 static_assert(
2927 AllArgsAreDescendantNodes::value, "All arguments passed to set(...) must be descendant nodes.");
2928
2929 static_assert(
2930 AllArgsDecayedAreUnique<Args...>::value,
2931 "Found duplicate types among the arguments passed to set(...). "
2932 "Types should be listed at most once.");
2933
2934 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
2935 }
2936
2965#ifndef NO_DOC
2966 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
2967#else
2968 template<typename... Args>
2969#endif
2970 FrameInfo copyWith(Args &&...args) const
2971 {
2972 using namespace Zivid::Detail::TypeTraits;
2973
2974 using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
2975 static_assert(
2976 AllArgsAreDescendantNodes::value, "All arguments passed to copyWith(...) must be descendant nodes.");
2977
2978 static_assert(
2979 AllArgsDecayedAreUnique<Args...>::value,
2980 "Found duplicate types among the arguments passed to copyWith(...). "
2981 "Types should be listed at most once.");
2982
2983 auto copy{ *this };
2984 copy.set(std::forward<Args>(args)...);
2985 return copy;
2986 }
2987
2990 {
2991 return m_diagnostics;
2992 }
2993
2996 {
2997 return m_diagnostics;
2998 }
2999
3002 {
3003 m_diagnostics = value;
3004 return *this;
3005 }
3006
3009 {
3010 m_diagnostics.set(value);
3011 return *this;
3012 }
3013
3015 const Metrics &metrics() const
3016 {
3017 return m_metrics;
3018 }
3019
3022 {
3023 return m_metrics;
3024 }
3025
3027 FrameInfo &set(const Metrics &value)
3028 {
3029 m_metrics = value;
3030 return *this;
3031 }
3032
3035 {
3036 m_metrics.set(value);
3037 return *this;
3038 }
3039
3042 {
3043 m_metrics.set(value);
3044 return *this;
3045 }
3046
3049 {
3050 m_metrics.set(value);
3051 return *this;
3052 }
3053
3056 {
3057 m_metrics.set(value);
3058 return *this;
3059 }
3060
3063 {
3064 m_metrics.set(value);
3065 return *this;
3066 }
3067
3070 {
3071 return m_softwareVersion;
3072 }
3073
3076 {
3077 return m_softwareVersion;
3078 }
3079
3082 {
3083 m_softwareVersion = value;
3084 return *this;
3085 }
3086
3089 {
3090 m_softwareVersion.set(value);
3091 return *this;
3092 }
3093
3095 const SystemInfo &systemInfo() const
3096 {
3097 return m_systemInfo;
3098 }
3099
3102 {
3103 return m_systemInfo;
3104 }
3105
3107 FrameInfo &set(const SystemInfo &value)
3108 {
3109 m_systemInfo = value;
3110 return *this;
3111 }
3112
3115 {
3116 m_systemInfo.set(value);
3117 return *this;
3118 }
3119
3122 {
3123 m_systemInfo.set(value);
3124 return *this;
3125 }
3126
3129 {
3130 m_systemInfo.set(value);
3131 return *this;
3132 }
3133
3136 {
3137 m_systemInfo.set(value);
3138 return *this;
3139 }
3140
3143 {
3144 m_systemInfo.set(value);
3145 return *this;
3146 }
3147
3150 {
3151 m_systemInfo.set(value);
3152 return *this;
3153 }
3154
3156 const TimeStamp &timeStamp() const
3157 {
3158 return m_timeStamp;
3159 }
3160
3163 {
3164 return m_timeStamp;
3165 }
3166
3168 FrameInfo &set(const TimeStamp &value)
3169 {
3170 m_timeStamp = value;
3171 return *this;
3172 }
3173
3174 template<typename T, typename std::enable_if<std::is_same<T, FrameInfo::Diagnostics>::value, int>::type = 0>
3176 {
3177 return m_diagnostics;
3178 }
3179
3180 template<
3181 typename T,
3182 typename std::enable_if<std::is_same<T, FrameInfo::Diagnostics::PacketLoss>::value, int>::type = 0>
3184 {
3185 return m_diagnostics.get<FrameInfo::Diagnostics::PacketLoss>();
3186 }
3187
3188 template<typename T, typename std::enable_if<std::is_same<T, FrameInfo::Metrics>::value, int>::type = 0>
3190 {
3191 return m_metrics;
3192 }
3193
3194 template<
3195 typename T,
3196 typename std::enable_if<std::is_same<T, FrameInfo::Metrics::AcquisitionTime>::value, int>::type = 0>
3198 {
3199 return m_metrics.get<FrameInfo::Metrics::AcquisitionTime>();
3200 }
3201
3202 template<
3203 typename T,
3204 typename std::enable_if<std::is_same<T, FrameInfo::Metrics::CaptureTime>::value, int>::type = 0>
3206 {
3207 return m_metrics.get<FrameInfo::Metrics::CaptureTime>();
3208 }
3209
3210 template<
3211 typename T,
3212 typename std::enable_if<std::is_same<T, FrameInfo::Metrics::KernelComputeTime>::value, int>::type = 0>
3214 {
3215 return m_metrics.get<FrameInfo::Metrics::KernelComputeTime>();
3216 }
3217
3218 template<
3219 typename T,
3220 typename std::enable_if<std::is_same<T, FrameInfo::Metrics::ReprocessingTime>::value, int>::type = 0>
3222 {
3223 return m_metrics.get<FrameInfo::Metrics::ReprocessingTime>();
3224 }
3225
3226 template<
3227 typename T,
3228 typename std::enable_if<std::is_same<T, FrameInfo::Metrics::ThrottlingTime>::value, int>::type = 0>
3230 {
3231 return m_metrics.get<FrameInfo::Metrics::ThrottlingTime>();
3232 }
3233
3234 template<typename T, typename std::enable_if<std::is_same<T, FrameInfo::SoftwareVersion>::value, int>::type = 0>
3236 {
3237 return m_softwareVersion;
3238 }
3239
3240 template<
3241 typename T,
3242 typename std::enable_if<std::is_same<T, FrameInfo::SoftwareVersion::Core>::value, int>::type = 0>
3244 {
3245 return m_softwareVersion.get<FrameInfo::SoftwareVersion::Core>();
3246 }
3247
3248 template<typename T, typename std::enable_if<std::is_same<T, FrameInfo::SystemInfo>::value, int>::type = 0>
3250 {
3251 return m_systemInfo;
3252 }
3253
3254 template<typename T, typename std::enable_if<std::is_same<T, FrameInfo::SystemInfo::CPU>::value, int>::type = 0>
3256 {
3257 return m_systemInfo.get<FrameInfo::SystemInfo::CPU>();
3258 }
3259
3260 template<
3261 typename T,
3262 typename std::enable_if<std::is_same<T, FrameInfo::SystemInfo::CPU::Model>::value, int>::type = 0>
3264 {
3265 return m_systemInfo.get<FrameInfo::SystemInfo::CPU::Model>();
3266 }
3267
3268 template<
3269 typename T,
3270 typename std::enable_if<std::is_same<T, FrameInfo::SystemInfo::ComputeDevice>::value, int>::type = 0>
3272 {
3273 return m_systemInfo.get<FrameInfo::SystemInfo::ComputeDevice>();
3274 }
3275
3276 template<
3277 typename T,
3278 typename std::enable_if<std::is_same<T, FrameInfo::SystemInfo::ComputeDevice::Model>::value, int>::type = 0>
3280 {
3281 return m_systemInfo.get<FrameInfo::SystemInfo::ComputeDevice::Model>();
3282 }
3283
3284 template<
3285 typename T,
3286 typename std::enable_if<std::is_same<T, FrameInfo::SystemInfo::ComputeDevice::Vendor>::value, int>::type =
3287 0>
3289 {
3290 return m_systemInfo.get<FrameInfo::SystemInfo::ComputeDevice::Vendor>();
3291 }
3292
3293 template<
3294 typename T,
3295 typename std::enable_if<std::is_same<T, FrameInfo::SystemInfo::OperatingSystem>::value, int>::type = 0>
3297 {
3298 return m_systemInfo.get<FrameInfo::SystemInfo::OperatingSystem>();
3299 }
3300
3301 template<typename T, typename std::enable_if<std::is_same<T, FrameInfo::TimeStamp>::value, int>::type = 0>
3303 {
3304 return m_timeStamp;
3305 }
3306
3307 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
3309 {
3310 return m_diagnostics;
3311 }
3312
3313 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
3315 {
3316 return m_metrics;
3317 }
3318
3319 template<size_t i, typename std::enable_if<i == 2, int>::type = 0>
3321 {
3322 return m_softwareVersion;
3323 }
3324
3325 template<size_t i, typename std::enable_if<i == 3, int>::type = 0>
3327 {
3328 return m_systemInfo;
3329 }
3330
3331 template<size_t i, typename std::enable_if<i == 4, int>::type = 0>
3333 {
3334 return m_timeStamp;
3335 }
3336
3338 template<typename F>
3339 void forEach(const F &f) const
3340 {
3341 f(m_diagnostics);
3342 f(m_metrics);
3343 f(m_softwareVersion);
3344 f(m_systemInfo);
3345 f(m_timeStamp);
3346 }
3347
3349 template<typename F>
3350 void forEach(const F &f)
3351 {
3352 f(m_diagnostics);
3353 f(m_metrics);
3354 f(m_softwareVersion);
3355 f(m_systemInfo);
3356 f(m_timeStamp);
3357 }
3358
3360 bool operator==(const FrameInfo &other) const;
3361
3363 bool operator!=(const FrameInfo &other) const;
3364
3366 std::string toString() const;
3367
3369 friend std::ostream &operator<<(std::ostream &stream, const FrameInfo &value)
3370 {
3371 return stream << value.toString();
3372 }
3373
3375 void save(const std::string &fileName) const;
3376
3378 void load(const std::string &fileName);
3379
3380 private:
3381 void setFromString(const std::string &value);
3382
3383 void setFromString(const std::string &fullPath, const std::string &value);
3384
3385 std::string getString(const std::string &fullPath) const;
3386
3387 Diagnostics m_diagnostics;
3388 Metrics m_metrics;
3389 SoftwareVersion m_softwareVersion;
3390 SystemInfo m_systemInfo;
3391 TimeStamp m_timeStamp;
3392
3393 friend struct DataModel::Detail::Befriend<FrameInfo>;
3394 };
3395
3396#ifndef NO_DOC
3397 template<>
3398 struct FrameInfo::Version<8>
3399 {
3400 using Type = FrameInfo;
3401 };
3402#endif
3403
3404} // namespace Zivid
3405
3406#ifndef NO_DOC
3408namespace Zivid::Detail
3409{
3410
3411 ZIVID_CORE_EXPORT void save(const Zivid::FrameInfo &dataModel, std::ostream &ostream);
3412 ZIVID_CORE_EXPORT void load(Zivid::FrameInfo &dataModel, std::istream &istream);
3413
3414} // namespace Zivid::Detail
3415#endif
3416
3417#ifdef _MSC_VER
3418# pragma warning(pop)
3419#endif
3420
3421#ifndef NO_DOC
3422# if !(defined(_MSC_VER) && (_MSC_VER <= 1900))
3423namespace std // NOLINT
3424{
3425
3426 template<>
3427 struct tuple_size<Zivid::FrameInfo::Diagnostics> : integral_constant<size_t, 1>
3428 {};
3429
3430 template<size_t i>
3431 struct tuple_element<i, Zivid::FrameInfo::Diagnostics>
3432 {
3433 static_assert(i < tuple_size<Zivid::FrameInfo::Diagnostics>::value, "Index must be less than 1");
3434
3435 using type // NOLINT
3436 = decltype(declval<Zivid::FrameInfo::Diagnostics>().get<i>());
3437 };
3438
3439 template<>
3440 struct tuple_size<Zivid::FrameInfo::Metrics> : integral_constant<size_t, 5>
3441 {};
3442
3443 template<size_t i>
3444 struct tuple_element<i, Zivid::FrameInfo::Metrics>
3445 {
3446 static_assert(i < tuple_size<Zivid::FrameInfo::Metrics>::value, "Index must be less than 5");
3447
3448 using type // NOLINT
3449 = decltype(declval<Zivid::FrameInfo::Metrics>().get<i>());
3450 };
3451
3452 template<>
3453 struct tuple_size<Zivid::FrameInfo::SoftwareVersion> : integral_constant<size_t, 1>
3454 {};
3455
3456 template<size_t i>
3457 struct tuple_element<i, Zivid::FrameInfo::SoftwareVersion>
3458 {
3459 static_assert(i < tuple_size<Zivid::FrameInfo::SoftwareVersion>::value, "Index must be less than 1");
3460
3461 using type // NOLINT
3462 = decltype(declval<Zivid::FrameInfo::SoftwareVersion>().get<i>());
3463 };
3464
3465 template<>
3466 struct tuple_size<Zivid::FrameInfo::SystemInfo> : integral_constant<size_t, 3>
3467 {};
3468
3469 template<size_t i>
3470 struct tuple_element<i, Zivid::FrameInfo::SystemInfo>
3471 {
3472 static_assert(i < tuple_size<Zivid::FrameInfo::SystemInfo>::value, "Index must be less than 3");
3473
3474 using type // NOLINT
3475 = decltype(declval<Zivid::FrameInfo::SystemInfo>().get<i>());
3476 };
3477
3478 template<>
3479 struct tuple_size<Zivid::FrameInfo::SystemInfo::CPU> : integral_constant<size_t, 1>
3480 {};
3481
3482 template<size_t i>
3483 struct tuple_element<i, Zivid::FrameInfo::SystemInfo::CPU>
3484 {
3485 static_assert(i < tuple_size<Zivid::FrameInfo::SystemInfo::CPU>::value, "Index must be less than 1");
3486
3487 using type // NOLINT
3488 = decltype(declval<Zivid::FrameInfo::SystemInfo::CPU>().get<i>());
3489 };
3490
3491 template<>
3492 struct tuple_size<Zivid::FrameInfo::SystemInfo::ComputeDevice> : integral_constant<size_t, 2>
3493 {};
3494
3495 template<size_t i>
3496 struct tuple_element<i, Zivid::FrameInfo::SystemInfo::ComputeDevice>
3497 {
3498 static_assert(i < tuple_size<Zivid::FrameInfo::SystemInfo::ComputeDevice>::value, "Index must be less than 2");
3499
3500 using type // NOLINT
3501 = decltype(declval<Zivid::FrameInfo::SystemInfo::ComputeDevice>().get<i>());
3502 };
3503
3504 template<>
3505 struct tuple_size<Zivid::FrameInfo> : integral_constant<size_t, 5>
3506 {};
3507
3508 template<size_t i>
3509 struct tuple_element<i, Zivid::FrameInfo>
3510 {
3511 static_assert(i < tuple_size<Zivid::FrameInfo>::value, "Index must be less than 5");
3512
3513 using type // NOLINT
3514 = decltype(declval<Zivid::FrameInfo>().get<i>());
3515 };
3516
3517} // namespace std
3518# endif
3519#endif
3520
3521// If we have access to the DataModel library, automatically include internal DataModel
3522// header. This header is necessary for serialization and deserialization.
3523#if defined(__has_include) && !defined(NO_DOC)
3524# if __has_include("Zivid/FrameInfoInternal.h") && __has_include("Zivid/DataModelNodeMetaData.h")
3525# include "Zivid/FrameInfoInternal.h"
3526# endif
3527#endif
#define ZIVID_CORE_EXPORT
Definition CoreExport.h:56
Contains information about the compute device used by Zivid::Application.
Definition ComputeDevice.h:60
Is frame missing any data.
Definition FrameInfo.h:129
static constexpr DataModel::NodeType nodeType
The type of this node.
Definition FrameInfo.h:132
bool value() const
Get the value.
static constexpr const char * path
The full path for this value.
Definition FrameInfo.h:135
bool ValueType
The type of the underlying value.
Definition FrameInfo.h:144
bool operator!=(const PacketLoss &other) const
Comparison operator.
Definition FrameInfo.h:181
friend std::ostream & operator<<(std::ostream &stream, const PacketLoss &value)
Operator to serialize the value to a stream.
Definition FrameInfo.h:187
static constexpr const char * description
The description for this value.
Definition FrameInfo.h:141
static constexpr const char * name
The name of this value.
Definition FrameInfo.h:138
static const PacketLoss yes
On/enabled.
Definition FrameInfo.h:145
PacketLoss()=default
Default constructor.
std::string toString() const
Get the value as string.
static const PacketLoss no
Off/disabled.
Definition FrameInfo.h:146
static std::set< bool > validValues()
All valid values of PacketLoss.
Definition FrameInfo.h:149
constexpr PacketLoss(bool value)
Constructor.
Definition FrameInfo.h:158
bool operator==(const PacketLoss &other) const
Comparison operator.
Definition FrameInfo.h:175
Diagnostic information for frame.
Definition FrameInfo.h:111
static constexpr const char * name
The name of this value.
Definition FrameInfo.h:120
friend std::ostream & operator<<(std::ostream &stream, const Diagnostics &value)
Operator to send the value as string to a stream.
Definition FrameInfo.h:362
bool operator!=(const Diagnostics &other) const
Inequality operator.
std::string toString() const
Get the value as string.
const FrameInfo::Diagnostics::PacketLoss & get() const
Definition FrameInfo.h:327
Diagnostics & set(const PacketLoss &value)
Set PacketLoss.
Definition FrameInfo.h:318
Diagnostics copyWith(Args &&...args) const
Returns a copy of this object with the given argument(s) set to the new value(s)
Definition FrameInfo.h:286
const PacketLoss & packetLoss() const
Get PacketLoss.
Definition FrameInfo.h:306
static constexpr const char * path
The full path for this value.
Definition FrameInfo.h:117
static constexpr const char * description
The description for this value.
Definition FrameInfo.h:123
std::tuple< FrameInfo::Diagnostics::PacketLoss > Descendants
Definition FrameInfo.h:200
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition FrameInfo.h:347
bool operator==(const Diagnostics &other) const
Equality operator.
PacketLoss & packetLoss()
Get PacketLoss.
Definition FrameInfo.h:312
void set(Args &&...args)
Set multiple arguments.
Definition FrameInfo.h:254
void forEach(const F &f) const
Run the given function on each direct member with the value of the member as parameter.
Definition FrameInfo.h:340
Diagnostics()
Default constructor.
static constexpr DataModel::NodeType nodeType
The type of this node.
Definition FrameInfo.h:114
Acquisition Time is the duration from the start of the capture to when the camera has acquired the la...
Definition FrameInfo.h:405
AcquisitionTime()=default
Default constructor.
bool operator<(const AcquisitionTime &other) const
Comparison operator.
Definition FrameInfo.h:461
static constexpr const char * description
The description for this value.
Definition FrameInfo.h:417
static constexpr const char * path
The full path for this value.
Definition FrameInfo.h:411
bool operator<=(const AcquisitionTime &other) const
Comparison operator.
Definition FrameInfo.h:473
std::chrono::microseconds ValueType
The type of the underlying value.
Definition FrameInfo.h:426
bool operator>=(const AcquisitionTime &other) const
Comparison operator.
Definition FrameInfo.h:479
std::chrono::microseconds value() const
Get the value.
bool operator>(const AcquisitionTime &other) const
Comparison operator.
Definition FrameInfo.h:467
static constexpr const char * name
The name of this value.
Definition FrameInfo.h:414
bool operator==(const AcquisitionTime &other) const
Comparison operator.
Definition FrameInfo.h:449
static constexpr DataModel::NodeType nodeType
The type of this node.
Definition FrameInfo.h:408
bool operator!=(const AcquisitionTime &other) const
Comparison operator.
Definition FrameInfo.h:455
constexpr AcquisitionTime(std::chrono::microseconds value)
Constructor.
Definition FrameInfo.h:438
static constexpr Range< std::chrono::microseconds > validRange()
The range of valid values for AcquisitionTime.
Definition FrameInfo.h:429
std::string toString() const
Get the value as string.
friend std::ostream & operator<<(std::ostream &stream, const AcquisitionTime &value)
Operator to serialize the value to a stream.
Definition FrameInfo.h:485
Capture Time is the duration from the start of the capture to when all of the data transfer and proce...
Definition FrameInfo.h:505
static constexpr const char * description
The description for this value.
Definition FrameInfo.h:517
constexpr CaptureTime(std::chrono::microseconds value)
Constructor.
Definition FrameInfo.h:537
static constexpr DataModel::NodeType nodeType
The type of this node.
Definition FrameInfo.h:508
std::string toString() const
Get the value as string.
CaptureTime()=default
Default constructor.
bool operator<(const CaptureTime &other) const
Comparison operator.
Definition FrameInfo.h:560
static constexpr const char * path
The full path for this value.
Definition FrameInfo.h:511
std::chrono::microseconds ValueType
The type of the underlying value.
Definition FrameInfo.h:525
static constexpr const char * name
The name of this value.
Definition FrameInfo.h:514
bool operator>(const CaptureTime &other) const
Comparison operator.
Definition FrameInfo.h:566
bool operator==(const CaptureTime &other) const
Comparison operator.
Definition FrameInfo.h:548
bool operator<=(const CaptureTime &other) const
Comparison operator.
Definition FrameInfo.h:572
bool operator>=(const CaptureTime &other) const
Comparison operator.
Definition FrameInfo.h:578
static constexpr Range< std::chrono::microseconds > validRange()
The range of valid values for CaptureTime.
Definition FrameInfo.h:528
bool operator!=(const CaptureTime &other) const
Comparison operator.
Definition FrameInfo.h:554
std::chrono::microseconds value() const
Get the value.
friend std::ostream & operator<<(std::ostream &stream, const CaptureTime &value)
Operator to serialize the value to a stream.
Definition FrameInfo.h:584
Kernel Compute Time is the duration of the compute on the GPU. It is a subset of Capture Time....
Definition FrameInfo.h:605
KernelComputeTime()=default
Default constructor.
bool operator>=(const KernelComputeTime &other) const
Comparison operator.
Definition FrameInfo.h:679
std::chrono::microseconds ValueType
The type of the underlying value.
Definition FrameInfo.h:626
std::chrono::microseconds value() const
Get the value.
static constexpr DataModel::NodeType nodeType
The type of this node.
Definition FrameInfo.h:608
bool operator!=(const KernelComputeTime &other) const
Comparison operator.
Definition FrameInfo.h:655
static constexpr const char * path
The full path for this value.
Definition FrameInfo.h:611
bool operator==(const KernelComputeTime &other) const
Comparison operator.
Definition FrameInfo.h:649
static constexpr const char * description
The description for this value.
Definition FrameInfo.h:617
bool operator<=(const KernelComputeTime &other) const
Comparison operator.
Definition FrameInfo.h:673
static constexpr Range< std::chrono::microseconds > validRange()
The range of valid values for KernelComputeTime.
Definition FrameInfo.h:629
constexpr KernelComputeTime(std::chrono::microseconds value)
Constructor.
Definition FrameInfo.h:638
bool operator<(const KernelComputeTime &other) const
Comparison operator.
Definition FrameInfo.h:661
std::string toString() const
Get the value as string.
friend std::ostream & operator<<(std::ostream &stream, const KernelComputeTime &value)
Operator to serialize the value to a stream.
Definition FrameInfo.h:685
bool operator>(const KernelComputeTime &other) const
Comparison operator.
Definition FrameInfo.h:667
static constexpr const char * name
The name of this value.
Definition FrameInfo.h:614
Reprocessing re-runs the entire processing pipeline (including filters, color balance etc....
Definition FrameInfo.h:717
bool operator<(const ReprocessingTime &other) const
Comparison operator.
Definition FrameInfo.h:793
constexpr ReprocessingTime(std::chrono::microseconds value)
Constructor.
Definition FrameInfo.h:761
static constexpr Range< std::chrono::microseconds > validRange()
The range of valid values for ReprocessingTime.
Definition FrameInfo.h:752
bool operator>=(const ReprocessingTime &other) const
Comparison operator.
Definition FrameInfo.h:811
bool hasValue() const
Check if the value is set.
static constexpr const char * description
The description for this value.
Definition FrameInfo.h:729
static constexpr const char * path
The full path for this value.
Definition FrameInfo.h:723
bool operator>(const ReprocessingTime &other) const
Comparison operator.
Definition FrameInfo.h:799
std::string toString() const
Get the value as string.
void reset()
Reset the node to unset state.
static constexpr const char * name
The name of this value.
Definition FrameInfo.h:726
static constexpr DataModel::NodeType nodeType
The type of this node.
Definition FrameInfo.h:720
std::chrono::microseconds value() const
Get the value.
bool operator<=(const ReprocessingTime &other) const
Comparison operator.
Definition FrameInfo.h:805
friend std::ostream & operator<<(std::ostream &stream, const ReprocessingTime &value)
Operator to serialize the value to a stream.
Definition FrameInfo.h:817
std::chrono::microseconds ValueType
The type of the underlying value.
Definition FrameInfo.h:749
bool operator==(const ReprocessingTime &other) const
Comparison operator.
Definition FrameInfo.h:781
ReprocessingTime()=default
Default constructor.
bool operator!=(const ReprocessingTime &other) const
Comparison operator.
Definition FrameInfo.h:787
Throttling Time is the duration that the capture was paused due to thermal or other constraints on th...
Definition FrameInfo.h:840
ThrottlingTime()=default
Default constructor.
static constexpr DataModel::NodeType nodeType
The type of this node.
Definition FrameInfo.h:843
static constexpr const char * path
The full path for this value.
Definition FrameInfo.h:846
static constexpr const char * description
The description for this value.
Definition FrameInfo.h:852
static constexpr const char * name
The name of this value.
Definition FrameInfo.h:849
bool operator==(const ThrottlingTime &other) const
Comparison operator.
Definition FrameInfo.h:886
static constexpr Range< std::chrono::microseconds > validRange()
The range of valid values for ThrottlingTime.
Definition FrameInfo.h:866
bool operator<=(const ThrottlingTime &other) const
Comparison operator.
Definition FrameInfo.h:910
std::chrono::microseconds ValueType
The type of the underlying value.
Definition FrameInfo.h:863
bool operator<(const ThrottlingTime &other) const
Comparison operator.
Definition FrameInfo.h:898
constexpr ThrottlingTime(std::chrono::microseconds value)
Constructor.
Definition FrameInfo.h:875
friend std::ostream & operator<<(std::ostream &stream, const ThrottlingTime &value)
Operator to serialize the value to a stream.
Definition FrameInfo.h:922
bool operator>(const ThrottlingTime &other) const
Comparison operator.
Definition FrameInfo.h:904
std::chrono::microseconds value() const
Get the value.
std::string toString() const
Get the value as string.
bool operator>=(const ThrottlingTime &other) const
Comparison operator.
Definition FrameInfo.h:916
bool operator!=(const ThrottlingTime &other) const
Comparison operator.
Definition FrameInfo.h:892
Metrics related to this capture.
Definition FrameInfo.h:383
const FrameInfo::Metrics::ThrottlingTime & get() const
Definition FrameInfo.h:1187
static constexpr const char * name
The name of this value.
Definition FrameInfo.h:392
const ThrottlingTime & throttlingTime() const
Get ThrottlingTime.
Definition FrameInfo.h:1134
friend std::ostream & operator<<(std::ostream &stream, const Metrics &value)
Operator to send the value as string to a stream.
Definition FrameInfo.h:1254
bool operator!=(const Metrics &other) const
Inequality operator.
static constexpr const char * description
The description for this value.
Definition FrameInfo.h:395
Metrics()
Default constructor.
static constexpr DataModel::NodeType nodeType
The type of this node.
Definition FrameInfo.h:386
const KernelComputeTime & kernelComputeTime() const
Get KernelComputeTime.
Definition FrameInfo.h:1096
const FrameInfo::Metrics::ReprocessingTime & get() const
Definition FrameInfo.h:1179
void forEach(const F &f) const
Run the given function on each direct member with the value of the member as parameter.
Definition FrameInfo.h:1224
Metrics copyWith(Args &&...args) const
Returns a copy of this object with the given argument(s) set to the new value(s)
Definition FrameInfo.h:1038
const CaptureTime & captureTime() const
Get CaptureTime.
Definition FrameInfo.h:1077
KernelComputeTime & kernelComputeTime()
Get KernelComputeTime.
Definition FrameInfo.h:1102
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition FrameInfo.h:1235
CaptureTime & captureTime()
Get CaptureTime.
Definition FrameInfo.h:1083
static constexpr const char * path
The full path for this value.
Definition FrameInfo.h:389
void set(Args &&...args)
Set multiple arguments.
Definition FrameInfo.h:1002
const FrameInfo::Metrics::KernelComputeTime & get() const
Definition FrameInfo.h:1171
Metrics & set(const CaptureTime &value)
Set CaptureTime.
Definition FrameInfo.h:1089
const AcquisitionTime & acquisitionTime() const
Get AcquisitionTime.
Definition FrameInfo.h:1058
const ReprocessingTime & reprocessingTime() const
Get ReprocessingTime.
Definition FrameInfo.h:1115
const FrameInfo::Metrics::CaptureTime & get() const
Definition FrameInfo.h:1163
Metrics & set(const ThrottlingTime &value)
Set ThrottlingTime.
Definition FrameInfo.h:1146
AcquisitionTime & acquisitionTime()
Get AcquisitionTime.
Definition FrameInfo.h:1064
ThrottlingTime & throttlingTime()
Get ThrottlingTime.
Definition FrameInfo.h:1140
std::tuple< FrameInfo::Metrics::AcquisitionTime, FrameInfo::Metrics::CaptureTime, FrameInfo::Metrics::KernelComputeTime, FrameInfo::Metrics::ReprocessingTime, FrameInfo::Metrics::ThrottlingTime > Descendants
Definition FrameInfo.h:935
std::string toString() const
Get the value as string.
Metrics & set(const KernelComputeTime &value)
Set KernelComputeTime.
Definition FrameInfo.h:1108
Metrics & set(const AcquisitionTime &value)
Set AcquisitionTime.
Definition FrameInfo.h:1070
Metrics & set(const ReprocessingTime &value)
Set ReprocessingTime.
Definition FrameInfo.h:1127
bool operator==(const Metrics &other) const
Equality operator.
ReprocessingTime & reprocessingTime()
Get ReprocessingTime.
Definition FrameInfo.h:1121
const FrameInfo::Metrics::AcquisitionTime & get() const
Definition FrameInfo.h:1155
Core version.
Definition FrameInfo.h:1299
std::string toString() const
Get the value as string.
bool operator>=(const Core &other) const
Comparison operator.
Definition FrameInfo.h:1367
static constexpr const char * path
The full path for this value.
Definition FrameInfo.h:1305
const std::string & value() const
Get the value.
static constexpr const char * description
The description for this value.
Definition FrameInfo.h:1311
bool operator!=(const Core &other) const
Comparison operator.
Definition FrameInfo.h:1343
Core(std::string value)
Constructor.
Definition FrameInfo.h:1326
static constexpr DataModel::NodeType nodeType
The type of this node.
Definition FrameInfo.h:1302
bool operator==(const Core &other) const
Comparison operator.
Definition FrameInfo.h:1337
Core()=default
Default constructor.
bool operator>(const Core &other) const
Comparison operator.
Definition FrameInfo.h:1355
bool operator<(const Core &other) const
Comparison operator.
Definition FrameInfo.h:1349
friend std::ostream & operator<<(std::ostream &stream, const Core &value)
Operator to serialize the value to a stream.
Definition FrameInfo.h:1373
bool operator<=(const Core &other) const
Comparison operator.
Definition FrameInfo.h:1361
std::string ValueType
The type of the underlying value.
Definition FrameInfo.h:1314
static constexpr const char * name
The name of this value.
Definition FrameInfo.h:1308
static constexpr Range< ValueType::size_type > validSize()
The valid sizes for Core.
Definition FrameInfo.h:1317
The version information for installed software at the time of image capture.
Definition FrameInfo.h:1279
const Core & core() const
Get Core.
Definition FrameInfo.h:1492
friend std::ostream & operator<<(std::ostream &stream, const SoftwareVersion &value)
Operator to send the value as string to a stream.
Definition FrameInfo.h:1548
bool operator!=(const SoftwareVersion &other) const
Inequality operator.
bool operator==(const SoftwareVersion &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 FrameInfo.h:1533
static constexpr const char * name
The name of this value.
Definition FrameInfo.h:1288
SoftwareVersion()
Default constructor.
const FrameInfo::SoftwareVersion::Core & get() const
Definition FrameInfo.h:1513
SoftwareVersion copyWith(Args &&...args) const
Returns a copy of this object with the given argument(s) set to the new value(s)
Definition FrameInfo.h:1472
Core & core()
Get Core.
Definition FrameInfo.h:1498
void forEach(const F &f) const
Run the given function on each direct member with the value of the member as parameter.
Definition FrameInfo.h:1526
static constexpr const char * description
The description for this value.
Definition FrameInfo.h:1291
static constexpr DataModel::NodeType nodeType
The type of this node.
Definition FrameInfo.h:1282
static constexpr const char * path
The full path for this value.
Definition FrameInfo.h:1285
void set(Args &&...args)
Set multiple arguments.
Definition FrameInfo.h:1440
std::tuple< FrameInfo::SoftwareVersion::Core > Descendants
Definition FrameInfo.h:1386
SoftwareVersion & set(const Core &value)
Set Core.
Definition FrameInfo.h:1504
std::string toString() const
Get the value as string.
CPU model.
Definition FrameInfo.h:1607
static constexpr const char * name
The name of this value.
Definition FrameInfo.h:1616
static constexpr DataModel::NodeType nodeType
The type of this node.
Definition FrameInfo.h:1610
const std::string & value() const
Get the value.
bool operator!=(const Model &other) const
Comparison operator.
Definition FrameInfo.h:1651
Model()=default
Default constructor.
bool operator<(const Model &other) const
Comparison operator.
Definition FrameInfo.h:1657
std::string toString() const
Get the value as string.
static constexpr const char * description
The description for this value.
Definition FrameInfo.h:1619
bool operator==(const Model &other) const
Comparison operator.
Definition FrameInfo.h:1645
static constexpr const char * path
The full path for this value.
Definition FrameInfo.h:1613
bool operator>=(const Model &other) const
Comparison operator.
Definition FrameInfo.h:1675
friend std::ostream & operator<<(std::ostream &stream, const Model &value)
Operator to serialize the value to a stream.
Definition FrameInfo.h:1681
bool operator<=(const Model &other) const
Comparison operator.
Definition FrameInfo.h:1669
static constexpr Range< ValueType::size_type > validSize()
The valid sizes for Model.
Definition FrameInfo.h:1625
std::string ValueType
The type of the underlying value.
Definition FrameInfo.h:1622
Model(std::string value)
Constructor.
Definition FrameInfo.h:1634
bool operator>(const Model &other) const
Comparison operator.
Definition FrameInfo.h:1663
CPU.
Definition FrameInfo.h:1589
static constexpr const char * path
The full path for this value.
Definition FrameInfo.h:1595
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition FrameInfo.h:1843
const Model & model() const
Get Model.
Definition FrameInfo.h:1802
static constexpr const char * description
The description for this value.
Definition FrameInfo.h:1601
std::tuple< FrameInfo::SystemInfo::CPU::Model > Descendants
Definition FrameInfo.h:1694
void forEach(const F &f) const
Run the given function on each direct member with the value of the member as parameter.
Definition FrameInfo.h:1836
bool operator!=(const CPU &other) const
Inequality operator.
std::string toString() const
Get the value as string.
bool operator==(const CPU &other) const
Equality operator.
friend std::ostream & operator<<(std::ostream &stream, const CPU &value)
Operator to send the value as string to a stream.
Definition FrameInfo.h:1858
CPU & set(const Model &value)
Set Model.
Definition FrameInfo.h:1814
void set(Args &&...args)
Set multiple arguments.
Definition FrameInfo.h:1748
static constexpr DataModel::NodeType nodeType
The type of this node.
Definition FrameInfo.h:1592
CPU copyWith(Args &&...args) const
Returns a copy of this object with the given argument(s) set to the new value(s)
Definition FrameInfo.h:1781
Model & model()
Get Model.
Definition FrameInfo.h:1808
const FrameInfo::SystemInfo::CPU::Model & get() const
Definition FrameInfo.h:1823
static constexpr const char * name
The name of this value.
Definition FrameInfo.h:1598
Compute device model.
Definition FrameInfo.h:1897
static constexpr Range< ValueType::size_type > validSize()
The valid sizes for Model.
Definition FrameInfo.h:1915
static constexpr const char * description
The description for this value.
Definition FrameInfo.h:1909
std::string toString() const
Get the value as string.
bool operator<=(const Model &other) const
Comparison operator.
Definition FrameInfo.h:1959
Model(std::string value)
Constructor.
Definition FrameInfo.h:1924
std::string ValueType
The type of the underlying value.
Definition FrameInfo.h:1912
const std::string & value() const
Get the value.
bool operator==(const Model &other) const
Comparison operator.
Definition FrameInfo.h:1935
bool operator!=(const Model &other) const
Comparison operator.
Definition FrameInfo.h:1941
bool operator>=(const Model &other) const
Comparison operator.
Definition FrameInfo.h:1965
static constexpr DataModel::NodeType nodeType
The type of this node.
Definition FrameInfo.h:1900
bool operator>(const Model &other) const
Comparison operator.
Definition FrameInfo.h:1953
static constexpr const char * name
The name of this value.
Definition FrameInfo.h:1906
friend std::ostream & operator<<(std::ostream &stream, const Model &value)
Operator to serialize the value to a stream.
Definition FrameInfo.h:1971
static constexpr const char * path
The full path for this value.
Definition FrameInfo.h:1903
bool operator<(const Model &other) const
Comparison operator.
Definition FrameInfo.h:1947
Compute device vendor.
Definition FrameInfo.h:1988
static constexpr const char * path
The full path for this value.
Definition FrameInfo.h:1994
static constexpr DataModel::NodeType nodeType
The type of this node.
Definition FrameInfo.h:1991
bool operator>(const Vendor &other) const
Comparison operator.
Definition FrameInfo.h:2044
static constexpr Range< ValueType::size_type > validSize()
The valid sizes for Vendor.
Definition FrameInfo.h:2006
friend std::ostream & operator<<(std::ostream &stream, const Vendor &value)
Operator to serialize the value to a stream.
Definition FrameInfo.h:2062
bool operator>=(const Vendor &other) const
Comparison operator.
Definition FrameInfo.h:2056
bool operator<(const Vendor &other) const
Comparison operator.
Definition FrameInfo.h:2038
bool operator==(const Vendor &other) const
Comparison operator.
Definition FrameInfo.h:2026
std::string ValueType
The type of the underlying value.
Definition FrameInfo.h:2003
static constexpr const char * name
The name of this value.
Definition FrameInfo.h:1997
static constexpr const char * description
The description for this value.
Definition FrameInfo.h:2000
std::string toString() const
Get the value as string.
bool operator<=(const Vendor &other) const
Comparison operator.
Definition FrameInfo.h:2050
const std::string & value() const
Get the value.
bool operator!=(const Vendor &other) const
Comparison operator.
Definition FrameInfo.h:2032
Vendor(std::string value)
Constructor.
Definition FrameInfo.h:2015
Compute device.
Definition FrameInfo.h:1879
static constexpr const char * name
The name of this value.
Definition FrameInfo.h:1888
void set(Args &&...args)
Set multiple arguments.
Definition FrameInfo.h:2132
ComputeDevice & set(const Model &value)
Set Model.
Definition FrameInfo.h:2199
void forEach(const F &f) const
Run the given function on each direct member with the value of the member as parameter.
Definition FrameInfo.h:2256
const Vendor & vendor() const
Get Vendor.
Definition FrameInfo.h:2206
std:: tuple< FrameInfo::SystemInfo::ComputeDevice::Model, FrameInfo::SystemInfo::ComputeDevice::Vendor > Descendants
Definition FrameInfo.h:2075
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition FrameInfo.h:2264
Model & model()
Get Model.
Definition FrameInfo.h:2193
Vendor & vendor()
Get Vendor.
Definition FrameInfo.h:2212
bool operator==(const ComputeDevice &other) const
Equality operator.
const FrameInfo::SystemInfo::ComputeDevice::Vendor & get() const
Definition FrameInfo.h:2237
static constexpr const char * description
The description for this value.
Definition FrameInfo.h:1891
const Model & model() const
Get Model.
Definition FrameInfo.h:2187
friend std::ostream & operator<<(std::ostream &stream, const ComputeDevice &value)
Operator to send the value as string to a stream.
Definition FrameInfo.h:2280
bool operator!=(const ComputeDevice &other) const
Inequality operator.
std::string toString() const
Get the value as string.
ComputeDevice & set(const Vendor &value)
Set Vendor.
Definition FrameInfo.h:2218
ComputeDevice copyWith(Args &&...args) const
Returns a copy of this object with the given argument(s) set to the new value(s)
Definition FrameInfo.h:2166
static constexpr DataModel::NodeType nodeType
The type of this node.
Definition FrameInfo.h:1882
const FrameInfo::SystemInfo::ComputeDevice::Model & get() const
Definition FrameInfo.h:2228
static constexpr const char * path
The full path for this value.
Definition FrameInfo.h:1885
Operating system.
Definition FrameInfo.h:2302
bool operator>(const OperatingSystem &other) const
Comparison operator.
Definition FrameInfo.h:2358
OperatingSystem(std::string value)
Constructor.
Definition FrameInfo.h:2329
bool operator!=(const OperatingSystem &other) const
Comparison operator.
Definition FrameInfo.h:2346
bool operator<(const OperatingSystem &other) const
Comparison operator.
Definition FrameInfo.h:2352
bool operator>=(const OperatingSystem &other) const
Comparison operator.
Definition FrameInfo.h:2370
bool operator==(const OperatingSystem &other) const
Comparison operator.
Definition FrameInfo.h:2340
std::string ValueType
The type of the underlying value.
Definition FrameInfo.h:2317
OperatingSystem()=default
Default constructor.
static constexpr const char * name
The name of this value.
Definition FrameInfo.h:2311
bool operator<=(const OperatingSystem &other) const
Comparison operator.
Definition FrameInfo.h:2364
static constexpr const char * description
The description for this value.
Definition FrameInfo.h:2314
static constexpr DataModel::NodeType nodeType
The type of this node.
Definition FrameInfo.h:2305
const std::string & value() const
Get the value.
static constexpr const char * path
The full path for this value.
Definition FrameInfo.h:2308
friend std::ostream & operator<<(std::ostream &stream, const OperatingSystem &value)
Operator to serialize the value to a stream.
Definition FrameInfo.h:2376
std::string toString() const
Get the value as string.
static constexpr Range< ValueType::size_type > validSize()
The valid sizes for OperatingSystem.
Definition FrameInfo.h:2320
Information about the system that captured this frame.
Definition FrameInfo.h:1569
SystemInfo & set(const CPU::Model &value)
Set CPU::Model.
Definition FrameInfo.h:2535
static constexpr const char * description
The description for this value.
Definition FrameInfo.h:1581
std::string toString() const
Get the value as string.
const FrameInfo::SystemInfo::CPU & get() const
Definition FrameInfo.h:2596
void forEach(const F &f) const
Run the given function on each direct member with the value of the member as parameter.
Definition FrameInfo.h:2663
ComputeDevice & computeDevice()
Get ComputeDevice.
Definition FrameInfo.h:2548
SystemInfo & set(const ComputeDevice &value)
Set ComputeDevice.
Definition FrameInfo.h:2554
const FrameInfo::SystemInfo::ComputeDevice::Vendor & get() const
Definition FrameInfo.h:2630
SystemInfo & set(const CPU &value)
Set CPU.
Definition FrameInfo.h:2528
bool operator==(const SystemInfo &other) const
Equality operator.
void set(Args &&...args)
Set multiple arguments.
Definition FrameInfo.h:2459
friend std::ostream & operator<<(std::ostream &stream, const SystemInfo &value)
Operator to send the value as string to a stream.
Definition FrameInfo.h:2689
static constexpr const char * name
The name of this value.
Definition FrameInfo.h:1578
const ComputeDevice & computeDevice() const
Get ComputeDevice.
Definition FrameInfo.h:2542
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition FrameInfo.h:2672
SystemInfo & set(const ComputeDevice::Vendor &value)
Set ComputeDevice::Vendor.
Definition FrameInfo.h:2568
SystemInfo & set(const OperatingSystem &value)
Set OperatingSystem.
Definition FrameInfo.h:2587
SystemInfo copyWith(Args &&...args) const
Returns a copy of this object with the given argument(s) set to the new value(s)
Definition FrameInfo.h:2496
bool operator!=(const SystemInfo &other) const
Inequality operator.
SystemInfo & set(const ComputeDevice::Model &value)
Set ComputeDevice::Model.
Definition FrameInfo.h:2561
const FrameInfo::SystemInfo::OperatingSystem & get() const
Definition FrameInfo.h:2638
CPU & cpu()
Get CPU.
Definition FrameInfo.h:2522
const FrameInfo::SystemInfo::ComputeDevice & get() const
Definition FrameInfo.h:2612
const OperatingSystem & operatingSystem() const
Get OperatingSystem.
Definition FrameInfo.h:2575
OperatingSystem & operatingSystem()
Get OperatingSystem.
Definition FrameInfo.h:2581
SystemInfo()
Default constructor.
const CPU & cpu() const
Get CPU.
Definition FrameInfo.h:2516
const FrameInfo::SystemInfo::ComputeDevice::Model & get() const
Definition FrameInfo.h:2621
std::tuple< FrameInfo::SystemInfo::CPU, FrameInfo::SystemInfo::CPU::Model, FrameInfo::SystemInfo::ComputeDevice, FrameInfo::SystemInfo::ComputeDevice::Model, FrameInfo::SystemInfo::ComputeDevice::Vendor, FrameInfo::SystemInfo::OperatingSystem > Descendants
Definition FrameInfo.h:2389
static constexpr DataModel::NodeType nodeType
The type of this node.
Definition FrameInfo.h:1572
const FrameInfo::SystemInfo::CPU::Model & get() const
Definition FrameInfo.h:2604
static constexpr const char * path
The full path for this value.
Definition FrameInfo.h:1575
The time of frame capture.
Definition FrameInfo.h:2712
std::chrono::system_clock::time_point value() const
Get the value.
static constexpr const char * name
The name of this value.
Definition FrameInfo.h:2721
bool operator>(const TimeStamp &other) const
Comparison operator.
Definition FrameInfo.h:2768
bool operator<(const TimeStamp &other) const
Comparison operator.
Definition FrameInfo.h:2762
bool operator<=(const TimeStamp &other) const
Comparison operator.
Definition FrameInfo.h:2774
static constexpr Range< std::chrono::system_clock::time_point > validRange()
The range of valid values for TimeStamp.
Definition FrameInfo.h:2730
bool operator>=(const TimeStamp &other) const
Comparison operator.
Definition FrameInfo.h:2780
static constexpr const char * description
The description for this value.
Definition FrameInfo.h:2724
std::string toString() const
Get the value as string.
friend std::ostream & operator<<(std::ostream &stream, const TimeStamp &value)
Operator to serialize the value to a stream.
Definition FrameInfo.h:2786
TimeStamp()=default
Default constructor.
constexpr TimeStamp(std::chrono::system_clock::time_point value)
Constructor.
Definition FrameInfo.h:2739
static constexpr const char * path
The full path for this value.
Definition FrameInfo.h:2718
bool operator!=(const TimeStamp &other) const
Comparison operator.
Definition FrameInfo.h:2756
bool operator==(const TimeStamp &other) const
Comparison operator.
Definition FrameInfo.h:2750
static constexpr DataModel::NodeType nodeType
The type of this node.
Definition FrameInfo.h:2715
std::chrono::system_clock::time_point ValueType
The type of the underlying value.
Definition FrameInfo.h:2727
Various information for a frame.
Definition FrameInfo.h:79
const FrameInfo::Metrics::ReprocessingTime & get() const
Definition FrameInfo.h:3221
TimeStamp & timeStamp()
Get TimeStamp.
Definition FrameInfo.h:3162
const FrameInfo::Metrics::ThrottlingTime & get() const
Definition FrameInfo.h:3229
std::string toString() const
Get the value as string.
Metrics & metrics()
Get Metrics.
Definition FrameInfo.h:3021
void forEach(const F &f) const
Run the given function on each direct member with the value of the member as parameter.
Definition FrameInfo.h:3339
const FrameInfo::SoftwareVersion::Core & get() const
Definition FrameInfo.h:3243
const FrameInfo::Metrics & get() const
Definition FrameInfo.h:3189
const FrameInfo::Metrics::CaptureTime & get() const
Definition FrameInfo.h:3205
FrameInfo & set(const SystemInfo::ComputeDevice &value)
Set SystemInfo::ComputeDevice.
Definition FrameInfo.h:3128
FrameInfo()
Default constructor.
const FrameInfo::Diagnostics::PacketLoss & get() const
Definition FrameInfo.h:3183
FrameInfo & set(const Metrics::ThrottlingTime &value)
Set Metrics::ThrottlingTime.
Definition FrameInfo.h:3062
static constexpr DataModel::NodeType nodeType
The type of this node.
Definition FrameInfo.h:82
void set(Args &&...args)
Set multiple arguments.
Definition FrameInfo.h:2921
const FrameInfo::SystemInfo::ComputeDevice::Model & get() const
Definition FrameInfo.h:3279
const FrameInfo::Metrics::AcquisitionTime & get() const
Definition FrameInfo.h:3197
FrameInfo & set(const SystemInfo::OperatingSystem &value)
Set SystemInfo::OperatingSystem.
Definition FrameInfo.h:3149
static constexpr const char * path
The full path for this value.
Definition FrameInfo.h:85
void save(const std::string &fileName) const
Save to the given file.
const SystemInfo & systemInfo() const
Get SystemInfo.
Definition FrameInfo.h:3095
FrameInfo & set(const Metrics::CaptureTime &value)
Set Metrics::CaptureTime.
Definition FrameInfo.h:3041
FrameInfo & set(const SystemInfo &value)
Set SystemInfo.
Definition FrameInfo.h:3107
const TimeStamp & timeStamp() const
Get TimeStamp.
Definition FrameInfo.h:3156
SoftwareVersion & softwareVersion()
Get SoftwareVersion.
Definition FrameInfo.h:3075
Diagnostics & diagnostics()
Get Diagnostics.
Definition FrameInfo.h:2995
FrameInfo(const std::string &fileName)
Construct FrameInfo by loading from file.
std::string serialize() const
Serialize to a string.
FrameInfo & set(const SystemInfo::ComputeDevice::Vendor &value)
Set SystemInfo::ComputeDevice::Vendor.
Definition FrameInfo.h:3142
const FrameInfo::SoftwareVersion & get() const
Definition FrameInfo.h:3235
const Diagnostics & diagnostics() const
Get Diagnostics.
Definition FrameInfo.h:2989
friend std::ostream & operator<<(std::ostream &stream, const FrameInfo &value)
Operator to send the value as string to a stream.
Definition FrameInfo.h:3369
FrameInfo & set(const TimeStamp &value)
Set TimeStamp.
Definition FrameInfo.h:3168
FrameInfo(Args &&...args)
Constructor taking variadic number of arguments.
Definition FrameInfo.h:2877
static constexpr const char * name
The name of this value.
Definition FrameInfo.h:88
const FrameInfo::TimeStamp & get() const
Definition FrameInfo.h:3302
const SoftwareVersion & softwareVersion() const
Get SoftwareVersion.
Definition FrameInfo.h:3069
FrameInfo & set(const SystemInfo::CPU::Model &value)
Set SystemInfo::CPU::Model.
Definition FrameInfo.h:3121
static FrameInfo fromSerialized(const std::string &value)
Construct a new FrameInfo instance from a previously serialized string.
FrameInfo & set(const SystemInfo::ComputeDevice::Model &value)
Set SystemInfo::ComputeDevice::Model.
Definition FrameInfo.h:3135
const FrameInfo::SystemInfo::CPU::Model & get() const
Definition FrameInfo.h:3263
const FrameInfo::SystemInfo::ComputeDevice::Vendor & get() const
Definition FrameInfo.h:3288
FrameInfo & set(const SoftwareVersion &value)
Set SoftwareVersion.
Definition FrameInfo.h:3081
const FrameInfo::SystemInfo & get() const
Definition FrameInfo.h:3249
FrameInfo & set(const Metrics::ReprocessingTime &value)
Set Metrics::ReprocessingTime.
Definition FrameInfo.h:3055
FrameInfo & set(const Diagnostics &value)
Set Diagnostics.
Definition FrameInfo.h:3001
const FrameInfo::Metrics::KernelComputeTime & get() const
Definition FrameInfo.h:3213
static constexpr const char * description
The description for this value.
Definition FrameInfo.h:91
FrameInfo & set(const Diagnostics::PacketLoss &value)
Set Diagnostics::PacketLoss.
Definition FrameInfo.h:3008
const FrameInfo::Diagnostics & get() const
Definition FrameInfo.h:3175
const FrameInfo::SystemInfo::ComputeDevice & get() const
Definition FrameInfo.h:3271
FrameInfo & set(const SoftwareVersion::Core &value)
Set SoftwareVersion::Core.
Definition FrameInfo.h:3088
static constexpr size_t version
Definition FrameInfo.h:93
SystemInfo & systemInfo()
Get SystemInfo.
Definition FrameInfo.h:3101
bool operator!=(const FrameInfo &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 FrameInfo.h:3350
FrameInfo & set(const Metrics::AcquisitionTime &value)
Set Metrics::AcquisitionTime.
Definition FrameInfo.h:3034
bool operator==(const FrameInfo &other) const
Equality operator.
FrameInfo & set(const SystemInfo::CPU &value)
Set SystemInfo::CPU.
Definition FrameInfo.h:3114
const FrameInfo::SystemInfo::CPU & get() const
Definition FrameInfo.h:3255
std::tuple< FrameInfo::Diagnostics, FrameInfo::Diagnostics::PacketLoss, FrameInfo::Metrics, FrameInfo::Metrics::AcquisitionTime, FrameInfo::Metrics::CaptureTime, FrameInfo::Metrics::KernelComputeTime, FrameInfo::Metrics::ReprocessingTime, FrameInfo::Metrics::ThrottlingTime, FrameInfo::SoftwareVersion, FrameInfo::SoftwareVersion::Core, FrameInfo::SystemInfo, FrameInfo::SystemInfo::CPU, FrameInfo::SystemInfo::CPU::Model, FrameInfo::SystemInfo::ComputeDevice, FrameInfo::SystemInfo::ComputeDevice::Model, FrameInfo::SystemInfo::ComputeDevice::Vendor, FrameInfo::SystemInfo::OperatingSystem, FrameInfo::TimeStamp > Descendants
Definition FrameInfo.h:2799
void load(const std::string &fileName)
Load from the given file.
FrameInfo & set(const Metrics::KernelComputeTime &value)
Set Metrics::KernelComputeTime.
Definition FrameInfo.h:3048
FrameInfo copyWith(Args &&...args) const
Returns a copy of this object with the given argument(s) set to the new value(s)
Definition FrameInfo.h:2970
FrameInfo & set(const Metrics &value)
Set Metrics.
Definition FrameInfo.h:3027
const Metrics & metrics() const
Get Metrics.
Definition FrameInfo.h:3015
const FrameInfo::SystemInfo::OperatingSystem & get() const
Definition FrameInfo.h:3296
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