MIP SDK  0.0.1
MicroStrain Communications Library for embedded systems
data_system.hpp
Go to the documentation of this file.
1 #pragma once
2 
3 #include "descriptors.h"
4 #include "../mip_result.h"
5 
6 #include <stdint.h>
7 #include <stddef.h>
8 #include <stdbool.h>
9 
10 namespace mip {
11 class Serializer;
12 
13 namespace C {
14 struct mip_interface;
15 } // namespace C
16 
17 namespace data_system {
18 
25 
27 // Descriptors
29 
30 enum
31 {
33 
38 
39 };
40 
42 // Shared Type Definitions
44 
45 
47 // Mip Fields
49 
73 
75 {
78 
79  static const bool HAS_FUNCTION_SELECTOR = false;
80 
81  uint8_t result[16] = {0};
82 
83 };
84 void insert(Serializer& serializer, const BuiltInTest& self);
85 void extract(Serializer& serializer, BuiltInTest& self);
86 
94 
96 {
99 
100  static const bool HAS_FUNCTION_SELECTOR = false;
101 
102  bool time_sync = 0;
103  uint8_t last_pps_rcvd = 0;
104 
105 };
106 void insert(Serializer& serializer, const TimeSyncStatus& self);
107 void extract(Serializer& serializer, TimeSyncStatus& self);
108 
134 
135 struct GpioState
136 {
139 
140  static const bool HAS_FUNCTION_SELECTOR = false;
141 
142  uint8_t states = 0;
143 
144 };
145 void insert(Serializer& serializer, const GpioState& self);
146 void extract(Serializer& serializer, GpioState& self);
147 
156 
158 {
161 
162  static const bool HAS_FUNCTION_SELECTOR = false;
163 
164  uint8_t gpio_id = 0;
165  float value = 0;
166 
167 };
168 void insert(Serializer& serializer, const GpioAnalogValue& self);
169 void extract(Serializer& serializer, GpioAnalogValue& self);
170 
173 
178 } // namespace data_system
179 } // namespace mip
180 
Serialization class.
Definition: serialization.h:145
void insert(Serializer &serializer, const BuiltInTest &self)
Definition: data_system.cpp:32
void extract(Serializer &serializer, BuiltInTest &self)
Definition: data_system.cpp:38
struct mip::C::mip_interface mip_interface
State of the interface for communicating with a MIP device.
@ DATA_TIME_SYNC_STATUS
Definition: data_system.hpp:35
@ DATA_GPIO_ANALOG_VALUE
Definition: data_system.hpp:37
@ DATA_GPIO_STATE
Definition: data_system.hpp:36
@ DATA_BUILT_IN_TEST
Definition: data_system.hpp:34
@ DESCRIPTOR_SET
Definition: data_system.hpp:32
A collection of C++ classes and functions covering the full mip api.
Definition: commands_3dm.c:11
Definition: data_system.hpp:75
static const uint8_t FIELD_DESCRIPTOR
Definition: data_system.hpp:77
uint8_t result[16]
Device-specific bitfield (128 bits). See device user manual. Bits are least-significant-byte first....
Definition: data_system.hpp:81
static const uint8_t DESCRIPTOR_SET
Definition: data_system.hpp:76
static const bool HAS_FUNCTION_SELECTOR
Definition: data_system.hpp:79
Definition: data_system.hpp:158
uint8_t gpio_id
GPIO pin number starting with 1.
Definition: data_system.hpp:164
static const uint8_t FIELD_DESCRIPTOR
Definition: data_system.hpp:160
float value
Value of the GPIO line in scaled volts.
Definition: data_system.hpp:165
static const bool HAS_FUNCTION_SELECTOR
Definition: data_system.hpp:162
static const uint8_t DESCRIPTOR_SET
Definition: data_system.hpp:159
Definition: data_system.hpp:136
static const uint8_t DESCRIPTOR_SET
Definition: data_system.hpp:137
uint8_t states
Bitfield containing the states for each GPIO pin. Bit 0 (0x01): pin 1 Bit 1 (0x02): pin 2 Bit 2 (0...
Definition: data_system.hpp:142
static const uint8_t FIELD_DESCRIPTOR
Definition: data_system.hpp:138
static const bool HAS_FUNCTION_SELECTOR
Definition: data_system.hpp:140
Definition: data_system.hpp:96
static const uint8_t DESCRIPTOR_SET
Definition: data_system.hpp:97
static const bool HAS_FUNCTION_SELECTOR
Definition: data_system.hpp:100
static const uint8_t FIELD_DESCRIPTOR
Definition: data_system.hpp:98
uint8_t last_pps_rcvd
Elapsed time in seconds since last PPS was received, with a maximum value of 255.
Definition: data_system.hpp:103
bool time_sync
True if sync with the PPS signal is currently valid. False if PPS feature is disabled or a PPS signal...
Definition: data_system.hpp:102