CamControlMessage.h
Go to the documentation of this file.
00001 
00040 #ifndef LibMultiSense_CamControlMessage
00041 #define LibMultiSense_CamControlMessage
00042 
00043 #include "details/utility/Portability.hh"
00044 
00045 namespace crl {
00046 namespace multisense {
00047 namespace details {
00048 namespace wire {
00049 
00050 class CamControl {
00051 public:
00052     static CRL_CONSTEXPR IdType      ID      = ID_CMD_CAM_CONTROL;
00053     static CRL_CONSTEXPR VersionType VERSION = 3;
00054 
00055     //
00056     // Parameters representing the current camera configuration
00057 
00058     float    framesPerSecond;
00059     float    gain;
00060     
00061     uint32_t exposure;
00062     uint8_t  autoExposure;
00063     uint32_t autoExposureMax;
00064     uint32_t autoExposureDecay;
00065     float    autoExposureThresh;
00066 
00067     float    whiteBalanceRed;
00068     float    whiteBalanceBlue;
00069     uint8_t  autoWhiteBalance;
00070     uint32_t autoWhiteBalanceDecay;
00071     float    autoWhiteBalanceThresh;
00072 
00073     //
00074     // Additions in version 2
00075 
00076     float    stereoPostFilterStrength; // [0.0, 1.0]
00077 
00078     //
00079     // Additions in version 3
00080 
00081     bool     hdrEnabled;
00082 
00083     //
00084     // Constructors
00085 
00086     CamControl(utility::BufferStreamReader&r, VersionType v) {serialize(r,v);};
00087     CamControl() {};
00088 
00089     //
00090     // Serialization routine
00091 
00092     template<class Archive>
00093         void serialize(Archive&          message,
00094                        const VersionType version)
00095     {
00096         message & framesPerSecond;
00097         message & gain;
00098 
00099         message & exposure;
00100         message & autoExposure;
00101         message & autoExposureMax;
00102         message & autoExposureDecay;
00103         message & autoExposureThresh;
00104 
00105         message & whiteBalanceRed;
00106         message & whiteBalanceBlue;
00107         message & autoWhiteBalance;
00108         message & autoWhiteBalanceDecay;
00109         message & autoWhiteBalanceThresh;
00110 
00111         if (version >= 2)
00112             message & stereoPostFilterStrength;
00113         else
00114             stereoPostFilterStrength = 0.5f;
00115 
00116         if (version >= 3)
00117             message & hdrEnabled;
00118         else
00119             hdrEnabled = false;
00120     }
00121 };
00122 
00123 }}}}; // namespaces
00124 
00125 #endif


multisense_lib
Author(s):
autogenerated on Mon Oct 9 2017 03:06:21