CamConfigMessage.h
Go to the documentation of this file.
00001 
00040 #ifndef LibMultiSense_CamConfigMessage
00041 #define LibMultiSense_CamConfigMessage
00042 
00043 #include "details/utility/Portability.hh"
00044 
00045 namespace crl {
00046 namespace multisense {
00047 namespace details {
00048 namespace wire {
00049 
00050 class CamConfig {
00051 public:
00052     static CRL_CONSTEXPR IdType      ID      = ID_DATA_CAM_CONFIG;
00053     static CRL_CONSTEXPR VersionType VERSION = 4;
00054 
00055     //
00056     // Parameters representing the current camera configuration
00057 
00058     uint16_t width;
00059     uint16_t height;
00060     float    framesPerSecond;
00061     float    gain;
00062 
00063     uint32_t exposure;
00064     uint8_t  autoExposure;
00065     uint32_t autoExposureMax;
00066     uint32_t autoExposureDecay;
00067     float    autoExposureThresh;
00068 
00069     float    whiteBalanceRed;
00070     float    whiteBalanceBlue;
00071     uint8_t  autoWhiteBalance;
00072     uint32_t autoWhiteBalanceDecay;
00073     float    autoWhiteBalanceThresh;
00074 
00075     float fx, fy;
00076     float cx, cy;
00077     float tx, ty, tz;
00078     float roll, pitch, yaw;
00079 
00080     //
00081     // Version 2 additions
00082 
00083     int32_t disparities;
00084 
00085     //
00086     // Version 3 additions
00087 
00088     float stereoPostFilterStrength;
00089 
00090     //
00091     // Version 4 additions
00092 
00093     bool hdrEnabled;
00094 
00095     //
00096     // Constructors
00097 
00098     CamConfig(utility::BufferStreamReader&r, VersionType v) {serialize(r,v);};
00099     CamConfig() {};
00100 
00101     //
00102     // Serialization routine
00103 
00104     template<class Archive>
00105         void serialize(Archive&          message,
00106                        const VersionType version)
00107     {
00108         message & width;
00109         message & height;
00110 
00111         message & framesPerSecond;
00112         message & gain;
00113 
00114         message & exposure;
00115         message & autoExposure;
00116         message & autoExposureMax;
00117         message & autoExposureDecay;
00118         message & autoExposureThresh;
00119         
00120         message & whiteBalanceRed;
00121         message & whiteBalanceBlue;
00122         message & autoWhiteBalance;
00123         message & autoWhiteBalanceDecay;
00124         message & autoWhiteBalanceThresh;
00125 
00126         message & fx;
00127         message & fy;
00128         message & cx;
00129         message & cy;
00130 
00131         message & tx;
00132         message & ty;
00133         message & tz;
00134 
00135         message & roll;
00136         message & pitch;
00137         message & yaw;
00138 
00139         if (version >= 2)
00140             message & disparities;
00141         else
00142             disparities = -1;
00143 
00144         if (version >= 3)
00145             message & stereoPostFilterStrength;
00146         else
00147             stereoPostFilterStrength = 0.5f;
00148 
00149         if (version >= 4)
00150             message & hdrEnabled;
00151         else
00152             hdrEnabled = false;
00153     }
00154 };
00155 
00156 }}}}; // namespaces
00157 
00158 #endif


multisense_lib
Author(s):
autogenerated on Fri Apr 5 2019 02:28:24