StreamControlMessage.h
Go to the documentation of this file.
00001 
00037 #ifndef LibMultiSense_StreamControlMessage
00038 #define LibMultiSense_StreamControlMessage
00039 
00040 #include "details/utility/Portability.hh"
00041 
00042 namespace crl {
00043 namespace multisense {
00044 namespace details {
00045 namespace wire {
00046 
00047 class StreamControl {
00048 public:
00049     static CRL_CONSTEXPR IdType      ID      = ID_CMD_STREAM_CONTROL;
00050     static CRL_CONSTEXPR VersionType VERSION = 1;
00051 
00052     //
00053     // Set modify mask bit high to have the device
00054     // accept the corresponding bit in the control mask.
00055 
00056     SourceType modifyMask;
00057     SourceType controlMask;
00058 
00059     //
00060     // Convenience functions
00061 
00062     void enable(SourceType mask) {
00063         modifyMask = controlMask = mask;
00064     };
00065     void disable(SourceType mask) {
00066         modifyMask = mask; controlMask = 0;
00067     };
00068 
00069     //
00070     // Constructor
00071 
00072     StreamControl(utility::BufferStreamReader&r, VersionType v) {serialize(r,v);};
00073     StreamControl()
00074         : modifyMask(0), controlMask(0) {};
00075 
00076     //
00077     // Serialization routine.
00078 
00079     template<class Archive>
00080         void serialize(Archive&          message,
00081                        const VersionType version)
00082     {
00083         message & modifyMask;
00084         message & controlMask;
00085     }
00086 };
00087 
00088 }}}}; // namespaces
00089 
00090 #endif


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