Zivid C++ API 2.18.0+1b44dbef-1
CameraState.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{ "CameraState" };
89
91 static constexpr const char *description{
92 R"description(Information about camera connection state, temperatures, etc.)description"
93 };
94
95 static constexpr size_t version{ 9 };
96
97#ifndef NO_DOC
98 template<size_t>
99 struct Version;
100
101 using LatestVersion = Zivid::CameraState;
102
103 // Short identifier. This value is not guaranteed to be universally unique
104 // Todo(ZIVID-2808): Move this to internal DataModelExt header
105 static constexpr std::array<uint8_t, 3> binaryId{ 'c', 's', 't' };
106
107#endif
108
113
114 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
116 {
117 public:
120
122 static constexpr const char *path{ "Available" };
123
125 static constexpr const char *name{ "Available" };
126
128 static constexpr const char *description{
129 R"description(Flag if camera is physically connected to the computer and is available for use, but not connected in
130software. This corresponds to the Status enums `available` or `firmwareUpdateRequired`. Zivid
131recommends to use the Status enum instead of this bool.
132)description"
133 };
134
136 using ValueType = bool;
137 static const Available yes;
138 static const Available no;
139
141 static std::set<bool> validValues()
142 {
143 return { false, true };
144 }
145
147 Available() = default;
148
150 explicit constexpr Available(bool value)
151 : m_value{ value }
152 {}
153
155 bool value() const;
156
158 std::string toString() const;
159
161 explicit operator bool() const
162 {
163 return m_value;
164 }
165
167 bool operator==(const Available &other) const
168 {
169 return m_value == other.m_value;
170 }
171
173 bool operator!=(const Available &other) const
174 {
175 return m_value != other.m_value;
176 }
177
179 friend std::ostream &operator<<(std::ostream &stream, const Available &value)
180 {
181 return stream << value.toString();
182 }
183
184 private:
185 void setFromString(const std::string &value);
186
187 bool m_value{ false };
188
189 friend struct DataModel::Detail::Befriend<Available>;
190 };
191
195
196 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
198 {
199 public:
202
204 static constexpr const char *path{ "Connected" };
205
207 static constexpr const char *name{ "Connected" };
208
210 static constexpr const char *description{
211 R"description(Flag if camera is connected in software. This bool is true when the Status value is `connected`. Zivid
212recommends to use the Status enum instead of this bool.
213)description"
214 };
215
217 using ValueType = bool;
218 static const Connected yes;
219 static const Connected no;
220
222 static std::set<bool> validValues()
223 {
224 return { false, true };
225 }
226
228 Connected() = default;
229
231 explicit constexpr Connected(bool value)
232 : m_value{ value }
233 {}
234
236 bool value() const;
237
239 std::string toString() const;
240
242 explicit operator bool() const
243 {
244 return m_value;
245 }
246
248 bool operator==(const Connected &other) const
249 {
250 return m_value == other.m_value;
251 }
252
254 bool operator!=(const Connected &other) const
255 {
256 return m_value != other.m_value;
257 }
258
260 friend std::ostream &operator<<(std::ostream &stream, const Connected &value)
261 {
262 return stream << value.toString();
263 }
264
265 private:
266 void setFromString(const std::string &value);
267
268 bool m_value{ false };
269
270 friend struct DataModel::Detail::Befriend<Connected>;
271 };
272
274
275 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
277 {
278 public:
281
283 static constexpr const char *path{ "InaccessibleReason" };
284
286 static constexpr const char *name{ "InaccessibleReason" };
287
289 static constexpr const char *description{
290 R"description(If the camera status is `inaccessible`, then this enum value will give you the reason.)description"
291 };
292
294 enum class ValueType
295 {
300 };
305
307 static std::set<ValueType> validValues()
308 {
313 }
314
317
320 : m_opt{ verifyValue(value) }
321 {}
322
328
330 bool hasValue() const;
331
333 void reset();
334
336 std::string toString() const;
337
339 friend std::ostream &operator<<(std::ostream &stream, const InaccessibleReason::ValueType &value)
340 {
341 return stream << InaccessibleReason{ value }.toString();
342 }
343
345 bool operator==(const InaccessibleReason &other) const
346 {
347 return m_opt == other.m_opt;
348 }
349
351 bool operator!=(const InaccessibleReason &other) const
352 {
353 return m_opt != other.m_opt;
354 }
355
357 friend std::ostream &operator<<(std::ostream &stream, const InaccessibleReason &value)
358 {
359 return stream << value.toString();
360 }
361
362 private:
363 void setFromString(const std::string &value);
364
365 constexpr ValueType static verifyValue(const ValueType &value)
366 {
367 return value == ValueType::ipConflictWithAnotherCamera
368 || value == ValueType::ipConflictWithLocalNetworkAdapter
369 || value == ValueType::ipNotInLocalSubnet || value == ValueType::ipInMultipleLocalSubnets
370 ? value
371 : throw std::invalid_argument{
372 "Invalid value: InaccessibleReason{ "
373 + std::to_string(static_cast<std::underlying_type<ValueType>::type>(value)) + " }"
374 };
375 }
376
377 std::optional<ValueType> m_opt;
378
379 friend struct DataModel::Detail::Befriend<InaccessibleReason>;
380 };
381
383
384 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
386 {
387 public:
390
392 static constexpr const char *path{ "Network" };
393
395 static constexpr const char *name{ "Network" };
396
398 static constexpr const char *description{ R"description(Current network state)description" };
399
402
403 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
405 {
406 public:
409
411 static constexpr const char *path{ "Network/LocalInterface" };
412
414 static constexpr const char *name{ "LocalInterface" };
415
417 static constexpr const char *description{
418 R"description(Current state of the computer's local network interface.
419)description"
420 };
421
423
424 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
426 {
427 public:
430
432 static constexpr const char *path{ "Network/LocalInterface/Ethernet" };
433
435 static constexpr const char *name{ "Ethernet" };
436
438 static constexpr const char *description{ R"description(Current Ethernet state)description" };
439
442
443 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
445 {
446 public:
449
451 static constexpr const char *path{ "Network/LocalInterface/Ethernet/LinkSpeed" };
452
454 static constexpr const char *name{ "LinkSpeed" };
455
457 static constexpr const char *description{
458 R"description(The link speed that the computer's Ethernet interface is operating at.
459)description"
460 };
461
463 enum class ValueType
464 {
472 };
473 static const LinkSpeed unknown;
474 static const LinkSpeed link10Mbps;
475 static const LinkSpeed link100Mbps;
476 static const LinkSpeed link1Gbps;
477 static const LinkSpeed link2_5Gbps;
478 static const LinkSpeed link5Gbps;
479 static const LinkSpeed link10Gbps;
480
482 static std::set<ValueType> validValues()
483 {
487 }
488
490 LinkSpeed() = default;
491
493 explicit constexpr LinkSpeed(ValueType value)
494 : m_value{ verifyValue(value) }
495 {}
496
499
501 std::string toString() const;
502
504 friend std::ostream &operator<<(std::ostream &stream, const LinkSpeed::ValueType &value)
505 {
506 return stream << LinkSpeed{ value }.toString();
507 }
508
510 bool operator==(const LinkSpeed &other) const
511 {
512 return m_value == other.m_value;
513 }
514
516 bool operator!=(const LinkSpeed &other) const
517 {
518 return m_value != other.m_value;
519 }
520
522 friend std::ostream &operator<<(std::ostream &stream, const LinkSpeed &value)
523 {
524 return stream << value.toString();
525 }
526
527 private:
528 void setFromString(const std::string &value);
529
530 constexpr ValueType static verifyValue(const ValueType &value)
531 {
532 return value == ValueType::unknown || value == ValueType::link10Mbps
533 || value == ValueType::link100Mbps || value == ValueType::link1Gbps
534 || value == ValueType::link2_5Gbps || value == ValueType::link5Gbps
535 || value == ValueType::link10Gbps
536 ? value
537 : throw std::invalid_argument{
538 "Invalid value: LinkSpeed{ "
539 + std::to_string(static_cast<std::underlying_type<ValueType>::type>(value))
540 + " }"
541 };
542 }
543
545
546 friend struct DataModel::Detail::Befriend<LinkSpeed>;
547 };
548
549 using Descendants = std::tuple<CameraState::Network::LocalInterface::Ethernet::LinkSpeed>;
550
553
565#ifndef NO_DOC
566 template<
567 typename... Args,
568 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
569 typename std::enable_if<
570 Zivid::Detail::TypeTraits::
571 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::value,
572 int>::type = 0>
573#else
574 template<typename... Args>
575#endif
576 explicit Ethernet(Args &&...args)
577 {
578 using namespace Zivid::Detail::TypeTraits;
579
580 static_assert(
581 AllArgsDecayedAreUnique<Args...>::value,
582 "Found duplicate types among the arguments passed to Ethernet(...). "
583 "Types should be listed at most once.");
584
585 set(std::forward<Args>(args)...);
586 }
587
598#ifndef NO_DOC
599 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
600#else
601 template<typename... Args>
602#endif
603 void set(Args &&...args)
604 {
605 using namespace Zivid::Detail::TypeTraits;
606
607 using AllArgsAreDescendantNodes =
608 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
609 static_assert(
610 AllArgsAreDescendantNodes::value,
611 "All arguments passed to set(...) must be descendant nodes.");
612
613 static_assert(
614 AllArgsDecayedAreUnique<Args...>::value,
615 "Found duplicate types among the arguments passed to set(...). "
616 "Types should be listed at most once.");
617
618 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
619 }
620
632#ifndef NO_DOC
633 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
634#else
635 template<typename... Args>
636#endif
637 Ethernet copyWith(Args &&...args) const
638 {
639 using namespace Zivid::Detail::TypeTraits;
640
641 using AllArgsAreDescendantNodes =
642 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
643 static_assert(
644 AllArgsAreDescendantNodes::value,
645 "All arguments passed to copyWith(...) must be descendant nodes.");
646
647 static_assert(
648 AllArgsDecayedAreUnique<Args...>::value,
649 "Found duplicate types among the arguments passed to copyWith(...). "
650 "Types should be listed at most once.");
651
652 auto copy{ *this };
653 copy.set(std::forward<Args>(args)...);
654 return copy;
655 }
656
658 const LinkSpeed &linkSpeed() const
659 {
660 return m_linkSpeed;
661 }
662
665 {
666 return m_linkSpeed;
667 }
668
670 Ethernet &set(const LinkSpeed &value)
671 {
672 m_linkSpeed = value;
673 return *this;
674 }
675
676 template<
677 typename T,
678 typename std::enable_if<
679 std::is_same<T, CameraState::Network::LocalInterface::Ethernet::LinkSpeed>::value,
680 int>::type = 0>
682 {
683 return m_linkSpeed;
684 }
685
686 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
688 {
689 return m_linkSpeed;
690 }
691
693 template<typename F>
694 void forEach(const F &f) const
695 {
696 f(m_linkSpeed);
697 }
698
700 template<typename F>
701 void forEach(const F &f)
702 {
703 f(m_linkSpeed);
704 }
705
707 bool operator==(const Ethernet &other) const;
708
710 bool operator!=(const Ethernet &other) const;
711
713 std::string toString() const;
714
716 friend std::ostream &operator<<(std::ostream &stream, const Ethernet &value)
717 {
718 return stream << value.toString();
719 }
720
721 private:
722 void setFromString(const std::string &value);
723
724 void setFromString(const std::string &fullPath, const std::string &value);
725
726 std::string getString(const std::string &fullPath) const;
727
728 LinkSpeed m_linkSpeed;
729
730 friend struct DataModel::Detail::Befriend<Ethernet>;
731 };
732
734
735 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
737 {
738 public:
741
743 static constexpr const char *path{ "Network/LocalInterface/IPV4" };
744
746 static constexpr const char *name{ "IPV4" };
747
749 static constexpr const char *description{
750 R"description(Current IPv4 protocol state of the computer's local network interface.)description"
751 };
752
755
756 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
758 {
759 public:
762
764 static constexpr const char *path{ "Network/LocalInterface/IPV4/Subnet" };
765
767 static constexpr const char *name{ "Subnet" };
768
770 static constexpr const char *description{
771 R"description(An IPv4 subnet that the local network interface is connected to.
772)description"
773 };
774
776
777 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
779 {
780 public:
783
785 static constexpr const char *path{ "Network/LocalInterface/IPV4/Subnet/Address" };
786
788 static constexpr const char *name{ "Address" };
789
791 static constexpr const char *description{
792 R"description(IP address of the computer's local network interface.)description"
793 };
794
796 using ValueType = std::string;
797
800 {
801 return { 0, std::numeric_limits<ValueType::size_type>::max() };
802 }
803
805 Address() = default;
806
808 explicit Address(std::string value)
809 : m_value{ std::move(value) }
810 {}
811
813 const std::string &value() const;
814
816 std::string toString() const;
817
819 bool operator==(const Address &other) const
820 {
821 return m_value == other.m_value;
822 }
823
825 bool operator!=(const Address &other) const
826 {
827 return m_value != other.m_value;
828 }
829
831 bool operator<(const Address &other) const
832 {
833 return m_value < other.m_value;
834 }
835
837 bool operator>(const Address &other) const
838 {
839 return m_value > other.m_value;
840 }
841
843 bool operator<=(const Address &other) const
844 {
845 return m_value <= other.m_value;
846 }
847
849 bool operator>=(const Address &other) const
850 {
851 return m_value >= other.m_value;
852 }
853
855 friend std::ostream &operator<<(std::ostream &stream, const Address &value)
856 {
857 return stream << value.toString();
858 }
859
860 private:
861 void setFromString(const std::string &value);
862
863 std::string m_value{};
864
865 friend struct DataModel::Detail::Befriend<Address>;
866 };
867
869
870 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
872 {
873 public:
876
878 static constexpr const char *path{ "Network/LocalInterface/IPV4/Subnet/Mask" };
879
881 static constexpr const char *name{ "Mask" };
882
884 static constexpr const char *description{
885 R"description(Subnet mask of the computer's local network interface.)description"
886 };
887
889 using ValueType = std::string;
890
893 {
894 return { 0, std::numeric_limits<ValueType::size_type>::max() };
895 }
896
898 Mask() = default;
899
901 explicit Mask(std::string value)
902 : m_value{ std::move(value) }
903 {}
904
906 const std::string &value() const;
907
909 std::string toString() const;
910
912 bool operator==(const Mask &other) const
913 {
914 return m_value == other.m_value;
915 }
916
918 bool operator!=(const Mask &other) const
919 {
920 return m_value != other.m_value;
921 }
922
924 bool operator<(const Mask &other) const
925 {
926 return m_value < other.m_value;
927 }
928
930 bool operator>(const Mask &other) const
931 {
932 return m_value > other.m_value;
933 }
934
936 bool operator<=(const Mask &other) const
937 {
938 return m_value <= other.m_value;
939 }
940
942 bool operator>=(const Mask &other) const
943 {
944 return m_value >= other.m_value;
945 }
946
948 friend std::ostream &operator<<(std::ostream &stream, const Mask &value)
949 {
950 return stream << value.toString();
951 }
952
953 private:
954 void setFromString(const std::string &value);
955
956 std::string m_value{};
957
958 friend struct DataModel::Detail::Befriend<Mask>;
959 };
960
961 using Descendants = std::tuple<
964
967
980#ifndef NO_DOC
981 template<
982 typename... Args,
983 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
984 typename std::enable_if<
985 Zivid::Detail::TypeTraits::
986 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::value,
987 int>::type = 0>
988#else
989 template<typename... Args>
990#endif
991 explicit Subnet(Args &&...args)
992 {
993 using namespace Zivid::Detail::TypeTraits;
994
995 static_assert(
996 AllArgsDecayedAreUnique<Args...>::value,
997 "Found duplicate types among the arguments passed to Subnet(...). "
998 "Types should be listed at most once.");
999
1000 set(std::forward<Args>(args)...);
1001 }
1002
1014#ifndef NO_DOC
1015 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
1016#else
1017 template<typename... Args>
1018#endif
1019 void set(Args &&...args)
1020 {
1021 using namespace Zivid::Detail::TypeTraits;
1022
1023 using AllArgsAreDescendantNodes =
1024 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
1025 static_assert(
1026 AllArgsAreDescendantNodes::value,
1027 "All arguments passed to set(...) must be descendant nodes.");
1028
1029 static_assert(
1030 AllArgsDecayedAreUnique<Args...>::value,
1031 "Found duplicate types among the arguments passed to set(...). "
1032 "Types should be listed at most once.");
1033
1034 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
1035 }
1036
1049#ifndef NO_DOC
1050 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
1051#else
1052 template<typename... Args>
1053#endif
1054 Subnet copyWith(Args &&...args) const
1055 {
1056 using namespace Zivid::Detail::TypeTraits;
1057
1058 using AllArgsAreDescendantNodes =
1059 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
1060 static_assert(
1061 AllArgsAreDescendantNodes::value,
1062 "All arguments passed to copyWith(...) must be descendant nodes.");
1063
1064 static_assert(
1065 AllArgsDecayedAreUnique<Args...>::value,
1066 "Found duplicate types among the arguments passed to copyWith(...). "
1067 "Types should be listed at most once.");
1068
1069 auto copy{ *this };
1070 copy.set(std::forward<Args>(args)...);
1071 return copy;
1072 }
1073
1075 const Address &address() const
1076 {
1077 return m_address;
1078 }
1079
1082 {
1083 return m_address;
1084 }
1085
1087 Subnet &set(const Address &value)
1088 {
1089 m_address = value;
1090 return *this;
1091 }
1092
1094 const Mask &mask() const
1095 {
1096 return m_mask;
1097 }
1098
1101 {
1102 return m_mask;
1103 }
1104
1106 Subnet &set(const Mask &value)
1107 {
1108 m_mask = value;
1109 return *this;
1110 }
1111
1112 template<
1113 typename T,
1114 typename std::enable_if<
1115 std::is_same<T, CameraState::Network::LocalInterface::IPV4::Subnet::Address>::value,
1116 int>::type = 0>
1118 {
1119 return m_address;
1120 }
1121
1122 template<
1123 typename T,
1124 typename std::enable_if<
1125 std::is_same<T, CameraState::Network::LocalInterface::IPV4::Subnet::Mask>::value,
1126 int>::type = 0>
1128 {
1129 return m_mask;
1130 }
1131
1132 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
1134 {
1135 return m_address;
1136 }
1137
1138 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
1140 {
1141 return m_mask;
1142 }
1143
1145 template<typename F>
1146 void forEach(const F &f) const
1147 {
1148 f(m_address);
1149 f(m_mask);
1150 }
1151
1153 template<typename F>
1154 void forEach(const F &f)
1155 {
1156 f(m_address);
1157 f(m_mask);
1158 }
1159
1161 bool operator==(const Subnet &other) const;
1162
1164 bool operator!=(const Subnet &other) const;
1165
1167 std::string toString() const;
1168
1170 friend std::ostream &operator<<(std::ostream &stream, const Subnet &value)
1171 {
1172 return stream << value.toString();
1173 }
1174
1175 private:
1176 void setFromString(const std::string &value);
1177
1178 void setFromString(const std::string &fullPath, const std::string &value);
1179
1180 std::string getString(const std::string &fullPath) const;
1181
1182 Address m_address;
1183 Mask m_mask;
1184
1185 friend struct DataModel::Detail::Befriend<Subnet>;
1186 };
1187
1192
1193 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
1195 {
1196 public:
1199
1201 static constexpr const char *path{ "Network/LocalInterface/IPV4/Subnets" };
1202
1204 static constexpr const char *name{ "Subnets" };
1205
1207 static constexpr const char *description{
1208 R"description(List of IPv4 addresses and subnet masks that the interface is configured with. This list can
1209contain multiple entries if the local network interface is configured with multiple IPv4
1210addresses.
1211)description"
1212 };
1213
1215 using ValueType = std::vector<CameraState::Network::LocalInterface::IPV4::Subnet>;
1216
1219 {
1220 return { 0, std::numeric_limits<ValueType::size_type>::max() };
1221 }
1222
1224 Subnets() = default;
1225
1227 explicit Subnets(std::vector<CameraState::Network::LocalInterface::IPV4::Subnet> value)
1228 : m_value{ std::move(value) }
1229 {}
1230
1232 explicit Subnets(
1233 std::initializer_list<CameraState::Network::LocalInterface::IPV4::Subnet> value)
1234 : Subnets{ ValueType{ value } }
1235 {}
1236
1238 const std::vector<CameraState::Network::LocalInterface::IPV4::Subnet> &value() const;
1239
1241 std::string toString() const;
1242
1244 std::size_t size() const noexcept;
1245
1247 bool isEmpty() const noexcept;
1248
1254 template<typename... Args>
1255 void emplaceBack(Args &&...args)
1256 {
1257 m_value.emplace_back(std::forward<Args>(args)...);
1258 }
1259
1266
1273
1280
1287
1289 template<typename F>
1290 void forEach(const F &f)
1291 {
1292 for(auto &child : m_value)
1293 {
1294 f(child);
1295 }
1296 }
1297
1299 template<typename F>
1300 void forEach(const F &f) const
1301 {
1302 for(const auto &child : m_value)
1303 {
1304 f(child);
1305 }
1306 }
1307
1309 using Iterator = std::vector<CameraState::Network::LocalInterface::IPV4::Subnet>::iterator;
1310
1312 Iterator begin() noexcept;
1313
1315 Iterator end() noexcept;
1316
1319 std::vector<CameraState::Network::LocalInterface::IPV4::Subnet>::const_iterator;
1320
1322 ConstIterator begin() const noexcept;
1323
1325 ConstIterator end() const noexcept;
1326
1328 ConstIterator cbegin() const noexcept;
1329
1331 ConstIterator cend() const noexcept;
1332
1334 bool operator==(const Subnets &other) const
1335 {
1336 return m_value == other.m_value;
1337 }
1338
1340 bool operator!=(const Subnets &other) const
1341 {
1342 return m_value != other.m_value;
1343 }
1344
1346 friend std::ostream &operator<<(std::ostream &stream, const Subnets &value)
1347 {
1348 return stream << value.toString();
1349 }
1350
1351 private:
1352 void setFromString(const std::string &value);
1353
1354 std::vector<CameraState::Network::LocalInterface::IPV4::Subnet> m_value{};
1355
1356 friend struct DataModel::Detail::Befriend<Subnets>;
1357 };
1358
1359 using Descendants = std::tuple<CameraState::Network::LocalInterface::IPV4::Subnets>;
1360
1363
1375#ifndef NO_DOC
1376 template<
1377 typename... Args,
1378 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
1379 typename std::enable_if<
1380 Zivid::Detail::TypeTraits::
1381 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::value,
1382 int>::type = 0>
1383#else
1384 template<typename... Args>
1385#endif
1386 explicit IPV4(Args &&...args)
1387 {
1388 using namespace Zivid::Detail::TypeTraits;
1389
1390 static_assert(
1391 AllArgsDecayedAreUnique<Args...>::value,
1392 "Found duplicate types among the arguments passed to IPV4(...). "
1393 "Types should be listed at most once.");
1394
1395 set(std::forward<Args>(args)...);
1396 }
1397
1408#ifndef NO_DOC
1409 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
1410#else
1411 template<typename... Args>
1412#endif
1413 void set(Args &&...args)
1414 {
1415 using namespace Zivid::Detail::TypeTraits;
1416
1417 using AllArgsAreDescendantNodes =
1418 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
1419 static_assert(
1420 AllArgsAreDescendantNodes::value,
1421 "All arguments passed to set(...) must be descendant nodes.");
1422
1423 static_assert(
1424 AllArgsDecayedAreUnique<Args...>::value,
1425 "Found duplicate types among the arguments passed to set(...). "
1426 "Types should be listed at most once.");
1427
1428 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
1429 }
1430
1442#ifndef NO_DOC
1443 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
1444#else
1445 template<typename... Args>
1446#endif
1447 IPV4 copyWith(Args &&...args) const
1448 {
1449 using namespace Zivid::Detail::TypeTraits;
1450
1451 using AllArgsAreDescendantNodes =
1452 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
1453 static_assert(
1454 AllArgsAreDescendantNodes::value,
1455 "All arguments passed to copyWith(...) must be descendant nodes.");
1456
1457 static_assert(
1458 AllArgsDecayedAreUnique<Args...>::value,
1459 "Found duplicate types among the arguments passed to copyWith(...). "
1460 "Types should be listed at most once.");
1461
1462 auto copy{ *this };
1463 copy.set(std::forward<Args>(args)...);
1464 return copy;
1465 }
1466
1468 const Subnets &subnets() const
1469 {
1470 return m_subnets;
1471 }
1472
1475 {
1476 return m_subnets;
1477 }
1478
1480 IPV4 &set(const Subnets &value)
1481 {
1482 m_subnets = value;
1483 return *this;
1484 }
1485
1486 template<
1487 typename T,
1488 typename std::enable_if<
1489 std::is_same<T, CameraState::Network::LocalInterface::IPV4::Subnets>::value,
1490 int>::type = 0>
1492 {
1493 return m_subnets;
1494 }
1495
1496 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
1498 {
1499 return m_subnets;
1500 }
1501
1503 template<typename F>
1504 void forEach(const F &f) const
1505 {
1506 f(m_subnets);
1507 }
1508
1510 template<typename F>
1511 void forEach(const F &f)
1512 {
1513 f(m_subnets);
1514 }
1515
1517 bool operator==(const IPV4 &other) const;
1518
1520 bool operator!=(const IPV4 &other) const;
1521
1523 std::string toString() const;
1524
1526 friend std::ostream &operator<<(std::ostream &stream, const IPV4 &value)
1527 {
1528 return stream << value.toString();
1529 }
1530
1531 private:
1532 void setFromString(const std::string &value);
1533
1534 void setFromString(const std::string &fullPath, const std::string &value);
1535
1536 std::string getString(const std::string &fullPath) const;
1537
1538 Subnets m_subnets;
1539
1540 friend struct DataModel::Detail::Befriend<IPV4>;
1541 };
1542
1544
1545 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
1547 {
1548 public:
1551
1553 static constexpr const char *path{ "Network/LocalInterface/InterfaceName" };
1554
1556 static constexpr const char *name{ "InterfaceName" };
1557
1559 static constexpr const char *description{
1560 R"description(Name of the computer's local network interface.)description"
1561 };
1562
1564 using ValueType = std::string;
1565
1568 {
1569 return { 0, std::numeric_limits<ValueType::size_type>::max() };
1570 }
1571
1573 InterfaceName() = default;
1574
1576 explicit InterfaceName(std::string value)
1577 : m_value{ std::move(value) }
1578 {}
1579
1581 const std::string &value() const;
1582
1584 std::string toString() const;
1585
1587 bool operator==(const InterfaceName &other) const
1588 {
1589 return m_value == other.m_value;
1590 }
1591
1593 bool operator!=(const InterfaceName &other) const
1594 {
1595 return m_value != other.m_value;
1596 }
1597
1599 bool operator<(const InterfaceName &other) const
1600 {
1601 return m_value < other.m_value;
1602 }
1603
1605 bool operator>(const InterfaceName &other) const
1606 {
1607 return m_value > other.m_value;
1608 }
1609
1611 bool operator<=(const InterfaceName &other) const
1612 {
1613 return m_value <= other.m_value;
1614 }
1615
1617 bool operator>=(const InterfaceName &other) const
1618 {
1619 return m_value >= other.m_value;
1620 }
1621
1623 friend std::ostream &operator<<(std::ostream &stream, const InterfaceName &value)
1624 {
1625 return stream << value.toString();
1626 }
1627
1628 private:
1629 void setFromString(const std::string &value);
1630
1631 std::string m_value{};
1632
1633 friend struct DataModel::Detail::Befriend<InterfaceName>;
1634 };
1635
1636 using Descendants = std::tuple<
1642
1645
1661#ifndef NO_DOC
1662 template<
1663 typename... Args,
1664 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
1665 typename std::enable_if<
1666 Zivid::Detail::TypeTraits::AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::
1667 value,
1668 int>::type = 0>
1669#else
1670 template<typename... Args>
1671#endif
1672 explicit LocalInterface(Args &&...args)
1673 {
1674 using namespace Zivid::Detail::TypeTraits;
1675
1676 static_assert(
1677 AllArgsDecayedAreUnique<Args...>::value,
1678 "Found duplicate types among the arguments passed to LocalInterface(...). "
1679 "Types should be listed at most once.");
1680
1681 set(std::forward<Args>(args)...);
1682 }
1683
1698#ifndef NO_DOC
1699 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
1700#else
1701 template<typename... Args>
1702#endif
1703 void set(Args &&...args)
1704 {
1705 using namespace Zivid::Detail::TypeTraits;
1706
1707 using AllArgsAreDescendantNodes =
1708 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
1709 static_assert(
1710 AllArgsAreDescendantNodes::value, "All arguments passed to set(...) must be descendant nodes.");
1711
1712 static_assert(
1713 AllArgsDecayedAreUnique<Args...>::value,
1714 "Found duplicate types among the arguments passed to set(...). "
1715 "Types should be listed at most once.");
1716
1717 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
1718 }
1719
1735#ifndef NO_DOC
1736 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
1737#else
1738 template<typename... Args>
1739#endif
1740 LocalInterface copyWith(Args &&...args) const
1741 {
1742 using namespace Zivid::Detail::TypeTraits;
1743
1744 using AllArgsAreDescendantNodes =
1745 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
1746 static_assert(
1747 AllArgsAreDescendantNodes::value,
1748 "All arguments passed to copyWith(...) must be descendant nodes.");
1749
1750 static_assert(
1751 AllArgsDecayedAreUnique<Args...>::value,
1752 "Found duplicate types among the arguments passed to copyWith(...). "
1753 "Types should be listed at most once.");
1754
1755 auto copy{ *this };
1756 copy.set(std::forward<Args>(args)...);
1757 return copy;
1758 }
1759
1761 const Ethernet &ethernet() const
1762 {
1763 return m_ethernet;
1764 }
1765
1768 {
1769 return m_ethernet;
1770 }
1771
1774 {
1775 m_ethernet = value;
1776 return *this;
1777 }
1778
1781 {
1782 m_ethernet.set(value);
1783 return *this;
1784 }
1785
1787 const IPV4 &ipv4() const
1788 {
1789 return m_ipv4;
1790 }
1791
1794 {
1795 return m_ipv4;
1796 }
1797
1799 LocalInterface &set(const IPV4 &value)
1800 {
1801 m_ipv4 = value;
1802 return *this;
1803 }
1804
1807 {
1808 m_ipv4.set(value);
1809 return *this;
1810 }
1811
1814 {
1815 return m_interfaceName;
1816 }
1817
1820 {
1821 return m_interfaceName;
1822 }
1823
1826 {
1827 m_interfaceName = value;
1828 return *this;
1829 }
1830
1831 template<
1832 typename T,
1833 typename std::enable_if<
1834 std::is_same<T, CameraState::Network::LocalInterface::Ethernet>::value,
1835 int>::type = 0>
1837 {
1838 return m_ethernet;
1839 }
1840
1841 template<
1842 typename T,
1843 typename std::enable_if<
1844 std::is_same<T, CameraState::Network::LocalInterface::Ethernet::LinkSpeed>::value,
1845 int>::type = 0>
1847 {
1849 }
1850
1851 template<
1852 typename T,
1853 typename std::enable_if<std::is_same<T, CameraState::Network::LocalInterface::IPV4>::value, int>::
1854 type = 0>
1856 {
1857 return m_ipv4;
1858 }
1859
1860 template<
1861 typename T,
1862 typename std::enable_if<
1863 std::is_same<T, CameraState::Network::LocalInterface::IPV4::Subnets>::value,
1864 int>::type = 0>
1866 {
1868 }
1869
1870 template<
1871 typename T,
1872 typename std::enable_if<
1873 std::is_same<T, CameraState::Network::LocalInterface::InterfaceName>::value,
1874 int>::type = 0>
1876 {
1877 return m_interfaceName;
1878 }
1879
1880 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
1882 {
1883 return m_ethernet;
1884 }
1885
1886 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
1888 {
1889 return m_ipv4;
1890 }
1891
1892 template<size_t i, typename std::enable_if<i == 2, int>::type = 0>
1894 {
1895 return m_interfaceName;
1896 }
1897
1899 template<typename F>
1900 void forEach(const F &f) const
1901 {
1902 f(m_ethernet);
1903 f(m_ipv4);
1904 f(m_interfaceName);
1905 }
1906
1908 template<typename F>
1909 void forEach(const F &f)
1910 {
1911 f(m_ethernet);
1912 f(m_ipv4);
1913 f(m_interfaceName);
1914 }
1915
1917 bool operator==(const LocalInterface &other) const;
1918
1920 bool operator!=(const LocalInterface &other) const;
1921
1923 std::string toString() const;
1924
1926 friend std::ostream &operator<<(std::ostream &stream, const LocalInterface &value)
1927 {
1928 return stream << value.toString();
1929 }
1930
1931 private:
1932 void setFromString(const std::string &value);
1933
1934 void setFromString(const std::string &fullPath, const std::string &value);
1935
1936 std::string getString(const std::string &fullPath) const;
1937
1938 Ethernet m_ethernet;
1939 IPV4 m_ipv4;
1940 InterfaceName m_interfaceName;
1941
1942 friend struct DataModel::Detail::Befriend<LocalInterface>;
1943 };
1944
1946
1947 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
1949 {
1950 public:
1953
1955 static constexpr const char *path{ "Network/Ethernet" };
1956
1958 static constexpr const char *name{ "Ethernet" };
1959
1961 static constexpr const char *description{ R"description(Current Ethernet state)description" };
1962
1965
1966 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
1968 {
1969 public:
1972
1974 static constexpr const char *path{ "Network/Ethernet/LinkSpeed" };
1975
1977 static constexpr const char *name{ "LinkSpeed" };
1978
1980 static constexpr const char *description{
1981 R"description(The link speed that the camera's Ethernet interface is operating at.
1982)description"
1983 };
1984
1986 enum class ValueType
1987 {
1995 };
1996 static const LinkSpeed unknown;
1997 static const LinkSpeed link10Mbps;
1998 static const LinkSpeed link100Mbps;
1999 static const LinkSpeed link1Gbps;
2000 static const LinkSpeed link2_5Gbps;
2001 static const LinkSpeed link5Gbps;
2002 static const LinkSpeed link10Gbps;
2003
2005 static std::set<ValueType> validValues()
2006 {
2010 }
2011
2013 LinkSpeed() = default;
2014
2016 explicit constexpr LinkSpeed(ValueType value)
2017 : m_value{ verifyValue(value) }
2018 {}
2019
2022
2024 std::string toString() const;
2025
2027 friend std::ostream &operator<<(std::ostream &stream, const LinkSpeed::ValueType &value)
2028 {
2029 return stream << LinkSpeed{ value }.toString();
2030 }
2031
2033 bool operator==(const LinkSpeed &other) const
2034 {
2035 return m_value == other.m_value;
2036 }
2037
2039 bool operator!=(const LinkSpeed &other) const
2040 {
2041 return m_value != other.m_value;
2042 }
2043
2045 friend std::ostream &operator<<(std::ostream &stream, const LinkSpeed &value)
2046 {
2047 return stream << value.toString();
2048 }
2049
2050 private:
2051 void setFromString(const std::string &value);
2052
2053 constexpr ValueType static verifyValue(const ValueType &value)
2054 {
2055 return value == ValueType::unknown || value == ValueType::link10Mbps
2056 || value == ValueType::link100Mbps || value == ValueType::link1Gbps
2057 || value == ValueType::link2_5Gbps || value == ValueType::link5Gbps
2058 || value == ValueType::link10Gbps
2059 ? value
2060 : throw std::invalid_argument{
2061 "Invalid value: LinkSpeed{ "
2062 + std::to_string(static_cast<std::underlying_type<ValueType>::type>(value))
2063 + " }"
2064 };
2065 }
2066
2068
2069 friend struct DataModel::Detail::Befriend<LinkSpeed>;
2070 };
2071
2072 using Descendants = std::tuple<CameraState::Network::Ethernet::LinkSpeed>;
2073
2076
2088#ifndef NO_DOC
2089 template<
2090 typename... Args,
2091 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
2092 typename std::enable_if<
2093 Zivid::Detail::TypeTraits::AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::
2094 value,
2095 int>::type = 0>
2096#else
2097 template<typename... Args>
2098#endif
2099 explicit Ethernet(Args &&...args)
2100 {
2101 using namespace Zivid::Detail::TypeTraits;
2102
2103 static_assert(
2104 AllArgsDecayedAreUnique<Args...>::value,
2105 "Found duplicate types among the arguments passed to Ethernet(...). "
2106 "Types should be listed at most once.");
2107
2108 set(std::forward<Args>(args)...);
2109 }
2110
2121#ifndef NO_DOC
2122 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
2123#else
2124 template<typename... Args>
2125#endif
2126 void set(Args &&...args)
2127 {
2128 using namespace Zivid::Detail::TypeTraits;
2129
2130 using AllArgsAreDescendantNodes =
2131 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
2132 static_assert(
2133 AllArgsAreDescendantNodes::value, "All arguments passed to set(...) must be descendant nodes.");
2134
2135 static_assert(
2136 AllArgsDecayedAreUnique<Args...>::value,
2137 "Found duplicate types among the arguments passed to set(...). "
2138 "Types should be listed at most once.");
2139
2140 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
2141 }
2142
2154#ifndef NO_DOC
2155 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
2156#else
2157 template<typename... Args>
2158#endif
2159 Ethernet copyWith(Args &&...args) const
2160 {
2161 using namespace Zivid::Detail::TypeTraits;
2162
2163 using AllArgsAreDescendantNodes =
2164 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
2165 static_assert(
2166 AllArgsAreDescendantNodes::value,
2167 "All arguments passed to copyWith(...) must be descendant nodes.");
2168
2169 static_assert(
2170 AllArgsDecayedAreUnique<Args...>::value,
2171 "Found duplicate types among the arguments passed to copyWith(...). "
2172 "Types should be listed at most once.");
2173
2174 auto copy{ *this };
2175 copy.set(std::forward<Args>(args)...);
2176 return copy;
2177 }
2178
2180 const LinkSpeed &linkSpeed() const
2181 {
2182 return m_linkSpeed;
2183 }
2184
2187 {
2188 return m_linkSpeed;
2189 }
2190
2192 Ethernet &set(const LinkSpeed &value)
2193 {
2194 m_linkSpeed = value;
2195 return *this;
2196 }
2197
2198 template<
2199 typename T,
2200 typename std::enable_if<std::is_same<T, CameraState::Network::Ethernet::LinkSpeed>::value, int>::
2201 type = 0>
2203 {
2204 return m_linkSpeed;
2205 }
2206
2207 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
2209 {
2210 return m_linkSpeed;
2211 }
2212
2214 template<typename F>
2215 void forEach(const F &f) const
2216 {
2217 f(m_linkSpeed);
2218 }
2219
2221 template<typename F>
2222 void forEach(const F &f)
2223 {
2224 f(m_linkSpeed);
2225 }
2226
2228 bool operator==(const Ethernet &other) const;
2229
2231 bool operator!=(const Ethernet &other) const;
2232
2234 std::string toString() const;
2235
2237 friend std::ostream &operator<<(std::ostream &stream, const Ethernet &value)
2238 {
2239 return stream << value.toString();
2240 }
2241
2242 private:
2243 void setFromString(const std::string &value);
2244
2245 void setFromString(const std::string &fullPath, const std::string &value);
2246
2247 std::string getString(const std::string &fullPath) const;
2248
2249 LinkSpeed m_linkSpeed;
2250
2251 friend struct DataModel::Detail::Befriend<Ethernet>;
2252 };
2253
2255
2256 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
2258 {
2259 public:
2262
2264 static constexpr const char *path{ "Network/IPV4" };
2265
2267 static constexpr const char *name{ "IPV4" };
2268
2270 static constexpr const char *description{ R"description(Current IPv4 protocol state)description" };
2271
2273
2274 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
2276 {
2277 public:
2280
2282 static constexpr const char *path{ "Network/IPV4/Address" };
2283
2285 static constexpr const char *name{ "Address" };
2286
2288 static constexpr const char *description{ R"description(Current IPv4 address)description" };
2289
2291 using ValueType = std::string;
2292
2295 {
2296 return { 0, std::numeric_limits<ValueType::size_type>::max() };
2297 }
2298
2300 Address() = default;
2301
2303 explicit Address(std::string value)
2304 : m_value{ std::move(value) }
2305 {}
2306
2308 const std::string &value() const;
2309
2311 std::string toString() const;
2312
2314 bool operator==(const Address &other) const
2315 {
2316 return m_value == other.m_value;
2317 }
2318
2320 bool operator!=(const Address &other) const
2321 {
2322 return m_value != other.m_value;
2323 }
2324
2326 bool operator<(const Address &other) const
2327 {
2328 return m_value < other.m_value;
2329 }
2330
2332 bool operator>(const Address &other) const
2333 {
2334 return m_value > other.m_value;
2335 }
2336
2338 bool operator<=(const Address &other) const
2339 {
2340 return m_value <= other.m_value;
2341 }
2342
2344 bool operator>=(const Address &other) const
2345 {
2346 return m_value >= other.m_value;
2347 }
2348
2350 friend std::ostream &operator<<(std::ostream &stream, const Address &value)
2351 {
2352 return stream << value.toString();
2353 }
2354
2355 private:
2356 void setFromString(const std::string &value);
2357
2358 std::string m_value{};
2359
2360 friend struct DataModel::Detail::Befriend<Address>;
2361 };
2362
2363 using Descendants = std::tuple<CameraState::Network::IPV4::Address>;
2364
2367
2379#ifndef NO_DOC
2380 template<
2381 typename... Args,
2382 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
2383 typename std::enable_if<
2384 Zivid::Detail::TypeTraits::AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::
2385 value,
2386 int>::type = 0>
2387#else
2388 template<typename... Args>
2389#endif
2390 explicit IPV4(Args &&...args)
2391 {
2392 using namespace Zivid::Detail::TypeTraits;
2393
2394 static_assert(
2395 AllArgsDecayedAreUnique<Args...>::value,
2396 "Found duplicate types among the arguments passed to IPV4(...). "
2397 "Types should be listed at most once.");
2398
2399 set(std::forward<Args>(args)...);
2400 }
2401
2412#ifndef NO_DOC
2413 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
2414#else
2415 template<typename... Args>
2416#endif
2417 void set(Args &&...args)
2418 {
2419 using namespace Zivid::Detail::TypeTraits;
2420
2421 using AllArgsAreDescendantNodes =
2422 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
2423 static_assert(
2424 AllArgsAreDescendantNodes::value, "All arguments passed to set(...) must be descendant nodes.");
2425
2426 static_assert(
2427 AllArgsDecayedAreUnique<Args...>::value,
2428 "Found duplicate types among the arguments passed to set(...). "
2429 "Types should be listed at most once.");
2430
2431 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
2432 }
2433
2445#ifndef NO_DOC
2446 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
2447#else
2448 template<typename... Args>
2449#endif
2450 IPV4 copyWith(Args &&...args) const
2451 {
2452 using namespace Zivid::Detail::TypeTraits;
2453
2454 using AllArgsAreDescendantNodes =
2455 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
2456 static_assert(
2457 AllArgsAreDescendantNodes::value,
2458 "All arguments passed to copyWith(...) must be descendant nodes.");
2459
2460 static_assert(
2461 AllArgsDecayedAreUnique<Args...>::value,
2462 "Found duplicate types among the arguments passed to copyWith(...). "
2463 "Types should be listed at most once.");
2464
2465 auto copy{ *this };
2466 copy.set(std::forward<Args>(args)...);
2467 return copy;
2468 }
2469
2471 const Address &address() const
2472 {
2473 return m_address;
2474 }
2475
2478 {
2479 return m_address;
2480 }
2481
2483 IPV4 &set(const Address &value)
2484 {
2485 m_address = value;
2486 return *this;
2487 }
2488
2489 template<
2490 typename T,
2491 typename std::enable_if<std::is_same<T, CameraState::Network::IPV4::Address>::value, int>::type = 0>
2493 {
2494 return m_address;
2495 }
2496
2497 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
2499 {
2500 return m_address;
2501 }
2502
2504 template<typename F>
2505 void forEach(const F &f) const
2506 {
2507 f(m_address);
2508 }
2509
2511 template<typename F>
2512 void forEach(const F &f)
2513 {
2514 f(m_address);
2515 }
2516
2518 bool operator==(const IPV4 &other) const;
2519
2521 bool operator!=(const IPV4 &other) const;
2522
2524 std::string toString() const;
2525
2527 friend std::ostream &operator<<(std::ostream &stream, const IPV4 &value)
2528 {
2529 return stream << value.toString();
2530 }
2531
2532 private:
2533 void setFromString(const std::string &value);
2534
2535 void setFromString(const std::string &fullPath, const std::string &value);
2536
2537 std::string getString(const std::string &fullPath) const;
2538
2539 Address m_address;
2540
2541 friend struct DataModel::Detail::Befriend<IPV4>;
2542 };
2543
2551
2552 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
2554 {
2555 public:
2558
2560 static constexpr const char *path{ "Network/LocalInterfaces" };
2561
2563 static constexpr const char *name{ "LocalInterfaces" };
2564
2566 static constexpr const char *description{
2567 R"description(List of the computer's local network interfaces that discovered the camera. In the most common scenario
2568with the camera connected to the computer with an Ethernet cable, this list will contain only the
2569network interface for that Ethernet port. In more complex network scenarios it can be the case that the
2570camera is discovered by multiple interfaces, and in that case this list will contain multiple network
2571interfaces. However, when `CameraState::Status` is `connected`, only the one network interface that has
2572the active TCP/IP connection to the camera will be listed.
2573)description"
2574 };
2575
2577 using ValueType = std::vector<CameraState::Network::LocalInterface>;
2578
2581 {
2582 return { 0, std::numeric_limits<ValueType::size_type>::max() };
2583 }
2584
2586 LocalInterfaces() = default;
2587
2589 explicit LocalInterfaces(std::vector<CameraState::Network::LocalInterface> value)
2590 : m_value{ std::move(value) }
2591 {}
2592
2594 explicit LocalInterfaces(std::initializer_list<CameraState::Network::LocalInterface> value)
2596 {}
2597
2599 const std::vector<CameraState::Network::LocalInterface> &value() const;
2600
2602 std::string toString() const;
2603
2605 std::size_t size() const noexcept;
2606
2608 bool isEmpty() const noexcept;
2609
2615 template<typename... Args>
2616 void emplaceBack(Args &&...args)
2617 {
2618 m_value.emplace_back(std::forward<Args>(args)...);
2619 }
2620
2627
2633 const CameraState::Network::LocalInterface &at(std::size_t pos) const;
2634
2641
2648
2650 template<typename F>
2651 void forEach(const F &f)
2652 {
2653 for(auto &child : m_value)
2654 {
2655 f(child);
2656 }
2657 }
2658
2660 template<typename F>
2661 void forEach(const F &f) const
2662 {
2663 for(const auto &child : m_value)
2664 {
2665 f(child);
2666 }
2667 }
2668
2670 using Iterator = std::vector<CameraState::Network::LocalInterface>::iterator;
2671
2673 Iterator begin() noexcept;
2674
2676 Iterator end() noexcept;
2677
2679 using ConstIterator = std::vector<CameraState::Network::LocalInterface>::const_iterator;
2680
2682 ConstIterator begin() const noexcept;
2683
2685 ConstIterator end() const noexcept;
2686
2688 ConstIterator cbegin() const noexcept;
2689
2691 ConstIterator cend() const noexcept;
2692
2694 bool operator==(const LocalInterfaces &other) const
2695 {
2696 return m_value == other.m_value;
2697 }
2698
2700 bool operator!=(const LocalInterfaces &other) const
2701 {
2702 return m_value != other.m_value;
2703 }
2704
2706 friend std::ostream &operator<<(std::ostream &stream, const LocalInterfaces &value)
2707 {
2708 return stream << value.toString();
2709 }
2710
2711 private:
2712 void setFromString(const std::string &value);
2713
2714 std::vector<CameraState::Network::LocalInterface> m_value{};
2715
2716 friend struct DataModel::Detail::Befriend<LocalInterfaces>;
2717 };
2718
2719 using Descendants = std::tuple<
2725
2728
2744#ifndef NO_DOC
2745 template<
2746 typename... Args,
2747 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
2748 typename std::enable_if<
2749 Zivid::Detail::TypeTraits::AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::
2750 value,
2751 int>::type = 0>
2752#else
2753 template<typename... Args>
2754#endif
2755 explicit Network(Args &&...args)
2756 {
2757 using namespace Zivid::Detail::TypeTraits;
2758
2759 static_assert(
2760 AllArgsDecayedAreUnique<Args...>::value,
2761 "Found duplicate types among the arguments passed to Network(...). "
2762 "Types should be listed at most once.");
2763
2764 set(std::forward<Args>(args)...);
2765 }
2766
2781#ifndef NO_DOC
2782 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
2783#else
2784 template<typename... Args>
2785#endif
2786 void set(Args &&...args)
2787 {
2788 using namespace Zivid::Detail::TypeTraits;
2789
2790 using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
2791 static_assert(
2792 AllArgsAreDescendantNodes::value, "All arguments passed to set(...) must be descendant nodes.");
2793
2794 static_assert(
2795 AllArgsDecayedAreUnique<Args...>::value,
2796 "Found duplicate types among the arguments passed to set(...). "
2797 "Types should be listed at most once.");
2798
2799 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
2800 }
2801
2817#ifndef NO_DOC
2818 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
2819#else
2820 template<typename... Args>
2821#endif
2822 Network copyWith(Args &&...args) const
2823 {
2824 using namespace Zivid::Detail::TypeTraits;
2825
2826 using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
2827 static_assert(
2828 AllArgsAreDescendantNodes::value,
2829 "All arguments passed to copyWith(...) must be descendant nodes.");
2830
2831 static_assert(
2832 AllArgsDecayedAreUnique<Args...>::value,
2833 "Found duplicate types among the arguments passed to copyWith(...). "
2834 "Types should be listed at most once.");
2835
2836 auto copy{ *this };
2837 copy.set(std::forward<Args>(args)...);
2838 return copy;
2839 }
2840
2842 const Ethernet &ethernet() const
2843 {
2844 return m_ethernet;
2845 }
2846
2849 {
2850 return m_ethernet;
2851 }
2852
2854 Network &set(const Ethernet &value)
2855 {
2856 m_ethernet = value;
2857 return *this;
2858 }
2859
2862 {
2863 m_ethernet.set(value);
2864 return *this;
2865 }
2866
2868 const IPV4 &ipv4() const
2869 {
2870 return m_ipv4;
2871 }
2872
2875 {
2876 return m_ipv4;
2877 }
2878
2880 Network &set(const IPV4 &value)
2881 {
2882 m_ipv4 = value;
2883 return *this;
2884 }
2885
2888 {
2889 m_ipv4.set(value);
2890 return *this;
2891 }
2892
2895 {
2896 return m_localInterfaces;
2897 }
2898
2901 {
2902 return m_localInterfaces;
2903 }
2904
2907 {
2908 m_localInterfaces = value;
2909 return *this;
2910 }
2911
2912 template<
2913 typename T,
2914 typename std::enable_if<std::is_same<T, CameraState::Network::Ethernet>::value, int>::type = 0>
2916 {
2917 return m_ethernet;
2918 }
2919
2920 template<
2921 typename T,
2922 typename std::enable_if<std::is_same<T, CameraState::Network::Ethernet::LinkSpeed>::value, int>::type =
2923 0>
2925 {
2926 return m_ethernet.get<CameraState::Network::Ethernet::LinkSpeed>();
2927 }
2928
2929 template<
2930 typename T,
2931 typename std::enable_if<std::is_same<T, CameraState::Network::IPV4>::value, int>::type = 0>
2933 {
2934 return m_ipv4;
2935 }
2936
2937 template<
2938 typename T,
2939 typename std::enable_if<std::is_same<T, CameraState::Network::IPV4::Address>::value, int>::type = 0>
2941 {
2942 return m_ipv4.get<CameraState::Network::IPV4::Address>();
2943 }
2944
2945 template<
2946 typename T,
2947 typename std::enable_if<std::is_same<T, CameraState::Network::LocalInterfaces>::value, int>::type = 0>
2949 {
2950 return m_localInterfaces;
2951 }
2952
2953 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
2955 {
2956 return m_ethernet;
2957 }
2958
2959 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
2961 {
2962 return m_ipv4;
2963 }
2964
2965 template<size_t i, typename std::enable_if<i == 2, int>::type = 0>
2967 {
2968 return m_localInterfaces;
2969 }
2970
2972 template<typename F>
2973 void forEach(const F &f) const
2974 {
2975 f(m_ethernet);
2976 f(m_ipv4);
2977 f(m_localInterfaces);
2978 }
2979
2981 template<typename F>
2982 void forEach(const F &f)
2983 {
2984 f(m_ethernet);
2985 f(m_ipv4);
2986 f(m_localInterfaces);
2987 }
2988
2990 bool operator==(const Network &other) const;
2991
2993 bool operator!=(const Network &other) const;
2994
2996 std::string toString() const;
2997
2999 friend std::ostream &operator<<(std::ostream &stream, const Network &value)
3000 {
3001 return stream << value.toString();
3002 }
3003
3004 private:
3005 void setFromString(const std::string &value);
3006
3007 void setFromString(const std::string &fullPath, const std::string &value);
3008
3009 std::string getString(const std::string &fullPath) const;
3010
3011 Ethernet m_ethernet;
3012 IPV4 m_ipv4;
3013 LocalInterfaces m_localInterfaces;
3014
3015 friend struct DataModel::Detail::Befriend<Network>;
3016 };
3017
3052
3053 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
3055 {
3056 public:
3059
3061 static constexpr const char *path{ "Status" };
3062
3064 static constexpr const char *name{ "Status" };
3065
3067 static constexpr const char *description{
3068 R"description(This enum describes the current status of this camera. The enum can have the following values:
3069
3070* `inaccessible`: The camera was discovered, but the SDK is not able to connect to this camera. This can
3071 be because the IP settings of the camera and the PC are not compatible, or because there are several
3072 cameras with the same IP connected to your PC. The `InaccessibleReason` enum will give you more
3073 details about why this camera is not accessible. The network configuration of the camera can be changed
3074 using the ZividNetworkCameraConfigurator CLI tool. See the knowledge base for more information.
3075
3076* `busy`: The camera is currently in use by another process. This can be a different process on the same
3077 PC, or on a different PC if the camera is shared on a network.
3078
3079* `applyingNetworkConfiguration`: The camera network configuration is being changed by the current process.
3080
3081* `firmwareUpdateRequired`: The camera is accessible, but requires a firmware update before you can connect
3082 to it.
3083
3084* `updatingFirmware`: The camera firmware is currently being updated in the current process.
3085
3086* `available`: The camera is available for use by the current process. This means that you can invoke
3087 camera.connect() on this camera.
3088
3089* `connecting`: The camera is currently connecting in the current process.
3090
3091* `connected`: The camera is connected in the current process. This means camera.connect() has successfully
3092 completed and you can capture using this camera.
3093
3094* `disconnecting`: The camera is currently disconnecting in the current process. When disconnection has
3095 completed, the camera will normally go back to the `available` state.
3096
3097* `disappeared`: The camera was found earlier, but it can no longer be found. The connection between the
3098 PC and the camera may be disrupted, or the camera may have lost power. When in `disappeared` state, the
3099 camera will not be returned from `Application::cameras()`. The camera will go back to one of the other
3100 states if the camera is later found again.
3101)description"
3102 };
3103
3105 enum class ValueType
3106 {
3117 };
3118 static const Status inaccessible;
3119 static const Status busy;
3123 static const Status available;
3124 static const Status connecting;
3125 static const Status connected;
3126 static const Status disconnecting;
3127 static const Status disappeared;
3128
3130 static std::set<ValueType> validValues()
3131 {
3132 return { ValueType::inaccessible,
3142 }
3143
3145 Status() = default;
3146
3148 explicit constexpr Status(ValueType value)
3149 : m_value{ verifyValue(value) }
3150 {}
3151
3154
3156 std::string toString() const;
3157
3159 friend std::ostream &operator<<(std::ostream &stream, const Status::ValueType &value)
3160 {
3161 return stream << Status{ value }.toString();
3162 }
3163
3165 bool operator==(const Status &other) const
3166 {
3167 return m_value == other.m_value;
3168 }
3169
3171 bool operator!=(const Status &other) const
3172 {
3173 return m_value != other.m_value;
3174 }
3175
3177 friend std::ostream &operator<<(std::ostream &stream, const Status &value)
3178 {
3179 return stream << value.toString();
3180 }
3181
3182 private:
3183 void setFromString(const std::string &value);
3184
3185 constexpr ValueType static verifyValue(const ValueType &value)
3186 {
3187 return value == ValueType::inaccessible || value == ValueType::busy
3188 || value == ValueType::applyingNetworkConfiguration
3189 || value == ValueType::firmwareUpdateRequired || value == ValueType::updatingFirmware
3190 || value == ValueType::available || value == ValueType::connecting
3191 || value == ValueType::connected || value == ValueType::disconnecting
3192 || value == ValueType::disappeared
3193 ? value
3194 : throw std::invalid_argument{
3195 "Invalid value: Status{ "
3196 + std::to_string(static_cast<std::underlying_type<ValueType>::type>(value)) + " }"
3197 };
3198 }
3199
3201
3202 friend struct DataModel::Detail::Befriend<Status>;
3203 };
3204
3206
3207 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
3209 {
3210 public:
3213
3215 static constexpr const char *path{ "Temperature" };
3216
3218 static constexpr const char *name{ "Temperature" };
3219
3221 static constexpr const char *description{ R"description(Current temperature(s))description" };
3222
3224
3225 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
3227 {
3228 public:
3231
3233 static constexpr const char *path{ "Temperature/DMD" };
3234
3236 static constexpr const char *name{ "DMD" };
3237
3239 static constexpr const char *description{ R"description(DMD temperature)description" };
3240
3242 using ValueType = double;
3243
3245 static constexpr Range<double> validRange()
3246 {
3247 return { std::numeric_limits<double>::lowest(), std::numeric_limits<double>::max() };
3248 }
3249
3251 DMD() = default;
3252
3254 explicit constexpr DMD(double value)
3255 : m_value{ value }
3256 {}
3257
3259 double value() const;
3260
3262 std::string toString() const;
3263
3265 bool operator==(const DMD &other) const
3266 {
3267 return m_value == other.m_value;
3268 }
3269
3271 bool operator!=(const DMD &other) const
3272 {
3273 return m_value != other.m_value;
3274 }
3275
3277 bool operator<(const DMD &other) const
3278 {
3279 return m_value < other.m_value;
3280 }
3281
3283 bool operator>(const DMD &other) const
3284 {
3285 return m_value > other.m_value;
3286 }
3287
3289 bool operator<=(const DMD &other) const
3290 {
3291 return m_value <= other.m_value;
3292 }
3293
3295 bool operator>=(const DMD &other) const
3296 {
3297 return m_value >= other.m_value;
3298 }
3299
3301 friend std::ostream &operator<<(std::ostream &stream, const DMD &value)
3302 {
3303 return stream << value.toString();
3304 }
3305
3306 private:
3307 void setFromString(const std::string &value);
3308
3309 double m_value{ 0.0 };
3310
3311 friend struct DataModel::Detail::Befriend<DMD>;
3312 };
3313
3315
3316 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
3318 {
3319 public:
3322
3324 static constexpr const char *path{ "Temperature/General" };
3325
3327 static constexpr const char *name{ "General" };
3328
3330 static constexpr const char *description{ R"description(General temperature)description" };
3331
3333 using ValueType = double;
3334
3336 static constexpr Range<double> validRange()
3337 {
3338 return { std::numeric_limits<double>::lowest(), std::numeric_limits<double>::max() };
3339 }
3340
3342 General() = default;
3343
3345 explicit constexpr General(double value)
3346 : m_value{ value }
3347 {}
3348
3350 double value() const;
3351
3353 std::string toString() const;
3354
3356 bool operator==(const General &other) const
3357 {
3358 return m_value == other.m_value;
3359 }
3360
3362 bool operator!=(const General &other) const
3363 {
3364 return m_value != other.m_value;
3365 }
3366
3368 bool operator<(const General &other) const
3369 {
3370 return m_value < other.m_value;
3371 }
3372
3374 bool operator>(const General &other) const
3375 {
3376 return m_value > other.m_value;
3377 }
3378
3380 bool operator<=(const General &other) const
3381 {
3382 return m_value <= other.m_value;
3383 }
3384
3386 bool operator>=(const General &other) const
3387 {
3388 return m_value >= other.m_value;
3389 }
3390
3392 friend std::ostream &operator<<(std::ostream &stream, const General &value)
3393 {
3394 return stream << value.toString();
3395 }
3396
3397 private:
3398 void setFromString(const std::string &value);
3399
3400 double m_value{ 0.0 };
3401
3402 friend struct DataModel::Detail::Befriend<General>;
3403 };
3404
3406
3407 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
3409 {
3410 public:
3413
3415 static constexpr const char *path{ "Temperature/LED" };
3416
3418 static constexpr const char *name{ "LED" };
3419
3421 static constexpr const char *description{ R"description(LED temperature)description" };
3422
3424 using ValueType = double;
3425
3427 static constexpr Range<double> validRange()
3428 {
3429 return { std::numeric_limits<double>::lowest(), std::numeric_limits<double>::max() };
3430 }
3431
3433 LED() = default;
3434
3436 explicit constexpr LED(double value)
3437 : m_value{ value }
3438 {}
3439
3441 double value() const;
3442
3444 std::string toString() const;
3445
3447 bool operator==(const LED &other) const
3448 {
3449 return m_value == other.m_value;
3450 }
3451
3453 bool operator!=(const LED &other) const
3454 {
3455 return m_value != other.m_value;
3456 }
3457
3459 bool operator<(const LED &other) const
3460 {
3461 return m_value < other.m_value;
3462 }
3463
3465 bool operator>(const LED &other) const
3466 {
3467 return m_value > other.m_value;
3468 }
3469
3471 bool operator<=(const LED &other) const
3472 {
3473 return m_value <= other.m_value;
3474 }
3475
3477 bool operator>=(const LED &other) const
3478 {
3479 return m_value >= other.m_value;
3480 }
3481
3483 friend std::ostream &operator<<(std::ostream &stream, const LED &value)
3484 {
3485 return stream << value.toString();
3486 }
3487
3488 private:
3489 void setFromString(const std::string &value);
3490
3491 double m_value{ 0.0 };
3492
3493 friend struct DataModel::Detail::Befriend<LED>;
3494 };
3495
3497
3498 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
3500 {
3501 public:
3504
3506 static constexpr const char *path{ "Temperature/Lens" };
3507
3509 static constexpr const char *name{ "Lens" };
3510
3512 static constexpr const char *description{ R"description(Lens temperature)description" };
3513
3515 using ValueType = double;
3516
3518 static constexpr Range<double> validRange()
3519 {
3520 return { std::numeric_limits<double>::lowest(), std::numeric_limits<double>::max() };
3521 }
3522
3524 Lens() = default;
3525
3527 explicit constexpr Lens(double value)
3528 : m_value{ value }
3529 {}
3530
3532 double value() const;
3533
3535 std::string toString() const;
3536
3538 bool operator==(const Lens &other) const
3539 {
3540 return m_value == other.m_value;
3541 }
3542
3544 bool operator!=(const Lens &other) const
3545 {
3546 return m_value != other.m_value;
3547 }
3548
3550 bool operator<(const Lens &other) const
3551 {
3552 return m_value < other.m_value;
3553 }
3554
3556 bool operator>(const Lens &other) const
3557 {
3558 return m_value > other.m_value;
3559 }
3560
3562 bool operator<=(const Lens &other) const
3563 {
3564 return m_value <= other.m_value;
3565 }
3566
3568 bool operator>=(const Lens &other) const
3569 {
3570 return m_value >= other.m_value;
3571 }
3572
3574 friend std::ostream &operator<<(std::ostream &stream, const Lens &value)
3575 {
3576 return stream << value.toString();
3577 }
3578
3579 private:
3580 void setFromString(const std::string &value);
3581
3582 double m_value{ 0.0 };
3583
3584 friend struct DataModel::Detail::Befriend<Lens>;
3585 };
3586
3588
3589 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
3591 {
3592 public:
3595
3597 static constexpr const char *path{ "Temperature/PCB" };
3598
3600 static constexpr const char *name{ "PCB" };
3601
3603 static constexpr const char *description{ R"description(PCB temperature)description" };
3604
3606 using ValueType = double;
3607
3609 static constexpr Range<double> validRange()
3610 {
3611 return { std::numeric_limits<double>::lowest(), std::numeric_limits<double>::max() };
3612 }
3613
3615 PCB() = default;
3616
3618 explicit constexpr PCB(double value)
3619 : m_value{ value }
3620 {}
3621
3623 double value() const;
3624
3626 std::string toString() const;
3627
3629 bool operator==(const PCB &other) const
3630 {
3631 return m_value == other.m_value;
3632 }
3633
3635 bool operator!=(const PCB &other) const
3636 {
3637 return m_value != other.m_value;
3638 }
3639
3641 bool operator<(const PCB &other) const
3642 {
3643 return m_value < other.m_value;
3644 }
3645
3647 bool operator>(const PCB &other) const
3648 {
3649 return m_value > other.m_value;
3650 }
3651
3653 bool operator<=(const PCB &other) const
3654 {
3655 return m_value <= other.m_value;
3656 }
3657
3659 bool operator>=(const PCB &other) const
3660 {
3661 return m_value >= other.m_value;
3662 }
3663
3665 friend std::ostream &operator<<(std::ostream &stream, const PCB &value)
3666 {
3667 return stream << value.toString();
3668 }
3669
3670 private:
3671 void setFromString(const std::string &value);
3672
3673 double m_value{ 0.0 };
3674
3675 friend struct DataModel::Detail::Befriend<PCB>;
3676 };
3677
3678 using Descendants = std::tuple<
3684
3687
3703#ifndef NO_DOC
3704 template<
3705 typename... Args,
3706 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
3707 typename std::enable_if<
3708 Zivid::Detail::TypeTraits::AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::
3709 value,
3710 int>::type = 0>
3711#else
3712 template<typename... Args>
3713#endif
3714 explicit Temperature(Args &&...args)
3715 {
3716 using namespace Zivid::Detail::TypeTraits;
3717
3718 static_assert(
3719 AllArgsDecayedAreUnique<Args...>::value,
3720 "Found duplicate types among the arguments passed to Temperature(...). "
3721 "Types should be listed at most once.");
3722
3723 set(std::forward<Args>(args)...);
3724 }
3725
3740#ifndef NO_DOC
3741 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
3742#else
3743 template<typename... Args>
3744#endif
3745 void set(Args &&...args)
3746 {
3747 using namespace Zivid::Detail::TypeTraits;
3748
3749 using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
3750 static_assert(
3751 AllArgsAreDescendantNodes::value, "All arguments passed to set(...) must be descendant nodes.");
3752
3753 static_assert(
3754 AllArgsDecayedAreUnique<Args...>::value,
3755 "Found duplicate types among the arguments passed to set(...). "
3756 "Types should be listed at most once.");
3757
3758 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
3759 }
3760
3776#ifndef NO_DOC
3777 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
3778#else
3779 template<typename... Args>
3780#endif
3781 Temperature copyWith(Args &&...args) const
3782 {
3783 using namespace Zivid::Detail::TypeTraits;
3784
3785 using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
3786 static_assert(
3787 AllArgsAreDescendantNodes::value,
3788 "All arguments passed to copyWith(...) must be descendant nodes.");
3789
3790 static_assert(
3791 AllArgsDecayedAreUnique<Args...>::value,
3792 "Found duplicate types among the arguments passed to copyWith(...). "
3793 "Types should be listed at most once.");
3794
3795 auto copy{ *this };
3796 copy.set(std::forward<Args>(args)...);
3797 return copy;
3798 }
3799
3801 const DMD &dmd() const
3802 {
3803 return m_dmd;
3804 }
3805
3808 {
3809 return m_dmd;
3810 }
3811
3813 Temperature &set(const DMD &value)
3814 {
3815 m_dmd = value;
3816 return *this;
3817 }
3818
3820 const General &general() const
3821 {
3822 return m_general;
3823 }
3824
3827 {
3828 return m_general;
3829 }
3830
3832 Temperature &set(const General &value)
3833 {
3834 m_general = value;
3835 return *this;
3836 }
3837
3839 const LED &led() const
3840 {
3841 return m_led;
3842 }
3843
3846 {
3847 return m_led;
3848 }
3849
3851 Temperature &set(const LED &value)
3852 {
3853 m_led = value;
3854 return *this;
3855 }
3856
3858 const Lens &lens() const
3859 {
3860 return m_lens;
3861 }
3862
3865 {
3866 return m_lens;
3867 }
3868
3870 Temperature &set(const Lens &value)
3871 {
3872 m_lens = value;
3873 return *this;
3874 }
3875
3877 const PCB &pcb() const
3878 {
3879 return m_pcb;
3880 }
3881
3884 {
3885 return m_pcb;
3886 }
3887
3889 Temperature &set(const PCB &value)
3890 {
3891 m_pcb = value;
3892 return *this;
3893 }
3894
3895 template<
3896 typename T,
3897 typename std::enable_if<std::is_same<T, CameraState::Temperature::DMD>::value, int>::type = 0>
3899 {
3900 return m_dmd;
3901 }
3902
3903 template<
3904 typename T,
3905 typename std::enable_if<std::is_same<T, CameraState::Temperature::General>::value, int>::type = 0>
3907 {
3908 return m_general;
3909 }
3910
3911 template<
3912 typename T,
3913 typename std::enable_if<std::is_same<T, CameraState::Temperature::LED>::value, int>::type = 0>
3915 {
3916 return m_led;
3917 }
3918
3919 template<
3920 typename T,
3921 typename std::enable_if<std::is_same<T, CameraState::Temperature::Lens>::value, int>::type = 0>
3923 {
3924 return m_lens;
3925 }
3926
3927 template<
3928 typename T,
3929 typename std::enable_if<std::is_same<T, CameraState::Temperature::PCB>::value, int>::type = 0>
3931 {
3932 return m_pcb;
3933 }
3934
3935 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
3937 {
3938 return m_dmd;
3939 }
3940
3941 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
3943 {
3944 return m_general;
3945 }
3946
3947 template<size_t i, typename std::enable_if<i == 2, int>::type = 0>
3949 {
3950 return m_led;
3951 }
3952
3953 template<size_t i, typename std::enable_if<i == 3, int>::type = 0>
3955 {
3956 return m_lens;
3957 }
3958
3959 template<size_t i, typename std::enable_if<i == 4, int>::type = 0>
3961 {
3962 return m_pcb;
3963 }
3964
3966 template<typename F>
3967 void forEach(const F &f) const
3968 {
3969 f(m_dmd);
3970 f(m_general);
3971 f(m_led);
3972 f(m_lens);
3973 f(m_pcb);
3974 }
3975
3977 template<typename F>
3978 void forEach(const F &f)
3979 {
3980 f(m_dmd);
3981 f(m_general);
3982 f(m_led);
3983 f(m_lens);
3984 f(m_pcb);
3985 }
3986
3988 bool operator==(const Temperature &other) const;
3989
3991 bool operator!=(const Temperature &other) const;
3992
3994 std::string toString() const;
3995
3997 friend std::ostream &operator<<(std::ostream &stream, const Temperature &value)
3998 {
3999 return stream << value.toString();
4000 }
4001
4002 private:
4003 void setFromString(const std::string &value);
4004
4005 void setFromString(const std::string &fullPath, const std::string &value);
4006
4007 std::string getString(const std::string &fullPath) const;
4008
4009 DMD m_dmd;
4010 General m_general;
4011 LED m_led;
4012 Lens m_lens;
4013 PCB m_pcb;
4014
4015 friend struct DataModel::Detail::Befriend<Temperature>;
4016 };
4017
4018 using Descendants = std::tuple<
4035
4038
4040 explicit CameraState(const std::string &fileName);
4041
4047 [[nodiscard]] static CameraState fromSerialized(const std::string &value);
4048
4054 std::string serialize() const;
4055
4082#ifndef NO_DOC
4083 template<
4084 typename... Args,
4085 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
4086 typename std::enable_if<
4087 Zivid::Detail::TypeTraits::AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::value,
4088 int>::type = 0>
4089#else
4090 template<typename... Args>
4091#endif
4092 explicit CameraState(Args &&...args)
4093 {
4094 using namespace Zivid::Detail::TypeTraits;
4095
4096 static_assert(
4097 AllArgsDecayedAreUnique<Args...>::value,
4098 "Found duplicate types among the arguments passed to CameraState(...). "
4099 "Types should be listed at most once.");
4100
4101 set(std::forward<Args>(args)...);
4102 }
4103
4129#ifndef NO_DOC
4130 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
4131#else
4132 template<typename... Args>
4133#endif
4134 void set(Args &&...args)
4135 {
4136 using namespace Zivid::Detail::TypeTraits;
4137
4138 using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
4139 static_assert(
4140 AllArgsAreDescendantNodes::value, "All arguments passed to set(...) must be descendant nodes.");
4141
4142 static_assert(
4143 AllArgsDecayedAreUnique<Args...>::value,
4144 "Found duplicate types among the arguments passed to set(...). "
4145 "Types should be listed at most once.");
4146
4147 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
4148 }
4149
4176#ifndef NO_DOC
4177 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
4178#else
4179 template<typename... Args>
4180#endif
4181 CameraState copyWith(Args &&...args) const
4182 {
4183 using namespace Zivid::Detail::TypeTraits;
4184
4185 using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
4186 static_assert(
4187 AllArgsAreDescendantNodes::value, "All arguments passed to copyWith(...) must be descendant nodes.");
4188
4189 static_assert(
4190 AllArgsDecayedAreUnique<Args...>::value,
4191 "Found duplicate types among the arguments passed to copyWith(...). "
4192 "Types should be listed at most once.");
4193
4194 auto copy{ *this };
4195 copy.set(std::forward<Args>(args)...);
4196 return copy;
4197 }
4198
4200 const Available &isAvailable() const
4201 {
4202 return m_available;
4203 }
4204
4207 {
4208 return m_available;
4209 }
4210
4213 {
4214 m_available = value;
4215 return *this;
4216 }
4217
4219 const Connected &isConnected() const
4220 {
4221 return m_connected;
4222 }
4223
4226 {
4227 return m_connected;
4228 }
4229
4232 {
4233 m_connected = value;
4234 return *this;
4235 }
4236
4239 {
4240 return m_inaccessibleReason;
4241 }
4242
4245 {
4246 return m_inaccessibleReason;
4247 }
4248
4251 {
4252 m_inaccessibleReason = value;
4253 return *this;
4254 }
4255
4257 const Network &network() const
4258 {
4259 return m_network;
4260 }
4261
4264 {
4265 return m_network;
4266 }
4267
4269 CameraState &set(const Network &value)
4270 {
4271 m_network = value;
4272 return *this;
4273 }
4274
4277 {
4278 m_network.set(value);
4279 return *this;
4280 }
4281
4284 {
4285 m_network.set(value);
4286 return *this;
4287 }
4288
4291 {
4292 m_network.set(value);
4293 return *this;
4294 }
4295
4298 {
4299 m_network.set(value);
4300 return *this;
4301 }
4302
4305 {
4306 m_network.set(value);
4307 return *this;
4308 }
4309
4311 const Status &status() const
4312 {
4313 return m_status;
4314 }
4315
4318 {
4319 return m_status;
4320 }
4321
4323 CameraState &set(const Status &value)
4324 {
4325 m_status = value;
4326 return *this;
4327 }
4328
4331 {
4332 return m_temperature;
4333 }
4334
4337 {
4338 return m_temperature;
4339 }
4340
4343 {
4344 m_temperature = value;
4345 return *this;
4346 }
4347
4350 {
4351 m_temperature.set(value);
4352 return *this;
4353 }
4354
4357 {
4358 m_temperature.set(value);
4359 return *this;
4360 }
4361
4364 {
4365 m_temperature.set(value);
4366 return *this;
4367 }
4368
4371 {
4372 m_temperature.set(value);
4373 return *this;
4374 }
4375
4378 {
4379 m_temperature.set(value);
4380 return *this;
4381 }
4382
4383 template<typename T, typename std::enable_if<std::is_same<T, CameraState::Available>::value, int>::type = 0>
4385 {
4386 return m_available;
4387 }
4388
4389 template<typename T, typename std::enable_if<std::is_same<T, CameraState::Connected>::value, int>::type = 0>
4391 {
4392 return m_connected;
4393 }
4394
4395 template<
4396 typename T,
4397 typename std::enable_if<std::is_same<T, CameraState::InaccessibleReason>::value, int>::type = 0>
4399 {
4400 return m_inaccessibleReason;
4401 }
4402
4403 template<typename T, typename std::enable_if<std::is_same<T, CameraState::Network>::value, int>::type = 0>
4405 {
4406 return m_network;
4407 }
4408
4409 template<
4410 typename T,
4411 typename std::enable_if<std::is_same<T, CameraState::Network::Ethernet>::value, int>::type = 0>
4413 {
4414 return m_network.get<CameraState::Network::Ethernet>();
4415 }
4416
4417 template<
4418 typename T,
4419 typename std::enable_if<std::is_same<T, CameraState::Network::Ethernet::LinkSpeed>::value, int>::type = 0>
4421 {
4422 return m_network.get<CameraState::Network::Ethernet::LinkSpeed>();
4423 }
4424
4425 template<typename T, typename std::enable_if<std::is_same<T, CameraState::Network::IPV4>::value, int>::type = 0>
4427 {
4428 return m_network.get<CameraState::Network::IPV4>();
4429 }
4430
4431 template<
4432 typename T,
4433 typename std::enable_if<std::is_same<T, CameraState::Network::IPV4::Address>::value, int>::type = 0>
4435 {
4436 return m_network.get<CameraState::Network::IPV4::Address>();
4437 }
4438
4439 template<
4440 typename T,
4441 typename std::enable_if<std::is_same<T, CameraState::Network::LocalInterfaces>::value, int>::type = 0>
4443 {
4444 return m_network.get<CameraState::Network::LocalInterfaces>();
4445 }
4446
4447 template<typename T, typename std::enable_if<std::is_same<T, CameraState::Status>::value, int>::type = 0>
4449 {
4450 return m_status;
4451 }
4452
4453 template<typename T, typename std::enable_if<std::is_same<T, CameraState::Temperature>::value, int>::type = 0>
4455 {
4456 return m_temperature;
4457 }
4458
4459 template<
4460 typename T,
4461 typename std::enable_if<std::is_same<T, CameraState::Temperature::DMD>::value, int>::type = 0>
4463 {
4464 return m_temperature.get<CameraState::Temperature::DMD>();
4465 }
4466
4467 template<
4468 typename T,
4469 typename std::enable_if<std::is_same<T, CameraState::Temperature::General>::value, int>::type = 0>
4471 {
4472 return m_temperature.get<CameraState::Temperature::General>();
4473 }
4474
4475 template<
4476 typename T,
4477 typename std::enable_if<std::is_same<T, CameraState::Temperature::LED>::value, int>::type = 0>
4479 {
4480 return m_temperature.get<CameraState::Temperature::LED>();
4481 }
4482
4483 template<
4484 typename T,
4485 typename std::enable_if<std::is_same<T, CameraState::Temperature::Lens>::value, int>::type = 0>
4487 {
4488 return m_temperature.get<CameraState::Temperature::Lens>();
4489 }
4490
4491 template<
4492 typename T,
4493 typename std::enable_if<std::is_same<T, CameraState::Temperature::PCB>::value, int>::type = 0>
4495 {
4496 return m_temperature.get<CameraState::Temperature::PCB>();
4497 }
4498
4499 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
4501 {
4502 return m_available;
4503 }
4504
4505 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
4507 {
4508 return m_connected;
4509 }
4510
4511 template<size_t i, typename std::enable_if<i == 2, int>::type = 0>
4513 {
4514 return m_inaccessibleReason;
4515 }
4516
4517 template<size_t i, typename std::enable_if<i == 3, int>::type = 0>
4519 {
4520 return m_network;
4521 }
4522
4523 template<size_t i, typename std::enable_if<i == 4, int>::type = 0>
4525 {
4526 return m_status;
4527 }
4528
4529 template<size_t i, typename std::enable_if<i == 5, int>::type = 0>
4531 {
4532 return m_temperature;
4533 }
4534
4536 template<typename F>
4537 void forEach(const F &f) const
4538 {
4539 f(m_available);
4540 f(m_connected);
4541 f(m_inaccessibleReason);
4542 f(m_network);
4543 f(m_status);
4544 f(m_temperature);
4545 }
4546
4548 template<typename F>
4549 void forEach(const F &f)
4550 {
4551 f(m_available);
4552 f(m_connected);
4553 f(m_inaccessibleReason);
4554 f(m_network);
4555 f(m_status);
4556 f(m_temperature);
4557 }
4558
4560 bool operator==(const CameraState &other) const;
4561
4563 bool operator!=(const CameraState &other) const;
4564
4566 std::string toString() const;
4567
4569 friend std::ostream &operator<<(std::ostream &stream, const CameraState &value)
4570 {
4571 return stream << value.toString();
4572 }
4573
4575 void save(const std::string &fileName) const;
4576
4578 void load(const std::string &fileName);
4579
4580 private:
4581 void setFromString(const std::string &value);
4582
4583 void setFromString(const std::string &fullPath, const std::string &value);
4584
4585 std::string getString(const std::string &fullPath) const;
4586
4587 Available m_available;
4588 Connected m_connected;
4589 InaccessibleReason m_inaccessibleReason;
4590 Network m_network;
4591 Status m_status;
4592 Temperature m_temperature;
4593
4594 friend struct DataModel::Detail::Befriend<CameraState>;
4595 };
4596
4597#ifndef NO_DOC
4598 template<>
4599 struct CameraState::Version<9>
4600 {
4601 using Type = CameraState;
4602 };
4603#endif
4604
4605} // namespace Zivid
4606
4607#ifndef NO_DOC
4609namespace Zivid::Detail
4610{
4611
4612 ZIVID_CORE_EXPORT void save(const Zivid::CameraState &dataModel, std::ostream &ostream);
4613 ZIVID_CORE_EXPORT void load(Zivid::CameraState &dataModel, std::istream &istream);
4614
4615} // namespace Zivid::Detail
4616#endif
4617
4618#ifdef _MSC_VER
4619# pragma warning(pop)
4620#endif
4621
4622#ifndef NO_DOC
4623# if !(defined(_MSC_VER) && (_MSC_VER <= 1900))
4624namespace std // NOLINT
4625{
4626
4627 template<>
4628 struct tuple_size<Zivid::CameraState::Network> : integral_constant<size_t, 3>
4629 {};
4630
4631 template<size_t i>
4632 struct tuple_element<i, Zivid::CameraState::Network>
4633 {
4634 static_assert(i < tuple_size<Zivid::CameraState::Network>::value, "Index must be less than 3");
4635
4636 using type // NOLINT
4637 = decltype(declval<Zivid::CameraState::Network>().get<i>());
4638 };
4639
4640 template<>
4641 struct tuple_size<Zivid::CameraState::Network::Ethernet> : integral_constant<size_t, 1>
4642 {};
4643
4644 template<size_t i>
4645 struct tuple_element<i, Zivid::CameraState::Network::Ethernet>
4646 {
4647 static_assert(i < tuple_size<Zivid::CameraState::Network::Ethernet>::value, "Index must be less than 1");
4648
4649 using type // NOLINT
4650 = decltype(declval<Zivid::CameraState::Network::Ethernet>().get<i>());
4651 };
4652
4653 template<>
4654 struct tuple_size<Zivid::CameraState::Network::IPV4> : integral_constant<size_t, 1>
4655 {};
4656
4657 template<size_t i>
4658 struct tuple_element<i, Zivid::CameraState::Network::IPV4>
4659 {
4660 static_assert(i < tuple_size<Zivid::CameraState::Network::IPV4>::value, "Index must be less than 1");
4661
4662 using type // NOLINT
4663 = decltype(declval<Zivid::CameraState::Network::IPV4>().get<i>());
4664 };
4665
4666 template<>
4667 struct tuple_size<Zivid::CameraState::Temperature> : integral_constant<size_t, 5>
4668 {};
4669
4670 template<size_t i>
4671 struct tuple_element<i, Zivid::CameraState::Temperature>
4672 {
4673 static_assert(i < tuple_size<Zivid::CameraState::Temperature>::value, "Index must be less than 5");
4674
4675 using type // NOLINT
4676 = decltype(declval<Zivid::CameraState::Temperature>().get<i>());
4677 };
4678
4679 template<>
4680 struct tuple_size<Zivid::CameraState> : integral_constant<size_t, 6>
4681 {};
4682
4683 template<size_t i>
4684 struct tuple_element<i, Zivid::CameraState>
4685 {
4686 static_assert(i < tuple_size<Zivid::CameraState>::value, "Index must be less than 6");
4687
4688 using type // NOLINT
4689 = decltype(declval<Zivid::CameraState>().get<i>());
4690 };
4691
4692} // namespace std
4693# endif
4694#endif
4695
4696// If we have access to the DataModel library, automatically include internal DataModel
4697// header. This header is necessary for serialization and deserialization.
4698#if defined(__has_include) && !defined(NO_DOC)
4699# if __has_include("Zivid/CameraStateInternal.h") && __has_include("Zivid/DataModelNodeMetaData.h")
4700# include "Zivid/CameraStateInternal.h"
4701# endif
4702#endif
#define ZIVID_CORE_EXPORT
Definition CoreExport.h:56
Flag if camera is physically connected to the computer and is available for use, but not connected in...
Definition CameraState.h:116
static std::set< bool > validValues()
All valid values of Available.
Definition CameraState.h:141
static const Available no
Off/disabled.
Definition CameraState.h:138
bool operator==(const Available &other) const
Comparison operator.
Definition CameraState.h:167
std::string toString() const
Get the value as string.
bool ValueType
The type of the underlying value.
Definition CameraState.h:136
static const Available yes
On/enabled.
Definition CameraState.h:137
friend std::ostream & operator<<(std::ostream &stream, const Available &value)
Operator to serialize the value to a stream.
Definition CameraState.h:179
static constexpr const char * path
The full path for this value.
Definition CameraState.h:122
bool operator!=(const Available &other) const
Comparison operator.
Definition CameraState.h:173
constexpr Available(bool value)
Constructor.
Definition CameraState.h:150
bool value() const
Get the value.
static constexpr const char * name
The name of this value.
Definition CameraState.h:125
static constexpr DataModel::NodeType nodeType
The type of this node.
Definition CameraState.h:119
Available()=default
Default constructor.
static constexpr const char * description
The description for this value.
Definition CameraState.h:128
Flag if camera is connected in software. This bool is true when the Status value is connected....
Definition CameraState.h:198
Connected()=default
Default constructor.
static const Connected yes
On/enabled.
Definition CameraState.h:218
static const Connected no
Off/disabled.
Definition CameraState.h:219
static constexpr DataModel::NodeType nodeType
The type of this node.
Definition CameraState.h:201
bool operator!=(const Connected &other) const
Comparison operator.
Definition CameraState.h:254
static constexpr const char * name
The name of this value.
Definition CameraState.h:207
constexpr Connected(bool value)
Constructor.
Definition CameraState.h:231
bool value() const
Get the value.
std::string toString() const
Get the value as string.
static constexpr const char * description
The description for this value.
Definition CameraState.h:210
friend std::ostream & operator<<(std::ostream &stream, const Connected &value)
Operator to serialize the value to a stream.
Definition CameraState.h:260
static std::set< bool > validValues()
All valid values of Connected.
Definition CameraState.h:222
bool operator==(const Connected &other) const
Comparison operator.
Definition CameraState.h:248
static constexpr const char * path
The full path for this value.
Definition CameraState.h:204
bool ValueType
The type of the underlying value.
Definition CameraState.h:217
If the camera status is inaccessible, then this enum value will give you the reason.
Definition CameraState.h:277
static const InaccessibleReason ipNotInLocalSubnet
ipNotInLocalSubnet
Definition CameraState.h:303
constexpr InaccessibleReason(ValueType value)
Constructor.
Definition CameraState.h:319
bool hasValue() const
Check if the value is set.
static constexpr const char * path
The full path for this value.
Definition CameraState.h:283
static const InaccessibleReason ipConflictWithAnotherCamera
ipConflictWithAnotherCamera
Definition CameraState.h:301
friend std::ostream & operator<<(std::ostream &stream, const InaccessibleReason::ValueType &value)
Operator to serialize ValueType to a stream.
Definition CameraState.h:339
bool operator==(const InaccessibleReason &other) const
Comparison operator.
Definition CameraState.h:345
static constexpr const char * description
The description for this value.
Definition CameraState.h:289
std::string toString() const
Get the value as string.
friend std::ostream & operator<<(std::ostream &stream, const InaccessibleReason &value)
Operator to serialize the value to a stream.
Definition CameraState.h:357
static constexpr DataModel::NodeType nodeType
The type of this node.
Definition CameraState.h:280
static const InaccessibleReason ipConflictWithLocalNetworkAdapter
ipConflictWithLocalNetworkAdapter
Definition CameraState.h:302
InaccessibleReason()=default
Default constructor.
static const InaccessibleReason ipInMultipleLocalSubnets
ipInMultipleLocalSubnets
Definition CameraState.h:304
static constexpr const char * name
The name of this value.
Definition CameraState.h:286
ValueType
The type of the underlying value.
Definition CameraState.h:295
@ ipConflictWithLocalNetworkAdapter
Definition CameraState.h:297
@ ipNotInLocalSubnet
Definition CameraState.h:298
@ ipInMultipleLocalSubnets
Definition CameraState.h:299
@ ipConflictWithAnotherCamera
Definition CameraState.h:296
ValueType value() const
Get the value.
void reset()
Reset the node to unset state.
bool operator!=(const InaccessibleReason &other) const
Comparison operator.
Definition CameraState.h:351
static std::set< ValueType > validValues()
All valid values of InaccessibleReason.
Definition CameraState.h:307
The link speed that the camera's Ethernet interface is operating at.
Definition CameraState.h:1968
static const LinkSpeed link2_5Gbps
link2_5Gbps
Definition CameraState.h:2000
std::string toString() const
Get the value as string.
static const LinkSpeed unknown
unknown
Definition CameraState.h:1996
static constexpr DataModel::NodeType nodeType
The type of this node.
Definition CameraState.h:1971
bool operator!=(const LinkSpeed &other) const
Comparison operator.
Definition CameraState.h:2039
static constexpr const char * name
The name of this value.
Definition CameraState.h:1977
static const LinkSpeed link100Mbps
link100Mbps
Definition CameraState.h:1998
static constexpr const char * path
The full path for this value.
Definition CameraState.h:1974
friend std::ostream & operator<<(std::ostream &stream, const LinkSpeed::ValueType &value)
Operator to serialize ValueType to a stream.
Definition CameraState.h:2027
static const LinkSpeed link5Gbps
link5Gbps
Definition CameraState.h:2001
static constexpr const char * description
The description for this value.
Definition CameraState.h:1980
static const LinkSpeed link10Gbps
link10Gbps
Definition CameraState.h:2002
ValueType value() const
Get the value.
friend std::ostream & operator<<(std::ostream &stream, const LinkSpeed &value)
Operator to serialize the value to a stream.
Definition CameraState.h:2045
constexpr LinkSpeed(ValueType value)
Constructor.
Definition CameraState.h:2016
static const LinkSpeed link10Mbps
link10Mbps
Definition CameraState.h:1997
static std::set< ValueType > validValues()
All valid values of LinkSpeed.
Definition CameraState.h:2005
static const LinkSpeed link1Gbps
link1Gbps
Definition CameraState.h:1999
ValueType
The type of the underlying value.
Definition CameraState.h:1987
bool operator==(const LinkSpeed &other) const
Comparison operator.
Definition CameraState.h:2033
Current Ethernet state.
Definition CameraState.h:1949
friend std::ostream & operator<<(std::ostream &stream, const Ethernet &value)
Operator to send the value as string to a stream.
Definition CameraState.h:2237
static constexpr DataModel::NodeType nodeType
The type of this node.
Definition CameraState.h:1952
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition CameraState.h:2222
Ethernet copyWith(Args &&...args) const
Returns a copy of this object with the given argument(s) set to the new value(s)
Definition CameraState.h:2159
static constexpr const char * name
The name of this value.
Definition CameraState.h:1958
const CameraState::Network::Ethernet::LinkSpeed & get() const
Definition CameraState.h:2202
std::tuple< CameraState::Network::Ethernet::LinkSpeed > Descendants
Definition CameraState.h:2072
LinkSpeed & linkSpeed()
Get LinkSpeed.
Definition CameraState.h:2186
void forEach(const F &f) const
Run the given function on each direct member with the value of the member as parameter.
Definition CameraState.h:2215
static constexpr const char * description
The description for this value.
Definition CameraState.h:1961
static constexpr const char * path
The full path for this value.
Definition CameraState.h:1955
Ethernet & set(const LinkSpeed &value)
Set LinkSpeed.
Definition CameraState.h:2192
bool operator!=(const Ethernet &other) const
Inequality operator.
std::string toString() const
Get the value as string.
bool operator==(const Ethernet &other) const
Equality operator.
void set(Args &&...args)
Set multiple arguments.
Definition CameraState.h:2126
const LinkSpeed & linkSpeed() const
Get LinkSpeed.
Definition CameraState.h:2180
Current IPv4 address.
Definition CameraState.h:2276
Address()=default
Default constructor.
bool operator<(const Address &other) const
Comparison operator.
Definition CameraState.h:2326
static constexpr const char * description
The description for this value.
Definition CameraState.h:2288
bool operator==(const Address &other) const
Comparison operator.
Definition CameraState.h:2314
bool operator<=(const Address &other) const
Comparison operator.
Definition CameraState.h:2338
static constexpr Range< ValueType::size_type > validSize()
The valid sizes for Address.
Definition CameraState.h:2294
bool operator>(const Address &other) const
Comparison operator.
Definition CameraState.h:2332
static constexpr DataModel::NodeType nodeType
The type of this node.
Definition CameraState.h:2279
bool operator!=(const Address &other) const
Comparison operator.
Definition CameraState.h:2320
const std::string & value() const
Get the value.
static constexpr const char * name
The name of this value.
Definition CameraState.h:2285
friend std::ostream & operator<<(std::ostream &stream, const Address &value)
Operator to serialize the value to a stream.
Definition CameraState.h:2350
static constexpr const char * path
The full path for this value.
Definition CameraState.h:2282
bool operator>=(const Address &other) const
Comparison operator.
Definition CameraState.h:2344
Address(std::string value)
Constructor.
Definition CameraState.h:2303
std::string toString() const
Get the value as string.
std::string ValueType
The type of the underlying value.
Definition CameraState.h:2291
Current IPv4 protocol state.
Definition CameraState.h:2258
static constexpr DataModel::NodeType nodeType
The type of this node.
Definition CameraState.h:2261
IPV4()
Default constructor.
void set(Args &&...args)
Set multiple arguments.
Definition CameraState.h:2417
void forEach(const F &f) const
Run the given function on each direct member with the value of the member as parameter.
Definition CameraState.h:2505
static constexpr const char * description
The description for this value.
Definition CameraState.h:2270
const Address & address() const
Get Address.
Definition CameraState.h:2471
static constexpr const char * path
The full path for this value.
Definition CameraState.h:2264
friend std::ostream & operator<<(std::ostream &stream, const IPV4 &value)
Operator to send the value as string to a stream.
Definition CameraState.h:2527
IPV4 copyWith(Args &&...args) const
Returns a copy of this object with the given argument(s) set to the new value(s)
Definition CameraState.h:2450
const CameraState::Network::IPV4::Address & get() const
Definition CameraState.h:2492
static constexpr const char * name
The name of this value.
Definition CameraState.h:2267
bool operator==(const IPV4 &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 CameraState.h:2512
IPV4 & set(const Address &value)
Set Address.
Definition CameraState.h:2483
std::string toString() const
Get the value as string.
std::tuple< CameraState::Network::IPV4::Address > Descendants
Definition CameraState.h:2363
Address & address()
Get Address.
Definition CameraState.h:2477
bool operator!=(const IPV4 &other) const
Inequality operator.
The link speed that the computer's Ethernet interface is operating at.
Definition CameraState.h:445
static const LinkSpeed link10Gbps
link10Gbps
Definition CameraState.h:479
constexpr LinkSpeed(ValueType value)
Constructor.
Definition CameraState.h:493
static const LinkSpeed link10Mbps
link10Mbps
Definition CameraState.h:474
static const LinkSpeed link5Gbps
link5Gbps
Definition CameraState.h:478
static constexpr DataModel::NodeType nodeType
The type of this node.
Definition CameraState.h:448
static const LinkSpeed link100Mbps
link100Mbps
Definition CameraState.h:475
bool operator!=(const LinkSpeed &other) const
Comparison operator.
Definition CameraState.h:516
ValueType
The type of the underlying value.
Definition CameraState.h:464
static const LinkSpeed link1Gbps
link1Gbps
Definition CameraState.h:476
bool operator==(const LinkSpeed &other) const
Comparison operator.
Definition CameraState.h:510
friend std::ostream & operator<<(std::ostream &stream, const LinkSpeed::ValueType &value)
Operator to serialize ValueType to a stream.
Definition CameraState.h:504
static std::set< ValueType > validValues()
All valid values of LinkSpeed.
Definition CameraState.h:482
static const LinkSpeed link2_5Gbps
link2_5Gbps
Definition CameraState.h:477
friend std::ostream & operator<<(std::ostream &stream, const LinkSpeed &value)
Operator to serialize the value to a stream.
Definition CameraState.h:522
static constexpr const char * description
The description for this value.
Definition CameraState.h:457
static const LinkSpeed unknown
unknown
Definition CameraState.h:473
static constexpr const char * path
The full path for this value.
Definition CameraState.h:451
static constexpr const char * name
The name of this value.
Definition CameraState.h:454
std::string toString() const
Get the value as string.
Current Ethernet state.
Definition CameraState.h:426
friend std::ostream & operator<<(std::ostream &stream, const Ethernet &value)
Operator to send the value as string to a stream.
Definition CameraState.h:716
Ethernet copyWith(Args &&...args) const
Returns a copy of this object with the given argument(s) set to the new value(s)
Definition CameraState.h:637
std::tuple< CameraState::Network::LocalInterface::Ethernet::LinkSpeed > Descendants
Definition CameraState.h:549
static constexpr const char * path
The full path for this value.
Definition CameraState.h:432
static constexpr DataModel::NodeType nodeType
The type of this node.
Definition CameraState.h:429
LinkSpeed & linkSpeed()
Get LinkSpeed.
Definition CameraState.h:664
bool operator==(const Ethernet &other) const
Equality operator.
bool operator!=(const Ethernet &other) const
Inequality operator.
const LinkSpeed & linkSpeed() const
Get LinkSpeed.
Definition CameraState.h:658
static constexpr const char * description
The description for this value.
Definition CameraState.h:438
void forEach(const F &f) const
Run the given function on each direct member with the value of the member as parameter.
Definition CameraState.h:694
void set(Args &&...args)
Set multiple arguments.
Definition CameraState.h:603
Ethernet & set(const LinkSpeed &value)
Set LinkSpeed.
Definition CameraState.h:670
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition CameraState.h:701
std::string toString() const
Get the value as string.
static constexpr const char * name
The name of this value.
Definition CameraState.h:435
const CameraState::Network::LocalInterface::Ethernet::LinkSpeed & get() const
Definition CameraState.h:681
IP address of the computer's local network interface.
Definition CameraState.h:779
bool operator>=(const Address &other) const
Comparison operator.
Definition CameraState.h:849
bool operator<(const Address &other) const
Comparison operator.
Definition CameraState.h:831
bool operator<=(const Address &other) const
Comparison operator.
Definition CameraState.h:843
static constexpr const char * name
The name of this value.
Definition CameraState.h:788
std::string ValueType
The type of the underlying value.
Definition CameraState.h:796
static constexpr Range< ValueType::size_type > validSize()
The valid sizes for Address.
Definition CameraState.h:799
std::string toString() const
Get the value as string.
static constexpr const char * path
The full path for this value.
Definition CameraState.h:785
friend std::ostream & operator<<(std::ostream &stream, const Address &value)
Operator to serialize the value to a stream.
Definition CameraState.h:855
Address(std::string value)
Constructor.
Definition CameraState.h:808
bool operator!=(const Address &other) const
Comparison operator.
Definition CameraState.h:825
static constexpr const char * description
The description for this value.
Definition CameraState.h:791
static constexpr DataModel::NodeType nodeType
The type of this node.
Definition CameraState.h:782
bool operator>(const Address &other) const
Comparison operator.
Definition CameraState.h:837
bool operator==(const Address &other) const
Comparison operator.
Definition CameraState.h:819
Subnet mask of the computer's local network interface.
Definition CameraState.h:872
bool operator!=(const Mask &other) const
Comparison operator.
Definition CameraState.h:918
bool operator>=(const Mask &other) const
Comparison operator.
Definition CameraState.h:942
Mask(std::string value)
Constructor.
Definition CameraState.h:901
static constexpr const char * description
The description for this value.
Definition CameraState.h:884
friend std::ostream & operator<<(std::ostream &stream, const Mask &value)
Operator to serialize the value to a stream.
Definition CameraState.h:948
bool operator==(const Mask &other) const
Comparison operator.
Definition CameraState.h:912
bool operator>(const Mask &other) const
Comparison operator.
Definition CameraState.h:930
static constexpr const char * name
The name of this value.
Definition CameraState.h:881
bool operator<(const Mask &other) const
Comparison operator.
Definition CameraState.h:924
bool operator<=(const Mask &other) const
Comparison operator.
Definition CameraState.h:936
static constexpr DataModel::NodeType nodeType
The type of this node.
Definition CameraState.h:875
std::string toString() const
Get the value as string.
static constexpr Range< ValueType::size_type > validSize()
The valid sizes for Mask.
Definition CameraState.h:892
std::string ValueType
The type of the underlying value.
Definition CameraState.h:889
static constexpr const char * path
The full path for this value.
Definition CameraState.h:878
const std::string & value() const
Get the value.
An IPv4 subnet that the local network interface is connected to.
Definition CameraState.h:758
std::string toString() const
Get the value as string.
static constexpr const char * path
The full path for this value.
Definition CameraState.h:764
Subnet copyWith(Args &&...args) const
Returns a copy of this object with the given argument(s) set to the new value(s)
Definition CameraState.h:1054
const Mask & mask() const
Get Mask.
Definition CameraState.h:1094
static constexpr const char * name
The name of this value.
Definition CameraState.h:767
void set(Args &&...args)
Set multiple arguments.
Definition CameraState.h:1019
const CameraState::Network::LocalInterface::IPV4::Subnet::Address & get() const
Definition CameraState.h:1117
static constexpr DataModel::NodeType nodeType
The type of this node.
Definition CameraState.h:761
bool operator!=(const Subnet &other) const
Inequality operator.
Mask & mask()
Get Mask.
Definition CameraState.h:1100
std::tuple< CameraState::Network::LocalInterface::IPV4::Subnet::Address, CameraState::Network::LocalInterface::IPV4::Subnet::Mask > Descendants
Definition CameraState.h:961
bool operator==(const Subnet &other) const
Equality operator.
static constexpr const char * description
The description for this value.
Definition CameraState.h:770
friend std::ostream & operator<<(std::ostream &stream, const Subnet &value)
Operator to send the value as string to a stream.
Definition CameraState.h:1170
const CameraState::Network::LocalInterface::IPV4::Subnet::Mask & get() const
Definition CameraState.h:1127
const Address & address() const
Get Address.
Definition CameraState.h:1075
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition CameraState.h:1154
Subnet & set(const Address &value)
Set Address.
Definition CameraState.h:1087
void forEach(const F &f) const
Run the given function on each direct member with the value of the member as parameter.
Definition CameraState.h:1146
Subnet & set(const Mask &value)
Set Mask.
Definition CameraState.h:1106
Address & address()
Get Address.
Definition CameraState.h:1081
List of IPv4 addresses and subnet masks that the interface is configured with. This list can contain ...
Definition CameraState.h:1195
CameraState::Network::LocalInterface::IPV4::Subnet & operator[](std::size_t pos)
Returns a reference to the element at position pos in the list.
static constexpr const char * description
The description for this value.
Definition CameraState.h:1207
void emplaceBack(Args &&...args)
Appends a new element to the end of the list.
Definition CameraState.h:1255
bool operator!=(const Subnets &other) const
Comparison operator.
Definition CameraState.h:1340
bool isEmpty() const noexcept
Check if the list is empty.
std::vector< CameraState::Network::LocalInterface::IPV4::Subnet > ValueType
The type of the underlying value.
Definition CameraState.h:1215
Subnets(std::vector< CameraState::Network::LocalInterface::IPV4::Subnet > value)
Constructor.
Definition CameraState.h:1227
std::string toString() const
Get the value as string.
const CameraState::Network::LocalInterface::IPV4::Subnet & at(std::size_t pos) const
Returns a const reference to the element at position pos in the list.
Subnets(std::initializer_list< CameraState::Network::LocalInterface::IPV4::Subnet > value)
Constructor.
Definition CameraState.h:1232
void forEach(const F &f)
Run the given function on each element in the list.
Definition CameraState.h:1290
friend std::ostream & operator<<(std::ostream &stream, const Subnets &value)
Operator to serialize the value to a stream.
Definition CameraState.h:1346
std::vector< CameraState::Network::LocalInterface::IPV4::Subnet >::const_iterator ConstIterator
Constant iterator type for Subnets.
Definition CameraState.h:1318
static constexpr const char * name
The name of this value.
Definition CameraState.h:1204
static constexpr DataModel::NodeType nodeType
The type of this node.
Definition CameraState.h:1198
Iterator end() noexcept
Returns an iterator to the element following the last element of the list.
ConstIterator cbegin() const noexcept
Returns a constant iterator to the first element of the list.
std::size_t size() const noexcept
Get the size of the list.
CameraState::Network::LocalInterface::IPV4::Subnet & at(std::size_t pos)
Returns a reference to the element at position pos in the list.
const CameraState::Network::LocalInterface::IPV4::Subnet & operator[](std::size_t pos) const
Returns a const reference to the element at position pos in the list.
static constexpr const char * path
The full path for this value.
Definition CameraState.h:1201
std::vector< CameraState::Network::LocalInterface::IPV4::Subnet >::iterator Iterator
Iterator type for Subnets.
Definition CameraState.h:1309
static constexpr Range< ValueType::size_type > validSize()
The valid sizes for Subnets.
Definition CameraState.h:1218
ConstIterator cend() const noexcept
Returns a constant iterator to the element following the last element of the list.
void forEach(const F &f) const
Run the given function on each element in the list.
Definition CameraState.h:1300
const std::vector< CameraState::Network::LocalInterface::IPV4::Subnet > & value() const
Get the value.
Iterator begin() noexcept
Returns an iterator to the first element of the list.
Current IPv4 protocol state of the computer's local network interface.
Definition CameraState.h:737
static constexpr const char * path
The full path for this value.
Definition CameraState.h:743
const Subnets & subnets() const
Get Subnets.
Definition CameraState.h:1468
IPV4 copyWith(Args &&...args) const
Returns a copy of this object with the given argument(s) set to the new value(s)
Definition CameraState.h:1447
const CameraState::Network::LocalInterface::IPV4::Subnets & get() const
Definition CameraState.h:1491
std::tuple< CameraState::Network::LocalInterface::IPV4::Subnets > Descendants
Definition CameraState.h:1359
friend std::ostream & operator<<(std::ostream &stream, const IPV4 &value)
Operator to send the value as string to a stream.
Definition CameraState.h:1526
static constexpr DataModel::NodeType nodeType
The type of this node.
Definition CameraState.h:740
void forEach(const F &f) const
Run the given function on each direct member with the value of the member as parameter.
Definition CameraState.h:1504
bool operator!=(const IPV4 &other) const
Inequality operator.
void set(Args &&...args)
Set multiple arguments.
Definition CameraState.h:1413
static constexpr const char * description
The description for this value.
Definition CameraState.h:749
bool operator==(const IPV4 &other) const
Equality operator.
std::string toString() const
Get the value as string.
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition CameraState.h:1511
IPV4 & set(const Subnets &value)
Set Subnets.
Definition CameraState.h:1480
Subnets & subnets()
Get Subnets.
Definition CameraState.h:1474
static constexpr const char * name
The name of this value.
Definition CameraState.h:746
Name of the computer's local network interface.
Definition CameraState.h:1547
bool operator==(const InterfaceName &other) const
Comparison operator.
Definition CameraState.h:1587
std::string ValueType
The type of the underlying value.
Definition CameraState.h:1564
const std::string & value() const
Get the value.
static constexpr Range< ValueType::size_type > validSize()
The valid sizes for InterfaceName.
Definition CameraState.h:1567
InterfaceName(std::string value)
Constructor.
Definition CameraState.h:1576
bool operator<=(const InterfaceName &other) const
Comparison operator.
Definition CameraState.h:1611
friend std::ostream & operator<<(std::ostream &stream, const InterfaceName &value)
Operator to serialize the value to a stream.
Definition CameraState.h:1623
bool operator>(const InterfaceName &other) const
Comparison operator.
Definition CameraState.h:1605
bool operator<(const InterfaceName &other) const
Comparison operator.
Definition CameraState.h:1599
static constexpr const char * path
The full path for this value.
Definition CameraState.h:1553
std::string toString() const
Get the value as string.
static constexpr DataModel::NodeType nodeType
The type of this node.
Definition CameraState.h:1550
bool operator!=(const InterfaceName &other) const
Comparison operator.
Definition CameraState.h:1593
bool operator>=(const InterfaceName &other) const
Comparison operator.
Definition CameraState.h:1617
static constexpr const char * name
The name of this value.
Definition CameraState.h:1556
static constexpr const char * description
The description for this value.
Definition CameraState.h:1559
Current state of the computer's local network interface.
Definition CameraState.h:405
const CameraState::Network::LocalInterface::IPV4::Subnets & get() const
Definition CameraState.h:1865
static constexpr const char * path
The full path for this value.
Definition CameraState.h:411
const CameraState::Network::LocalInterface::Ethernet & get() const
Definition CameraState.h:1836
Ethernet & ethernet()
Get Ethernet.
Definition CameraState.h:1767
const CameraState::Network::LocalInterface::Ethernet::LinkSpeed & get() const
Definition CameraState.h:1846
bool operator!=(const LocalInterface &other) const
Inequality operator.
static constexpr DataModel::NodeType nodeType
The type of this node.
Definition CameraState.h:408
InterfaceName & interfaceName()
Get InterfaceName.
Definition CameraState.h:1819
bool operator==(const LocalInterface &other) const
Equality operator.
LocalInterface & set(const IPV4::Subnets &value)
Set IPV4::Subnets.
Definition CameraState.h:1806
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition CameraState.h:1909
LocalInterface copyWith(Args &&...args) const
Returns a copy of this object with the given argument(s) set to the new value(s)
Definition CameraState.h:1740
std::string toString() const
Get the value as string.
const InterfaceName & interfaceName() const
Get InterfaceName.
Definition CameraState.h:1813
const Ethernet & ethernet() const
Get Ethernet.
Definition CameraState.h:1761
const IPV4 & ipv4() const
Get IPV4.
Definition CameraState.h:1787
void forEach(const F &f) const
Run the given function on each direct member with the value of the member as parameter.
Definition CameraState.h:1900
void set(Args &&...args)
Set multiple arguments.
Definition CameraState.h:1703
friend std::ostream & operator<<(std::ostream &stream, const LocalInterface &value)
Operator to send the value as string to a stream.
Definition CameraState.h:1926
const CameraState::Network::LocalInterface::IPV4 & get() const
Definition CameraState.h:1855
LocalInterface & set(const Ethernet &value)
Set Ethernet.
Definition CameraState.h:1773
static constexpr const char * description
The description for this value.
Definition CameraState.h:417
LocalInterface & set(const Ethernet::LinkSpeed &value)
Set Ethernet::LinkSpeed.
Definition CameraState.h:1780
LocalInterface & set(const InterfaceName &value)
Set InterfaceName.
Definition CameraState.h:1825
static constexpr const char * name
The name of this value.
Definition CameraState.h:414
std::tuple< CameraState::Network::LocalInterface::Ethernet, CameraState::Network::LocalInterface::Ethernet::LinkSpeed, CameraState::Network::LocalInterface::IPV4, CameraState::Network::LocalInterface::IPV4::Subnets, CameraState::Network::LocalInterface::InterfaceName > Descendants
Definition CameraState.h:1636
IPV4 & ipv4()
Get IPV4.
Definition CameraState.h:1793
const CameraState::Network::LocalInterface::InterfaceName & get() const
Definition CameraState.h:1875
LocalInterface & set(const IPV4 &value)
Set IPV4.
Definition CameraState.h:1799
List of the computer's local network interfaces that discovered the camera. In the most common scenar...
Definition CameraState.h:2554
std::vector< CameraState::Network::LocalInterface >::iterator Iterator
Iterator type for LocalInterfaces.
Definition CameraState.h:2670
bool operator!=(const LocalInterfaces &other) const
Comparison operator.
Definition CameraState.h:2700
bool isEmpty() const noexcept
Check if the list is empty.
const std::vector< CameraState::Network::LocalInterface > & value() const
Get the value.
ConstIterator cbegin() const noexcept
Returns a constant iterator to the first element of the list.
CameraState::Network::LocalInterface & operator[](std::size_t pos)
Returns a reference to the element at position pos in the list.
std::string toString() const
Get the value as string.
LocalInterfaces()=default
Default constructor.
static constexpr const char * description
The description for this value.
Definition CameraState.h:2566
static constexpr DataModel::NodeType nodeType
The type of this node.
Definition CameraState.h:2557
Iterator end() noexcept
Returns an iterator to the element following the last element of the list.
std::vector< CameraState::Network::LocalInterface > ValueType
The type of the underlying value.
Definition CameraState.h:2577
LocalInterfaces(std::initializer_list< CameraState::Network::LocalInterface > value)
Constructor.
Definition CameraState.h:2594
const CameraState::Network::LocalInterface & operator[](std::size_t pos) const
Returns a const reference to the element at position pos in the list.
void emplaceBack(Args &&...args)
Appends a new element to the end of the list.
Definition CameraState.h:2616
static constexpr Range< ValueType::size_type > validSize()
The valid sizes for LocalInterfaces.
Definition CameraState.h:2580
Iterator begin() noexcept
Returns an iterator to the first element of the list.
const CameraState::Network::LocalInterface & at(std::size_t pos) const
Returns a const reference to the element at position pos in the list.
LocalInterfaces(std::vector< CameraState::Network::LocalInterface > value)
Constructor.
Definition CameraState.h:2589
ConstIterator cend() const noexcept
Returns a constant iterator to the element following the last element of the list.
void forEach(const F &f) const
Run the given function on each element in the list.
Definition CameraState.h:2661
std::vector< CameraState::Network::LocalInterface >::const_iterator ConstIterator
Constant iterator type for LocalInterfaces.
Definition CameraState.h:2679
static constexpr const char * name
The name of this value.
Definition CameraState.h:2563
void forEach(const F &f)
Run the given function on each element in the list.
Definition CameraState.h:2651
static constexpr const char * path
The full path for this value.
Definition CameraState.h:2560
CameraState::Network::LocalInterface & at(std::size_t pos)
Returns a reference to the element at position pos in the list.
std::size_t size() const noexcept
Get the size of the list.
friend std::ostream & operator<<(std::ostream &stream, const LocalInterfaces &value)
Operator to serialize the value to a stream.
Definition CameraState.h:2706
Current network state.
Definition CameraState.h:386
void set(Args &&...args)
Set multiple arguments.
Definition CameraState.h:2786
const LocalInterfaces & localInterfaces() const
Get LocalInterfaces.
Definition CameraState.h:2894
Network & set(const Ethernet::LinkSpeed &value)
Set Ethernet::LinkSpeed.
Definition CameraState.h:2861
std::tuple< CameraState::Network::Ethernet, CameraState::Network::Ethernet::LinkSpeed, CameraState::Network::IPV4, CameraState::Network::IPV4::Address, CameraState::Network::LocalInterfaces > Descendants
Definition CameraState.h:2719
static constexpr const char * path
The full path for this value.
Definition CameraState.h:392
std::string toString() const
Get the value as string.
static constexpr DataModel::NodeType nodeType
The type of this node.
Definition CameraState.h:389
friend std::ostream & operator<<(std::ostream &stream, const Network &value)
Operator to send the value as string to a stream.
Definition CameraState.h:2999
Network & set(const Ethernet &value)
Set Ethernet.
Definition CameraState.h:2854
const Ethernet & ethernet() const
Get Ethernet.
Definition CameraState.h:2842
const CameraState::Network::Ethernet & get() const
Definition CameraState.h:2915
const CameraState::Network::LocalInterfaces & get() const
Definition CameraState.h:2948
const CameraState::Network::Ethernet::LinkSpeed & get() const
Definition CameraState.h:2924
Ethernet & ethernet()
Get Ethernet.
Definition CameraState.h:2848
bool operator==(const Network &other) const
Equality operator.
LocalInterfaces & localInterfaces()
Get LocalInterfaces.
Definition CameraState.h:2900
static constexpr const char * description
The description for this value.
Definition CameraState.h:398
Network()
Default constructor.
Network & set(const IPV4 &value)
Set IPV4.
Definition CameraState.h:2880
Network copyWith(Args &&...args) const
Returns a copy of this object with the given argument(s) set to the new value(s)
Definition CameraState.h:2822
const CameraState::Network::IPV4::Address & get() const
Definition CameraState.h:2940
Network & set(const LocalInterfaces &value)
Set LocalInterfaces.
Definition CameraState.h:2906
const CameraState::Network::IPV4 & get() const
Definition CameraState.h:2932
Network & set(const IPV4::Address &value)
Set IPV4::Address.
Definition CameraState.h:2887
static constexpr const char * name
The name of this value.
Definition CameraState.h:395
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition CameraState.h:2982
IPV4 & ipv4()
Get IPV4.
Definition CameraState.h:2874
bool operator!=(const Network &other) const
Inequality operator.
void forEach(const F &f) const
Run the given function on each direct member with the value of the member as parameter.
Definition CameraState.h:2973
const IPV4 & ipv4() const
Get IPV4.
Definition CameraState.h:2868
This enum describes the current status of this camera. The enum can have the following values:
Definition CameraState.h:3055
constexpr Status(ValueType value)
Constructor.
Definition CameraState.h:3148
static std::set< ValueType > validValues()
All valid values of Status.
Definition CameraState.h:3130
static const Status connected
connected
Definition CameraState.h:3125
static const Status disconnecting
disconnecting
Definition CameraState.h:3126
static const Status inaccessible
inaccessible
Definition CameraState.h:3118
std::string toString() const
Get the value as string.
ValueType
The type of the underlying value.
Definition CameraState.h:3106
@ connected
Definition CameraState.h:3114
@ disconnecting
Definition CameraState.h:3115
@ firmwareUpdateRequired
Definition CameraState.h:3110
@ updatingFirmware
Definition CameraState.h:3111
@ inaccessible
Definition CameraState.h:3107
@ busy
Definition CameraState.h:3108
@ connecting
Definition CameraState.h:3113
@ disappeared
Definition CameraState.h:3116
@ available
Definition CameraState.h:3112
@ applyingNetworkConfiguration
Definition CameraState.h:3109
static const Status applyingNetworkConfiguration
applyingNetworkConfiguration
Definition CameraState.h:3120
friend std::ostream & operator<<(std::ostream &stream, const Status &value)
Operator to serialize the value to a stream.
Definition CameraState.h:3177
static constexpr DataModel::NodeType nodeType
The type of this node.
Definition CameraState.h:3058
static const Status firmwareUpdateRequired
firmwareUpdateRequired
Definition CameraState.h:3121
ValueType value() const
Get the value.
bool operator!=(const Status &other) const
Comparison operator.
Definition CameraState.h:3171
static const Status connecting
connecting
Definition CameraState.h:3124
bool operator==(const Status &other) const
Comparison operator.
Definition CameraState.h:3165
static const Status busy
busy
Definition CameraState.h:3119
Status()=default
Default constructor.
static const Status available
available
Definition CameraState.h:3123
static const Status updatingFirmware
updatingFirmware
Definition CameraState.h:3122
static constexpr const char * description
The description for this value.
Definition CameraState.h:3067
static const Status disappeared
disappeared
Definition CameraState.h:3127
static constexpr const char * path
The full path for this value.
Definition CameraState.h:3061
static constexpr const char * name
The name of this value.
Definition CameraState.h:3064
friend std::ostream & operator<<(std::ostream &stream, const Status::ValueType &value)
Operator to serialize ValueType to a stream.
Definition CameraState.h:3159
DMD temperature.
Definition CameraState.h:3227
static constexpr DataModel::NodeType nodeType
The type of this node.
Definition CameraState.h:3230
bool operator>(const DMD &other) const
Comparison operator.
Definition CameraState.h:3283
std::string toString() const
Get the value as string.
static constexpr const char * description
The description for this value.
Definition CameraState.h:3239
double value() const
Get the value.
bool operator!=(const DMD &other) const
Comparison operator.
Definition CameraState.h:3271
bool operator<(const DMD &other) const
Comparison operator.
Definition CameraState.h:3277
static constexpr const char * path
The full path for this value.
Definition CameraState.h:3233
bool operator>=(const DMD &other) const
Comparison operator.
Definition CameraState.h:3295
double ValueType
The type of the underlying value.
Definition CameraState.h:3242
bool operator<=(const DMD &other) const
Comparison operator.
Definition CameraState.h:3289
friend std::ostream & operator<<(std::ostream &stream, const DMD &value)
Operator to serialize the value to a stream.
Definition CameraState.h:3301
constexpr DMD(double value)
Constructor.
Definition CameraState.h:3254
bool operator==(const DMD &other) const
Comparison operator.
Definition CameraState.h:3265
static constexpr const char * name
The name of this value.
Definition CameraState.h:3236
static constexpr Range< double > validRange()
The range of valid values for DMD.
Definition CameraState.h:3245
DMD()=default
Default constructor.
General temperature.
Definition CameraState.h:3318
double ValueType
The type of the underlying value.
Definition CameraState.h:3333
static constexpr const char * name
The name of this value.
Definition CameraState.h:3327
static constexpr DataModel::NodeType nodeType
The type of this node.
Definition CameraState.h:3321
std::string toString() const
Get the value as string.
double value() const
Get the value.
bool operator<(const General &other) const
Comparison operator.
Definition CameraState.h:3368
constexpr General(double value)
Constructor.
Definition CameraState.h:3345
static constexpr Range< double > validRange()
The range of valid values for General.
Definition CameraState.h:3336
bool operator==(const General &other) const
Comparison operator.
Definition CameraState.h:3356
General()=default
Default constructor.
bool operator<=(const General &other) const
Comparison operator.
Definition CameraState.h:3380
bool operator!=(const General &other) const
Comparison operator.
Definition CameraState.h:3362
bool operator>(const General &other) const
Comparison operator.
Definition CameraState.h:3374
static constexpr const char * description
The description for this value.
Definition CameraState.h:3330
static constexpr const char * path
The full path for this value.
Definition CameraState.h:3324
friend std::ostream & operator<<(std::ostream &stream, const General &value)
Operator to serialize the value to a stream.
Definition CameraState.h:3392
bool operator>=(const General &other) const
Comparison operator.
Definition CameraState.h:3386
LED temperature.
Definition CameraState.h:3409
bool operator<=(const LED &other) const
Comparison operator.
Definition CameraState.h:3471
std::string toString() const
Get the value as string.
bool operator<(const LED &other) const
Comparison operator.
Definition CameraState.h:3459
double value() const
Get the value.
LED()=default
Default constructor.
static constexpr const char * path
The full path for this value.
Definition CameraState.h:3415
constexpr LED(double value)
Constructor.
Definition CameraState.h:3436
friend std::ostream & operator<<(std::ostream &stream, const LED &value)
Operator to serialize the value to a stream.
Definition CameraState.h:3483
static constexpr DataModel::NodeType nodeType
The type of this node.
Definition CameraState.h:3412
static constexpr const char * name
The name of this value.
Definition CameraState.h:3418
bool operator!=(const LED &other) const
Comparison operator.
Definition CameraState.h:3453
bool operator==(const LED &other) const
Comparison operator.
Definition CameraState.h:3447
bool operator>=(const LED &other) const
Comparison operator.
Definition CameraState.h:3477
bool operator>(const LED &other) const
Comparison operator.
Definition CameraState.h:3465
static constexpr const char * description
The description for this value.
Definition CameraState.h:3421
static constexpr Range< double > validRange()
The range of valid values for LED.
Definition CameraState.h:3427
double ValueType
The type of the underlying value.
Definition CameraState.h:3424
Lens temperature.
Definition CameraState.h:3500
static constexpr DataModel::NodeType nodeType
The type of this node.
Definition CameraState.h:3503
double ValueType
The type of the underlying value.
Definition CameraState.h:3515
static constexpr const char * name
The name of this value.
Definition CameraState.h:3509
bool operator==(const Lens &other) const
Comparison operator.
Definition CameraState.h:3538
Lens()=default
Default constructor.
bool operator<=(const Lens &other) const
Comparison operator.
Definition CameraState.h:3562
double value() const
Get the value.
bool operator>(const Lens &other) const
Comparison operator.
Definition CameraState.h:3556
bool operator!=(const Lens &other) const
Comparison operator.
Definition CameraState.h:3544
static constexpr const char * path
The full path for this value.
Definition CameraState.h:3506
bool operator>=(const Lens &other) const
Comparison operator.
Definition CameraState.h:3568
static constexpr const char * description
The description for this value.
Definition CameraState.h:3512
std::string toString() const
Get the value as string.
constexpr Lens(double value)
Constructor.
Definition CameraState.h:3527
static constexpr Range< double > validRange()
The range of valid values for Lens.
Definition CameraState.h:3518
bool operator<(const Lens &other) const
Comparison operator.
Definition CameraState.h:3550
friend std::ostream & operator<<(std::ostream &stream, const Lens &value)
Operator to serialize the value to a stream.
Definition CameraState.h:3574
PCB temperature.
Definition CameraState.h:3591
bool operator!=(const PCB &other) const
Comparison operator.
Definition CameraState.h:3635
constexpr PCB(double value)
Constructor.
Definition CameraState.h:3618
static constexpr Range< double > validRange()
The range of valid values for PCB.
Definition CameraState.h:3609
bool operator>=(const PCB &other) const
Comparison operator.
Definition CameraState.h:3659
PCB()=default
Default constructor.
bool operator<=(const PCB &other) const
Comparison operator.
Definition CameraState.h:3653
friend std::ostream & operator<<(std::ostream &stream, const PCB &value)
Operator to serialize the value to a stream.
Definition CameraState.h:3665
static constexpr const char * name
The name of this value.
Definition CameraState.h:3600
bool operator==(const PCB &other) const
Comparison operator.
Definition CameraState.h:3629
static constexpr const char * description
The description for this value.
Definition CameraState.h:3603
static constexpr const char * path
The full path for this value.
Definition CameraState.h:3597
static constexpr DataModel::NodeType nodeType
The type of this node.
Definition CameraState.h:3594
double value() const
Get the value.
bool operator>(const PCB &other) const
Comparison operator.
Definition CameraState.h:3647
double ValueType
The type of the underlying value.
Definition CameraState.h:3606
std::string toString() const
Get the value as string.
bool operator<(const PCB &other) const
Comparison operator.
Definition CameraState.h:3641
Current temperature(s)
Definition CameraState.h:3209
DMD & dmd()
Get DMD.
Definition CameraState.h:3807
Temperature & set(const General &value)
Set General.
Definition CameraState.h:3832
static constexpr DataModel::NodeType nodeType
The type of this node.
Definition CameraState.h:3212
const PCB & pcb() const
Get PCB.
Definition CameraState.h:3877
const CameraState::Temperature::Lens & get() const
Definition CameraState.h:3922
static constexpr const char * name
The name of this value.
Definition CameraState.h:3218
Temperature & set(const Lens &value)
Set Lens.
Definition CameraState.h:3870
const CameraState::Temperature::DMD & get() const
Definition CameraState.h:3898
static constexpr const char * path
The full path for this value.
Definition CameraState.h:3215
const CameraState::Temperature::PCB & get() const
Definition CameraState.h:3930
const CameraState::Temperature::General & get() const
Definition CameraState.h:3906
Temperature & set(const PCB &value)
Set PCB.
Definition CameraState.h:3889
const General & general() const
Get General.
Definition CameraState.h:3820
bool operator!=(const Temperature &other) const
Inequality operator.
const LED & led() const
Get LED.
Definition CameraState.h:3839
void forEach(const F &f) const
Run the given function on each direct member with the value of the member as parameter.
Definition CameraState.h:3967
friend std::ostream & operator<<(std::ostream &stream, const Temperature &value)
Operator to send the value as string to a stream.
Definition CameraState.h:3997
Temperature & set(const LED &value)
Set LED.
Definition CameraState.h:3851
std::string toString() const
Get the value as string.
LED & led()
Get LED.
Definition CameraState.h:3845
bool operator==(const Temperature &other) const
Equality operator.
const Lens & lens() const
Get Lens.
Definition CameraState.h:3858
Temperature copyWith(Args &&...args) const
Returns a copy of this object with the given argument(s) set to the new value(s)
Definition CameraState.h:3781
General & general()
Get General.
Definition CameraState.h:3826
std::tuple< CameraState::Temperature::DMD, CameraState::Temperature::General, CameraState::Temperature::LED, CameraState::Temperature::Lens, CameraState::Temperature::PCB > Descendants
Definition CameraState.h:3678
void set(Args &&...args)
Set multiple arguments.
Definition CameraState.h:3745
const DMD & dmd() const
Get DMD.
Definition CameraState.h:3801
static constexpr const char * description
The description for this value.
Definition CameraState.h:3221
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition CameraState.h:3978
const CameraState::Temperature::LED & get() const
Definition CameraState.h:3914
Lens & lens()
Get Lens.
Definition CameraState.h:3864
Temperature()
Default constructor.
Temperature & set(const DMD &value)
Set DMD.
Definition CameraState.h:3813
PCB & pcb()
Get PCB.
Definition CameraState.h:3883
Information about camera connection state, temperatures, etc.
Definition CameraState.h:79
CameraState & set(const Network::Ethernet::LinkSpeed &value)
Set Network::Ethernet::LinkSpeed.
Definition CameraState.h:4283
const Temperature & temperature() const
Get Temperature.
Definition CameraState.h:4330
CameraState copyWith(Args &&...args) const
Returns a copy of this object with the given argument(s) set to the new value(s)
Definition CameraState.h:4181
const CameraState::Network::IPV4 & get() const
Definition CameraState.h:4426
const CameraState::Temperature::Lens & get() const
Definition CameraState.h:4486
void load(const std::string &fileName)
Load from the given file.
CameraState(const std::string &fileName)
Construct CameraState by loading from file.
std::string serialize() const
Serialize to a string.
CameraState & set(const Temperature &value)
Set Temperature.
Definition CameraState.h:4342
static constexpr const char * description
The description for this value.
Definition CameraState.h:91
const CameraState::Connected & get() const
Definition CameraState.h:4390
Temperature & temperature()
Get Temperature.
Definition CameraState.h:4336
const CameraState::Temperature::General & get() const
Definition CameraState.h:4470
std::string toString() const
Get the value as string.
CameraState & set(const Network &value)
Set Network.
Definition CameraState.h:4269
const CameraState::Status & get() const
Definition CameraState.h:4448
const CameraState::InaccessibleReason & get() const
Definition CameraState.h:4398
const CameraState::Available & get() const
Definition CameraState.h:4384
const CameraState::Network::Ethernet::LinkSpeed & get() const
Definition CameraState.h:4420
const CameraState::Network::IPV4::Address & get() const
Definition CameraState.h:4434
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition CameraState.h:4549
void save(const std::string &fileName) const
Save to the given file.
const CameraState::Network & get() const
Definition CameraState.h:4404
const CameraState::Temperature::PCB & get() const
Definition CameraState.h:4494
CameraState & set(const Temperature::PCB &value)
Set Temperature::PCB.
Definition CameraState.h:4377
const InaccessibleReason & inaccessibleReason() const
Get InaccessibleReason.
Definition CameraState.h:4238
const CameraState::Temperature::LED & get() const
Definition CameraState.h:4478
std::tuple< CameraState::Available, CameraState::Connected, CameraState::InaccessibleReason, CameraState::Network, CameraState::Network::Ethernet, CameraState::Network::Ethernet::LinkSpeed, CameraState::Network::IPV4, CameraState::Network::IPV4::Address, CameraState::Network::LocalInterfaces, CameraState::Status, CameraState::Temperature, CameraState::Temperature::DMD, CameraState::Temperature::General, CameraState::Temperature::LED, CameraState::Temperature::Lens, CameraState::Temperature::PCB > Descendants
Definition CameraState.h:4018
static constexpr size_t version
Definition CameraState.h:95
CameraState & set(const Temperature::General &value)
Set Temperature::General.
Definition CameraState.h:4356
friend std::ostream & operator<<(std::ostream &stream, const CameraState &value)
Operator to send the value as string to a stream.
Definition CameraState.h:4569
bool operator!=(const CameraState &other) const
Inequality operator.
CameraState & set(const Network::IPV4 &value)
Set Network::IPV4.
Definition CameraState.h:4290
CameraState & set(const Network::IPV4::Address &value)
Set Network::IPV4::Address.
Definition CameraState.h:4297
static constexpr DataModel::NodeType nodeType
The type of this node.
Definition CameraState.h:82
Status & status()
Get Status.
Definition CameraState.h:4317
const Available & isAvailable() const
Get Available.
Definition CameraState.h:4200
const Status & status() const
Get Status.
Definition CameraState.h:4311
const CameraState::Network::LocalInterfaces & get() const
Definition CameraState.h:4442
Connected & isConnected()
Get Connected.
Definition CameraState.h:4225
CameraState & set(const Temperature::Lens &value)
Set Temperature::Lens.
Definition CameraState.h:4370
CameraState & set(const Available &value)
Set Available.
Definition CameraState.h:4212
CameraState & set(const Temperature::DMD &value)
Set Temperature::DMD.
Definition CameraState.h:4349
static constexpr const char * path
The full path for this value.
Definition CameraState.h:85
bool operator==(const CameraState &other) const
Equality operator.
CameraState()
Default constructor.
CameraState & set(const Status &value)
Set Status.
Definition CameraState.h:4323
CameraState & set(const InaccessibleReason &value)
Set InaccessibleReason.
Definition CameraState.h:4250
CameraState & set(const Connected &value)
Set Connected.
Definition CameraState.h:4231
Network & network()
Get Network.
Definition CameraState.h:4263
static constexpr const char * name
The name of this value.
Definition CameraState.h:88
CameraState(Args &&...args)
Constructor taking variadic number of arguments.
Definition CameraState.h:4092
const CameraState::Temperature & get() const
Definition CameraState.h:4454
void forEach(const F &f) const
Run the given function on each direct member with the value of the member as parameter.
Definition CameraState.h:4537
static CameraState fromSerialized(const std::string &value)
Construct a new CameraState instance from a previously serialized string.
void set(Args &&...args)
Set multiple arguments.
Definition CameraState.h:4134
const CameraState::Network::Ethernet & get() const
Definition CameraState.h:4412
InaccessibleReason & inaccessibleReason()
Get InaccessibleReason.
Definition CameraState.h:4244
CameraState & set(const Network::Ethernet &value)
Set Network::Ethernet.
Definition CameraState.h:4276
CameraState & set(const Temperature::LED &value)
Set Temperature::LED.
Definition CameraState.h:4363
const CameraState::Temperature::DMD & get() const
Definition CameraState.h:4462
const Network & network() const
Get Network.
Definition CameraState.h:4257
const Connected & isConnected() const
Get Connected.
Definition CameraState.h:4219
Available & isAvailable()
Get Available.
Definition CameraState.h:4206
CameraState & set(const Network::LocalInterfaces &value)
Set Network::LocalInterfaces.
Definition CameraState.h:4304
Class describing a range of values for a given type T.
Definition Range.h:75
NodeType
Definition NodeType.h:49
@ leafDataModelList
Definition NodeType.h:51
@ 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