LibMultiSense
LibMultiSense Documentation
Loading...
Searching...
No Matches
SysDeviceInfoMessage.hh
Go to the documentation of this file.
1
39#ifndef LibMultiSense_SysDeviceInfoMessage
40#define LibMultiSense_SysDeviceInfoMessage
41
42#include <algorithm>
43#include <string>
44#include "Protocol.hh"
46
47namespace crl {
48namespace multisense {
49namespace details {
50namespace wire {
51
52class PcbInfo {
53public:
55
56 std::string name;
57 uint32_t revision;
58
59 template<class Archive>
60 void serialize(Archive& message,
61 const VersionType version)
62 {
63 (void) version;
64 message & name;
65 message & revision;
66 }
67};
68
70public:
73
74 //
75 // These constants are stored in flash on the device, do
76 // not change these, only add.
77 //
78 // crl::multisense::DeviceInfo:: has similar constants
79 // that can be changed at will (just remember to
80 // map any differences when translating between
81 // WIRE and API.)
82
83 static CRL_CONSTEXPR uint8_t MAX_PCBS = 8;
84
85 static uint8_t maxPcbs()
86 {
87 return MAX_PCBS;
88 }
89
107 static CRL_CONSTEXPR uint32_t HARDWARE_REV_BCAM = 100;
108 static CRL_CONSTEXPR uint32_t HARDWARE_REV_MONO = 101;
109
119
121 static CRL_CONSTEXPR uint32_t LENS_TYPE_FISHEYE = 2;
122
125 static CRL_CONSTEXPR uint32_t LIGHTING_TYPE_SL_INTERNAL = 1; // Legacy
127 static CRL_CONSTEXPR uint32_t LIGHTING_TYPE_S21_EXTERNAL = 2; // Legacy
132
133 std::string key;
134 std::string name;
135 std::string buildDate;
136 std::string serialNumber;
138
141
142 std::string imagerName;
143 uint32_t imagerType;
144 uint32_t imagerWidth;
145 uint32_t imagerHeight;
146
147 std::string lensName;
148 uint32_t lensType;
149 float nominalBaseline; // meters
150 float nominalFocalLength; // meters
151 float nominalRelativeAperture; // f-stop
152
153 uint32_t lightingType;
155
156 std::string laserName;
157 uint32_t laserType;
158
159 std::string motorName;
160 uint32_t motorType;
162
163 //
164 // Constructors
165
169 imagerType(0),
170 imagerWidth(0),
171 imagerHeight(0),
172 lensType(0),
176 lightingType(0),
178 laserType(0),
179 motorType(0),
180 motorGearReduction(0.0) {};
181
182 //
183 // Serialization routine
184
185 template<class Archive>
186 void serialize(Archive& message,
187 const VersionType version)
188 {
189 message & key;
190 message & name;
191 message & buildDate;
192 message & serialNumber;
193 message & hardwareRevision;
194
195 message & numberOfPcbs;
196
197 uint8_t num = numberOfPcbs <= MAX_PCBS ? numberOfPcbs : MAX_PCBS;
198 for(uint8_t i=0; i<num; i++)
199 pcbs[i].serialize(message, version);
200
201 message & imagerName;
202 message & imagerType;
203 message & imagerWidth;
204 message & imagerHeight;
205 message & lensName;
206 message & lensType;
207 message & nominalBaseline;
208 message & nominalFocalLength;
209 message & nominalRelativeAperture;
210 message & lightingType;
211 message & numberOfLights;
212 message & laserName;
213 message & laserType;
214 message & motorName;
215 message & motorType;
216 message & motorGearReduction;
217 }
218};
219
220}}}} // namespaces
221
222#endif
A generic I/O stream buffer.
#define CRL_CONSTEXPR
Copyright 2013-2025 Carnegie Robotics, LLC 4501 Hatfield Street, Pittsburgh, PA 15201 http://www....
static CRL_CONSTEXPR VersionType VERSION
void serialize(Archive &message, const VersionType version)
static CRL_CONSTEXPR uint32_t IMAGER_TYPE_CMV2000_COLOR
static CRL_CONSTEXPR uint32_t HARDWARE_REV_MULTISENSE_C6S2_S27
static CRL_CONSTEXPR uint32_t HARDWARE_REV_MULTISENSE_SL
static CRL_CONSTEXPR uint32_t HARDWARE_REV_MULTISENSE_ST25
static CRL_CONSTEXPR uint32_t HARDWARE_REV_MULTISENSE_S30
static CRL_CONSTEXPR uint32_t HARDWARE_REV_MULTISENSE_S7AR
static CRL_CONSTEXPR uint32_t HARDWARE_REV_MULTISENSE_ST21
static CRL_CONSTEXPR uint32_t LIGHTING_TYPE_PATTERN_PROJECTOR_AND_OUTPUT_TRIGGER
static CRL_CONSTEXPR uint32_t HARDWARE_REV_MULTISENSE_M
static CRL_CONSTEXPR uint32_t LIGHTING_TYPE_PATTERN_PROJECTOR
static CRL_CONSTEXPR uint32_t IMAGER_TYPE_CMV4000_COLOR
static CRL_CONSTEXPR uint32_t HARDWARE_REV_MULTISENSE_KS21_SILVER
static CRL_CONSTEXPR uint32_t LIGHTING_TYPE_S21_PATTERN_PROJECTOR
static CRL_CONSTEXPR uint32_t LIGHTING_TYPE_S21_EXTERNAL
static CRL_CONSTEXPR uint32_t HARDWARE_REV_MULTISENSE_S21
static CRL_CONSTEXPR uint32_t HARDWARE_REV_MULTISENSE_REMOTE_HEAD_STEREO
static CRL_CONSTEXPR uint32_t HARDWARE_REV_MULTISENSE_S7S
static CRL_CONSTEXPR uint32_t LIGHTING_TYPE_SL_INTERNAL
static CRL_CONSTEXPR uint32_t HARDWARE_REV_MULTISENSE_REMOTE_HEAD_VPB
static CRL_CONSTEXPR uint32_t LIGHTING_TYPE_OUTPUT_TRIGGER
static CRL_CONSTEXPR uint32_t HARDWARE_REV_MULTISENSE_KS21
SysDeviceInfo(utility::BufferStreamReader &r, VersionType v)
static CRL_CONSTEXPR uint32_t HARDWARE_REV_MULTISENSE_S7
static CRL_CONSTEXPR uint32_t HARDWARE_REV_MULTISENSE_KS21i
static CRL_CONSTEXPR uint32_t HARDWARE_REV_MULTISENSE_MONOCAM
void serialize(Archive &message, const VersionType version)
static CRL_CONSTEXPR uint32_t HARDWARE_REV_MULTISENSE_REMOTE_HEAD_MONOCAM
static CRL_CONSTEXPR IdType ID_DATA_SYS_DEVICE_INFO
Definition Protocol.hh:213