MIP_SDK  v3.0.0
MicroStrain Communications Library for embedded systems
commands_gnss.hpp
Go to the documentation of this file.
1 #pragma once
2 
4 
6 
8 
9 namespace mip::metadata
10 {
11 
12 
13 template<>
14 struct MetadataFor<commands_gnss::ReceiverInfo::Info>
15 {
17 
18  static constexpr inline ParameterInfo parameters[] = {
19  {
20  /* .name = */ "receiver_id",
21  /* .docs = */ "Receiver id: e.g. 1, 2, etc.",
22  /* .type = */ {Type::U8, nullptr},
23  /* .accessor = */ nullptr, //utils::access<type, uint8_t, &type::receiver_id>,
24  /* .attributes = */ NO_FUNCTIONS,
25  /* .count = */ 1,
26  /* .condition = */ {},
27  },
28  {
29  /* .name = */ "mip_data_descriptor_set",
30  /* .docs = */ "MIP descriptor set associated with this receiver",
31  /* .type = */ {Type::U8, nullptr},
32  /* .accessor = */ nullptr, //utils::access<type, uint8_t, &type::mip_data_descriptor_set>,
33  /* .attributes = */ NO_FUNCTIONS,
34  /* .count = */ 1,
35  /* .condition = */ {},
36  },
37  {
38  /* .name = */ "description",
39  /* .docs = */ "Ascii description of receiver. Contains the following info (comma-delimited):<br/>\nModule name/model<br/>\nFirmware version info",
40  /* .type = */ {Type::CHAR, nullptr},
41  /* .accessor = */ nullptr, //utils::access<type, char, &type::description>,
42  /* .attributes = */ NO_FUNCTIONS,
43  /* .count = */ 32,
44  /* .condition = */ {},
45  },
46  };
47 
48  static constexpr inline StructInfo value = {
49  /* .name = */ "Info",
50  /* .title = */ "Info",
51  /* .docs = */ "",
52  /* .parameters = */ parameters,
53  };
54 };
55 
56 template<>
57 struct MetadataFor<commands_gnss::ReceiverInfo::Response>
58 {
60 
61  static constexpr inline ParameterInfo parameters[] = {
62  {
63  /* .name = */ "num_receivers",
64  /* .docs = */ "Number of physical receivers in the device",
65  /* .type = */ {Type::U8, nullptr},
66  /* .accessor = */ nullptr, //utils::access<type, uint8_t, &type::num_receivers>,
67  /* .attributes = */ {true, false, false, false, false},
68  /* .count = */ 1,
69  /* .condition = */ {},
70  },
71  {
72  /* .name = */ "receiver_info",
73  /* .docs = */ "",
75  /* .accessor = */ nullptr, //utils::access<type, commands_gnss::ReceiverInfo::Info, &type::receiver_info>,
76  /* .attributes = */ {true, false, false, false, false},
77  /* .count = */ {5, microstrain::Index(0) /* num_receivers */},
78  /* .condition = */ {},
79  },
80  };
81 
82  static constexpr inline FieldInfo value = {
83  /* .name = */ "commands_gnss::ReceiverInfo::Response",
84  /* .title = */ "response",
85  /* .docs = */ "",
86  /* .parameters = */ parameters,
87  /* .descriptor = */ type::DESCRIPTOR,
88  /* .functions = */ NO_FUNCTIONS,
89  /* .proprietary = */ false,
90  /* .response = */ nullptr,
91  };
92 };
93 
94 template<>
95 struct MetadataFor<commands_gnss::ReceiverInfo>
96 {
98 
99  static constexpr inline FieldInfo value = {
100  /* .name = */ "commands_gnss::ReceiverInfo",
101  /* .title = */ "receiver_info",
102  /* .docs = */ "Return information about the GNSS receivers in the device.\n",
103  /* .parameters = */ {},
104  /* .descriptor = */ type::DESCRIPTOR,
105  /* .functions = */ NO_FUNCTIONS,
106  /* .proprietary = */ false,
107  /* .response = */ &MetadataFor<type::Response>::value,
108  };
109 };
110 
111 template<>
112 struct MetadataFor<commands_gnss::SignalConfiguration::Response>
113 {
115 
116  static constexpr inline ParameterInfo parameters[] = {
117  {
118  /* .name = */ "gps_enable",
119  /* .docs = */ "Bitfield 0: Enable L1CA, 1: Enable L2C, 2: Enable L5",
120  /* .type = */ {Type::U8, nullptr},
121  /* .accessor = */ nullptr, //utils::access<type, uint8_t, &type::gps_enable>,
122  /* .attributes = */ {true, false, false, false, false},
123  /* .count = */ 1,
124  /* .condition = */ {},
125  },
126  {
127  /* .name = */ "glonass_enable",
128  /* .docs = */ "Bitfield 0: Enable L1OF, 1: Enable L2OF",
129  /* .type = */ {Type::U8, nullptr},
130  /* .accessor = */ nullptr, //utils::access<type, uint8_t, &type::glonass_enable>,
131  /* .attributes = */ {true, false, false, false, false},
132  /* .count = */ 1,
133  /* .condition = */ {},
134  },
135  {
136  /* .name = */ "galileo_enable",
137  /* .docs = */ "Bitfield 0: Enable E1, 1: Enable E5B, 2: Enable E5A",
138  /* .type = */ {Type::U8, nullptr},
139  /* .accessor = */ nullptr, //utils::access<type, uint8_t, &type::galileo_enable>,
140  /* .attributes = */ {true, false, false, false, false},
141  /* .count = */ 1,
142  /* .condition = */ {},
143  },
144  {
145  /* .name = */ "beidou_enable",
146  /* .docs = */ "Bitfield 0: Enable B1, 1: Enable B2, 2: Enable B2A",
147  /* .type = */ {Type::U8, nullptr},
148  /* .accessor = */ nullptr, //utils::access<type, uint8_t, &type::beidou_enable>,
149  /* .attributes = */ {true, false, false, false, false},
150  /* .count = */ 1,
151  /* .condition = */ {},
152  },
153  {
154  /* .name = */ "reserved",
155  /* .docs = */ "",
156  /* .type = */ {Type::U8, nullptr},
157  /* .accessor = */ nullptr, //utils::access<type, uint8_t, &type::reserved>,
158  /* .attributes = */ {true, false, false, false, false},
159  /* .count = */ 4,
160  /* .condition = */ {},
161  },
162  };
163 
164  static constexpr inline FieldInfo value = {
165  /* .name = */ "commands_gnss::SignalConfiguration::Response",
166  /* .title = */ "response",
167  /* .docs = */ "",
168  /* .parameters = */ parameters,
169  /* .descriptor = */ type::DESCRIPTOR,
170  /* .functions = */ NO_FUNCTIONS,
171  /* .proprietary = */ false,
172  /* .response = */ nullptr,
173  };
174 };
175 
176 template<>
177 struct MetadataFor<commands_gnss::SignalConfiguration>
178 {
180 
181  static constexpr inline ParameterInfo parameters[] = {
182  FUNCTION_SELECTOR_PARAM,
183  {
184  /* .name = */ "gps_enable",
185  /* .docs = */ "Bitfield 0: Enable L1CA, 1: Enable L2C, 2: Enable L5",
186  /* .type = */ {Type::U8, nullptr},
187  /* .accessor = */ nullptr, //utils::access<type, uint8_t, &type::gps_enable>,
188  /* .attributes = */ {true, false, false, false, false},
189  /* .count = */ 1,
190  /* .condition = */ {},
191  },
192  {
193  /* .name = */ "glonass_enable",
194  /* .docs = */ "Bitfield 0: Enable L1OF, 1: Enable L2OF",
195  /* .type = */ {Type::U8, nullptr},
196  /* .accessor = */ nullptr, //utils::access<type, uint8_t, &type::glonass_enable>,
197  /* .attributes = */ {true, false, false, false, false},
198  /* .count = */ 1,
199  /* .condition = */ {},
200  },
201  {
202  /* .name = */ "galileo_enable",
203  /* .docs = */ "Bitfield 0: Enable E1, 1: Enable E5B, 2: Enable E5A",
204  /* .type = */ {Type::U8, nullptr},
205  /* .accessor = */ nullptr, //utils::access<type, uint8_t, &type::galileo_enable>,
206  /* .attributes = */ {true, false, false, false, false},
207  /* .count = */ 1,
208  /* .condition = */ {},
209  },
210  {
211  /* .name = */ "beidou_enable",
212  /* .docs = */ "Bitfield 0: Enable B1, 1: Enable B2, 2: Enable B2A",
213  /* .type = */ {Type::U8, nullptr},
214  /* .accessor = */ nullptr, //utils::access<type, uint8_t, &type::beidou_enable>,
215  /* .attributes = */ {true, false, false, false, false},
216  /* .count = */ 1,
217  /* .condition = */ {},
218  },
219  {
220  /* .name = */ "reserved",
221  /* .docs = */ "",
222  /* .type = */ {Type::U8, nullptr},
223  /* .accessor = */ nullptr, //utils::access<type, uint8_t, &type::reserved>,
224  /* .attributes = */ {true, false, false, false, false},
225  /* .count = */ 4,
226  /* .condition = */ {},
227  },
228  };
229 
230  static constexpr inline FieldInfo value = {
231  /* .name = */ "commands_gnss::SignalConfiguration",
232  /* .title = */ "signal_configuration",
233  /* .docs = */ "Configure the GNSS signals used by the device.\n",
234  /* .parameters = */ parameters,
235  /* .descriptor = */ type::DESCRIPTOR,
236  /* .functions = */ {true, true, true, true, true},
237  /* .proprietary = */ false,
238  /* .response = */ &MetadataFor<type::Response>::value,
239  };
240 };
241 
242 template<>
243 struct MetadataFor<commands_gnss::RtkDongleConfiguration::Response>
244 {
246 
247  static constexpr inline ParameterInfo parameters[] = {
248  {
249  /* .name = */ "enable",
250  /* .docs = */ "",
251  /* .type = */ {Type::U8, nullptr},
252  /* .accessor = */ nullptr, //utils::access<type, uint8_t, &type::enable>,
253  /* .attributes = */ {true, false, false, false, false},
254  /* .count = */ 1,
255  /* .condition = */ {},
256  },
257  {
258  /* .name = */ "reserved",
259  /* .docs = */ "",
260  /* .type = */ {Type::U8, nullptr},
261  /* .accessor = */ nullptr, //utils::access<type, uint8_t, &type::reserved>,
262  /* .attributes = */ {true, false, false, false, false},
263  /* .count = */ 3,
264  /* .condition = */ {},
265  },
266  };
267 
268  static constexpr inline FieldInfo value = {
269  /* .name = */ "commands_gnss::RtkDongleConfiguration::Response",
270  /* .title = */ "response",
271  /* .docs = */ "",
272  /* .parameters = */ parameters,
273  /* .descriptor = */ type::DESCRIPTOR,
274  /* .functions = */ NO_FUNCTIONS,
275  /* .proprietary = */ false,
276  /* .response = */ nullptr,
277  };
278 };
279 
280 template<>
281 struct MetadataFor<commands_gnss::RtkDongleConfiguration>
282 {
284 
285  static constexpr inline ParameterInfo parameters[] = {
286  FUNCTION_SELECTOR_PARAM,
287  {
288  /* .name = */ "enable",
289  /* .docs = */ "0 - Disabled, 1- Enabled",
290  /* .type = */ {Type::U8, nullptr},
291  /* .accessor = */ nullptr, //utils::access<type, uint8_t, &type::enable>,
292  /* .attributes = */ {true, false, false, false, false},
293  /* .count = */ 1,
294  /* .condition = */ {},
295  },
296  {
297  /* .name = */ "reserved",
298  /* .docs = */ "",
299  /* .type = */ {Type::U8, nullptr},
300  /* .accessor = */ nullptr, //utils::access<type, uint8_t, &type::reserved>,
301  /* .attributes = */ {true, false, false, false, false},
302  /* .count = */ 3,
303  /* .condition = */ {},
304  },
305  };
306 
307  static constexpr inline FieldInfo value = {
308  /* .name = */ "commands_gnss::RtkDongleConfiguration",
309  /* .title = */ "rtk_dongle_configuration",
310  /* .docs = */ "Configure the communications with the RTK Dongle connected to the device.\n",
311  /* .parameters = */ parameters,
312  /* .descriptor = */ type::DESCRIPTOR,
313  /* .functions = */ {true, true, true, true, true},
314  /* .proprietary = */ false,
315  /* .response = */ &MetadataFor<type::Response>::value,
316  };
317 };
318 
319 
320 static constexpr inline std::initializer_list<const FieldInfo*> COMMANDS_GNSS = {
327 };
328 
329 
330 } // namespace mip::metadata
331 
mip::metadata::MetadataFor< commands_gnss::SignalConfiguration::Response >::value
static constexpr FieldInfo value
Definition: commands_gnss.hpp:164
commands_gnss.hpp
mip::metadata
Definition: commands_3dm.hpp:9
mip::metadata::MetadataFor< commands_gnss::SignalConfiguration >::value
static constexpr FieldInfo value
Definition: commands_gnss.hpp:230
mip::commands_gnss::RtkDongleConfiguration::Response
Definition: commands_gnss.hpp:269
mip::metadata::MetadataFor
Definition: mip_metadata.hpp:15
mip::metadata::Type::STRUCT
@ STRUCT
mip::metadata::Type::CHAR
@ CHAR
mip::metadata::ParameterInfo
Definition: mip_structures.hpp:127
mip::metadata::MetadataFor< commands_gnss::ReceiverInfo >::value
static constexpr FieldInfo value
Definition: commands_gnss.hpp:99
mip::commands_gnss::SignalConfiguration::Response
Definition: commands_gnss.hpp:185
mip::commands_gnss::ReceiverInfo
Definition: commands_gnss.hpp:69
mip_metadata.hpp
mip::commands_gnss::RtkDongleConfiguration
Definition: commands_gnss.hpp:233
microstrain::Index
Represents an index ranging from 0..N excluding N.
Definition: index.hpp:28
mip::metadata::FieldInfo
Definition: mip_structures.hpp:182
mip::metadata::Type::U8
@ U8
mip::commands_gnss::ReceiverInfo::Info
Definition: commands_gnss.hpp:71
mip::metadata::MetadataFor< commands_gnss::RtkDongleConfiguration::Response >::value
static constexpr FieldInfo value
Definition: commands_gnss.hpp:268
mip::commands_gnss::ReceiverInfo::Response
Definition: commands_gnss.hpp:105
mip::metadata::MetadataFor< commands_gnss::ReceiverInfo::Response >::value
static constexpr FieldInfo value
Definition: commands_gnss.hpp:82
mip::metadata::StructInfo
Definition: mip_structures.hpp:171
mip::commands_gnss::SignalConfiguration
Definition: commands_gnss.hpp:146
common.hpp
mip::metadata::MetadataFor< commands_gnss::RtkDongleConfiguration >::value
static constexpr FieldInfo value
Definition: commands_gnss.hpp:307