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