ImuDataMessage.h
Go to the documentation of this file.
1 
39 #ifndef LibMultiSense_ImuDataMessage
40 #define LibMultiSense_ImuDataMessage
41 
43 
44 namespace crl {
45 namespace multisense {
46 namespace details {
47 namespace wire {
48 
50 public:
51  static CRL_CONSTEXPR VersionType VERSION = 1;
52  static CRL_CONSTEXPR uint16_t TYPE_ACCEL = 1;
53  static CRL_CONSTEXPR uint16_t TYPE_GYRO = 2;
54  static CRL_CONSTEXPR uint16_t TYPE_MAG = 3;
55 
56  uint16_t type;
57  int64_t timeNanoSeconds;
58  float x, y, z;
59 
60 #ifndef SENSORPOD_FIRMWARE
61  template<class Archive>
62  void serialize(Archive& message,
63  const VersionType version)
64  {
65  message & type;
66  message & timeNanoSeconds;
67  message & x;
68  message & y;
69  message & z;
70  }
71 #endif // !SENSORPOD_FIRMWARE
72 };
73 
74 class ImuData {
75 public:
77  static CRL_CONSTEXPR VersionType VERSION = 1;
78 
79  uint32_t sequence;
80  std::vector<ImuSample> samples;
81 
82 #ifndef SENSORPOD_FIRMWARE
83 
84  //
85  // Constructors
86 
88  ImuData() {};
89 
90  //
91  // Serialization routine
92 
93  template<class Archive>
94  void serialize(Archive& message,
95  const VersionType version)
96  {
97  message & sequence;
98  message & samples;
99  }
100 #endif // !SENSORPOD_FIRMWARE
101 
102 };
103 
104 }}}}; // namespaces
105 
106 #endif
static CRL_CONSTEXPR IdType ID_DATA_IMU
Definition: Protocol.h:198
void serialize(Stream &stream, const T &t)
Definition: channel.cc:56
ImuData(utility::BufferStreamReader &r, VersionType v)
#define WIRE_HEADER_ATTRIBS_
Definition: Protocol.h:55
void serialize(Archive &message, const VersionType version)
void serialize(Archive &message, const VersionType version)
#define CRL_CONSTEXPR
Definition: Portability.hh:38


multisense_lib
Author(s):
autogenerated on Sat Apr 6 2019 02:16:46