ImuConfigMessage.h
Go to the documentation of this file.
00001 
00037 #ifndef LibMultiSense_ImuConfigMessage
00038 #define LibMultiSense_ImuConfigMessage
00039 
00040 #include "details/utility/Portability.hh"
00041 
00042 namespace crl {
00043 namespace multisense {
00044 namespace details {
00045 namespace wire {
00046 namespace imu {
00047 
00048 class Config {
00049 public:
00050     static CRL_CONSTEXPR VersionType VERSION       = 1;
00051     static CRL_CONSTEXPR uint32_t    FLAGS_ENABLED = (1<<0);
00052 
00053     std::string name;
00054     uint32_t    flags;
00055     uint32_t    rateTableIndex;
00056     uint32_t    rangeTableIndex;
00057 
00058     //
00059     // Serialization routine
00060 
00061     template<class Archive>
00062         void serialize(Archive&          message,
00063                        const VersionType version)
00064     {
00065         message & name;
00066         message & flags;
00067         message & rateTableIndex;
00068         message & rangeTableIndex;
00069     }
00070 };
00071 
00072 } // namespace imu
00073 
00074 class ImuConfig {
00075 public:
00076     static CRL_CONSTEXPR IdType      ID      = ID_DATA_IMU_CONFIG;
00077     static CRL_CONSTEXPR VersionType VERSION = 1;
00078 
00079     uint8_t                  storeSettingsInFlash;  // boolean
00080     uint32_t                 samplesPerMessage;     // 0 to ignore
00081     std::vector<imu::Config> configs;
00082 
00083     //
00084     // Constructors
00085 
00086     ImuConfig(utility::BufferStreamReader&r, VersionType v) {serialize(r,v);};
00087     ImuConfig() : storeSettingsInFlash(0), samplesPerMessage(0) {};
00088 
00089     //
00090     // Serialization routine
00091 
00092     template<class Archive>
00093         void serialize(Archive&          message,
00094                        const VersionType version)
00095     {
00096         message & storeSettingsInFlash;
00097         message & samplesPerMessage;
00098         message & configs;
00099     }
00100 };
00101 
00102 }}}}; // namespaces
00103 
00104 #endif


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