MIP_SDK  latest-2-g34f3e39
MicroStrain Communications Library for embedded systems
common.h
Go to the documentation of this file.
1 #pragma once
2 
15 
17 #include "../mip_field.h"
18 
19 #include <stddef.h>
20 #include <stdint.h>
21 #include <stdbool.h>
22 
23 #ifdef __cplusplus
24 #include <tuple>
25 #include <type_traits>
26 #include <utility>
27 
28 namespace mip {
29 namespace C {
30 extern "C" {
32 #endif // __cplusplus
33 
34 typedef struct mip_descriptor_rate
35 {
36  uint8_t descriptor;
37  uint16_t decimation;
39 
42 
43 #define DECLARE_MIP_VECTOR_TYPE(n, type, name) \
44 typedef type name[n]; \
45 \
46 void insert_##name(microstrain_serializer* serializer, const name self); \
47 void extract_##name(microstrain_serializer* serializer, name self);
48 
49 DECLARE_MIP_VECTOR_TYPE(3, float, mip_vector3f)
50 DECLARE_MIP_VECTOR_TYPE(4, float, mip_vector4f)
51 DECLARE_MIP_VECTOR_TYPE(9, float, mip_matrix3f)
52 DECLARE_MIP_VECTOR_TYPE(3, double, mip_vector3d)
53 DECLARE_MIP_VECTOR_TYPE(4, double, mip_vector4d)
54 DECLARE_MIP_VECTOR_TYPE(9, double, mip_matrix3d)
55 DECLARE_MIP_VECTOR_TYPE(4, float, mip_quatf)
56 
57 #undef DECLARE_MIP_VECTOR_TYPE
58 
59 #ifdef __cplusplus
60 } // extern "C"
61 } // namespace C
62 } // namespace mip
63 #endif // __cplusplus
mip
A collection of C++ classes and functions covering the full mip api.
Definition: commands_3dm.c:11
microstrain::C::microstrain_serializer
struct microstrain::C::microstrain_serializer microstrain_serializer
Structure used for serialization.
mip::C::mip_descriptor_rate::descriptor
uint8_t descriptor
Definition: common.h:36
DECLARE_MIP_VECTOR_TYPE
#define DECLARE_MIP_VECTOR_TYPE(n, type, name)
Definition: common.h:43
microstrain::C::microstrain_serializer
Structure used for serialization.
Definition: serialization.h:42
mip::C::mip_descriptor_rate
Definition: common.h:34
mip::C::mip_descriptor_rate
struct mip::C::mip_descriptor_rate mip_descriptor_rate
serialization.h
mip::C::insert_mip_descriptor_rate
void insert_mip_descriptor_rate(microstrain_serializer *serializer, const mip_descriptor_rate *self)
mip::C::extract_mip_descriptor_rate
void extract_mip_descriptor_rate(microstrain_serializer *serializer, mip_descriptor_rate *self)
mip::C::mip_descriptor_rate::decimation
uint16_t decimation
Definition: common.h:37