LibMultiSense
LibMultiSense Documentation
Loading...
Searching...
No Matches
StatusResponseMessage.hh
Go to the documentation of this file.
1
40#ifndef LibMultiSense_StatusResponseMessage
41#define LibMultiSense_StatusResponseMessage
42
44
45namespace crl {
46namespace multisense {
47namespace details {
48namespace wire {
49
51public:
54 static float INVALID_TEMPERATURE() { return -99999.0f; };
55
56 //
57 // Subsytem status
58
59 static CRL_CONSTEXPR uint32_t STATUS_GENERAL_OK = (1<<0);
60 static CRL_CONSTEXPR uint32_t STATUS_LASER_OK = (1<<1);
61 static CRL_CONSTEXPR uint32_t STATUS_LASER_MOTOR_OK = (1<<2);
62 static CRL_CONSTEXPR uint32_t STATUS_CAMERAS_OK = (1<<3);
63 static CRL_CONSTEXPR uint32_t STATUS_IMU_OK = (1<<4);
64 static CRL_CONSTEXPR uint32_t STATUS_EXTERNAL_LED_OK = (1<<5);
65 static CRL_CONSTEXPR uint32_t STATUS_PIPELINE_OK = (1<<6);
66
67 //
68 // The reported uptime for the system
69 //
70
72 uint32_t status;
73 float temperature0; // celsius
75
76 //
77 // Version 2 additions
78
79 float temperature2; // celsius
81
82 float inputVolts; // volts
83 float inputCurrent; // amps
84 float fpgaPower; // watts
87
88 //
89 // Constructors
90
103
104 //
105 // Serialization routine
106
107 template<class Archive>
108 void serialize(Archive& message,
109 const VersionType version)
110 {
111 message & uptime;
112 message & status;
113 message & temperature0;
114 message & temperature1;
115
116 if (version >= 2) {
117 message & temperature2;
118 message & temperature3;
119 message & inputVolts;
120 message & inputCurrent;
121 message & fpgaPower;
122 message & logicPower;
123 message & imagerPower;
124 }
125
126 //
127 // Enable the LED OK and pipeline OK status for older messages
128 if (version < 3) {
131 }
132 }
133};
134
135}}}} // namespaces
136
137#endif
Macros and symbols to help portability between different compiler versions.
#define CRL_CONSTEXPR
StatusResponse(utility::BufferStreamReader &r, VersionType v)
void serialize(Archive &message, const VersionType version)
static CRL_CONSTEXPR IdType ID_DATA_STATUS
Definition Protocol.hh:206