LibMultiSense
LibMultiSense Documentation
Loading...
Searching...
No Matches
LedStatusMessage.hh
Go to the documentation of this file.
1
40#ifndef LibMultiSense_LedStatusMessage
41#define LibMultiSense_LedStatusMessage
42
44
45namespace crl {
46namespace multisense {
47namespace details {
48namespace wire {
49
50class LedStatus {
51public:
54
55 //
56 // Bit mask indicating which LEDs are implemented
57
58 uint8_t available;
59
60 //
61 // Current LED duty cycles; 0 = off; 255 = 100%
62
64
65 //
66 // If non-zero, LEDs are only on while sensors are exposing
67
68 uint8_t flash;
69
70 //
71 // The delay of the LED from turning on to visible light seen in microseconds.
72 // Should be measured and specific to the LED in question.
73
74 uint32_t led_delay_us;
75
76 //
77 // For LED synchronized to shutter the number of pulses is how many pulses
78 // per exposure of an image.
79
81
82 //
83 // Invert the output signal that drives lighting. 1 means the output
84 // will be low during the exposure. 0 means the output will be high
85 // during the exposure.
86
87 uint8_t invert_pulse;
88
89 //
90 // The status of the rolling shutter led enable flag, can be used confirm that
91 // the LED synchronization technique, can be used with a rolling shutter imager.
92
94
95 //
96 // Constructors
97
101
102 //
103 // Serialization routine
104
105 template<class Archive>
106 void serialize(Archive& message,
107 const VersionType version)
108 {
109 (void) version;
110 message & available;
111 for(uint32_t i=0; i<MAX_LIGHTS; i++)
112 message & intensity[i];
113 message & flash;
114
115 if (version >= 2)
116 {
117 message & led_delay_us;
118 message & number_of_pulses;
119 }
120 else
121 {
122 led_delay_us = 0;
124 }
125
126 if (version >= 3)
127 {
128 message & invert_pulse;
129 }
130 else
131 {
132 invert_pulse = 0;
133 }
134
135 if (version >= 4)
136 {
137 message & rolling_shutter_led;
138 }
139 else
140 {
142 }
143 }
144};
145
146}}}} // namespaces
147
148#endif
Macros and symbols to help portability between different compiler versions.
#define CRL_CONSTEXPR
void serialize(Archive &message, const VersionType version)
static CRL_CONSTEXPR VersionType VERSION
LedStatus(utility::BufferStreamReader &r, VersionType v)
static CRL_CONSTEXPR uint32_t MAX_LIGHTS
Definition Protocol.hh:337
static CRL_CONSTEXPR IdType ID_DATA_LED_STATUS
Definition Protocol.hh:211