CamControlMessage.h
Go to the documentation of this file.
1 
40 #ifndef LibMultiSense_CamControlMessage
41 #define LibMultiSense_CamControlMessage
42 
44 
45 namespace crl {
46 namespace multisense {
47 namespace details {
48 namespace wire {
49 
50 class CamControl {
51 public:
54 
55  //
56  // Parameters representing the current camera configuration
57 
59  float gain;
60 
61  uint32_t exposure;
62  uint8_t autoExposure;
63  uint32_t autoExposureMax;
66 
72 
73  //
74  // Additions in version 2
75 
76  float stereoPostFilterStrength; // [0.0, 1.0]
77 
78  //
79  // Additions in version 3
80 
81  bool hdrEnabled;
82 
83  //
84  // Additions in version 4
85 
86  bool storeSettingsInFlash; // boolean
87 
88  //
89  // Additions in version 5
90 
91  uint16_t autoExposureRoiX;
92  uint16_t autoExposureRoiY;
95 
96  //
97  // Additions in version 6
98 
99  uint32_t cameraProfile;
100 
101  //
102  // Constructors
103 
106 
107  //
108  // Serialization routine
109 
110  template<class Archive>
111  void serialize(Archive& message,
112  const VersionType version)
113  {
114  message & framesPerSecond;
115  message & gain;
116 
117  message & exposure;
118  message & autoExposure;
119  message & autoExposureMax;
120  message & autoExposureDecay;
121  message & autoExposureThresh;
122 
123  message & whiteBalanceRed;
124  message & whiteBalanceBlue;
125  message & autoWhiteBalance;
126  message & autoWhiteBalanceDecay;
127  message & autoWhiteBalanceThresh;
128 
129  if (version >= 2)
130  message & stereoPostFilterStrength;
131  else
132  stereoPostFilterStrength = 0.5f;
133 
134  if (version >= 3)
135  message & hdrEnabled;
136  else
137  hdrEnabled = false;
138 
139  if (version >= 4)
140  message & storeSettingsInFlash;
141  else
142  storeSettingsInFlash = false;
143 
144  if (version >= 5)
145  {
146  message & autoExposureRoiX;
147  message & autoExposureRoiY;
148  message & autoExposureRoiWidth;
149  message & autoExposureRoiHeight;
150  }
151  else
152  {
153  autoExposureRoiX = 0;
154  autoExposureRoiY = 0;
155  autoExposureRoiWidth = crl::multisense::Roi_Full_Image;
156  autoExposureRoiHeight = crl::multisense::Roi_Full_Image;
157  }
158 
159  if (version >= 6)
160  {
161  message & cameraProfile;
162  }
163  else
164  {
165  cameraProfile = 0;
166  }
167  }
168 };
169 
170 }}}} // namespaces
171 
172 #endif
static CRL_CONSTEXPR IdType ID_CMD_CAM_CONTROL
Definition: Protocol.h:159
CamControl(utility::BufferStreamReader &r, VersionType v)
Definition: channel.cc:56
void serialize(Archive &message, const VersionType version)
static CRL_CONSTEXPR VersionType VERSION
static CRL_CONSTEXPR int Roi_Full_Image
#define CRL_CONSTEXPR
Definition: Portability.hh:51


multisense_lib
Author(s):
autogenerated on Sun Mar 14 2021 02:34:50