MIP_SDK  latest-2-g34f3e39
MicroStrain Communications Library for embedded systems
commands_gnss.hpp
Go to the documentation of this file.
1 #pragma once
2 
4 
6 
7 
9 
10 namespace mip::metadata
11 {
12 
13 
14 template<>
15 struct MetadataFor<commands_gnss::ReceiverInfo::Info>
16 {
18 
19  static constexpr inline ParameterInfo parameters[] = {
20  {
21  /* .name = */ "receiver_id",
22  /* .docs = */ "Receiver id: e.g. 1, 2, etc.",
23  /* .type = */ {Type::U8, nullptr},
24  /* .accessor = */ nullptr, //utils::access<type, uint8_t, &type::receiver_id>,
25  /* .attributes = */ NO_FUNCTIONS,
26  /* .count = */ 1,
27  /* .condition = */ {},
28  },
29  {
30  /* .name = */ "mip_data_descriptor_set",
31  /* .docs = */ "MIP descriptor set associated with this receiver",
32  /* .type = */ {Type::U8, nullptr},
33  /* .accessor = */ nullptr, //utils::access<type, uint8_t, &type::mip_data_descriptor_set>,
34  /* .attributes = */ NO_FUNCTIONS,
35  /* .count = */ 1,
36  /* .condition = */ {},
37  },
38  {
39  /* .name = */ "description",
40  /* .docs = */ "Ascii description of receiver. Contains the following info (comma-delimited):<br/>\nModule name/model<br/>\nFirmware version info",
41  /* .type = */ {Type::CHAR, nullptr},
42  /* .accessor = */ nullptr, //utils::access<type, char, &type::description>,
43  /* .attributes = */ NO_FUNCTIONS,
44  /* .count = */ 32,
45  /* .condition = */ {},
46  },
47  };
48 
49  static constexpr inline StructInfo value = {
50  /* .name = */ "Info",
51  /* .title = */ "Info",
52  /* .docs = */ "",
53  /* .parameters = */ parameters,
54  };
55 };
56 
57 template<>
58 struct MetadataFor<commands_gnss::ReceiverInfo::Response>
59 {
61 
62  static constexpr inline ParameterInfo parameters[] = {
63  {
64  /* .name = */ "num_receivers",
65  /* .docs = */ "Number of physical receivers in the device",
66  /* .type = */ {Type::U8, nullptr},
67  /* .accessor = */ nullptr, //utils::access<type, uint8_t, &type::num_receivers>,
68  /* .attributes = */ {true, false, false, false, false},
69  /* .count = */ 1,
70  /* .condition = */ {},
71  },
72  {
73  /* .name = */ "receiver_info",
74  /* .docs = */ "",
76  /* .accessor = */ nullptr, //utils::access<type, commands_gnss::ReceiverInfo::Info, &type::receiver_info>,
77  /* .attributes = */ {true, false, false, false, false},
78  /* .count = */ {5, microstrain::Index(0) /* num_receivers */},
79  /* .condition = */ {},
80  },
81  };
82 
83  static constexpr inline FieldInfo value = {
84  /* .name = */ "commands_gnss::ReceiverInfo::Response",
85  /* .title = */ "response",
86  /* .docs = */ "",
87  /* .parameters = */ parameters,
88  /* .descriptor = */ type::DESCRIPTOR,
89  /* .functions = */ NO_FUNCTIONS,
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  /* .response = */ &MetadataFor<type::Response>::value,
107  };
108 };
109 
110 template<>
111 struct MetadataFor<commands_gnss::SignalConfiguration::Response>
112 {
114 
115  static constexpr inline ParameterInfo parameters[] = {
116  {
117  /* .name = */ "gps_enable",
118  /* .docs = */ "Bitfield 0: Enable L1CA, 1: Enable L2C, 2: Enable L5",
119  /* .type = */ {Type::U8, nullptr},
120  /* .accessor = */ nullptr, //utils::access<type, uint8_t, &type::gps_enable>,
121  /* .attributes = */ {true, false, false, false, false},
122  /* .count = */ 1,
123  /* .condition = */ {},
124  },
125  {
126  /* .name = */ "glonass_enable",
127  /* .docs = */ "Bitfield 0: Enable L1OF, 1: Enable L2OF",
128  /* .type = */ {Type::U8, nullptr},
129  /* .accessor = */ nullptr, //utils::access<type, uint8_t, &type::glonass_enable>,
130  /* .attributes = */ {true, false, false, false, false},
131  /* .count = */ 1,
132  /* .condition = */ {},
133  },
134  {
135  /* .name = */ "galileo_enable",
136  /* .docs = */ "Bitfield 0: Enable E1, 1: Enable E5B, 2: Enable E5A",
137  /* .type = */ {Type::U8, nullptr},
138  /* .accessor = */ nullptr, //utils::access<type, uint8_t, &type::galileo_enable>,
139  /* .attributes = */ {true, false, false, false, false},
140  /* .count = */ 1,
141  /* .condition = */ {},
142  },
143  {
144  /* .name = */ "beidou_enable",
145  /* .docs = */ "Bitfield 0: Enable B1, 1: Enable B2, 2: Enable B2A",
146  /* .type = */ {Type::U8, nullptr},
147  /* .accessor = */ nullptr, //utils::access<type, uint8_t, &type::beidou_enable>,
148  /* .attributes = */ {true, false, false, false, false},
149  /* .count = */ 1,
150  /* .condition = */ {},
151  },
152  {
153  /* .name = */ "reserved",
154  /* .docs = */ "",
155  /* .type = */ {Type::U8, nullptr},
156  /* .accessor = */ nullptr, //utils::access<type, uint8_t, &type::reserved>,
157  /* .attributes = */ {true, false, false, false, false},
158  /* .count = */ 4,
159  /* .condition = */ {},
160  },
161  };
162 
163  static constexpr inline FieldInfo value = {
164  /* .name = */ "commands_gnss::SignalConfiguration::Response",
165  /* .title = */ "response",
166  /* .docs = */ "",
167  /* .parameters = */ parameters,
168  /* .descriptor = */ type::DESCRIPTOR,
169  /* .functions = */ NO_FUNCTIONS,
170  /* .response = */ nullptr,
171  };
172 };
173 
174 template<>
175 struct MetadataFor<commands_gnss::SignalConfiguration>
176 {
178 
179  static constexpr inline ParameterInfo parameters[] = {
180  FUNCTION_SELECTOR_PARAM,
181  {
182  /* .name = */ "gps_enable",
183  /* .docs = */ "Bitfield 0: Enable L1CA, 1: Enable L2C, 2: Enable L5",
184  /* .type = */ {Type::U8, nullptr},
185  /* .accessor = */ nullptr, //utils::access<type, uint8_t, &type::gps_enable>,
186  /* .attributes = */ {true, false, false, false, false},
187  /* .count = */ 1,
188  /* .condition = */ {},
189  },
190  {
191  /* .name = */ "glonass_enable",
192  /* .docs = */ "Bitfield 0: Enable L1OF, 1: Enable L2OF",
193  /* .type = */ {Type::U8, nullptr},
194  /* .accessor = */ nullptr, //utils::access<type, uint8_t, &type::glonass_enable>,
195  /* .attributes = */ {true, false, false, false, false},
196  /* .count = */ 1,
197  /* .condition = */ {},
198  },
199  {
200  /* .name = */ "galileo_enable",
201  /* .docs = */ "Bitfield 0: Enable E1, 1: Enable E5B, 2: Enable E5A",
202  /* .type = */ {Type::U8, nullptr},
203  /* .accessor = */ nullptr, //utils::access<type, uint8_t, &type::galileo_enable>,
204  /* .attributes = */ {true, false, false, false, false},
205  /* .count = */ 1,
206  /* .condition = */ {},
207  },
208  {
209  /* .name = */ "beidou_enable",
210  /* .docs = */ "Bitfield 0: Enable B1, 1: Enable B2, 2: Enable B2A",
211  /* .type = */ {Type::U8, nullptr},
212  /* .accessor = */ nullptr, //utils::access<type, uint8_t, &type::beidou_enable>,
213  /* .attributes = */ {true, false, false, false, false},
214  /* .count = */ 1,
215  /* .condition = */ {},
216  },
217  {
218  /* .name = */ "reserved",
219  /* .docs = */ "",
220  /* .type = */ {Type::U8, nullptr},
221  /* .accessor = */ nullptr, //utils::access<type, uint8_t, &type::reserved>,
222  /* .attributes = */ {true, false, false, false, false},
223  /* .count = */ 4,
224  /* .condition = */ {},
225  },
226  };
227 
228  static constexpr inline FieldInfo value = {
229  /* .name = */ "commands_gnss::SignalConfiguration",
230  /* .title = */ "signal_configuration",
231  /* .docs = */ "Configure the GNSS signals used by the device.\n",
232  /* .parameters = */ parameters,
233  /* .descriptor = */ type::DESCRIPTOR,
234  /* .functions = */ {true, true, true, true, true},
235  /* .response = */ &MetadataFor<type::Response>::value,
236  };
237 };
238 
239 template<>
240 struct MetadataFor<commands_gnss::SpartnConfiguration::Response>
241 {
243 
244  static constexpr inline ParameterInfo parameters[] = {
245  {
246  /* .name = */ "enable",
247  /* .docs = */ "Enable/Disable the SPARTN subsystem (0 = Disabled, 1 = Enabled)",
248  /* .type = */ {Type::U8, nullptr},
249  /* .accessor = */ nullptr, //utils::access<type, uint8_t, &type::enable>,
250  /* .attributes = */ {true, false, false, false, false},
251  /* .count = */ 1,
252  /* .condition = */ {},
253  },
254  {
255  /* .name = */ "type",
256  /* .docs = */ "Connection type (0 - None, 1 = Network, 2 = L-Band)",
257  /* .type = */ {Type::U8, nullptr},
258  /* .accessor = */ nullptr, //utils::access<type, uint8_t, &type::type>,
259  /* .attributes = */ {true, false, false, false, false},
260  /* .count = */ 1,
261  /* .condition = */ {},
262  },
263  {
264  /* .name = */ "current_key_tow",
265  /* .docs = */ "The GPS time of week the current key is valid until",
266  /* .type = */ {Type::U32, nullptr},
267  /* .accessor = */ nullptr, //utils::access<type, uint32_t, &type::current_key_tow>,
268  /* .attributes = */ {true, false, false, false, false},
269  /* .count = */ 1,
270  /* .condition = */ {},
271  },
272  {
273  /* .name = */ "current_key_week",
274  /* .docs = */ "The GPS week number the current key is valid until",
275  /* .type = */ {Type::U16, nullptr},
276  /* .accessor = */ nullptr, //utils::access<type, uint16_t, &type::current_key_week>,
277  /* .attributes = */ {true, false, false, false, false},
278  /* .count = */ 1,
279  /* .condition = */ {},
280  },
281  {
282  /* .name = */ "current_key",
283  /* .docs = */ "32 character string of ASCII hex values for the current key (e.g. 'bc' for 0xBC)",
284  /* .type = */ {Type::U8, nullptr},
285  /* .accessor = */ nullptr, //utils::access<type, uint8_t, &type::current_key>,
286  /* .attributes = */ {true, false, false, false, false},
287  /* .count = */ 32,
288  /* .condition = */ {},
289  },
290  {
291  /* .name = */ "next_key_tow",
292  /* .docs = */ "The GPS time of week the next key is valid until",
293  /* .type = */ {Type::U32, nullptr},
294  /* .accessor = */ nullptr, //utils::access<type, uint32_t, &type::next_key_tow>,
295  /* .attributes = */ {true, false, false, false, false},
296  /* .count = */ 1,
297  /* .condition = */ {},
298  },
299  {
300  /* .name = */ "next_key_week",
301  /* .docs = */ "The GPS week number the next key is valid until",
302  /* .type = */ {Type::U16, nullptr},
303  /* .accessor = */ nullptr, //utils::access<type, uint16_t, &type::next_key_week>,
304  /* .attributes = */ {true, false, false, false, false},
305  /* .count = */ 1,
306  /* .condition = */ {},
307  },
308  {
309  /* .name = */ "next_key",
310  /* .docs = */ "32 character string of ASCII hex valuesfor the next key (e.g. 'bc' for 0xBC)",
311  /* .type = */ {Type::U8, nullptr},
312  /* .accessor = */ nullptr, //utils::access<type, uint8_t, &type::next_key>,
313  /* .attributes = */ {true, false, false, false, false},
314  /* .count = */ 32,
315  /* .condition = */ {},
316  },
317  };
318 
319  static constexpr inline FieldInfo value = {
320  /* .name = */ "commands_gnss::SpartnConfiguration::Response",
321  /* .title = */ "response",
322  /* .docs = */ "",
323  /* .parameters = */ parameters,
324  /* .descriptor = */ type::DESCRIPTOR,
325  /* .functions = */ NO_FUNCTIONS,
326  /* .response = */ nullptr,
327  };
328 };
329 
330 template<>
331 struct MetadataFor<commands_gnss::SpartnConfiguration>
332 {
334 
335  static constexpr inline ParameterInfo parameters[] = {
336  FUNCTION_SELECTOR_PARAM,
337  {
338  /* .name = */ "enable",
339  /* .docs = */ "Enable/Disable the SPARTN subsystem (0 = Disabled, 1 = Enabled)",
340  /* .type = */ {Type::U8, nullptr},
341  /* .accessor = */ nullptr, //utils::access<type, uint8_t, &type::enable>,
342  /* .attributes = */ {true, false, false, false, false},
343  /* .count = */ 1,
344  /* .condition = */ {},
345  },
346  {
347  /* .name = */ "type",
348  /* .docs = */ "Connection type (0 - None, 1 = Network, 2 = L-Band)",
349  /* .type = */ {Type::U8, nullptr},
350  /* .accessor = */ nullptr, //utils::access<type, uint8_t, &type::type>,
351  /* .attributes = */ {true, false, false, false, false},
352  /* .count = */ 1,
353  /* .condition = */ {},
354  },
355  {
356  /* .name = */ "current_key_tow",
357  /* .docs = */ "The GPS time of week the current key is valid until",
358  /* .type = */ {Type::U32, nullptr},
359  /* .accessor = */ nullptr, //utils::access<type, uint32_t, &type::current_key_tow>,
360  /* .attributes = */ {true, false, false, false, false},
361  /* .count = */ 1,
362  /* .condition = */ {},
363  },
364  {
365  /* .name = */ "current_key_week",
366  /* .docs = */ "The GPS week number the current key is valid until",
367  /* .type = */ {Type::U16, nullptr},
368  /* .accessor = */ nullptr, //utils::access<type, uint16_t, &type::current_key_week>,
369  /* .attributes = */ {true, false, false, false, false},
370  /* .count = */ 1,
371  /* .condition = */ {},
372  },
373  {
374  /* .name = */ "current_key",
375  /* .docs = */ "32 character string of ASCII hex values for the current key (e.g. 'bc' for 0xBC)",
376  /* .type = */ {Type::U8, nullptr},
377  /* .accessor = */ nullptr, //utils::access<type, uint8_t, &type::current_key>,
378  /* .attributes = */ {true, false, false, false, false},
379  /* .count = */ 32,
380  /* .condition = */ {},
381  },
382  {
383  /* .name = */ "next_key_tow",
384  /* .docs = */ "The GPS time of week the next key is valid until",
385  /* .type = */ {Type::U32, nullptr},
386  /* .accessor = */ nullptr, //utils::access<type, uint32_t, &type::next_key_tow>,
387  /* .attributes = */ {true, false, false, false, false},
388  /* .count = */ 1,
389  /* .condition = */ {},
390  },
391  {
392  /* .name = */ "next_key_week",
393  /* .docs = */ "The GPS week number the next key is valid until",
394  /* .type = */ {Type::U16, nullptr},
395  /* .accessor = */ nullptr, //utils::access<type, uint16_t, &type::next_key_week>,
396  /* .attributes = */ {true, false, false, false, false},
397  /* .count = */ 1,
398  /* .condition = */ {},
399  },
400  {
401  /* .name = */ "next_key",
402  /* .docs = */ "32 character string of ASCII hex valuesfor the next key (e.g. 'bc' for 0xBC)",
403  /* .type = */ {Type::U8, nullptr},
404  /* .accessor = */ nullptr, //utils::access<type, uint8_t, &type::next_key>,
405  /* .attributes = */ {true, false, false, false, false},
406  /* .count = */ 32,
407  /* .condition = */ {},
408  },
409  };
410 
411  static constexpr inline FieldInfo value = {
412  /* .name = */ "commands_gnss::SpartnConfiguration",
413  /* .title = */ "spartn_configuration",
414  /* .docs = */ "Configure the SPARTN corrections service parameters.\nNotes:<br/>\n- Enable and type settings will only update after a power cycle <br/>\n- Type settings will only take effect after a power cycle <br/>\n- Key information can be updated while running",
415  /* .parameters = */ parameters,
416  /* .descriptor = */ type::DESCRIPTOR,
417  /* .functions = */ {true, true, true, true, true},
418  /* .response = */ &MetadataFor<type::Response>::value,
419  };
420 };
421 
422 template<>
423 struct MetadataFor<commands_gnss::RtkDongleConfiguration::Response>
424 {
426 
427  static constexpr inline ParameterInfo parameters[] = {
428  {
429  /* .name = */ "enable",
430  /* .docs = */ "",
431  /* .type = */ {Type::U8, nullptr},
432  /* .accessor = */ nullptr, //utils::access<type, uint8_t, &type::enable>,
433  /* .attributes = */ {true, false, false, false, false},
434  /* .count = */ 1,
435  /* .condition = */ {},
436  },
437  {
438  /* .name = */ "reserved",
439  /* .docs = */ "",
440  /* .type = */ {Type::U8, nullptr},
441  /* .accessor = */ nullptr, //utils::access<type, uint8_t, &type::reserved>,
442  /* .attributes = */ {true, false, false, false, false},
443  /* .count = */ 3,
444  /* .condition = */ {},
445  },
446  };
447 
448  static constexpr inline FieldInfo value = {
449  /* .name = */ "commands_gnss::RtkDongleConfiguration::Response",
450  /* .title = */ "response",
451  /* .docs = */ "",
452  /* .parameters = */ parameters,
453  /* .descriptor = */ type::DESCRIPTOR,
454  /* .functions = */ NO_FUNCTIONS,
455  /* .response = */ nullptr,
456  };
457 };
458 
459 template<>
460 struct MetadataFor<commands_gnss::RtkDongleConfiguration>
461 {
463 
464  static constexpr inline ParameterInfo parameters[] = {
465  FUNCTION_SELECTOR_PARAM,
466  {
467  /* .name = */ "enable",
468  /* .docs = */ "0 - Disabled, 1- Enabled",
469  /* .type = */ {Type::U8, nullptr},
470  /* .accessor = */ nullptr, //utils::access<type, uint8_t, &type::enable>,
471  /* .attributes = */ {true, false, false, false, false},
472  /* .count = */ 1,
473  /* .condition = */ {},
474  },
475  {
476  /* .name = */ "reserved",
477  /* .docs = */ "",
478  /* .type = */ {Type::U8, nullptr},
479  /* .accessor = */ nullptr, //utils::access<type, uint8_t, &type::reserved>,
480  /* .attributes = */ {true, false, false, false, false},
481  /* .count = */ 3,
482  /* .condition = */ {},
483  },
484  };
485 
486  static constexpr inline FieldInfo value = {
487  /* .name = */ "commands_gnss::RtkDongleConfiguration",
488  /* .title = */ "rtk_dongle_configuration",
489  /* .docs = */ "Configure the communications with the RTK Dongle connected to the device.\n",
490  /* .parameters = */ parameters,
491  /* .descriptor = */ type::DESCRIPTOR,
492  /* .functions = */ {true, true, true, true, true},
493  /* .response = */ &MetadataFor<type::Response>::value,
494  };
495 };
496 
497 
498 static constexpr inline const FieldInfo* COMMANDS_GNSS_FIELDS[] = {
507 };
508 
509 static constexpr DescriptorSetInfo COMMANDS_GNSS = {
510  /*.descriptor =*/ mip::commands_gnss::DESCRIPTOR_SET,
511  /*.name =*/ "Gnss Commands",
512  /*.fields =*/ COMMANDS_GNSS_FIELDS,
513 };
514 
515 } // namespace mip::metadata
516 
mip::metadata::MetadataFor< commands_gnss::SignalConfiguration::Response >::value
static constexpr FieldInfo value
Definition: commands_gnss.hpp:163
commands_gnss.hpp
mip::metadata
Definition: commands_3dm.hpp:10
mip::commands_gnss::SpartnConfiguration::Response
Definition: commands_gnss.hpp:280
mip::metadata::MetadataFor< commands_gnss::SignalConfiguration >::value
static constexpr FieldInfo value
Definition: commands_gnss.hpp:228
mip::commands_gnss::RtkDongleConfiguration::Response
Definition: commands_gnss.hpp:367
mip::metadata::Type::U16
@ U16
mip::metadata::MetadataFor
Definition: mip_metadata.hpp:15
mip::metadata::Type::STRUCT
@ STRUCT
mip::metadata::Type::CHAR
@ CHAR
mip::commands_gnss::DESCRIPTOR_SET
@ DESCRIPTOR_SET
Definition: commands_gnss.hpp:31
mip::metadata::ParameterInfo
Definition: mip_structures.hpp:161
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:187
mip::commands_gnss::ReceiverInfo
Definition: commands_gnss.hpp:71
mip_metadata.hpp
mip::commands_gnss::SpartnConfiguration
Definition: commands_gnss.hpp:238
mip::commands_gnss::RtkDongleConfiguration
Definition: commands_gnss.hpp:331
microstrain::Index
Represents an index ranging from 0..N excluding N.
Definition: index.hpp:28
mip::metadata::FieldInfo
Definition: mip_structures.hpp:216
mip::metadata::Type::U8
@ U8
mip::commands_gnss::ReceiverInfo::Info
Definition: commands_gnss.hpp:73
mip::metadata::MetadataFor< commands_gnss::RtkDongleConfiguration::Response >::value
static constexpr FieldInfo value
Definition: commands_gnss.hpp:448
mip::metadata::MetadataFor< commands_gnss::SpartnConfiguration::Response >::value
static constexpr FieldInfo value
Definition: commands_gnss.hpp:319
mip::commands_gnss::ReceiverInfo::Response
Definition: commands_gnss.hpp:107
mip::metadata::MetadataFor< commands_gnss::ReceiverInfo::Response >::value
static constexpr FieldInfo value
Definition: commands_gnss.hpp:83
mip::metadata::StructInfo
Definition: mip_structures.hpp:205
mip::commands_gnss::SignalConfiguration
Definition: commands_gnss.hpp:148
mip::metadata::MetadataFor< commands_gnss::SpartnConfiguration >::value
static constexpr FieldInfo value
Definition: commands_gnss.hpp:411
common.hpp
mip::metadata::Type::U32
@ U32
mip::metadata::MetadataFor< commands_gnss::RtkDongleConfiguration >::value
static constexpr FieldInfo value
Definition: commands_gnss.hpp:486