CamSetResolutionMessage.h
Go to the documentation of this file.
00001 
00040 #ifndef LibMultiSense_CamSetResolutionMessage
00041 #define LibMultiSense_CamSetResolutionMessage
00042 
00043 #include "details/utility/Portability.hh"
00044 
00045 namespace crl {
00046 namespace multisense {
00047 namespace details {
00048 namespace wire {
00049 
00050 class CamSetResolution {
00051 public:
00052     static CRL_CONSTEXPR IdType      ID      = ID_CMD_CAM_SET_RESOLUTION;
00053     static CRL_CONSTEXPR VersionType VERSION = 2;
00054 
00055     //
00056     // Parameters
00057 
00058     uint32_t width;
00059     uint32_t height;
00060 
00061     //
00062     // Version 2 additions
00063 
00064     int32_t disparities;
00065 
00066     //
00067     // Constructors
00068 
00069     CamSetResolution(utility::BufferStreamReader&r, VersionType v) {serialize(r,v);};
00070     CamSetResolution(uint32_t w=0, uint32_t h=0, int32_t d=-1) :
00071                      width(w), height(h), disparities(d) {};
00072 
00073     //
00074     // Serialization routine
00075 
00076     template<class Archive>
00077         void serialize(Archive&          message,
00078                        const VersionType version)
00079     {
00080         message & width;
00081         message & height;
00082 
00083         if (version >= 2)
00084             message & disparities;
00085         else
00086             disparities = 0;
00087     }
00088 };
00089 
00090 }}}}; // namespaces
00091 
00092 #endif


multisense_lib
Author(s):
autogenerated on Thu Aug 27 2015 14:01:11