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 = 3;
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     // Version 3 additions
00068     int camMode;
00069     int offset;
00070 
00071     //
00072     // Constructors
00073 
00074     CamSetResolution(utility::BufferStreamReader&r, VersionType v) {serialize(r,v);};
00075     CamSetResolution(uint32_t w=0, uint32_t h=0, int32_t d=-1, int m=0, int o=0) :
00076                      width(w), height(h), disparities(d), camMode(m), offset(o) {};
00077 
00078     //
00079     // Serialization routine
00080 
00081     template<class Archive>
00082         void serialize(Archive&          message,
00083                        const VersionType version)
00084     {
00085         message & width;
00086         message & height;
00087 
00088         if (version >= 2)
00089             message & disparities;
00090         else
00091             disparities = 0;
00092 
00093         if (version >= 3){
00094             message & camMode;
00095             message & offset;
00096         }else{
00097                 camMode = 0;
00098                 offset = -1;
00099         }
00100     }
00101 };
00102 
00103 }}}}; // namespaces
00104 
00105 #endif


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