Zivid C++ API 2.13.1+18e79e79-1
CameraState.h
Go to the documentation of this file.
1/*******************************************************************************
2 * This file is part of the Zivid API
3 *
4 * Copyright 2015-2024 (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 <set>
53#include <sstream>
54#include <string>
55#include <tuple>
56#include <utility>
57#include <vector>
58
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:
82 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
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{ 6 };
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:
119 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
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:
201 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
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:
280 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
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 {
296 ipConflictWithAnotherCamera,
297 ipConflictWithLocalNetworkAdapter,
298 ipNotInLocalSubnet,
299 ipInMultipleLocalSubnets
300 };
305
307 static std::set<ValueType> validValues()
308 {
309 return { ValueType::ipConflictWithAnotherCamera,
310 ValueType::ipConflictWithLocalNetworkAdapter,
311 ValueType::ipNotInLocalSubnet,
312 ValueType::ipInMultipleLocalSubnets };
313 }
314
317
319 explicit constexpr InaccessibleReason(ValueType value)
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 Zivid::DataModel::Detail::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:
389 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
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
401
402 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
404 {
405 public:
407 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
408
410 static constexpr const char *path{ "Network/IPV4" };
411
413 static constexpr const char *name{ "IPV4" };
414
416 static constexpr const char *description{ R"description(Current IPv4 protocol state)description" };
417
419
420 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
422 {
423 public:
425 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
426
428 static constexpr const char *path{ "Network/IPV4/Address" };
429
431 static constexpr const char *name{ "Address" };
432
434 static constexpr const char *description{ R"description(Current IPv4 address)description" };
435
437 using ValueType = std::string;
438
441 {
442 return { 0, std::numeric_limits<ValueType::size_type>::max() };
443 }
444
446 Address() = default;
447
449 explicit Address(std::string value)
450 : m_value{ std::move(value) }
451 {}
452
454 const std::string &value() const;
455
457 std::string toString() const;
458
460 bool operator==(const Address &other) const
461 {
462 return m_value == other.m_value;
463 }
464
466 bool operator!=(const Address &other) const
467 {
468 return m_value != other.m_value;
469 }
470
472 bool operator<(const Address &other) const
473 {
474 return m_value < other.m_value;
475 }
476
478 bool operator>(const Address &other) const
479 {
480 return m_value > other.m_value;
481 }
482
484 bool operator<=(const Address &other) const
485 {
486 return m_value <= other.m_value;
487 }
488
490 bool operator>=(const Address &other) const
491 {
492 return m_value >= other.m_value;
493 }
494
496 friend std::ostream &operator<<(std::ostream &stream, const Address &value)
497 {
498 return stream << value.toString();
499 }
500
501 private:
502 void setFromString(const std::string &value);
503
504 std::string m_value{};
505
506 friend struct DataModel::Detail::Befriend<Address>;
507 };
508
509 using Descendants = std::tuple<CameraState::Network::IPV4::Address>;
510
513
525#ifndef NO_DOC
526 template<
527 typename... Args,
528 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
529 typename std::enable_if<
530 Zivid::Detail::TypeTraits::AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::
531 value,
532 int>::type = 0>
533#else
534 template<typename... Args>
535#endif
536 explicit IPV4(Args &&...args)
537 {
538 using namespace Zivid::Detail::TypeTraits;
539
540 static_assert(
541 AllArgsDecayedAreUnique<Args...>::value,
542 "Found duplicate types among the arguments passed to IPV4(...). "
543 "Types should be listed at most once.");
544
545 set(std::forward<Args>(args)...);
546 }
547
558#ifndef NO_DOC
559 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
560#else
561 template<typename... Args>
562#endif
563 void set(Args &&...args)
564 {
565 using namespace Zivid::Detail::TypeTraits;
566
567 using AllArgsAreDescendantNodes =
568 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
569 static_assert(
570 AllArgsAreDescendantNodes::value, "All arguments passed to set(...) must be descendant nodes.");
571
572 static_assert(
573 AllArgsDecayedAreUnique<Args...>::value,
574 "Found duplicate types among the arguments passed to set(...). "
575 "Types should be listed at most once.");
576
577 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
578 }
579
591#ifndef NO_DOC
592 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
593#else
594 template<typename... Args>
595#endif
596 IPV4 copyWith(Args &&...args) const
597 {
598 using namespace Zivid::Detail::TypeTraits;
599
600 using AllArgsAreDescendantNodes =
601 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
602 static_assert(
603 AllArgsAreDescendantNodes::value,
604 "All arguments passed to copyWith(...) must be descendant nodes.");
605
606 static_assert(
607 AllArgsDecayedAreUnique<Args...>::value,
608 "Found duplicate types among the arguments passed to copyWith(...). "
609 "Types should be listed at most once.");
610
611 auto copy{ *this };
612 copy.set(std::forward<Args>(args)...);
613 return copy;
614 }
615
617 const Address &address() const
618 {
619 return m_address;
620 }
621
624 {
625 return m_address;
626 }
627
629 IPV4 &set(const Address &value)
630 {
631 m_address = value;
632 return *this;
633 }
634
635 template<
636 typename T,
637 typename std::enable_if<std::is_same<T, CameraState::Network::IPV4::Address>::value, int>::type = 0>
639 {
640 return m_address;
641 }
642
643 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
645 {
646 return m_address;
647 }
648
650 template<typename F>
651 void forEach(const F &f) const
652 {
653 f(m_address);
654 }
655
657 template<typename F>
658 void forEach(const F &f)
659 {
660 f(m_address);
661 }
662
664 bool operator==(const IPV4 &other) const;
665
667 bool operator!=(const IPV4 &other) const;
668
670 std::string toString() const;
671
673 friend std::ostream &operator<<(std::ostream &stream, const IPV4 &value)
674 {
675 return stream << value.toString();
676 }
677
678 private:
679 void setFromString(const std::string &value);
680
681 void setFromString(const std::string &fullPath, const std::string &value);
682
683 std::string getString(const std::string &fullPath) const;
684
685 Address m_address;
686
687 friend struct DataModel::Detail::Befriend<IPV4>;
688 };
689
690 using Descendants = std::tuple<CameraState::Network::IPV4, CameraState::Network::IPV4::Address>;
691
694
707#ifndef NO_DOC
708 template<
709 typename... Args,
710 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
711 typename std::enable_if<
712 Zivid::Detail::TypeTraits::AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::
713 value,
714 int>::type = 0>
715#else
716 template<typename... Args>
717#endif
718 explicit Network(Args &&...args)
719 {
720 using namespace Zivid::Detail::TypeTraits;
721
722 static_assert(
723 AllArgsDecayedAreUnique<Args...>::value,
724 "Found duplicate types among the arguments passed to Network(...). "
725 "Types should be listed at most once.");
726
727 set(std::forward<Args>(args)...);
728 }
729
741#ifndef NO_DOC
742 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
743#else
744 template<typename... Args>
745#endif
746 void set(Args &&...args)
747 {
748 using namespace Zivid::Detail::TypeTraits;
749
750 using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
751 static_assert(
752 AllArgsAreDescendantNodes::value, "All arguments passed to set(...) must be descendant nodes.");
753
754 static_assert(
755 AllArgsDecayedAreUnique<Args...>::value,
756 "Found duplicate types among the arguments passed to set(...). "
757 "Types should be listed at most once.");
758
759 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
760 }
761
774#ifndef NO_DOC
775 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
776#else
777 template<typename... Args>
778#endif
779 Network copyWith(Args &&...args) const
780 {
781 using namespace Zivid::Detail::TypeTraits;
782
783 using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
784 static_assert(
785 AllArgsAreDescendantNodes::value,
786 "All arguments passed to copyWith(...) must be descendant nodes.");
787
788 static_assert(
789 AllArgsDecayedAreUnique<Args...>::value,
790 "Found duplicate types among the arguments passed to copyWith(...). "
791 "Types should be listed at most once.");
792
793 auto copy{ *this };
794 copy.set(std::forward<Args>(args)...);
795 return copy;
796 }
797
799 const IPV4 &ipv4() const
800 {
801 return m_ipv4;
802 }
803
806 {
807 return m_ipv4;
808 }
809
811 Network &set(const IPV4 &value)
812 {
813 m_ipv4 = value;
814 return *this;
815 }
816
818 Network &set(const IPV4::Address &value)
819 {
820 m_ipv4.set(value);
821 return *this;
822 }
823
824 template<
825 typename T,
826 typename std::enable_if<std::is_same<T, CameraState::Network::IPV4>::value, int>::type = 0>
828 {
829 return m_ipv4;
830 }
831
832 template<
833 typename T,
834 typename std::enable_if<std::is_same<T, CameraState::Network::IPV4::Address>::value, int>::type = 0>
836 {
837 return m_ipv4.get<CameraState::Network::IPV4::Address>();
838 }
839
840 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
842 {
843 return m_ipv4;
844 }
845
847 template<typename F>
848 void forEach(const F &f) const
849 {
850 f(m_ipv4);
851 }
852
854 template<typename F>
855 void forEach(const F &f)
856 {
857 f(m_ipv4);
858 }
859
861 bool operator==(const Network &other) const;
862
864 bool operator!=(const Network &other) const;
865
867 std::string toString() const;
868
870 friend std::ostream &operator<<(std::ostream &stream, const Network &value)
871 {
872 return stream << value.toString();
873 }
874
875 private:
876 void setFromString(const std::string &value);
877
878 void setFromString(const std::string &fullPath, const std::string &value);
879
880 std::string getString(const std::string &fullPath) const;
881
882 IPV4 m_ipv4;
883
884 friend struct DataModel::Detail::Befriend<Network>;
885 };
886
921
922 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
924 {
925 public:
927 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
928
930 static constexpr const char *path{ "Status" };
931
933 static constexpr const char *name{ "Status" };
934
936 static constexpr const char *description{
937 R"description(This enum describes the current status of this camera. The enum can have the following values:
938
939* `inaccessible`: The camera was discovered, but the SDK is not able to connect to this camera. This can
940 be because the IP settings of the camera and the PC are not compatible, or because there are several
941 cameras with the same IP connected to your PC. The `InaccessibleReason` enum will give you more
942 details about why this camera is not accessible. The network configuration of the camera can be changed
943 using the ZividNetworkCameraConfigurator CLI tool. See the knowledge base for more information.
944
945* `busy`: The camera is currently in use by another process. This can be a different process on the same
946 PC, or on a different PC if the camera is shared on a network.
947
948* `applyingNetworkConfiguration`: The camera network configuration is being changed by the current process.
949
950* `firmwareUpdateRequired`: The camera is accessible, but requires a firmware update before you can connect
951 to it.
952
953* `updatingFirmware`: The camera firmware is currently being updated in the current process.
954
955* `available`: The camera is available for use by the current process. This means that you can invoke
956 camera.connect() on this camera.
957
958* `connecting`: The camera is currently connecting in the current process.
959
960* `connected`: The camera is connected in the current process. This means camera.connect() has successfully
961 completed and you can capture using this camera.
962
963* `disconnecting`: The camera is currently disconnecting in the current process. When disconnection has
964 completed, the camera will normally go back to the `available` state.
965
966* `disappeared`: The camera was found earlier, but it can no longer be found. The connection between the
967 PC and the camera may be disrupted, or the camera may have lost power. When in `disappeared` state, the
968 camera will not be returned from `Application::cameras()`. The camera will go back to one of the other
969 states if the camera is later found again.
970)description"
971 };
972
974 enum class ValueType
975 {
976 inaccessible,
977 busy,
978 applyingNetworkConfiguration,
979 firmwareUpdateRequired,
980 updatingFirmware,
981 available,
982 connecting,
983 connected,
984 disconnecting,
985 disappeared
986 };
987 static const Status inaccessible;
988 static const Status busy;
992 static const Status available;
993 static const Status connecting;
994 static const Status connected;
995 static const Status disconnecting;
996 static const Status disappeared;
997
999 static std::set<ValueType> validValues()
1000 {
1001 return { ValueType::inaccessible,
1002 ValueType::busy,
1003 ValueType::applyingNetworkConfiguration,
1004 ValueType::firmwareUpdateRequired,
1005 ValueType::updatingFirmware,
1006 ValueType::available,
1007 ValueType::connecting,
1008 ValueType::connected,
1009 ValueType::disconnecting,
1010 ValueType::disappeared };
1011 }
1012
1014 Status() = default;
1015
1017 explicit constexpr Status(ValueType value)
1018 : m_value{ verifyValue(value) }
1019 {}
1020
1023
1025 std::string toString() const;
1026
1028 friend std::ostream &operator<<(std::ostream &stream, const Status::ValueType &value)
1029 {
1030 return stream << Status{ value }.toString();
1031 }
1032
1034 bool operator==(const Status &other) const
1035 {
1036 return m_value == other.m_value;
1037 }
1038
1040 bool operator!=(const Status &other) const
1041 {
1042 return m_value != other.m_value;
1043 }
1044
1046 friend std::ostream &operator<<(std::ostream &stream, const Status &value)
1047 {
1048 return stream << value.toString();
1049 }
1050
1051 private:
1052 void setFromString(const std::string &value);
1053
1054 constexpr ValueType static verifyValue(const ValueType &value)
1055 {
1056 return value == ValueType::inaccessible || value == ValueType::busy
1057 || value == ValueType::applyingNetworkConfiguration
1058 || value == ValueType::firmwareUpdateRequired || value == ValueType::updatingFirmware
1059 || value == ValueType::available || value == ValueType::connecting
1060 || value == ValueType::connected || value == ValueType::disconnecting
1061 || value == ValueType::disappeared
1062 ? value
1063 : throw std::invalid_argument{
1064 "Invalid value: Status{ "
1065 + std::to_string(static_cast<std::underlying_type<ValueType>::type>(value)) + " }"
1066 };
1067 }
1068
1069 ValueType m_value{ ValueType::inaccessible };
1070
1071 friend struct DataModel::Detail::Befriend<Status>;
1072 };
1073
1075
1076 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
1078 {
1079 public:
1081 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
1082
1084 static constexpr const char *path{ "Temperature" };
1085
1087 static constexpr const char *name{ "Temperature" };
1088
1090 static constexpr const char *description{ R"description(Current temperature(s))description" };
1091
1093
1094 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
1096 {
1097 public:
1099 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
1100
1102 static constexpr const char *path{ "Temperature/DMD" };
1103
1105 static constexpr const char *name{ "DMD" };
1106
1108 static constexpr const char *description{ R"description(DMD temperature)description" };
1109
1111 using ValueType = double;
1112
1114 static constexpr Range<double> validRange()
1115 {
1116 return { std::numeric_limits<double>::lowest(), std::numeric_limits<double>::max() };
1117 }
1118
1120 DMD() = default;
1121
1123 explicit constexpr DMD(double value)
1124 : m_value{ value }
1125 {}
1126
1128 double value() const;
1129
1131 std::string toString() const;
1132
1134 bool operator==(const DMD &other) const
1135 {
1136 return m_value == other.m_value;
1137 }
1138
1140 bool operator!=(const DMD &other) const
1141 {
1142 return m_value != other.m_value;
1143 }
1144
1146 bool operator<(const DMD &other) const
1147 {
1148 return m_value < other.m_value;
1149 }
1150
1152 bool operator>(const DMD &other) const
1153 {
1154 return m_value > other.m_value;
1155 }
1156
1158 bool operator<=(const DMD &other) const
1159 {
1160 return m_value <= other.m_value;
1161 }
1162
1164 bool operator>=(const DMD &other) const
1165 {
1166 return m_value >= other.m_value;
1167 }
1168
1170 friend std::ostream &operator<<(std::ostream &stream, const DMD &value)
1171 {
1172 return stream << value.toString();
1173 }
1174
1175 private:
1176 void setFromString(const std::string &value);
1177
1178 double m_value{ 0.0 };
1179
1180 friend struct DataModel::Detail::Befriend<DMD>;
1181 };
1182
1184
1185 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
1187 {
1188 public:
1190 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
1191
1193 static constexpr const char *path{ "Temperature/General" };
1194
1196 static constexpr const char *name{ "General" };
1197
1199 static constexpr const char *description{ R"description(General temperature)description" };
1200
1202 using ValueType = double;
1203
1205 static constexpr Range<double> validRange()
1206 {
1207 return { std::numeric_limits<double>::lowest(), std::numeric_limits<double>::max() };
1208 }
1209
1211 General() = default;
1212
1214 explicit constexpr General(double value)
1215 : m_value{ value }
1216 {}
1217
1219 double value() const;
1220
1222 std::string toString() const;
1223
1225 bool operator==(const General &other) const
1226 {
1227 return m_value == other.m_value;
1228 }
1229
1231 bool operator!=(const General &other) const
1232 {
1233 return m_value != other.m_value;
1234 }
1235
1237 bool operator<(const General &other) const
1238 {
1239 return m_value < other.m_value;
1240 }
1241
1243 bool operator>(const General &other) const
1244 {
1245 return m_value > other.m_value;
1246 }
1247
1249 bool operator<=(const General &other) const
1250 {
1251 return m_value <= other.m_value;
1252 }
1253
1255 bool operator>=(const General &other) const
1256 {
1257 return m_value >= other.m_value;
1258 }
1259
1261 friend std::ostream &operator<<(std::ostream &stream, const General &value)
1262 {
1263 return stream << value.toString();
1264 }
1265
1266 private:
1267 void setFromString(const std::string &value);
1268
1269 double m_value{ 0.0 };
1270
1271 friend struct DataModel::Detail::Befriend<General>;
1272 };
1273
1275
1276 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
1278 {
1279 public:
1281 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
1282
1284 static constexpr const char *path{ "Temperature/LED" };
1285
1287 static constexpr const char *name{ "LED" };
1288
1290 static constexpr const char *description{ R"description(LED temperature)description" };
1291
1293 using ValueType = double;
1294
1296 static constexpr Range<double> validRange()
1297 {
1298 return { std::numeric_limits<double>::lowest(), std::numeric_limits<double>::max() };
1299 }
1300
1302 LED() = default;
1303
1305 explicit constexpr LED(double value)
1306 : m_value{ value }
1307 {}
1308
1310 double value() const;
1311
1313 std::string toString() const;
1314
1316 bool operator==(const LED &other) const
1317 {
1318 return m_value == other.m_value;
1319 }
1320
1322 bool operator!=(const LED &other) const
1323 {
1324 return m_value != other.m_value;
1325 }
1326
1328 bool operator<(const LED &other) const
1329 {
1330 return m_value < other.m_value;
1331 }
1332
1334 bool operator>(const LED &other) const
1335 {
1336 return m_value > other.m_value;
1337 }
1338
1340 bool operator<=(const LED &other) const
1341 {
1342 return m_value <= other.m_value;
1343 }
1344
1346 bool operator>=(const LED &other) const
1347 {
1348 return m_value >= other.m_value;
1349 }
1350
1352 friend std::ostream &operator<<(std::ostream &stream, const LED &value)
1353 {
1354 return stream << value.toString();
1355 }
1356
1357 private:
1358 void setFromString(const std::string &value);
1359
1360 double m_value{ 0.0 };
1361
1362 friend struct DataModel::Detail::Befriend<LED>;
1363 };
1364
1366
1367 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
1369 {
1370 public:
1372 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
1373
1375 static constexpr const char *path{ "Temperature/Lens" };
1376
1378 static constexpr const char *name{ "Lens" };
1379
1381 static constexpr const char *description{ R"description(Lens temperature)description" };
1382
1384 using ValueType = double;
1385
1387 static constexpr Range<double> validRange()
1388 {
1389 return { std::numeric_limits<double>::lowest(), std::numeric_limits<double>::max() };
1390 }
1391
1393 Lens() = default;
1394
1396 explicit constexpr Lens(double value)
1397 : m_value{ value }
1398 {}
1399
1401 double value() const;
1402
1404 std::string toString() const;
1405
1407 bool operator==(const Lens &other) const
1408 {
1409 return m_value == other.m_value;
1410 }
1411
1413 bool operator!=(const Lens &other) const
1414 {
1415 return m_value != other.m_value;
1416 }
1417
1419 bool operator<(const Lens &other) const
1420 {
1421 return m_value < other.m_value;
1422 }
1423
1425 bool operator>(const Lens &other) const
1426 {
1427 return m_value > other.m_value;
1428 }
1429
1431 bool operator<=(const Lens &other) const
1432 {
1433 return m_value <= other.m_value;
1434 }
1435
1437 bool operator>=(const Lens &other) const
1438 {
1439 return m_value >= other.m_value;
1440 }
1441
1443 friend std::ostream &operator<<(std::ostream &stream, const Lens &value)
1444 {
1445 return stream << value.toString();
1446 }
1447
1448 private:
1449 void setFromString(const std::string &value);
1450
1451 double m_value{ 0.0 };
1452
1453 friend struct DataModel::Detail::Befriend<Lens>;
1454 };
1455
1457
1458 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
1460 {
1461 public:
1463 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
1464
1466 static constexpr const char *path{ "Temperature/PCB" };
1467
1469 static constexpr const char *name{ "PCB" };
1470
1472 static constexpr const char *description{ R"description(PCB temperature)description" };
1473
1475 using ValueType = double;
1476
1478 static constexpr Range<double> validRange()
1479 {
1480 return { std::numeric_limits<double>::lowest(), std::numeric_limits<double>::max() };
1481 }
1482
1484 PCB() = default;
1485
1487 explicit constexpr PCB(double value)
1488 : m_value{ value }
1489 {}
1490
1492 double value() const;
1493
1495 std::string toString() const;
1496
1498 bool operator==(const PCB &other) const
1499 {
1500 return m_value == other.m_value;
1501 }
1502
1504 bool operator!=(const PCB &other) const
1505 {
1506 return m_value != other.m_value;
1507 }
1508
1510 bool operator<(const PCB &other) const
1511 {
1512 return m_value < other.m_value;
1513 }
1514
1516 bool operator>(const PCB &other) const
1517 {
1518 return m_value > other.m_value;
1519 }
1520
1522 bool operator<=(const PCB &other) const
1523 {
1524 return m_value <= other.m_value;
1525 }
1526
1528 bool operator>=(const PCB &other) const
1529 {
1530 return m_value >= other.m_value;
1531 }
1532
1534 friend std::ostream &operator<<(std::ostream &stream, const PCB &value)
1535 {
1536 return stream << value.toString();
1537 }
1538
1539 private:
1540 void setFromString(const std::string &value);
1541
1542 double m_value{ 0.0 };
1543
1544 friend struct DataModel::Detail::Befriend<PCB>;
1545 };
1546
1547 using Descendants = std::tuple<
1553
1556
1572#ifndef NO_DOC
1573 template<
1574 typename... Args,
1575 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
1576 typename std::enable_if<
1577 Zivid::Detail::TypeTraits::AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::
1578 value,
1579 int>::type = 0>
1580#else
1581 template<typename... Args>
1582#endif
1583 explicit Temperature(Args &&...args)
1584 {
1585 using namespace Zivid::Detail::TypeTraits;
1586
1587 static_assert(
1588 AllArgsDecayedAreUnique<Args...>::value,
1589 "Found duplicate types among the arguments passed to Temperature(...). "
1590 "Types should be listed at most once.");
1591
1592 set(std::forward<Args>(args)...);
1593 }
1594
1609#ifndef NO_DOC
1610 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
1611#else
1612 template<typename... Args>
1613#endif
1614 void set(Args &&...args)
1615 {
1616 using namespace Zivid::Detail::TypeTraits;
1617
1618 using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
1619 static_assert(
1620 AllArgsAreDescendantNodes::value, "All arguments passed to set(...) must be descendant nodes.");
1621
1622 static_assert(
1623 AllArgsDecayedAreUnique<Args...>::value,
1624 "Found duplicate types among the arguments passed to set(...). "
1625 "Types should be listed at most once.");
1626
1627 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
1628 }
1629
1645#ifndef NO_DOC
1646 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
1647#else
1648 template<typename... Args>
1649#endif
1650 Temperature copyWith(Args &&...args) const
1651 {
1652 using namespace Zivid::Detail::TypeTraits;
1653
1654 using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
1655 static_assert(
1656 AllArgsAreDescendantNodes::value,
1657 "All arguments passed to copyWith(...) must be descendant nodes.");
1658
1659 static_assert(
1660 AllArgsDecayedAreUnique<Args...>::value,
1661 "Found duplicate types among the arguments passed to copyWith(...). "
1662 "Types should be listed at most once.");
1663
1664 auto copy{ *this };
1665 copy.set(std::forward<Args>(args)...);
1666 return copy;
1667 }
1668
1670 const DMD &dmd() const
1671 {
1672 return m_dmd;
1673 }
1674
1677 {
1678 return m_dmd;
1679 }
1680
1682 Temperature &set(const DMD &value)
1683 {
1684 m_dmd = value;
1685 return *this;
1686 }
1687
1689 const General &general() const
1690 {
1691 return m_general;
1692 }
1693
1696 {
1697 return m_general;
1698 }
1699
1701 Temperature &set(const General &value)
1702 {
1703 m_general = value;
1704 return *this;
1705 }
1706
1708 const LED &led() const
1709 {
1710 return m_led;
1711 }
1712
1715 {
1716 return m_led;
1717 }
1718
1720 Temperature &set(const LED &value)
1721 {
1722 m_led = value;
1723 return *this;
1724 }
1725
1727 const Lens &lens() const
1728 {
1729 return m_lens;
1730 }
1731
1734 {
1735 return m_lens;
1736 }
1737
1739 Temperature &set(const Lens &value)
1740 {
1741 m_lens = value;
1742 return *this;
1743 }
1744
1746 const PCB &pcb() const
1747 {
1748 return m_pcb;
1749 }
1750
1753 {
1754 return m_pcb;
1755 }
1756
1758 Temperature &set(const PCB &value)
1759 {
1760 m_pcb = value;
1761 return *this;
1762 }
1763
1764 template<
1765 typename T,
1766 typename std::enable_if<std::is_same<T, CameraState::Temperature::DMD>::value, int>::type = 0>
1768 {
1769 return m_dmd;
1770 }
1771
1772 template<
1773 typename T,
1774 typename std::enable_if<std::is_same<T, CameraState::Temperature::General>::value, int>::type = 0>
1776 {
1777 return m_general;
1778 }
1779
1780 template<
1781 typename T,
1782 typename std::enable_if<std::is_same<T, CameraState::Temperature::LED>::value, int>::type = 0>
1784 {
1785 return m_led;
1786 }
1787
1788 template<
1789 typename T,
1790 typename std::enable_if<std::is_same<T, CameraState::Temperature::Lens>::value, int>::type = 0>
1792 {
1793 return m_lens;
1794 }
1795
1796 template<
1797 typename T,
1798 typename std::enable_if<std::is_same<T, CameraState::Temperature::PCB>::value, int>::type = 0>
1800 {
1801 return m_pcb;
1802 }
1803
1804 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
1806 {
1807 return m_dmd;
1808 }
1809
1810 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
1812 {
1813 return m_general;
1814 }
1815
1816 template<size_t i, typename std::enable_if<i == 2, int>::type = 0>
1818 {
1819 return m_led;
1820 }
1821
1822 template<size_t i, typename std::enable_if<i == 3, int>::type = 0>
1824 {
1825 return m_lens;
1826 }
1827
1828 template<size_t i, typename std::enable_if<i == 4, int>::type = 0>
1830 {
1831 return m_pcb;
1832 }
1833
1835 template<typename F>
1836 void forEach(const F &f) const
1837 {
1838 f(m_dmd);
1839 f(m_general);
1840 f(m_led);
1841 f(m_lens);
1842 f(m_pcb);
1843 }
1844
1846 template<typename F>
1847 void forEach(const F &f)
1848 {
1849 f(m_dmd);
1850 f(m_general);
1851 f(m_led);
1852 f(m_lens);
1853 f(m_pcb);
1854 }
1855
1857 bool operator==(const Temperature &other) const;
1858
1860 bool operator!=(const Temperature &other) const;
1861
1863 std::string toString() const;
1864
1866 friend std::ostream &operator<<(std::ostream &stream, const Temperature &value)
1867 {
1868 return stream << value.toString();
1869 }
1870
1871 private:
1872 void setFromString(const std::string &value);
1873
1874 void setFromString(const std::string &fullPath, const std::string &value);
1875
1876 std::string getString(const std::string &fullPath) const;
1877
1878 DMD m_dmd;
1879 General m_general;
1880 LED m_led;
1881 Lens m_lens;
1882 PCB m_pcb;
1883
1884 friend struct DataModel::Detail::Befriend<Temperature>;
1885 };
1886
1887 using Descendants = std::tuple<
1901
1904
1906 explicit CameraState(const std::string &fileName);
1907
1913 ZIVID_NODISCARD static CameraState fromSerialized(const std::string &value);
1914
1920 std::string serialize() const;
1921
1945#ifndef NO_DOC
1946 template<
1947 typename... Args,
1948 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
1949 typename std::enable_if<
1950 Zivid::Detail::TypeTraits::AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::value,
1951 int>::type = 0>
1952#else
1953 template<typename... Args>
1954#endif
1955 explicit CameraState(Args &&...args)
1956 {
1957 using namespace Zivid::Detail::TypeTraits;
1958
1959 static_assert(
1960 AllArgsDecayedAreUnique<Args...>::value,
1961 "Found duplicate types among the arguments passed to CameraState(...). "
1962 "Types should be listed at most once.");
1963
1964 set(std::forward<Args>(args)...);
1965 }
1966
1989#ifndef NO_DOC
1990 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
1991#else
1992 template<typename... Args>
1993#endif
1994 void set(Args &&...args)
1995 {
1996 using namespace Zivid::Detail::TypeTraits;
1997
1998 using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
1999 static_assert(
2000 AllArgsAreDescendantNodes::value, "All arguments passed to set(...) must be descendant nodes.");
2001
2002 static_assert(
2003 AllArgsDecayedAreUnique<Args...>::value,
2004 "Found duplicate types among the arguments passed to set(...). "
2005 "Types should be listed at most once.");
2006
2007 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
2008 }
2009
2033#ifndef NO_DOC
2034 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
2035#else
2036 template<typename... Args>
2037#endif
2038 CameraState copyWith(Args &&...args) const
2039 {
2040 using namespace Zivid::Detail::TypeTraits;
2041
2042 using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
2043 static_assert(
2044 AllArgsAreDescendantNodes::value, "All arguments passed to copyWith(...) must be descendant nodes.");
2045
2046 static_assert(
2047 AllArgsDecayedAreUnique<Args...>::value,
2048 "Found duplicate types among the arguments passed to copyWith(...). "
2049 "Types should be listed at most once.");
2050
2051 auto copy{ *this };
2052 copy.set(std::forward<Args>(args)...);
2053 return copy;
2054 }
2055
2057 const Available &isAvailable() const
2058 {
2059 return m_available;
2060 }
2061
2064 {
2065 return m_available;
2066 }
2067
2070 {
2071 m_available = value;
2072 return *this;
2073 }
2074
2076 const Connected &isConnected() const
2077 {
2078 return m_connected;
2079 }
2080
2083 {
2084 return m_connected;
2085 }
2086
2089 {
2090 m_connected = value;
2091 return *this;
2092 }
2093
2096 {
2097 return m_inaccessibleReason;
2098 }
2099
2102 {
2103 return m_inaccessibleReason;
2104 }
2105
2108 {
2109 m_inaccessibleReason = value;
2110 return *this;
2111 }
2112
2114 const Network &network() const
2115 {
2116 return m_network;
2117 }
2118
2121 {
2122 return m_network;
2123 }
2124
2126 CameraState &set(const Network &value)
2127 {
2128 m_network = value;
2129 return *this;
2130 }
2131
2134 {
2135 m_network.set(value);
2136 return *this;
2137 }
2138
2141 {
2142 m_network.set(value);
2143 return *this;
2144 }
2145
2147 const Status &status() const
2148 {
2149 return m_status;
2150 }
2151
2154 {
2155 return m_status;
2156 }
2157
2159 CameraState &set(const Status &value)
2160 {
2161 m_status = value;
2162 return *this;
2163 }
2164
2167 {
2168 return m_temperature;
2169 }
2170
2173 {
2174 return m_temperature;
2175 }
2176
2179 {
2180 m_temperature = value;
2181 return *this;
2182 }
2183
2186 {
2187 m_temperature.set(value);
2188 return *this;
2189 }
2190
2193 {
2194 m_temperature.set(value);
2195 return *this;
2196 }
2197
2200 {
2201 m_temperature.set(value);
2202 return *this;
2203 }
2204
2207 {
2208 m_temperature.set(value);
2209 return *this;
2210 }
2211
2214 {
2215 m_temperature.set(value);
2216 return *this;
2217 }
2218
2219 template<typename T, typename std::enable_if<std::is_same<T, CameraState::Available>::value, int>::type = 0>
2221 {
2222 return m_available;
2223 }
2224
2225 template<typename T, typename std::enable_if<std::is_same<T, CameraState::Connected>::value, int>::type = 0>
2227 {
2228 return m_connected;
2229 }
2230
2231 template<
2232 typename T,
2233 typename std::enable_if<std::is_same<T, CameraState::InaccessibleReason>::value, int>::type = 0>
2235 {
2236 return m_inaccessibleReason;
2237 }
2238
2239 template<typename T, typename std::enable_if<std::is_same<T, CameraState::Network>::value, int>::type = 0>
2241 {
2242 return m_network;
2243 }
2244
2245 template<typename T, typename std::enable_if<std::is_same<T, CameraState::Network::IPV4>::value, int>::type = 0>
2247 {
2248 return m_network.get<CameraState::Network::IPV4>();
2249 }
2250
2251 template<
2252 typename T,
2253 typename std::enable_if<std::is_same<T, CameraState::Network::IPV4::Address>::value, int>::type = 0>
2255 {
2256 return m_network.get<CameraState::Network::IPV4::Address>();
2257 }
2258
2259 template<typename T, typename std::enable_if<std::is_same<T, CameraState::Status>::value, int>::type = 0>
2261 {
2262 return m_status;
2263 }
2264
2265 template<typename T, typename std::enable_if<std::is_same<T, CameraState::Temperature>::value, int>::type = 0>
2267 {
2268 return m_temperature;
2269 }
2270
2271 template<
2272 typename T,
2273 typename std::enable_if<std::is_same<T, CameraState::Temperature::DMD>::value, int>::type = 0>
2275 {
2276 return m_temperature.get<CameraState::Temperature::DMD>();
2277 }
2278
2279 template<
2280 typename T,
2281 typename std::enable_if<std::is_same<T, CameraState::Temperature::General>::value, int>::type = 0>
2283 {
2284 return m_temperature.get<CameraState::Temperature::General>();
2285 }
2286
2287 template<
2288 typename T,
2289 typename std::enable_if<std::is_same<T, CameraState::Temperature::LED>::value, int>::type = 0>
2291 {
2292 return m_temperature.get<CameraState::Temperature::LED>();
2293 }
2294
2295 template<
2296 typename T,
2297 typename std::enable_if<std::is_same<T, CameraState::Temperature::Lens>::value, int>::type = 0>
2299 {
2300 return m_temperature.get<CameraState::Temperature::Lens>();
2301 }
2302
2303 template<
2304 typename T,
2305 typename std::enable_if<std::is_same<T, CameraState::Temperature::PCB>::value, int>::type = 0>
2307 {
2308 return m_temperature.get<CameraState::Temperature::PCB>();
2309 }
2310
2311 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
2313 {
2314 return m_available;
2315 }
2316
2317 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
2319 {
2320 return m_connected;
2321 }
2322
2323 template<size_t i, typename std::enable_if<i == 2, int>::type = 0>
2325 {
2326 return m_inaccessibleReason;
2327 }
2328
2329 template<size_t i, typename std::enable_if<i == 3, int>::type = 0>
2331 {
2332 return m_network;
2333 }
2334
2335 template<size_t i, typename std::enable_if<i == 4, int>::type = 0>
2337 {
2338 return m_status;
2339 }
2340
2341 template<size_t i, typename std::enable_if<i == 5, int>::type = 0>
2343 {
2344 return m_temperature;
2345 }
2346
2348 template<typename F>
2349 void forEach(const F &f) const
2350 {
2351 f(m_available);
2352 f(m_connected);
2353 f(m_inaccessibleReason);
2354 f(m_network);
2355 f(m_status);
2356 f(m_temperature);
2357 }
2358
2360 template<typename F>
2361 void forEach(const F &f)
2362 {
2363 f(m_available);
2364 f(m_connected);
2365 f(m_inaccessibleReason);
2366 f(m_network);
2367 f(m_status);
2368 f(m_temperature);
2369 }
2370
2372 bool operator==(const CameraState &other) const;
2373
2375 bool operator!=(const CameraState &other) const;
2376
2378 std::string toString() const;
2379
2381 friend std::ostream &operator<<(std::ostream &stream, const CameraState &value)
2382 {
2383 return stream << value.toString();
2384 }
2385
2387 void save(const std::string &fileName) const;
2388
2390 void load(const std::string &fileName);
2391
2392 private:
2393 void setFromString(const std::string &value);
2394
2395 void setFromString(const std::string &fullPath, const std::string &value);
2396
2397 std::string getString(const std::string &fullPath) const;
2398
2399 Available m_available;
2400 Connected m_connected;
2401 InaccessibleReason m_inaccessibleReason;
2402 Network m_network;
2403 Status m_status;
2404 Temperature m_temperature;
2405
2406 friend struct DataModel::Detail::Befriend<CameraState>;
2407 };
2408
2409#ifndef NO_DOC
2411 namespace Detail
2412 {
2413 ZIVID_CORE_EXPORT void save(const CameraState &dataModel, std::ostream &ostream);
2414 ZIVID_CORE_EXPORT void load(CameraState &dataModel, std::istream &istream);
2415 } // namespace Detail
2416#endif
2417
2418#ifndef NO_DOC
2419 template<>
2420 struct CameraState::Version<6>
2421 {
2422 using Type = CameraState;
2423 };
2424#endif
2425
2426} // namespace Zivid
2427
2428#ifdef _MSC_VER
2429# pragma warning(pop)
2430#endif
2431
2432#ifndef NO_DOC
2433# if !(defined(_MSC_VER) && (_MSC_VER <= 1900))
2434namespace std // NOLINT
2435{
2436
2437 template<>
2438 struct tuple_size<Zivid::CameraState::Network> : integral_constant<size_t, 1>
2439 {};
2440
2441 template<size_t i>
2442 struct tuple_element<i, Zivid::CameraState::Network>
2443 {
2444 static_assert(i < tuple_size<Zivid::CameraState::Network>::value, "Index must be less than 1");
2445
2446 using type // NOLINT
2447 = decltype(declval<Zivid::CameraState::Network>().get<i>());
2448 };
2449
2450 template<>
2451 struct tuple_size<Zivid::CameraState::Network::IPV4> : integral_constant<size_t, 1>
2452 {};
2453
2454 template<size_t i>
2455 struct tuple_element<i, Zivid::CameraState::Network::IPV4>
2456 {
2457 static_assert(i < tuple_size<Zivid::CameraState::Network::IPV4>::value, "Index must be less than 1");
2458
2459 using type // NOLINT
2460 = decltype(declval<Zivid::CameraState::Network::IPV4>().get<i>());
2461 };
2462
2463 template<>
2464 struct tuple_size<Zivid::CameraState::Temperature> : integral_constant<size_t, 5>
2465 {};
2466
2467 template<size_t i>
2468 struct tuple_element<i, Zivid::CameraState::Temperature>
2469 {
2470 static_assert(i < tuple_size<Zivid::CameraState::Temperature>::value, "Index must be less than 5");
2471
2472 using type // NOLINT
2473 = decltype(declval<Zivid::CameraState::Temperature>().get<i>());
2474 };
2475
2476 template<>
2477 struct tuple_size<Zivid::CameraState> : integral_constant<size_t, 6>
2478 {};
2479
2480 template<size_t i>
2481 struct tuple_element<i, Zivid::CameraState>
2482 {
2483 static_assert(i < tuple_size<Zivid::CameraState>::value, "Index must be less than 6");
2484
2485 using type // NOLINT
2486 = decltype(declval<Zivid::CameraState>().get<i>());
2487 };
2488
2489} // namespace std
2490# endif
2491#endif
2492
2493// If we have access to the DataModel library, automatically include internal DataModel
2494// header. This header is necessary for serialization and deserialization.
2495#if defined(__has_include) && !defined(NO_DOC)
2496# if __has_include("Zivid/CameraStateInternal.h") && __has_include("Zivid/DataModelNodeMetaData.h")
2497# include "Zivid/CameraStateInternal.h"
2498# endif
2499#endif
#define ZIVID_NODISCARD
Definition Attributes.h:49
#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
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.
Available()=default
Default constructor.
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
bool operator!=(const Connected &other) const
Comparison operator.
Definition CameraState.h:254
constexpr Connected(bool value)
Constructor.
Definition CameraState.h:231
bool value() const
Get the value.
std::string toString() const
Get the value as string.
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
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 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
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 const InaccessibleReason ipConflictWithLocalNetworkAdapter
ipConflictWithLocalNetworkAdapter
Definition CameraState.h:302
InaccessibleReason()=default
Default constructor.
static const InaccessibleReason ipInMultipleLocalSubnets
ipInMultipleLocalSubnets
Definition CameraState.h:304
ValueType
The type of the underlying value.
Definition CameraState.h:295
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
Current IPv4 address.
Definition CameraState.h:422
Address()=default
Default constructor.
bool operator<(const Address &other) const
Comparison operator.
Definition CameraState.h:472
bool operator==(const Address &other) const
Comparison operator.
Definition CameraState.h:460
bool operator<=(const Address &other) const
Comparison operator.
Definition CameraState.h:484
static constexpr Range< ValueType::size_type > validSize()
The valid sizes for Address.
Definition CameraState.h:440
bool operator>(const Address &other) const
Comparison operator.
Definition CameraState.h:478
bool operator!=(const Address &other) const
Comparison operator.
Definition CameraState.h:466
const std::string & value() const
Get the value.
friend std::ostream & operator<<(std::ostream &stream, const Address &value)
Operator to serialize the value to a stream.
Definition CameraState.h:496
bool operator>=(const Address &other) const
Comparison operator.
Definition CameraState.h:490
Address(std::string value)
Constructor.
Definition CameraState.h:449
std::string toString() const
Get the value as string.
std::string ValueType
The type of the underlying value.
Definition CameraState.h:437
Current IPv4 protocol state.
Definition CameraState.h:404
IPV4()
Default constructor.
void set(Args &&...args)
Set multiple arguments.
Definition CameraState.h:563
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:651
const Address & address() const
Get Address.
Definition CameraState.h:617
friend std::ostream & operator<<(std::ostream &stream, const IPV4 &value)
Operator to send the value as string to a stream.
Definition CameraState.h:673
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:596
const CameraState::Network::IPV4::Address & get() const
Definition CameraState.h:638
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:658
IPV4 & set(const Address &value)
Set Address.
Definition CameraState.h:629
std::string toString() const
Get the value as string.
std::tuple< CameraState::Network::IPV4::Address > Descendants
Definition CameraState.h:509
Address & address()
Get Address.
Definition CameraState.h:623
bool operator!=(const IPV4 &other) const
Inequality operator.
Current network state.
Definition CameraState.h:386
void set(Args &&...args)
Set multiple arguments.
Definition CameraState.h:746
std::tuple< CameraState::Network::IPV4, CameraState::Network::IPV4::Address > Descendants
Definition CameraState.h:690
std::string toString() const
Get the value as string.
friend std::ostream & operator<<(std::ostream &stream, const Network &value)
Operator to send the value as string to a stream.
Definition CameraState.h:870
bool operator==(const Network &other) const
Equality operator.
Network()
Default constructor.
Network & set(const IPV4 &value)
Set IPV4.
Definition CameraState.h:811
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:779
const CameraState::Network::IPV4::Address & get() const
Definition CameraState.h:835
const CameraState::Network::IPV4 & get() const
Definition CameraState.h:827
Network & set(const IPV4::Address &value)
Set IPV4::Address.
Definition CameraState.h:818
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition CameraState.h:855
IPV4 & ipv4()
Get IPV4.
Definition CameraState.h:805
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:848
const IPV4 & ipv4() const
Get IPV4.
Definition CameraState.h:799
This enum describes the current status of this camera. The enum can have the following values:
Definition CameraState.h:924
constexpr Status(ValueType value)
Constructor.
Definition CameraState.h:1017
static std::set< ValueType > validValues()
All valid values of Status.
Definition CameraState.h:999
static const Status connected
connected
Definition CameraState.h:994
static const Status disconnecting
disconnecting
Definition CameraState.h:995
static const Status inaccessible
inaccessible
Definition CameraState.h:987
std::string toString() const
Get the value as string.
ValueType
The type of the underlying value.
Definition CameraState.h:975
static const Status applyingNetworkConfiguration
applyingNetworkConfiguration
Definition CameraState.h:989
friend std::ostream & operator<<(std::ostream &stream, const Status &value)
Operator to serialize the value to a stream.
Definition CameraState.h:1046
static const Status firmwareUpdateRequired
firmwareUpdateRequired
Definition CameraState.h:990
ValueType value() const
Get the value.
bool operator!=(const Status &other) const
Comparison operator.
Definition CameraState.h:1040
static const Status connecting
connecting
Definition CameraState.h:993
bool operator==(const Status &other) const
Comparison operator.
Definition CameraState.h:1034
static const Status busy
busy
Definition CameraState.h:988
Status()=default
Default constructor.
static const Status available
available
Definition CameraState.h:992
static const Status updatingFirmware
updatingFirmware
Definition CameraState.h:991
static const Status disappeared
disappeared
Definition CameraState.h:996
friend std::ostream & operator<<(std::ostream &stream, const Status::ValueType &value)
Operator to serialize ValueType to a stream.
Definition CameraState.h:1028
DMD temperature.
Definition CameraState.h:1096
bool operator>(const DMD &other) const
Comparison operator.
Definition CameraState.h:1152
std::string toString() const
Get the value as string.
double value() const
Get the value.
bool operator!=(const DMD &other) const
Comparison operator.
Definition CameraState.h:1140
bool operator<(const DMD &other) const
Comparison operator.
Definition CameraState.h:1146
bool operator>=(const DMD &other) const
Comparison operator.
Definition CameraState.h:1164
double ValueType
The type of the underlying value.
Definition CameraState.h:1111
bool operator<=(const DMD &other) const
Comparison operator.
Definition CameraState.h:1158
friend std::ostream & operator<<(std::ostream &stream, const DMD &value)
Operator to serialize the value to a stream.
Definition CameraState.h:1170
constexpr DMD(double value)
Constructor.
Definition CameraState.h:1123
bool operator==(const DMD &other) const
Comparison operator.
Definition CameraState.h:1134
static constexpr Range< double > validRange()
The range of valid values for DMD.
Definition CameraState.h:1114
DMD()=default
Default constructor.
General temperature.
Definition CameraState.h:1187
double ValueType
The type of the underlying value.
Definition CameraState.h:1202
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:1237
constexpr General(double value)
Constructor.
Definition CameraState.h:1214
static constexpr Range< double > validRange()
The range of valid values for General.
Definition CameraState.h:1205
bool operator==(const General &other) const
Comparison operator.
Definition CameraState.h:1225
General()=default
Default constructor.
bool operator<=(const General &other) const
Comparison operator.
Definition CameraState.h:1249
bool operator!=(const General &other) const
Comparison operator.
Definition CameraState.h:1231
bool operator>(const General &other) const
Comparison operator.
Definition CameraState.h:1243
friend std::ostream & operator<<(std::ostream &stream, const General &value)
Operator to serialize the value to a stream.
Definition CameraState.h:1261
bool operator>=(const General &other) const
Comparison operator.
Definition CameraState.h:1255
LED temperature.
Definition CameraState.h:1278
bool operator<=(const LED &other) const
Comparison operator.
Definition CameraState.h:1340
std::string toString() const
Get the value as string.
bool operator<(const LED &other) const
Comparison operator.
Definition CameraState.h:1328
double value() const
Get the value.
LED()=default
Default constructor.
constexpr LED(double value)
Constructor.
Definition CameraState.h:1305
friend std::ostream & operator<<(std::ostream &stream, const LED &value)
Operator to serialize the value to a stream.
Definition CameraState.h:1352
bool operator!=(const LED &other) const
Comparison operator.
Definition CameraState.h:1322
bool operator==(const LED &other) const
Comparison operator.
Definition CameraState.h:1316
bool operator>=(const LED &other) const
Comparison operator.
Definition CameraState.h:1346
bool operator>(const LED &other) const
Comparison operator.
Definition CameraState.h:1334
static constexpr Range< double > validRange()
The range of valid values for LED.
Definition CameraState.h:1296
double ValueType
The type of the underlying value.
Definition CameraState.h:1293
Lens temperature.
Definition CameraState.h:1369
double ValueType
The type of the underlying value.
Definition CameraState.h:1384
bool operator==(const Lens &other) const
Comparison operator.
Definition CameraState.h:1407
Lens()=default
Default constructor.
bool operator<=(const Lens &other) const
Comparison operator.
Definition CameraState.h:1431
double value() const
Get the value.
bool operator>(const Lens &other) const
Comparison operator.
Definition CameraState.h:1425
bool operator!=(const Lens &other) const
Comparison operator.
Definition CameraState.h:1413
bool operator>=(const Lens &other) const
Comparison operator.
Definition CameraState.h:1437
std::string toString() const
Get the value as string.
constexpr Lens(double value)
Constructor.
Definition CameraState.h:1396
static constexpr Range< double > validRange()
The range of valid values for Lens.
Definition CameraState.h:1387
bool operator<(const Lens &other) const
Comparison operator.
Definition CameraState.h:1419
friend std::ostream & operator<<(std::ostream &stream, const Lens &value)
Operator to serialize the value to a stream.
Definition CameraState.h:1443
PCB temperature.
Definition CameraState.h:1460
bool operator!=(const PCB &other) const
Comparison operator.
Definition CameraState.h:1504
constexpr PCB(double value)
Constructor.
Definition CameraState.h:1487
static constexpr Range< double > validRange()
The range of valid values for PCB.
Definition CameraState.h:1478
bool operator>=(const PCB &other) const
Comparison operator.
Definition CameraState.h:1528
PCB()=default
Default constructor.
bool operator<=(const PCB &other) const
Comparison operator.
Definition CameraState.h:1522
friend std::ostream & operator<<(std::ostream &stream, const PCB &value)
Operator to serialize the value to a stream.
Definition CameraState.h:1534
bool operator==(const PCB &other) const
Comparison operator.
Definition CameraState.h:1498
double value() const
Get the value.
bool operator>(const PCB &other) const
Comparison operator.
Definition CameraState.h:1516
double ValueType
The type of the underlying value.
Definition CameraState.h:1475
std::string toString() const
Get the value as string.
bool operator<(const PCB &other) const
Comparison operator.
Definition CameraState.h:1510
Current temperature(s)
Definition CameraState.h:1078
DMD & dmd()
Get DMD.
Definition CameraState.h:1676
Temperature & set(const General &value)
Set General.
Definition CameraState.h:1701
const PCB & pcb() const
Get PCB.
Definition CameraState.h:1746
const CameraState::Temperature::Lens & get() const
Definition CameraState.h:1791
Temperature & set(const Lens &value)
Set Lens.
Definition CameraState.h:1739
const CameraState::Temperature::DMD & get() const
Definition CameraState.h:1767
const CameraState::Temperature::PCB & get() const
Definition CameraState.h:1799
const CameraState::Temperature::General & get() const
Definition CameraState.h:1775
Temperature & set(const PCB &value)
Set PCB.
Definition CameraState.h:1758
const General & general() const
Get General.
Definition CameraState.h:1689
bool operator!=(const Temperature &other) const
Inequality operator.
const LED & led() const
Get LED.
Definition CameraState.h:1708
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:1836
friend std::ostream & operator<<(std::ostream &stream, const Temperature &value)
Operator to send the value as string to a stream.
Definition CameraState.h:1866
Temperature & set(const LED &value)
Set LED.
Definition CameraState.h:1720
std::string toString() const
Get the value as string.
LED & led()
Get LED.
Definition CameraState.h:1714
bool operator==(const Temperature &other) const
Equality operator.
const Lens & lens() const
Get Lens.
Definition CameraState.h:1727
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:1650
General & general()
Get General.
Definition CameraState.h:1695
std::tuple< CameraState::Temperature::DMD, CameraState::Temperature::General, CameraState::Temperature::LED, CameraState::Temperature::Lens, CameraState::Temperature::PCB > Descendants
Definition CameraState.h:1547
void set(Args &&...args)
Set multiple arguments.
Definition CameraState.h:1614
const DMD & dmd() const
Get DMD.
Definition CameraState.h:1670
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition CameraState.h:1847
const CameraState::Temperature::LED & get() const
Definition CameraState.h:1783
Lens & lens()
Get Lens.
Definition CameraState.h:1733
Temperature()
Default constructor.
Temperature & set(const DMD &value)
Set DMD.
Definition CameraState.h:1682
PCB & pcb()
Get PCB.
Definition CameraState.h:1752
Information about camera connection state, temperatures, etc.
Definition CameraState.h:79
static ZIVID_NODISCARD CameraState fromSerialized(const std::string &value)
Construct a new CameraState instance from a previously serialized string.
const Temperature & temperature() const
Get Temperature.
Definition CameraState.h:2166
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:2038
const CameraState::Network::IPV4 & get() const
Definition CameraState.h:2246
const CameraState::Temperature::Lens & get() const
Definition CameraState.h:2298
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:2178
const CameraState::Connected & get() const
Definition CameraState.h:2226
Temperature & temperature()
Get Temperature.
Definition CameraState.h:2172
const CameraState::Temperature::General & get() const
Definition CameraState.h:2282
std::string toString() const
Get the value as string.
CameraState & set(const Network &value)
Set Network.
Definition CameraState.h:2126
const CameraState::Status & get() const
Definition CameraState.h:2260
const CameraState::InaccessibleReason & get() const
Definition CameraState.h:2234
const CameraState::Available & get() const
Definition CameraState.h:2220
const CameraState::Network::IPV4::Address & get() const
Definition CameraState.h:2254
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition CameraState.h:2361
void save(const std::string &fileName) const
Save to the given file.
const CameraState::Network & get() const
Definition CameraState.h:2240
const CameraState::Temperature::PCB & get() const
Definition CameraState.h:2306
CameraState & set(const Temperature::PCB &value)
Set Temperature::PCB.
Definition CameraState.h:2213
const InaccessibleReason & inaccessibleReason() const
Get InaccessibleReason.
Definition CameraState.h:2095
const CameraState::Temperature::LED & get() const
Definition CameraState.h:2290
CameraState & set(const Temperature::General &value)
Set Temperature::General.
Definition CameraState.h:2192
friend std::ostream & operator<<(std::ostream &stream, const CameraState &value)
Operator to send the value as string to a stream.
Definition CameraState.h:2381
bool operator!=(const CameraState &other) const
Inequality operator.
CameraState & set(const Network::IPV4 &value)
Set Network::IPV4.
Definition CameraState.h:2133
CameraState & set(const Network::IPV4::Address &value)
Set Network::IPV4::Address.
Definition CameraState.h:2140
std::tuple< CameraState::Available, CameraState::Connected, CameraState::InaccessibleReason, CameraState::Network, CameraState::Network::IPV4, CameraState::Network::IPV4::Address, CameraState::Status, CameraState::Temperature, CameraState::Temperature::DMD, CameraState::Temperature::General, CameraState::Temperature::LED, CameraState::Temperature::Lens, CameraState::Temperature::PCB > Descendants
Definition CameraState.h:1887
Status & status()
Get Status.
Definition CameraState.h:2153
const Available & isAvailable() const
Get Available.
Definition CameraState.h:2057
const Status & status() const
Get Status.
Definition CameraState.h:2147
Connected & isConnected()
Get Connected.
Definition CameraState.h:2082
CameraState & set(const Temperature::Lens &value)
Set Temperature::Lens.
Definition CameraState.h:2206
CameraState & set(const Available &value)
Set Available.
Definition CameraState.h:2069
CameraState & set(const Temperature::DMD &value)
Set Temperature::DMD.
Definition CameraState.h:2185
bool operator==(const CameraState &other) const
Equality operator.
CameraState()
Default constructor.
CameraState & set(const Status &value)
Set Status.
Definition CameraState.h:2159
CameraState & set(const InaccessibleReason &value)
Set InaccessibleReason.
Definition CameraState.h:2107
CameraState & set(const Connected &value)
Set Connected.
Definition CameraState.h:2088
Network & network()
Get Network.
Definition CameraState.h:2120
CameraState(Args &&...args)
Constructor taking variadic number of arguments.
Definition CameraState.h:1955
const CameraState::Temperature & get() const
Definition CameraState.h:2266
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:2349
void set(Args &&...args)
Set multiple arguments.
Definition CameraState.h:1994
InaccessibleReason & inaccessibleReason()
Get InaccessibleReason.
Definition CameraState.h:2101
CameraState & set(const Temperature::LED &value)
Set Temperature::LED.
Definition CameraState.h:2199
const CameraState::Temperature::DMD & get() const
Definition CameraState.h:2274
const Network & network() const
Get Network.
Definition CameraState.h:2114
const Connected & isConnected() const
Get Connected.
Definition CameraState.h:2076
Available & isAvailable()
Get Available.
Definition CameraState.h:2063
Class describing a range of values for a given type T.
Definition Range.h:73
NodeType
Definition NodeType.h:55
The main Zivid namespace. All Zivid code is found here.
Definition Application.h:56