Zivid C++ API 2.19.0+b5c53d0f-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{ 9 };
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
944
945 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
947 {
948 public:
951
953 static constexpr const char *path{ "Metrics/TransferTime" };
954
956 static constexpr const char *name{ "TransferTime" };
957
959 static constexpr const char *description{
960 R"description(Transfer Time is the duration from when the capture is sent to the camera to when the last of the
961frame's data has arrived on the host. Acquisition Time ends when the camera has acquired the last
962image; Transfer Time ends when that image has reached the host. Both are part of Capture Time, which
963also includes the processing of the data.
964
965Transfer Time is unset for a frame that did not cross a network, such as one from a file camera or
966one loaded from a file saved by an SDK older than 2.19.0, and for a camera whose transport does not
967time the transfer.
968)description"
969 };
970
972 using ValueType = std::chrono::microseconds;
973
976 {
977 return { std::chrono::microseconds::min(), std::chrono::microseconds::max() };
978 }
979
981 TransferTime() = default;
982
984 explicit constexpr TransferTime(std::chrono::microseconds value)
985 : m_opt{ value }
986 {}
987
992 std::chrono::microseconds value() const;
993
995 bool hasValue() const;
996
998 void reset();
999
1001 std::string toString() const;
1002
1004 bool operator==(const TransferTime &other) const
1005 {
1006 return m_opt == other.m_opt;
1007 }
1008
1010 bool operator!=(const TransferTime &other) const
1011 {
1012 return m_opt != other.m_opt;
1013 }
1014
1016 bool operator<(const TransferTime &other) const
1017 {
1018 return m_opt < other.m_opt;
1019 }
1020
1022 bool operator>(const TransferTime &other) const
1023 {
1024 return m_opt > other.m_opt;
1025 }
1026
1028 bool operator<=(const TransferTime &other) const
1029 {
1030 return m_opt <= other.m_opt;
1031 }
1032
1034 bool operator>=(const TransferTime &other) const
1035 {
1036 return m_opt >= other.m_opt;
1037 }
1038
1040 friend std::ostream &operator<<(std::ostream &stream, const TransferTime &value)
1041 {
1042 return stream << value.toString();
1043 }
1044
1045 private:
1046 void setFromString(const std::string &value);
1047
1048 std::optional<std::chrono::microseconds> m_opt;
1049
1050 friend struct DataModel::Detail::Befriend<TransferTime>;
1051 };
1052
1053 using Descendants = std::tuple<
1060
1063
1080#ifndef NO_DOC
1081 template<
1082 typename... Args,
1083 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
1084 typename std::enable_if<
1085 Zivid::Detail::TypeTraits::AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::
1086 value,
1087 int>::type = 0>
1088#else
1089 template<typename... Args>
1090#endif
1091 explicit Metrics(Args &&...args)
1092 {
1093 using namespace Zivid::Detail::TypeTraits;
1094
1095 static_assert(
1096 AllArgsDecayedAreUnique<Args...>::value,
1097 "Found duplicate types among the arguments passed to Metrics(...). "
1098 "Types should be listed at most once.");
1099
1100 set(std::forward<Args>(args)...);
1101 }
1102
1118#ifndef NO_DOC
1119 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
1120#else
1121 template<typename... Args>
1122#endif
1123 void set(Args &&...args)
1124 {
1125 using namespace Zivid::Detail::TypeTraits;
1126
1127 using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
1128 static_assert(
1129 AllArgsAreDescendantNodes::value, "All arguments passed to set(...) must be descendant nodes.");
1130
1131 static_assert(
1132 AllArgsDecayedAreUnique<Args...>::value,
1133 "Found duplicate types among the arguments passed to set(...). "
1134 "Types should be listed at most once.");
1135
1136 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
1137 }
1138
1155#ifndef NO_DOC
1156 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
1157#else
1158 template<typename... Args>
1159#endif
1160 Metrics copyWith(Args &&...args) const
1161 {
1162 using namespace Zivid::Detail::TypeTraits;
1163
1164 using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
1165 static_assert(
1166 AllArgsAreDescendantNodes::value,
1167 "All arguments passed to copyWith(...) must be descendant nodes.");
1168
1169 static_assert(
1170 AllArgsDecayedAreUnique<Args...>::value,
1171 "Found duplicate types among the arguments passed to copyWith(...). "
1172 "Types should be listed at most once.");
1173
1174 auto copy{ *this };
1175 copy.set(std::forward<Args>(args)...);
1176 return copy;
1177 }
1178
1181 {
1182 return m_acquisitionTime;
1183 }
1184
1187 {
1188 return m_acquisitionTime;
1189 }
1190
1193 {
1194 m_acquisitionTime = value;
1195 return *this;
1196 }
1197
1200 {
1201 return m_captureTime;
1202 }
1203
1206 {
1207 return m_captureTime;
1208 }
1209
1211 Metrics &set(const CaptureTime &value)
1212 {
1213 m_captureTime = value;
1214 return *this;
1215 }
1216
1219 {
1220 return m_kernelComputeTime;
1221 }
1222
1225 {
1226 return m_kernelComputeTime;
1227 }
1228
1231 {
1232 m_kernelComputeTime = value;
1233 return *this;
1234 }
1235
1238 {
1239 return m_reprocessingTime;
1240 }
1241
1244 {
1245 return m_reprocessingTime;
1246 }
1247
1250 {
1251 m_reprocessingTime = value;
1252 return *this;
1253 }
1254
1257 {
1258 return m_throttlingTime;
1259 }
1260
1263 {
1264 return m_throttlingTime;
1265 }
1266
1269 {
1270 m_throttlingTime = value;
1271 return *this;
1272 }
1273
1276 {
1277 return m_transferTime;
1278 }
1279
1282 {
1283 return m_transferTime;
1284 }
1285
1287 Metrics &set(const TransferTime &value)
1288 {
1289 m_transferTime = value;
1290 return *this;
1291 }
1292
1293 template<
1294 typename T,
1295 typename std::enable_if<std::is_same<T, FrameInfo::Metrics::AcquisitionTime>::value, int>::type = 0>
1297 {
1298 return m_acquisitionTime;
1299 }
1300
1301 template<
1302 typename T,
1303 typename std::enable_if<std::is_same<T, FrameInfo::Metrics::CaptureTime>::value, int>::type = 0>
1305 {
1306 return m_captureTime;
1307 }
1308
1309 template<
1310 typename T,
1311 typename std::enable_if<std::is_same<T, FrameInfo::Metrics::KernelComputeTime>::value, int>::type = 0>
1313 {
1314 return m_kernelComputeTime;
1315 }
1316
1317 template<
1318 typename T,
1319 typename std::enable_if<std::is_same<T, FrameInfo::Metrics::ReprocessingTime>::value, int>::type = 0>
1321 {
1322 return m_reprocessingTime;
1323 }
1324
1325 template<
1326 typename T,
1327 typename std::enable_if<std::is_same<T, FrameInfo::Metrics::ThrottlingTime>::value, int>::type = 0>
1329 {
1330 return m_throttlingTime;
1331 }
1332
1333 template<
1334 typename T,
1335 typename std::enable_if<std::is_same<T, FrameInfo::Metrics::TransferTime>::value, int>::type = 0>
1337 {
1338 return m_transferTime;
1339 }
1340
1341 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
1343 {
1344 return m_acquisitionTime;
1345 }
1346
1347 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
1349 {
1350 return m_captureTime;
1351 }
1352
1353 template<size_t i, typename std::enable_if<i == 2, int>::type = 0>
1355 {
1356 return m_kernelComputeTime;
1357 }
1358
1359 template<size_t i, typename std::enable_if<i == 3, int>::type = 0>
1361 {
1362 return m_reprocessingTime;
1363 }
1364
1365 template<size_t i, typename std::enable_if<i == 4, int>::type = 0>
1367 {
1368 return m_throttlingTime;
1369 }
1370
1371 template<size_t i, typename std::enable_if<i == 5, int>::type = 0>
1373 {
1374 return m_transferTime;
1375 }
1376
1378 template<typename F>
1379 void forEach(const F &f) const
1380 {
1381 f(m_acquisitionTime);
1382 f(m_captureTime);
1383 f(m_kernelComputeTime);
1384 f(m_reprocessingTime);
1385 f(m_throttlingTime);
1386 f(m_transferTime);
1387 }
1388
1390 template<typename F>
1391 void forEach(const F &f)
1392 {
1393 f(m_acquisitionTime);
1394 f(m_captureTime);
1395 f(m_kernelComputeTime);
1396 f(m_reprocessingTime);
1397 f(m_throttlingTime);
1398 f(m_transferTime);
1399 }
1400
1402 bool operator==(const Metrics &other) const;
1403
1405 bool operator!=(const Metrics &other) const;
1406
1408 std::string toString() const;
1409
1411 friend std::ostream &operator<<(std::ostream &stream, const Metrics &value)
1412 {
1413 return stream << value.toString();
1414 }
1415
1416 private:
1417 void setFromString(const std::string &value);
1418
1419 void setFromString(const std::string &fullPath, const std::string &value);
1420
1421 std::string getString(const std::string &fullPath) const;
1422
1423 AcquisitionTime m_acquisitionTime;
1424 CaptureTime m_captureTime;
1425 KernelComputeTime m_kernelComputeTime;
1426 ReprocessingTime m_reprocessingTime;
1427 ThrottlingTime m_throttlingTime;
1428 TransferTime m_transferTime;
1429
1430 friend struct DataModel::Detail::Befriend<Metrics>;
1431 };
1432
1434
1435 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
1437 {
1438 public:
1441
1443 static constexpr const char *path{ "SoftwareVersion" };
1444
1446 static constexpr const char *name{ "SoftwareVersion" };
1447
1449 static constexpr const char *description{
1450 R"description(The version information for installed software at the time of image capture)description"
1451 };
1452
1454
1455 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
1457 {
1458 public:
1461
1463 static constexpr const char *path{ "SoftwareVersion/Core" };
1464
1466 static constexpr const char *name{ "Core" };
1467
1469 static constexpr const char *description{ R"description(Core version)description" };
1470
1472 using ValueType = std::string;
1473
1476 {
1477 return { 0, std::numeric_limits<ValueType::size_type>::max() };
1478 }
1479
1481 Core() = default;
1482
1484 explicit Core(std::string value)
1485 : m_value{ std::move(value) }
1486 {}
1487
1489 const std::string &value() const;
1490
1492 std::string toString() const;
1493
1495 bool operator==(const Core &other) const
1496 {
1497 return m_value == other.m_value;
1498 }
1499
1501 bool operator!=(const Core &other) const
1502 {
1503 return m_value != other.m_value;
1504 }
1505
1507 bool operator<(const Core &other) const
1508 {
1509 return m_value < other.m_value;
1510 }
1511
1513 bool operator>(const Core &other) const
1514 {
1515 return m_value > other.m_value;
1516 }
1517
1519 bool operator<=(const Core &other) const
1520 {
1521 return m_value <= other.m_value;
1522 }
1523
1525 bool operator>=(const Core &other) const
1526 {
1527 return m_value >= other.m_value;
1528 }
1529
1531 friend std::ostream &operator<<(std::ostream &stream, const Core &value)
1532 {
1533 return stream << value.toString();
1534 }
1535
1536 private:
1537 void setFromString(const std::string &value);
1538
1539 std::string m_value{ "No-version" };
1540
1541 friend struct DataModel::Detail::Befriend<Core>;
1542 };
1543
1544 using Descendants = std::tuple<FrameInfo::SoftwareVersion::Core>;
1545
1548
1560#ifndef NO_DOC
1561 template<
1562 typename... Args,
1563 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
1564 typename std::enable_if<
1565 Zivid::Detail::TypeTraits::AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::
1566 value,
1567 int>::type = 0>
1568#else
1569 template<typename... Args>
1570#endif
1571 explicit SoftwareVersion(Args &&...args)
1572 {
1573 using namespace Zivid::Detail::TypeTraits;
1574
1575 static_assert(
1576 AllArgsDecayedAreUnique<Args...>::value,
1577 "Found duplicate types among the arguments passed to SoftwareVersion(...). "
1578 "Types should be listed at most once.");
1579
1580 set(std::forward<Args>(args)...);
1581 }
1582
1593#ifndef NO_DOC
1594 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
1595#else
1596 template<typename... Args>
1597#endif
1598 void set(Args &&...args)
1599 {
1600 using namespace Zivid::Detail::TypeTraits;
1601
1602 using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
1603 static_assert(
1604 AllArgsAreDescendantNodes::value, "All arguments passed to set(...) must be descendant nodes.");
1605
1606 static_assert(
1607 AllArgsDecayedAreUnique<Args...>::value,
1608 "Found duplicate types among the arguments passed to set(...). "
1609 "Types should be listed at most once.");
1610
1611 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
1612 }
1613
1625#ifndef NO_DOC
1626 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
1627#else
1628 template<typename... Args>
1629#endif
1630 SoftwareVersion copyWith(Args &&...args) const
1631 {
1632 using namespace Zivid::Detail::TypeTraits;
1633
1634 using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
1635 static_assert(
1636 AllArgsAreDescendantNodes::value,
1637 "All arguments passed to copyWith(...) must be descendant nodes.");
1638
1639 static_assert(
1640 AllArgsDecayedAreUnique<Args...>::value,
1641 "Found duplicate types among the arguments passed to copyWith(...). "
1642 "Types should be listed at most once.");
1643
1644 auto copy{ *this };
1645 copy.set(std::forward<Args>(args)...);
1646 return copy;
1647 }
1648
1650 const Core &core() const
1651 {
1652 return m_core;
1653 }
1654
1657 {
1658 return m_core;
1659 }
1660
1662 SoftwareVersion &set(const Core &value)
1663 {
1664 m_core = value;
1665 return *this;
1666 }
1667
1668 template<
1669 typename T,
1670 typename std::enable_if<std::is_same<T, FrameInfo::SoftwareVersion::Core>::value, int>::type = 0>
1672 {
1673 return m_core;
1674 }
1675
1676 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
1678 {
1679 return m_core;
1680 }
1681
1683 template<typename F>
1684 void forEach(const F &f) const
1685 {
1686 f(m_core);
1687 }
1688
1690 template<typename F>
1691 void forEach(const F &f)
1692 {
1693 f(m_core);
1694 }
1695
1697 bool operator==(const SoftwareVersion &other) const;
1698
1700 bool operator!=(const SoftwareVersion &other) const;
1701
1703 std::string toString() const;
1704
1706 friend std::ostream &operator<<(std::ostream &stream, const SoftwareVersion &value)
1707 {
1708 return stream << value.toString();
1709 }
1710
1711 private:
1712 void setFromString(const std::string &value);
1713
1714 void setFromString(const std::string &fullPath, const std::string &value);
1715
1716 std::string getString(const std::string &fullPath) const;
1717
1718 Core m_core;
1719
1720 friend struct DataModel::Detail::Befriend<SoftwareVersion>;
1721 };
1722
1724
1725 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
1727 {
1728 public:
1731
1733 static constexpr const char *path{ "SystemInfo" };
1734
1736 static constexpr const char *name{ "SystemInfo" };
1737
1739 static constexpr const char *description{
1740 R"description(Information about the system that captured this frame)description"
1741 };
1742
1744
1745 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
1747 {
1748 public:
1751
1753 static constexpr const char *path{ "SystemInfo/CPU" };
1754
1756 static constexpr const char *name{ "CPU" };
1757
1759 static constexpr const char *description{ R"description(CPU)description" };
1760
1762
1763 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
1765 {
1766 public:
1769
1771 static constexpr const char *path{ "SystemInfo/CPU/Model" };
1772
1774 static constexpr const char *name{ "Model" };
1775
1777 static constexpr const char *description{ R"description(CPU model)description" };
1778
1780 using ValueType = std::string;
1781
1784 {
1785 return { 0, std::numeric_limits<ValueType::size_type>::max() };
1786 }
1787
1789 Model() = default;
1790
1792 explicit Model(std::string value)
1793 : m_value{ std::move(value) }
1794 {}
1795
1797 const std::string &value() const;
1798
1800 std::string toString() const;
1801
1803 bool operator==(const Model &other) const
1804 {
1805 return m_value == other.m_value;
1806 }
1807
1809 bool operator!=(const Model &other) const
1810 {
1811 return m_value != other.m_value;
1812 }
1813
1815 bool operator<(const Model &other) const
1816 {
1817 return m_value < other.m_value;
1818 }
1819
1821 bool operator>(const Model &other) const
1822 {
1823 return m_value > other.m_value;
1824 }
1825
1827 bool operator<=(const Model &other) const
1828 {
1829 return m_value <= other.m_value;
1830 }
1831
1833 bool operator>=(const Model &other) const
1834 {
1835 return m_value >= other.m_value;
1836 }
1837
1839 friend std::ostream &operator<<(std::ostream &stream, const Model &value)
1840 {
1841 return stream << value.toString();
1842 }
1843
1844 private:
1845 void setFromString(const std::string &value);
1846
1847 std::string m_value{};
1848
1849 friend struct DataModel::Detail::Befriend<Model>;
1850 };
1851
1852 using Descendants = std::tuple<FrameInfo::SystemInfo::CPU::Model>;
1853
1856
1868#ifndef NO_DOC
1869 template<
1870 typename... Args,
1871 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
1872 typename std::enable_if<
1873 Zivid::Detail::TypeTraits::AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::
1874 value,
1875 int>::type = 0>
1876#else
1877 template<typename... Args>
1878#endif
1879 explicit CPU(Args &&...args)
1880 {
1881 using namespace Zivid::Detail::TypeTraits;
1882
1883 static_assert(
1884 AllArgsDecayedAreUnique<Args...>::value,
1885 "Found duplicate types among the arguments passed to CPU(...). "
1886 "Types should be listed at most once.");
1887
1888 set(std::forward<Args>(args)...);
1889 }
1890
1901#ifndef NO_DOC
1902 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
1903#else
1904 template<typename... Args>
1905#endif
1906 void set(Args &&...args)
1907 {
1908 using namespace Zivid::Detail::TypeTraits;
1909
1910 using AllArgsAreDescendantNodes =
1911 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
1912 static_assert(
1913 AllArgsAreDescendantNodes::value, "All arguments passed to set(...) must be descendant nodes.");
1914
1915 static_assert(
1916 AllArgsDecayedAreUnique<Args...>::value,
1917 "Found duplicate types among the arguments passed to set(...). "
1918 "Types should be listed at most once.");
1919
1920 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
1921 }
1922
1934#ifndef NO_DOC
1935 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
1936#else
1937 template<typename... Args>
1938#endif
1939 CPU copyWith(Args &&...args) const
1940 {
1941 using namespace Zivid::Detail::TypeTraits;
1942
1943 using AllArgsAreDescendantNodes =
1944 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
1945 static_assert(
1946 AllArgsAreDescendantNodes::value,
1947 "All arguments passed to copyWith(...) must be descendant nodes.");
1948
1949 static_assert(
1950 AllArgsDecayedAreUnique<Args...>::value,
1951 "Found duplicate types among the arguments passed to copyWith(...). "
1952 "Types should be listed at most once.");
1953
1954 auto copy{ *this };
1955 copy.set(std::forward<Args>(args)...);
1956 return copy;
1957 }
1958
1960 const Model &model() const
1961 {
1962 return m_model;
1963 }
1964
1967 {
1968 return m_model;
1969 }
1970
1972 CPU &set(const Model &value)
1973 {
1974 m_model = value;
1975 return *this;
1976 }
1977
1978 template<
1979 typename T,
1980 typename std::enable_if<std::is_same<T, FrameInfo::SystemInfo::CPU::Model>::value, int>::type = 0>
1982 {
1983 return m_model;
1984 }
1985
1986 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
1988 {
1989 return m_model;
1990 }
1991
1993 template<typename F>
1994 void forEach(const F &f) const
1995 {
1996 f(m_model);
1997 }
1998
2000 template<typename F>
2001 void forEach(const F &f)
2002 {
2003 f(m_model);
2004 }
2005
2007 bool operator==(const CPU &other) const;
2008
2010 bool operator!=(const CPU &other) const;
2011
2013 std::string toString() const;
2014
2016 friend std::ostream &operator<<(std::ostream &stream, const CPU &value)
2017 {
2018 return stream << value.toString();
2019 }
2020
2021 private:
2022 void setFromString(const std::string &value);
2023
2024 void setFromString(const std::string &fullPath, const std::string &value);
2025
2026 std::string getString(const std::string &fullPath) const;
2027
2028 Model m_model;
2029
2030 friend struct DataModel::Detail::Befriend<CPU>;
2031 };
2032
2034
2035 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
2037 {
2038 public:
2041
2043 static constexpr const char *path{ "SystemInfo/ComputeDevice" };
2044
2046 static constexpr const char *name{ "ComputeDevice" };
2047
2049 static constexpr const char *description{ R"description(Compute device)description" };
2050
2052
2053 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
2055 {
2056 public:
2059
2061 static constexpr const char *path{ "SystemInfo/ComputeDevice/Model" };
2062
2064 static constexpr const char *name{ "Model" };
2065
2067 static constexpr const char *description{ R"description(Compute device model)description" };
2068
2070 using ValueType = std::string;
2071
2074 {
2075 return { 0, std::numeric_limits<ValueType::size_type>::max() };
2076 }
2077
2079 Model() = default;
2080
2082 explicit Model(std::string value)
2083 : m_value{ std::move(value) }
2084 {}
2085
2087 const std::string &value() const;
2088
2090 std::string toString() const;
2091
2093 bool operator==(const Model &other) const
2094 {
2095 return m_value == other.m_value;
2096 }
2097
2099 bool operator!=(const Model &other) const
2100 {
2101 return m_value != other.m_value;
2102 }
2103
2105 bool operator<(const Model &other) const
2106 {
2107 return m_value < other.m_value;
2108 }
2109
2111 bool operator>(const Model &other) const
2112 {
2113 return m_value > other.m_value;
2114 }
2115
2117 bool operator<=(const Model &other) const
2118 {
2119 return m_value <= other.m_value;
2120 }
2121
2123 bool operator>=(const Model &other) const
2124 {
2125 return m_value >= other.m_value;
2126 }
2127
2129 friend std::ostream &operator<<(std::ostream &stream, const Model &value)
2130 {
2131 return stream << value.toString();
2132 }
2133
2134 private:
2135 void setFromString(const std::string &value);
2136
2137 std::string m_value{};
2138
2139 friend struct DataModel::Detail::Befriend<Model>;
2140 };
2141
2143
2144 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
2146 {
2147 public:
2150
2152 static constexpr const char *path{ "SystemInfo/ComputeDevice/Vendor" };
2153
2155 static constexpr const char *name{ "Vendor" };
2156
2158 static constexpr const char *description{ R"description(Compute device vendor)description" };
2159
2161 using ValueType = std::string;
2162
2165 {
2166 return { 0, std::numeric_limits<ValueType::size_type>::max() };
2167 }
2168
2170 Vendor() = default;
2171
2173 explicit Vendor(std::string value)
2174 : m_value{ std::move(value) }
2175 {}
2176
2178 const std::string &value() const;
2179
2181 std::string toString() const;
2182
2184 bool operator==(const Vendor &other) const
2185 {
2186 return m_value == other.m_value;
2187 }
2188
2190 bool operator!=(const Vendor &other) const
2191 {
2192 return m_value != other.m_value;
2193 }
2194
2196 bool operator<(const Vendor &other) const
2197 {
2198 return m_value < other.m_value;
2199 }
2200
2202 bool operator>(const Vendor &other) const
2203 {
2204 return m_value > other.m_value;
2205 }
2206
2208 bool operator<=(const Vendor &other) const
2209 {
2210 return m_value <= other.m_value;
2211 }
2212
2214 bool operator>=(const Vendor &other) const
2215 {
2216 return m_value >= other.m_value;
2217 }
2218
2220 friend std::ostream &operator<<(std::ostream &stream, const Vendor &value)
2221 {
2222 return stream << value.toString();
2223 }
2224
2225 private:
2226 void setFromString(const std::string &value);
2227
2228 std::string m_value{};
2229
2230 friend struct DataModel::Detail::Befriend<Vendor>;
2231 };
2232
2233 using Descendants = std::
2234 tuple<FrameInfo::SystemInfo::ComputeDevice::Model, FrameInfo::SystemInfo::ComputeDevice::Vendor>;
2235
2238
2251#ifndef NO_DOC
2252 template<
2253 typename... Args,
2254 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
2255 typename std::enable_if<
2256 Zivid::Detail::TypeTraits::AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::
2257 value,
2258 int>::type = 0>
2259#else
2260 template<typename... Args>
2261#endif
2262 explicit ComputeDevice(Args &&...args)
2263 {
2264 using namespace Zivid::Detail::TypeTraits;
2265
2266 static_assert(
2267 AllArgsDecayedAreUnique<Args...>::value,
2268 "Found duplicate types among the arguments passed to ComputeDevice(...). "
2269 "Types should be listed at most once.");
2270
2271 set(std::forward<Args>(args)...);
2272 }
2273
2285#ifndef NO_DOC
2286 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
2287#else
2288 template<typename... Args>
2289#endif
2290 void set(Args &&...args)
2291 {
2292 using namespace Zivid::Detail::TypeTraits;
2293
2294 using AllArgsAreDescendantNodes =
2295 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
2296 static_assert(
2297 AllArgsAreDescendantNodes::value, "All arguments passed to set(...) must be descendant nodes.");
2298
2299 static_assert(
2300 AllArgsDecayedAreUnique<Args...>::value,
2301 "Found duplicate types among the arguments passed to set(...). "
2302 "Types should be listed at most once.");
2303
2304 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
2305 }
2306
2319#ifndef NO_DOC
2320 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
2321#else
2322 template<typename... Args>
2323#endif
2324 ComputeDevice copyWith(Args &&...args) const
2325 {
2326 using namespace Zivid::Detail::TypeTraits;
2327
2328 using AllArgsAreDescendantNodes =
2329 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
2330 static_assert(
2331 AllArgsAreDescendantNodes::value,
2332 "All arguments passed to copyWith(...) must be descendant nodes.");
2333
2334 static_assert(
2335 AllArgsDecayedAreUnique<Args...>::value,
2336 "Found duplicate types among the arguments passed to copyWith(...). "
2337 "Types should be listed at most once.");
2338
2339 auto copy{ *this };
2340 copy.set(std::forward<Args>(args)...);
2341 return copy;
2342 }
2343
2345 const Model &model() const
2346 {
2347 return m_model;
2348 }
2349
2352 {
2353 return m_model;
2354 }
2355
2357 ComputeDevice &set(const Model &value)
2358 {
2359 m_model = value;
2360 return *this;
2361 }
2362
2364 const Vendor &vendor() const
2365 {
2366 return m_vendor;
2367 }
2368
2371 {
2372 return m_vendor;
2373 }
2374
2376 ComputeDevice &set(const Vendor &value)
2377 {
2378 m_vendor = value;
2379 return *this;
2380 }
2381
2382 template<
2383 typename T,
2384 typename std::enable_if<std::is_same<T, FrameInfo::SystemInfo::ComputeDevice::Model>::value, int>::
2385 type = 0>
2387 {
2388 return m_model;
2389 }
2390
2391 template<
2392 typename T,
2393 typename std::enable_if<std::is_same<T, FrameInfo::SystemInfo::ComputeDevice::Vendor>::value, int>::
2394 type = 0>
2396 {
2397 return m_vendor;
2398 }
2399
2400 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
2402 {
2403 return m_model;
2404 }
2405
2406 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
2408 {
2409 return m_vendor;
2410 }
2411
2413 template<typename F>
2414 void forEach(const F &f) const
2415 {
2416 f(m_model);
2417 f(m_vendor);
2418 }
2419
2421 template<typename F>
2422 void forEach(const F &f)
2423 {
2424 f(m_model);
2425 f(m_vendor);
2426 }
2427
2429 bool operator==(const ComputeDevice &other) const;
2430
2432 bool operator!=(const ComputeDevice &other) const;
2433
2435 std::string toString() const;
2436
2438 friend std::ostream &operator<<(std::ostream &stream, const ComputeDevice &value)
2439 {
2440 return stream << value.toString();
2441 }
2442
2443 private:
2444 void setFromString(const std::string &value);
2445
2446 void setFromString(const std::string &fullPath, const std::string &value);
2447
2448 std::string getString(const std::string &fullPath) const;
2449
2450 Model m_model;
2451 Vendor m_vendor;
2452
2453 friend struct DataModel::Detail::Befriend<ComputeDevice>;
2454 };
2455
2457
2458 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
2460 {
2461 public:
2464
2466 static constexpr const char *path{ "SystemInfo/OperatingSystem" };
2467
2469 static constexpr const char *name{ "OperatingSystem" };
2470
2472 static constexpr const char *description{ R"description(Operating system)description" };
2473
2475 using ValueType = std::string;
2476
2479 {
2480 return { 0, std::numeric_limits<ValueType::size_type>::max() };
2481 }
2482
2484 OperatingSystem() = default;
2485
2487 explicit OperatingSystem(std::string value)
2488 : m_value{ std::move(value) }
2489 {}
2490
2492 const std::string &value() const;
2493
2495 std::string toString() const;
2496
2498 bool operator==(const OperatingSystem &other) const
2499 {
2500 return m_value == other.m_value;
2501 }
2502
2504 bool operator!=(const OperatingSystem &other) const
2505 {
2506 return m_value != other.m_value;
2507 }
2508
2510 bool operator<(const OperatingSystem &other) const
2511 {
2512 return m_value < other.m_value;
2513 }
2514
2516 bool operator>(const OperatingSystem &other) const
2517 {
2518 return m_value > other.m_value;
2519 }
2520
2522 bool operator<=(const OperatingSystem &other) const
2523 {
2524 return m_value <= other.m_value;
2525 }
2526
2528 bool operator>=(const OperatingSystem &other) const
2529 {
2530 return m_value >= other.m_value;
2531 }
2532
2534 friend std::ostream &operator<<(std::ostream &stream, const OperatingSystem &value)
2535 {
2536 return stream << value.toString();
2537 }
2538
2539 private:
2540 void setFromString(const std::string &value);
2541
2542 std::string m_value{};
2543
2544 friend struct DataModel::Detail::Befriend<OperatingSystem>;
2545 };
2546
2547 using Descendants = std::tuple<
2554
2557
2574#ifndef NO_DOC
2575 template<
2576 typename... Args,
2577 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
2578 typename std::enable_if<
2579 Zivid::Detail::TypeTraits::AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::
2580 value,
2581 int>::type = 0>
2582#else
2583 template<typename... Args>
2584#endif
2585 explicit SystemInfo(Args &&...args)
2586 {
2587 using namespace Zivid::Detail::TypeTraits;
2588
2589 static_assert(
2590 AllArgsDecayedAreUnique<Args...>::value,
2591 "Found duplicate types among the arguments passed to SystemInfo(...). "
2592 "Types should be listed at most once.");
2593
2594 set(std::forward<Args>(args)...);
2595 }
2596
2612#ifndef NO_DOC
2613 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
2614#else
2615 template<typename... Args>
2616#endif
2617 void set(Args &&...args)
2618 {
2619 using namespace Zivid::Detail::TypeTraits;
2620
2621 using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
2622 static_assert(
2623 AllArgsAreDescendantNodes::value, "All arguments passed to set(...) must be descendant nodes.");
2624
2625 static_assert(
2626 AllArgsDecayedAreUnique<Args...>::value,
2627 "Found duplicate types among the arguments passed to set(...). "
2628 "Types should be listed at most once.");
2629
2630 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
2631 }
2632
2649#ifndef NO_DOC
2650 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
2651#else
2652 template<typename... Args>
2653#endif
2654 SystemInfo copyWith(Args &&...args) const
2655 {
2656 using namespace Zivid::Detail::TypeTraits;
2657
2658 using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
2659 static_assert(
2660 AllArgsAreDescendantNodes::value,
2661 "All arguments passed to copyWith(...) must be descendant nodes.");
2662
2663 static_assert(
2664 AllArgsDecayedAreUnique<Args...>::value,
2665 "Found duplicate types among the arguments passed to copyWith(...). "
2666 "Types should be listed at most once.");
2667
2668 auto copy{ *this };
2669 copy.set(std::forward<Args>(args)...);
2670 return copy;
2671 }
2672
2674 const CPU &cpu() const
2675 {
2676 return m_cpu;
2677 }
2678
2681 {
2682 return m_cpu;
2683 }
2684
2686 SystemInfo &set(const CPU &value)
2687 {
2688 m_cpu = value;
2689 return *this;
2690 }
2691
2694 {
2695 m_cpu.set(value);
2696 return *this;
2697 }
2698
2701 {
2702 return m_computeDevice;
2703 }
2704
2707 {
2708 return m_computeDevice;
2709 }
2710
2713 {
2714 m_computeDevice = value;
2715 return *this;
2716 }
2717
2720 {
2721 m_computeDevice.set(value);
2722 return *this;
2723 }
2724
2727 {
2728 m_computeDevice.set(value);
2729 return *this;
2730 }
2731
2734 {
2735 return m_operatingSystem;
2736 }
2737
2740 {
2741 return m_operatingSystem;
2742 }
2743
2746 {
2747 m_operatingSystem = value;
2748 return *this;
2749 }
2750
2751 template<
2752 typename T,
2753 typename std::enable_if<std::is_same<T, FrameInfo::SystemInfo::CPU>::value, int>::type = 0>
2755 {
2756 return m_cpu;
2757 }
2758
2759 template<
2760 typename T,
2761 typename std::enable_if<std::is_same<T, FrameInfo::SystemInfo::CPU::Model>::value, int>::type = 0>
2763 {
2764 return m_cpu.get<FrameInfo::SystemInfo::CPU::Model>();
2765 }
2766
2767 template<
2768 typename T,
2769 typename std::enable_if<std::is_same<T, FrameInfo::SystemInfo::ComputeDevice>::value, int>::type = 0>
2771 {
2772 return m_computeDevice;
2773 }
2774
2775 template<
2776 typename T,
2777 typename std::enable_if<std::is_same<T, FrameInfo::SystemInfo::ComputeDevice::Model>::value, int>::
2778 type = 0>
2780 {
2781 return m_computeDevice.get<FrameInfo::SystemInfo::ComputeDevice::Model>();
2782 }
2783
2784 template<
2785 typename T,
2786 typename std::enable_if<std::is_same<T, FrameInfo::SystemInfo::ComputeDevice::Vendor>::value, int>::
2787 type = 0>
2789 {
2790 return m_computeDevice.get<FrameInfo::SystemInfo::ComputeDevice::Vendor>();
2791 }
2792
2793 template<
2794 typename T,
2795 typename std::enable_if<std::is_same<T, FrameInfo::SystemInfo::OperatingSystem>::value, int>::type = 0>
2797 {
2798 return m_operatingSystem;
2799 }
2800
2801 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
2803 {
2804 return m_cpu;
2805 }
2806
2807 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
2809 {
2810 return m_computeDevice;
2811 }
2812
2813 template<size_t i, typename std::enable_if<i == 2, int>::type = 0>
2815 {
2816 return m_operatingSystem;
2817 }
2818
2820 template<typename F>
2821 void forEach(const F &f) const
2822 {
2823 f(m_cpu);
2824 f(m_computeDevice);
2825 f(m_operatingSystem);
2826 }
2827
2829 template<typename F>
2830 void forEach(const F &f)
2831 {
2832 f(m_cpu);
2833 f(m_computeDevice);
2834 f(m_operatingSystem);
2835 }
2836
2838 bool operator==(const SystemInfo &other) const;
2839
2841 bool operator!=(const SystemInfo &other) const;
2842
2844 std::string toString() const;
2845
2847 friend std::ostream &operator<<(std::ostream &stream, const SystemInfo &value)
2848 {
2849 return stream << value.toString();
2850 }
2851
2852 private:
2853 void setFromString(const std::string &value);
2854
2855 void setFromString(const std::string &fullPath, const std::string &value);
2856
2857 std::string getString(const std::string &fullPath) const;
2858
2859 CPU m_cpu;
2860 ComputeDevice m_computeDevice;
2861 OperatingSystem m_operatingSystem;
2862
2863 friend struct DataModel::Detail::Befriend<SystemInfo>;
2864 };
2865
2867
2868 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
2870 {
2871 public:
2874
2876 static constexpr const char *path{ "TimeStamp" };
2877
2879 static constexpr const char *name{ "TimeStamp" };
2880
2882 static constexpr const char *description{ R"description(The time of frame capture)description" };
2883
2885 using ValueType = std::chrono::system_clock::time_point;
2886
2889 {
2890 return { std::chrono::system_clock::time_point::min(), std::chrono::system_clock::time_point::max() };
2891 }
2892
2894 TimeStamp() = default;
2895
2897 explicit constexpr TimeStamp(std::chrono::system_clock::time_point value)
2898 : m_value{ value }
2899 {}
2900
2902 std::chrono::system_clock::time_point value() const;
2903
2905 std::string toString() const;
2906
2908 bool operator==(const TimeStamp &other) const
2909 {
2910 return m_value == other.m_value;
2911 }
2912
2914 bool operator!=(const TimeStamp &other) const
2915 {
2916 return m_value != other.m_value;
2917 }
2918
2920 bool operator<(const TimeStamp &other) const
2921 {
2922 return m_value < other.m_value;
2923 }
2924
2926 bool operator>(const TimeStamp &other) const
2927 {
2928 return m_value > other.m_value;
2929 }
2930
2932 bool operator<=(const TimeStamp &other) const
2933 {
2934 return m_value <= other.m_value;
2935 }
2936
2938 bool operator>=(const TimeStamp &other) const
2939 {
2940 return m_value >= other.m_value;
2941 }
2942
2944 friend std::ostream &operator<<(std::ostream &stream, const TimeStamp &value)
2945 {
2946 return stream << value.toString();
2947 }
2948
2949 private:
2950 void setFromString(const std::string &value);
2951
2952 std::chrono::system_clock::time_point m_value{};
2953
2954 friend struct DataModel::Detail::Befriend<TimeStamp>;
2955 };
2956
2957 using Descendants = std::tuple<
2977
2980
2982 explicit FrameInfo(const std::string &fileName);
2983
2989 [[nodiscard]] static FrameInfo fromSerialized(const std::string &value);
2990
2996 std::string serialize() const;
2997
3027#ifndef NO_DOC
3028 template<
3029 typename... Args,
3030 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
3031 typename std::enable_if<
3032 Zivid::Detail::TypeTraits::AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::value,
3033 int>::type = 0>
3034#else
3035 template<typename... Args>
3036#endif
3037 explicit FrameInfo(Args &&...args)
3038 {
3039 using namespace Zivid::Detail::TypeTraits;
3040
3041 static_assert(
3042 AllArgsDecayedAreUnique<Args...>::value,
3043 "Found duplicate types among the arguments passed to FrameInfo(...). "
3044 "Types should be listed at most once.");
3045
3046 set(std::forward<Args>(args)...);
3047 }
3048
3077#ifndef NO_DOC
3078 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
3079#else
3080 template<typename... Args>
3081#endif
3082 void set(Args &&...args)
3083 {
3084 using namespace Zivid::Detail::TypeTraits;
3085
3086 using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
3087 static_assert(
3088 AllArgsAreDescendantNodes::value, "All arguments passed to set(...) must be descendant nodes.");
3089
3090 static_assert(
3091 AllArgsDecayedAreUnique<Args...>::value,
3092 "Found duplicate types among the arguments passed to set(...). "
3093 "Types should be listed at most once.");
3094
3095 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
3096 }
3097
3127#ifndef NO_DOC
3128 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
3129#else
3130 template<typename... Args>
3131#endif
3132 FrameInfo copyWith(Args &&...args) const
3133 {
3134 using namespace Zivid::Detail::TypeTraits;
3135
3136 using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
3137 static_assert(
3138 AllArgsAreDescendantNodes::value, "All arguments passed to copyWith(...) must be descendant nodes.");
3139
3140 static_assert(
3141 AllArgsDecayedAreUnique<Args...>::value,
3142 "Found duplicate types among the arguments passed to copyWith(...). "
3143 "Types should be listed at most once.");
3144
3145 auto copy{ *this };
3146 copy.set(std::forward<Args>(args)...);
3147 return copy;
3148 }
3149
3152 {
3153 return m_diagnostics;
3154 }
3155
3158 {
3159 return m_diagnostics;
3160 }
3161
3164 {
3165 m_diagnostics = value;
3166 return *this;
3167 }
3168
3171 {
3172 m_diagnostics.set(value);
3173 return *this;
3174 }
3175
3177 const Metrics &metrics() const
3178 {
3179 return m_metrics;
3180 }
3181
3184 {
3185 return m_metrics;
3186 }
3187
3189 FrameInfo &set(const Metrics &value)
3190 {
3191 m_metrics = value;
3192 return *this;
3193 }
3194
3197 {
3198 m_metrics.set(value);
3199 return *this;
3200 }
3201
3204 {
3205 m_metrics.set(value);
3206 return *this;
3207 }
3208
3211 {
3212 m_metrics.set(value);
3213 return *this;
3214 }
3215
3218 {
3219 m_metrics.set(value);
3220 return *this;
3221 }
3222
3225 {
3226 m_metrics.set(value);
3227 return *this;
3228 }
3229
3232 {
3233 m_metrics.set(value);
3234 return *this;
3235 }
3236
3239 {
3240 return m_softwareVersion;
3241 }
3242
3245 {
3246 return m_softwareVersion;
3247 }
3248
3251 {
3252 m_softwareVersion = value;
3253 return *this;
3254 }
3255
3258 {
3259 m_softwareVersion.set(value);
3260 return *this;
3261 }
3262
3264 const SystemInfo &systemInfo() const
3265 {
3266 return m_systemInfo;
3267 }
3268
3271 {
3272 return m_systemInfo;
3273 }
3274
3276 FrameInfo &set(const SystemInfo &value)
3277 {
3278 m_systemInfo = value;
3279 return *this;
3280 }
3281
3284 {
3285 m_systemInfo.set(value);
3286 return *this;
3287 }
3288
3291 {
3292 m_systemInfo.set(value);
3293 return *this;
3294 }
3295
3298 {
3299 m_systemInfo.set(value);
3300 return *this;
3301 }
3302
3305 {
3306 m_systemInfo.set(value);
3307 return *this;
3308 }
3309
3312 {
3313 m_systemInfo.set(value);
3314 return *this;
3315 }
3316
3319 {
3320 m_systemInfo.set(value);
3321 return *this;
3322 }
3323
3325 const TimeStamp &timeStamp() const
3326 {
3327 return m_timeStamp;
3328 }
3329
3332 {
3333 return m_timeStamp;
3334 }
3335
3337 FrameInfo &set(const TimeStamp &value)
3338 {
3339 m_timeStamp = value;
3340 return *this;
3341 }
3342
3343 template<typename T, typename std::enable_if<std::is_same<T, FrameInfo::Diagnostics>::value, int>::type = 0>
3345 {
3346 return m_diagnostics;
3347 }
3348
3349 template<
3350 typename T,
3351 typename std::enable_if<std::is_same<T, FrameInfo::Diagnostics::PacketLoss>::value, int>::type = 0>
3353 {
3354 return m_diagnostics.get<FrameInfo::Diagnostics::PacketLoss>();
3355 }
3356
3357 template<typename T, typename std::enable_if<std::is_same<T, FrameInfo::Metrics>::value, int>::type = 0>
3359 {
3360 return m_metrics;
3361 }
3362
3363 template<
3364 typename T,
3365 typename std::enable_if<std::is_same<T, FrameInfo::Metrics::AcquisitionTime>::value, int>::type = 0>
3367 {
3368 return m_metrics.get<FrameInfo::Metrics::AcquisitionTime>();
3369 }
3370
3371 template<
3372 typename T,
3373 typename std::enable_if<std::is_same<T, FrameInfo::Metrics::CaptureTime>::value, int>::type = 0>
3375 {
3376 return m_metrics.get<FrameInfo::Metrics::CaptureTime>();
3377 }
3378
3379 template<
3380 typename T,
3381 typename std::enable_if<std::is_same<T, FrameInfo::Metrics::KernelComputeTime>::value, int>::type = 0>
3383 {
3384 return m_metrics.get<FrameInfo::Metrics::KernelComputeTime>();
3385 }
3386
3387 template<
3388 typename T,
3389 typename std::enable_if<std::is_same<T, FrameInfo::Metrics::ReprocessingTime>::value, int>::type = 0>
3391 {
3392 return m_metrics.get<FrameInfo::Metrics::ReprocessingTime>();
3393 }
3394
3395 template<
3396 typename T,
3397 typename std::enable_if<std::is_same<T, FrameInfo::Metrics::ThrottlingTime>::value, int>::type = 0>
3399 {
3400 return m_metrics.get<FrameInfo::Metrics::ThrottlingTime>();
3401 }
3402
3403 template<
3404 typename T,
3405 typename std::enable_if<std::is_same<T, FrameInfo::Metrics::TransferTime>::value, int>::type = 0>
3407 {
3408 return m_metrics.get<FrameInfo::Metrics::TransferTime>();
3409 }
3410
3411 template<typename T, typename std::enable_if<std::is_same<T, FrameInfo::SoftwareVersion>::value, int>::type = 0>
3413 {
3414 return m_softwareVersion;
3415 }
3416
3417 template<
3418 typename T,
3419 typename std::enable_if<std::is_same<T, FrameInfo::SoftwareVersion::Core>::value, int>::type = 0>
3421 {
3422 return m_softwareVersion.get<FrameInfo::SoftwareVersion::Core>();
3423 }
3424
3425 template<typename T, typename std::enable_if<std::is_same<T, FrameInfo::SystemInfo>::value, int>::type = 0>
3427 {
3428 return m_systemInfo;
3429 }
3430
3431 template<typename T, typename std::enable_if<std::is_same<T, FrameInfo::SystemInfo::CPU>::value, int>::type = 0>
3433 {
3434 return m_systemInfo.get<FrameInfo::SystemInfo::CPU>();
3435 }
3436
3437 template<
3438 typename T,
3439 typename std::enable_if<std::is_same<T, FrameInfo::SystemInfo::CPU::Model>::value, int>::type = 0>
3441 {
3442 return m_systemInfo.get<FrameInfo::SystemInfo::CPU::Model>();
3443 }
3444
3445 template<
3446 typename T,
3447 typename std::enable_if<std::is_same<T, FrameInfo::SystemInfo::ComputeDevice>::value, int>::type = 0>
3449 {
3450 return m_systemInfo.get<FrameInfo::SystemInfo::ComputeDevice>();
3451 }
3452
3453 template<
3454 typename T,
3455 typename std::enable_if<std::is_same<T, FrameInfo::SystemInfo::ComputeDevice::Model>::value, int>::type = 0>
3457 {
3458 return m_systemInfo.get<FrameInfo::SystemInfo::ComputeDevice::Model>();
3459 }
3460
3461 template<
3462 typename T,
3463 typename std::enable_if<std::is_same<T, FrameInfo::SystemInfo::ComputeDevice::Vendor>::value, int>::type =
3464 0>
3466 {
3467 return m_systemInfo.get<FrameInfo::SystemInfo::ComputeDevice::Vendor>();
3468 }
3469
3470 template<
3471 typename T,
3472 typename std::enable_if<std::is_same<T, FrameInfo::SystemInfo::OperatingSystem>::value, int>::type = 0>
3474 {
3475 return m_systemInfo.get<FrameInfo::SystemInfo::OperatingSystem>();
3476 }
3477
3478 template<typename T, typename std::enable_if<std::is_same<T, FrameInfo::TimeStamp>::value, int>::type = 0>
3480 {
3481 return m_timeStamp;
3482 }
3483
3484 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
3486 {
3487 return m_diagnostics;
3488 }
3489
3490 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
3492 {
3493 return m_metrics;
3494 }
3495
3496 template<size_t i, typename std::enable_if<i == 2, int>::type = 0>
3498 {
3499 return m_softwareVersion;
3500 }
3501
3502 template<size_t i, typename std::enable_if<i == 3, int>::type = 0>
3504 {
3505 return m_systemInfo;
3506 }
3507
3508 template<size_t i, typename std::enable_if<i == 4, int>::type = 0>
3510 {
3511 return m_timeStamp;
3512 }
3513
3515 template<typename F>
3516 void forEach(const F &f) const
3517 {
3518 f(m_diagnostics);
3519 f(m_metrics);
3520 f(m_softwareVersion);
3521 f(m_systemInfo);
3522 f(m_timeStamp);
3523 }
3524
3526 template<typename F>
3527 void forEach(const F &f)
3528 {
3529 f(m_diagnostics);
3530 f(m_metrics);
3531 f(m_softwareVersion);
3532 f(m_systemInfo);
3533 f(m_timeStamp);
3534 }
3535
3537 bool operator==(const FrameInfo &other) const;
3538
3540 bool operator!=(const FrameInfo &other) const;
3541
3543 std::string toString() const;
3544
3546 friend std::ostream &operator<<(std::ostream &stream, const FrameInfo &value)
3547 {
3548 return stream << value.toString();
3549 }
3550
3552 void save(const std::string &fileName) const;
3553
3555 void load(const std::string &fileName);
3556
3557 private:
3558 void setFromString(const std::string &value);
3559
3560 void setFromString(const std::string &fullPath, const std::string &value);
3561
3562 std::string getString(const std::string &fullPath) const;
3563
3564 Diagnostics m_diagnostics;
3565 Metrics m_metrics;
3566 SoftwareVersion m_softwareVersion;
3567 SystemInfo m_systemInfo;
3568 TimeStamp m_timeStamp;
3569
3570 friend struct DataModel::Detail::Befriend<FrameInfo>;
3571 };
3572
3573#ifndef NO_DOC
3574 template<>
3575 struct FrameInfo::Version<9>
3576 {
3577 using Type = FrameInfo;
3578 };
3579#endif
3580
3581} // namespace Zivid
3582
3583#ifndef NO_DOC
3585namespace Zivid::Detail
3586{
3587
3588 ZIVID_CORE_EXPORT void save(const Zivid::FrameInfo &dataModel, std::ostream &ostream);
3589 ZIVID_CORE_EXPORT void load(Zivid::FrameInfo &dataModel, std::istream &istream);
3590
3591} // namespace Zivid::Detail
3592#endif
3593
3594#ifdef _MSC_VER
3595# pragma warning(pop)
3596#endif
3597
3598#ifndef NO_DOC
3599# if !(defined(_MSC_VER) && (_MSC_VER <= 1900))
3600namespace std // NOLINT
3601{
3602
3603 template<>
3604 struct tuple_size<Zivid::FrameInfo::Diagnostics> : integral_constant<size_t, 1>
3605 {};
3606
3607 template<size_t i>
3608 struct tuple_element<i, Zivid::FrameInfo::Diagnostics>
3609 {
3610 static_assert(i < tuple_size<Zivid::FrameInfo::Diagnostics>::value, "Index must be less than 1");
3611
3612 using type // NOLINT
3613 = decltype(declval<Zivid::FrameInfo::Diagnostics>().get<i>());
3614 };
3615
3616 template<>
3617 struct tuple_size<Zivid::FrameInfo::Metrics> : integral_constant<size_t, 6>
3618 {};
3619
3620 template<size_t i>
3621 struct tuple_element<i, Zivid::FrameInfo::Metrics>
3622 {
3623 static_assert(i < tuple_size<Zivid::FrameInfo::Metrics>::value, "Index must be less than 6");
3624
3625 using type // NOLINT
3626 = decltype(declval<Zivid::FrameInfo::Metrics>().get<i>());
3627 };
3628
3629 template<>
3630 struct tuple_size<Zivid::FrameInfo::SoftwareVersion> : integral_constant<size_t, 1>
3631 {};
3632
3633 template<size_t i>
3634 struct tuple_element<i, Zivid::FrameInfo::SoftwareVersion>
3635 {
3636 static_assert(i < tuple_size<Zivid::FrameInfo::SoftwareVersion>::value, "Index must be less than 1");
3637
3638 using type // NOLINT
3639 = decltype(declval<Zivid::FrameInfo::SoftwareVersion>().get<i>());
3640 };
3641
3642 template<>
3643 struct tuple_size<Zivid::FrameInfo::SystemInfo> : integral_constant<size_t, 3>
3644 {};
3645
3646 template<size_t i>
3647 struct tuple_element<i, Zivid::FrameInfo::SystemInfo>
3648 {
3649 static_assert(i < tuple_size<Zivid::FrameInfo::SystemInfo>::value, "Index must be less than 3");
3650
3651 using type // NOLINT
3652 = decltype(declval<Zivid::FrameInfo::SystemInfo>().get<i>());
3653 };
3654
3655 template<>
3656 struct tuple_size<Zivid::FrameInfo::SystemInfo::CPU> : integral_constant<size_t, 1>
3657 {};
3658
3659 template<size_t i>
3660 struct tuple_element<i, Zivid::FrameInfo::SystemInfo::CPU>
3661 {
3662 static_assert(i < tuple_size<Zivid::FrameInfo::SystemInfo::CPU>::value, "Index must be less than 1");
3663
3664 using type // NOLINT
3665 = decltype(declval<Zivid::FrameInfo::SystemInfo::CPU>().get<i>());
3666 };
3667
3668 template<>
3669 struct tuple_size<Zivid::FrameInfo::SystemInfo::ComputeDevice> : integral_constant<size_t, 2>
3670 {};
3671
3672 template<size_t i>
3673 struct tuple_element<i, Zivid::FrameInfo::SystemInfo::ComputeDevice>
3674 {
3675 static_assert(i < tuple_size<Zivid::FrameInfo::SystemInfo::ComputeDevice>::value, "Index must be less than 2");
3676
3677 using type // NOLINT
3678 = decltype(declval<Zivid::FrameInfo::SystemInfo::ComputeDevice>().get<i>());
3679 };
3680
3681 template<>
3682 struct tuple_size<Zivid::FrameInfo> : integral_constant<size_t, 5>
3683 {};
3684
3685 template<size_t i>
3686 struct tuple_element<i, Zivid::FrameInfo>
3687 {
3688 static_assert(i < tuple_size<Zivid::FrameInfo>::value, "Index must be less than 5");
3689
3690 using type // NOLINT
3691 = decltype(declval<Zivid::FrameInfo>().get<i>());
3692 };
3693
3694} // namespace std
3695# endif
3696#endif
3697
3698// If we have access to the DataModel library, automatically include internal DataModel
3699// header. This header is necessary for serialization and deserialization.
3700#if defined(__has_include) && !defined(NO_DOC)
3701# if __has_include("Zivid/FrameInfoInternal.h") && __has_include("Zivid/DataModelNodeMetaData.h")
3702# include "Zivid/FrameInfoInternal.h"
3703# endif
3704#endif
#define ZIVID_CORE_EXPORT
Definition CoreExport.h:56
Contains information about the compute device used by Zivid::Application.
Definition ComputeDevice.h:62
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
Transfer Time is the duration from when the capture is sent to the camera to when the last of the fra...
Definition FrameInfo.h:947
bool operator!=(const TransferTime &other) const
Comparison operator.
Definition FrameInfo.h:1010
bool operator<(const TransferTime &other) const
Comparison operator.
Definition FrameInfo.h:1016
static constexpr Range< std::chrono::microseconds > validRange()
The range of valid values for TransferTime.
Definition FrameInfo.h:975
std::string toString() const
Get the value as string.
static constexpr const char * name
The name of this value.
Definition FrameInfo.h:956
static constexpr const char * description
The description for this value.
Definition FrameInfo.h:959
bool operator>(const TransferTime &other) const
Comparison operator.
Definition FrameInfo.h:1022
bool hasValue() const
Check if the value is set.
std::chrono::microseconds value() const
Get the value.
constexpr TransferTime(std::chrono::microseconds value)
Constructor.
Definition FrameInfo.h:984
void reset()
Reset the node to unset state.
bool operator<=(const TransferTime &other) const
Comparison operator.
Definition FrameInfo.h:1028
std::chrono::microseconds ValueType
The type of the underlying value.
Definition FrameInfo.h:972
bool operator==(const TransferTime &other) const
Comparison operator.
Definition FrameInfo.h:1004
friend std::ostream & operator<<(std::ostream &stream, const TransferTime &value)
Operator to serialize the value to a stream.
Definition FrameInfo.h:1040
static constexpr const char * path
The full path for this value.
Definition FrameInfo.h:953
TransferTime()=default
Default constructor.
bool operator>=(const TransferTime &other) const
Comparison operator.
Definition FrameInfo.h:1034
static constexpr DataModel::NodeType nodeType
The type of this node.
Definition FrameInfo.h:950
Metrics related to this capture.
Definition FrameInfo.h:383
const FrameInfo::Metrics::ThrottlingTime & get() const
Definition FrameInfo.h:1328
static constexpr const char * name
The name of this value.
Definition FrameInfo.h:392
const ThrottlingTime & throttlingTime() const
Get ThrottlingTime.
Definition FrameInfo.h:1256
friend std::ostream & operator<<(std::ostream &stream, const Metrics &value)
Operator to send the value as string to a stream.
Definition FrameInfo.h:1411
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
Metrics & set(const TransferTime &value)
Set TransferTime.
Definition FrameInfo.h:1287
const KernelComputeTime & kernelComputeTime() const
Get KernelComputeTime.
Definition FrameInfo.h:1218
const FrameInfo::Metrics::ReprocessingTime & get() const
Definition FrameInfo.h:1320
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:1379
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:1160
const CaptureTime & captureTime() const
Get CaptureTime.
Definition FrameInfo.h:1199
KernelComputeTime & kernelComputeTime()
Get KernelComputeTime.
Definition FrameInfo.h:1224
const TransferTime & transferTime() const
Get TransferTime.
Definition FrameInfo.h:1275
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition FrameInfo.h:1391
CaptureTime & captureTime()
Get CaptureTime.
Definition FrameInfo.h:1205
std::tuple< FrameInfo::Metrics::AcquisitionTime, FrameInfo::Metrics::CaptureTime, FrameInfo::Metrics::KernelComputeTime, FrameInfo::Metrics::ReprocessingTime, FrameInfo::Metrics::ThrottlingTime, FrameInfo::Metrics::TransferTime > Descendants
Definition FrameInfo.h:1053
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:1123
const FrameInfo::Metrics::KernelComputeTime & get() const
Definition FrameInfo.h:1312
Metrics & set(const CaptureTime &value)
Set CaptureTime.
Definition FrameInfo.h:1211
const AcquisitionTime & acquisitionTime() const
Get AcquisitionTime.
Definition FrameInfo.h:1180
const ReprocessingTime & reprocessingTime() const
Get ReprocessingTime.
Definition FrameInfo.h:1237
const FrameInfo::Metrics::CaptureTime & get() const
Definition FrameInfo.h:1304
Metrics & set(const ThrottlingTime &value)
Set ThrottlingTime.
Definition FrameInfo.h:1268
AcquisitionTime & acquisitionTime()
Get AcquisitionTime.
Definition FrameInfo.h:1186
const FrameInfo::Metrics::TransferTime & get() const
Definition FrameInfo.h:1336
ThrottlingTime & throttlingTime()
Get ThrottlingTime.
Definition FrameInfo.h:1262
std::string toString() const
Get the value as string.
Metrics & set(const KernelComputeTime &value)
Set KernelComputeTime.
Definition FrameInfo.h:1230
TransferTime & transferTime()
Get TransferTime.
Definition FrameInfo.h:1281
Metrics & set(const AcquisitionTime &value)
Set AcquisitionTime.
Definition FrameInfo.h:1192
Metrics & set(const ReprocessingTime &value)
Set ReprocessingTime.
Definition FrameInfo.h:1249
bool operator==(const Metrics &other) const
Equality operator.
ReprocessingTime & reprocessingTime()
Get ReprocessingTime.
Definition FrameInfo.h:1243
const FrameInfo::Metrics::AcquisitionTime & get() const
Definition FrameInfo.h:1296
Core version.
Definition FrameInfo.h:1457
std::string toString() const
Get the value as string.
bool operator>=(const Core &other) const
Comparison operator.
Definition FrameInfo.h:1525
static constexpr const char * path
The full path for this value.
Definition FrameInfo.h:1463
const std::string & value() const
Get the value.
static constexpr const char * description
The description for this value.
Definition FrameInfo.h:1469
bool operator!=(const Core &other) const
Comparison operator.
Definition FrameInfo.h:1501
Core(std::string value)
Constructor.
Definition FrameInfo.h:1484
static constexpr DataModel::NodeType nodeType
The type of this node.
Definition FrameInfo.h:1460
bool operator==(const Core &other) const
Comparison operator.
Definition FrameInfo.h:1495
Core()=default
Default constructor.
bool operator>(const Core &other) const
Comparison operator.
Definition FrameInfo.h:1513
bool operator<(const Core &other) const
Comparison operator.
Definition FrameInfo.h:1507
friend std::ostream & operator<<(std::ostream &stream, const Core &value)
Operator to serialize the value to a stream.
Definition FrameInfo.h:1531
bool operator<=(const Core &other) const
Comparison operator.
Definition FrameInfo.h:1519
std::string ValueType
The type of the underlying value.
Definition FrameInfo.h:1472
static constexpr const char * name
The name of this value.
Definition FrameInfo.h:1466
static constexpr Range< ValueType::size_type > validSize()
The valid sizes for Core.
Definition FrameInfo.h:1475
The version information for installed software at the time of image capture.
Definition FrameInfo.h:1437
const Core & core() const
Get Core.
Definition FrameInfo.h:1650
friend std::ostream & operator<<(std::ostream &stream, const SoftwareVersion &value)
Operator to send the value as string to a stream.
Definition FrameInfo.h:1706
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:1691
static constexpr const char * name
The name of this value.
Definition FrameInfo.h:1446
SoftwareVersion()
Default constructor.
const FrameInfo::SoftwareVersion::Core & get() const
Definition FrameInfo.h:1671
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:1630
Core & core()
Get Core.
Definition FrameInfo.h:1656
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:1684
static constexpr const char * description
The description for this value.
Definition FrameInfo.h:1449
static constexpr DataModel::NodeType nodeType
The type of this node.
Definition FrameInfo.h:1440
static constexpr const char * path
The full path for this value.
Definition FrameInfo.h:1443
void set(Args &&...args)
Set multiple arguments.
Definition FrameInfo.h:1598
std::tuple< FrameInfo::SoftwareVersion::Core > Descendants
Definition FrameInfo.h:1544
SoftwareVersion & set(const Core &value)
Set Core.
Definition FrameInfo.h:1662
std::string toString() const
Get the value as string.
CPU model.
Definition FrameInfo.h:1765
static constexpr const char * name
The name of this value.
Definition FrameInfo.h:1774
static constexpr DataModel::NodeType nodeType
The type of this node.
Definition FrameInfo.h:1768
const std::string & value() const
Get the value.
bool operator!=(const Model &other) const
Comparison operator.
Definition FrameInfo.h:1809
Model()=default
Default constructor.
bool operator<(const Model &other) const
Comparison operator.
Definition FrameInfo.h:1815
std::string toString() const
Get the value as string.
static constexpr const char * description
The description for this value.
Definition FrameInfo.h:1777
bool operator==(const Model &other) const
Comparison operator.
Definition FrameInfo.h:1803
static constexpr const char * path
The full path for this value.
Definition FrameInfo.h:1771
bool operator>=(const Model &other) const
Comparison operator.
Definition FrameInfo.h:1833
friend std::ostream & operator<<(std::ostream &stream, const Model &value)
Operator to serialize the value to a stream.
Definition FrameInfo.h:1839
bool operator<=(const Model &other) const
Comparison operator.
Definition FrameInfo.h:1827
static constexpr Range< ValueType::size_type > validSize()
The valid sizes for Model.
Definition FrameInfo.h:1783
std::string ValueType
The type of the underlying value.
Definition FrameInfo.h:1780
Model(std::string value)
Constructor.
Definition FrameInfo.h:1792
bool operator>(const Model &other) const
Comparison operator.
Definition FrameInfo.h:1821
CPU.
Definition FrameInfo.h:1747
static constexpr const char * path
The full path for this value.
Definition FrameInfo.h:1753
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition FrameInfo.h:2001
const Model & model() const
Get Model.
Definition FrameInfo.h:1960
static constexpr const char * description
The description for this value.
Definition FrameInfo.h:1759
std::tuple< FrameInfo::SystemInfo::CPU::Model > Descendants
Definition FrameInfo.h:1852
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:1994
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:2016
CPU & set(const Model &value)
Set Model.
Definition FrameInfo.h:1972
void set(Args &&...args)
Set multiple arguments.
Definition FrameInfo.h:1906
static constexpr DataModel::NodeType nodeType
The type of this node.
Definition FrameInfo.h:1750
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:1939
Model & model()
Get Model.
Definition FrameInfo.h:1966
const FrameInfo::SystemInfo::CPU::Model & get() const
Definition FrameInfo.h:1981
static constexpr const char * name
The name of this value.
Definition FrameInfo.h:1756
Compute device model.
Definition FrameInfo.h:2055
static constexpr Range< ValueType::size_type > validSize()
The valid sizes for Model.
Definition FrameInfo.h:2073
static constexpr const char * description
The description for this value.
Definition FrameInfo.h:2067
std::string toString() const
Get the value as string.
bool operator<=(const Model &other) const
Comparison operator.
Definition FrameInfo.h:2117
Model(std::string value)
Constructor.
Definition FrameInfo.h:2082
std::string ValueType
The type of the underlying value.
Definition FrameInfo.h:2070
const std::string & value() const
Get the value.
bool operator==(const Model &other) const
Comparison operator.
Definition FrameInfo.h:2093
bool operator!=(const Model &other) const
Comparison operator.
Definition FrameInfo.h:2099
bool operator>=(const Model &other) const
Comparison operator.
Definition FrameInfo.h:2123
static constexpr DataModel::NodeType nodeType
The type of this node.
Definition FrameInfo.h:2058
bool operator>(const Model &other) const
Comparison operator.
Definition FrameInfo.h:2111
static constexpr const char * name
The name of this value.
Definition FrameInfo.h:2064
friend std::ostream & operator<<(std::ostream &stream, const Model &value)
Operator to serialize the value to a stream.
Definition FrameInfo.h:2129
static constexpr const char * path
The full path for this value.
Definition FrameInfo.h:2061
bool operator<(const Model &other) const
Comparison operator.
Definition FrameInfo.h:2105
Compute device vendor.
Definition FrameInfo.h:2146
static constexpr const char * path
The full path for this value.
Definition FrameInfo.h:2152
static constexpr DataModel::NodeType nodeType
The type of this node.
Definition FrameInfo.h:2149
bool operator>(const Vendor &other) const
Comparison operator.
Definition FrameInfo.h:2202
static constexpr Range< ValueType::size_type > validSize()
The valid sizes for Vendor.
Definition FrameInfo.h:2164
friend std::ostream & operator<<(std::ostream &stream, const Vendor &value)
Operator to serialize the value to a stream.
Definition FrameInfo.h:2220
bool operator>=(const Vendor &other) const
Comparison operator.
Definition FrameInfo.h:2214
bool operator<(const Vendor &other) const
Comparison operator.
Definition FrameInfo.h:2196
bool operator==(const Vendor &other) const
Comparison operator.
Definition FrameInfo.h:2184
std::string ValueType
The type of the underlying value.
Definition FrameInfo.h:2161
static constexpr const char * name
The name of this value.
Definition FrameInfo.h:2155
static constexpr const char * description
The description for this value.
Definition FrameInfo.h:2158
std::string toString() const
Get the value as string.
bool operator<=(const Vendor &other) const
Comparison operator.
Definition FrameInfo.h:2208
const std::string & value() const
Get the value.
bool operator!=(const Vendor &other) const
Comparison operator.
Definition FrameInfo.h:2190
Vendor(std::string value)
Constructor.
Definition FrameInfo.h:2173
Compute device.
Definition FrameInfo.h:2037
static constexpr const char * name
The name of this value.
Definition FrameInfo.h:2046
void set(Args &&...args)
Set multiple arguments.
Definition FrameInfo.h:2290
ComputeDevice & set(const Model &value)
Set Model.
Definition FrameInfo.h:2357
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:2414
const Vendor & vendor() const
Get Vendor.
Definition FrameInfo.h:2364
std:: tuple< FrameInfo::SystemInfo::ComputeDevice::Model, FrameInfo::SystemInfo::ComputeDevice::Vendor > Descendants
Definition FrameInfo.h:2233
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition FrameInfo.h:2422
Model & model()
Get Model.
Definition FrameInfo.h:2351
Vendor & vendor()
Get Vendor.
Definition FrameInfo.h:2370
bool operator==(const ComputeDevice &other) const
Equality operator.
const FrameInfo::SystemInfo::ComputeDevice::Vendor & get() const
Definition FrameInfo.h:2395
static constexpr const char * description
The description for this value.
Definition FrameInfo.h:2049
const Model & model() const
Get Model.
Definition FrameInfo.h:2345
friend std::ostream & operator<<(std::ostream &stream, const ComputeDevice &value)
Operator to send the value as string to a stream.
Definition FrameInfo.h:2438
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:2376
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:2324
static constexpr DataModel::NodeType nodeType
The type of this node.
Definition FrameInfo.h:2040
const FrameInfo::SystemInfo::ComputeDevice::Model & get() const
Definition FrameInfo.h:2386
static constexpr const char * path
The full path for this value.
Definition FrameInfo.h:2043
Operating system.
Definition FrameInfo.h:2460
bool operator>(const OperatingSystem &other) const
Comparison operator.
Definition FrameInfo.h:2516
OperatingSystem(std::string value)
Constructor.
Definition FrameInfo.h:2487
bool operator!=(const OperatingSystem &other) const
Comparison operator.
Definition FrameInfo.h:2504
bool operator<(const OperatingSystem &other) const
Comparison operator.
Definition FrameInfo.h:2510
bool operator>=(const OperatingSystem &other) const
Comparison operator.
Definition FrameInfo.h:2528
bool operator==(const OperatingSystem &other) const
Comparison operator.
Definition FrameInfo.h:2498
std::string ValueType
The type of the underlying value.
Definition FrameInfo.h:2475
OperatingSystem()=default
Default constructor.
static constexpr const char * name
The name of this value.
Definition FrameInfo.h:2469
bool operator<=(const OperatingSystem &other) const
Comparison operator.
Definition FrameInfo.h:2522
static constexpr const char * description
The description for this value.
Definition FrameInfo.h:2472
static constexpr DataModel::NodeType nodeType
The type of this node.
Definition FrameInfo.h:2463
const std::string & value() const
Get the value.
static constexpr const char * path
The full path for this value.
Definition FrameInfo.h:2466
friend std::ostream & operator<<(std::ostream &stream, const OperatingSystem &value)
Operator to serialize the value to a stream.
Definition FrameInfo.h:2534
std::string toString() const
Get the value as string.
static constexpr Range< ValueType::size_type > validSize()
The valid sizes for OperatingSystem.
Definition FrameInfo.h:2478
Information about the system that captured this frame.
Definition FrameInfo.h:1727
SystemInfo & set(const CPU::Model &value)
Set CPU::Model.
Definition FrameInfo.h:2693
static constexpr const char * description
The description for this value.
Definition FrameInfo.h:1739
std::string toString() const
Get the value as string.
const FrameInfo::SystemInfo::CPU & get() const
Definition FrameInfo.h:2754
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:2821
ComputeDevice & computeDevice()
Get ComputeDevice.
Definition FrameInfo.h:2706
SystemInfo & set(const ComputeDevice &value)
Set ComputeDevice.
Definition FrameInfo.h:2712
const FrameInfo::SystemInfo::ComputeDevice::Vendor & get() const
Definition FrameInfo.h:2788
SystemInfo & set(const CPU &value)
Set CPU.
Definition FrameInfo.h:2686
bool operator==(const SystemInfo &other) const
Equality operator.
void set(Args &&...args)
Set multiple arguments.
Definition FrameInfo.h:2617
friend std::ostream & operator<<(std::ostream &stream, const SystemInfo &value)
Operator to send the value as string to a stream.
Definition FrameInfo.h:2847
static constexpr const char * name
The name of this value.
Definition FrameInfo.h:1736
const ComputeDevice & computeDevice() const
Get ComputeDevice.
Definition FrameInfo.h:2700
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition FrameInfo.h:2830
SystemInfo & set(const ComputeDevice::Vendor &value)
Set ComputeDevice::Vendor.
Definition FrameInfo.h:2726
SystemInfo & set(const OperatingSystem &value)
Set OperatingSystem.
Definition FrameInfo.h:2745
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:2654
bool operator!=(const SystemInfo &other) const
Inequality operator.
SystemInfo & set(const ComputeDevice::Model &value)
Set ComputeDevice::Model.
Definition FrameInfo.h:2719
const FrameInfo::SystemInfo::OperatingSystem & get() const
Definition FrameInfo.h:2796
CPU & cpu()
Get CPU.
Definition FrameInfo.h:2680
const FrameInfo::SystemInfo::ComputeDevice & get() const
Definition FrameInfo.h:2770
const OperatingSystem & operatingSystem() const
Get OperatingSystem.
Definition FrameInfo.h:2733
OperatingSystem & operatingSystem()
Get OperatingSystem.
Definition FrameInfo.h:2739
SystemInfo()
Default constructor.
const CPU & cpu() const
Get CPU.
Definition FrameInfo.h:2674
const FrameInfo::SystemInfo::ComputeDevice::Model & get() const
Definition FrameInfo.h:2779
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:2547
static constexpr DataModel::NodeType nodeType
The type of this node.
Definition FrameInfo.h:1730
const FrameInfo::SystemInfo::CPU::Model & get() const
Definition FrameInfo.h:2762
static constexpr const char * path
The full path for this value.
Definition FrameInfo.h:1733
The time of frame capture.
Definition FrameInfo.h:2870
std::chrono::system_clock::time_point value() const
Get the value.
static constexpr const char * name
The name of this value.
Definition FrameInfo.h:2879
bool operator>(const TimeStamp &other) const
Comparison operator.
Definition FrameInfo.h:2926
bool operator<(const TimeStamp &other) const
Comparison operator.
Definition FrameInfo.h:2920
bool operator<=(const TimeStamp &other) const
Comparison operator.
Definition FrameInfo.h:2932
static constexpr Range< std::chrono::system_clock::time_point > validRange()
The range of valid values for TimeStamp.
Definition FrameInfo.h:2888
bool operator>=(const TimeStamp &other) const
Comparison operator.
Definition FrameInfo.h:2938
static constexpr const char * description
The description for this value.
Definition FrameInfo.h:2882
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:2944
TimeStamp()=default
Default constructor.
constexpr TimeStamp(std::chrono::system_clock::time_point value)
Constructor.
Definition FrameInfo.h:2897
static constexpr const char * path
The full path for this value.
Definition FrameInfo.h:2876
bool operator!=(const TimeStamp &other) const
Comparison operator.
Definition FrameInfo.h:2914
bool operator==(const TimeStamp &other) const
Comparison operator.
Definition FrameInfo.h:2908
static constexpr DataModel::NodeType nodeType
The type of this node.
Definition FrameInfo.h:2873
std::chrono::system_clock::time_point ValueType
The type of the underlying value.
Definition FrameInfo.h:2885
Various information for a frame.
Definition FrameInfo.h:79
const FrameInfo::Metrics::ReprocessingTime & get() const
Definition FrameInfo.h:3390
TimeStamp & timeStamp()
Get TimeStamp.
Definition FrameInfo.h:3331
const FrameInfo::Metrics::ThrottlingTime & get() const
Definition FrameInfo.h:3398
std::string toString() const
Get the value as string.
Metrics & metrics()
Get Metrics.
Definition FrameInfo.h:3183
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:3516
const FrameInfo::SoftwareVersion::Core & get() const
Definition FrameInfo.h:3420
const FrameInfo::Metrics & get() const
Definition FrameInfo.h:3358
const FrameInfo::Metrics::CaptureTime & get() const
Definition FrameInfo.h:3374
FrameInfo & set(const SystemInfo::ComputeDevice &value)
Set SystemInfo::ComputeDevice.
Definition FrameInfo.h:3297
FrameInfo()
Default constructor.
const FrameInfo::Diagnostics::PacketLoss & get() const
Definition FrameInfo.h:3352
FrameInfo & set(const Metrics::ThrottlingTime &value)
Set Metrics::ThrottlingTime.
Definition FrameInfo.h:3224
static constexpr DataModel::NodeType nodeType
The type of this node.
Definition FrameInfo.h:82
void set(Args &&...args)
Set multiple arguments.
Definition FrameInfo.h:3082
const FrameInfo::SystemInfo::ComputeDevice::Model & get() const
Definition FrameInfo.h:3456
const FrameInfo::Metrics::AcquisitionTime & get() const
Definition FrameInfo.h:3366
FrameInfo & set(const SystemInfo::OperatingSystem &value)
Set SystemInfo::OperatingSystem.
Definition FrameInfo.h:3318
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:3264
FrameInfo & set(const Metrics::CaptureTime &value)
Set Metrics::CaptureTime.
Definition FrameInfo.h:3203
FrameInfo & set(const SystemInfo &value)
Set SystemInfo.
Definition FrameInfo.h:3276
const TimeStamp & timeStamp() const
Get TimeStamp.
Definition FrameInfo.h:3325
SoftwareVersion & softwareVersion()
Get SoftwareVersion.
Definition FrameInfo.h:3244
Diagnostics & diagnostics()
Get Diagnostics.
Definition FrameInfo.h:3157
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:3311
const FrameInfo::SoftwareVersion & get() const
Definition FrameInfo.h:3412
const Diagnostics & diagnostics() const
Get Diagnostics.
Definition FrameInfo.h:3151
friend std::ostream & operator<<(std::ostream &stream, const FrameInfo &value)
Operator to send the value as string to a stream.
Definition FrameInfo.h:3546
FrameInfo & set(const TimeStamp &value)
Set TimeStamp.
Definition FrameInfo.h:3337
FrameInfo(Args &&...args)
Constructor taking variadic number of arguments.
Definition FrameInfo.h:3037
static constexpr const char * name
The name of this value.
Definition FrameInfo.h:88
const FrameInfo::TimeStamp & get() const
Definition FrameInfo.h:3479
const SoftwareVersion & softwareVersion() const
Get SoftwareVersion.
Definition FrameInfo.h:3238
FrameInfo & set(const SystemInfo::CPU::Model &value)
Set SystemInfo::CPU::Model.
Definition FrameInfo.h:3290
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:3304
const FrameInfo::SystemInfo::CPU::Model & get() const
Definition FrameInfo.h:3440
const FrameInfo::SystemInfo::ComputeDevice::Vendor & get() const
Definition FrameInfo.h:3465
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::Metrics::TransferTime, 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:2957
FrameInfo & set(const SoftwareVersion &value)
Set SoftwareVersion.
Definition FrameInfo.h:3250
const FrameInfo::SystemInfo & get() const
Definition FrameInfo.h:3426
FrameInfo & set(const Metrics::ReprocessingTime &value)
Set Metrics::ReprocessingTime.
Definition FrameInfo.h:3217
FrameInfo & set(const Diagnostics &value)
Set Diagnostics.
Definition FrameInfo.h:3163
const FrameInfo::Metrics::KernelComputeTime & get() const
Definition FrameInfo.h:3382
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:3170
const FrameInfo::Diagnostics & get() const
Definition FrameInfo.h:3344
const FrameInfo::SystemInfo::ComputeDevice & get() const
Definition FrameInfo.h:3448
FrameInfo & set(const SoftwareVersion::Core &value)
Set SoftwareVersion::Core.
Definition FrameInfo.h:3257
static constexpr size_t version
Definition FrameInfo.h:93
SystemInfo & systemInfo()
Get SystemInfo.
Definition FrameInfo.h:3270
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:3527
FrameInfo & set(const Metrics::AcquisitionTime &value)
Set Metrics::AcquisitionTime.
Definition FrameInfo.h:3196
bool operator==(const FrameInfo &other) const
Equality operator.
const FrameInfo::Metrics::TransferTime & get() const
Definition FrameInfo.h:3406
FrameInfo & set(const SystemInfo::CPU &value)
Set SystemInfo::CPU.
Definition FrameInfo.h:3283
const FrameInfo::SystemInfo::CPU & get() const
Definition FrameInfo.h:3432
void load(const std::string &fileName)
Load from the given file.
FrameInfo & set(const Metrics::KernelComputeTime &value)
Set Metrics::KernelComputeTime.
Definition FrameInfo.h:3210
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:3132
FrameInfo & set(const Metrics &value)
Set Metrics.
Definition FrameInfo.h:3189
const Metrics & metrics() const
Get Metrics.
Definition FrameInfo.h:3177
const FrameInfo::SystemInfo::OperatingSystem & get() const
Definition FrameInfo.h:3473
FrameInfo & set(const Metrics::TransferTime &value)
Set Metrics::TransferTime.
Definition FrameInfo.h:3231
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