ISDataMappings.cpp
Go to the documentation of this file.
1 /*
2 MIT LICENSE
3 
4 Copyright (c) 2014-2021 Inertial Sense, Inc. - http://inertialsense.com
5 
6 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files(the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions :
7 
8 The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
9 
10 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
11 */
12 
13 #include <map>
14 #include <vector>
15 #include <set>
16 #include <algorithm>
17 #include <stdlib.h>
18 #include <stddef.h>
19 #include <inttypes.h>
20 #include <stdio.h>
21 #include <assert.h>
22 #include <string.h>
23 
24 #include "ISDataMappings.h"
25 #include "DataJSON.h"
26 #include "ISUtilities.h"
27 #include "ISConstants.h"
28 #include "data_sets.h"
29 
30 #ifdef USE_IS_INTERNAL
31 #include "../../cpp/libs/IS_internal.h"
32 #endif
33 
34 #if PLATFORM_IS_EMBEDDED
36 #else
38 #endif
39 
40 const unsigned char g_asciiToLowerMap[256] =
41 {
42  0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,
43  41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q',
44  'r','s','t','u','v','w','x','y','z',91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,
45  119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,
46  154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,
47  189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,
48  224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255
49 };
50 
52 {
53  (uint32_t)sizeof(int8_t),
54  (uint32_t)sizeof(uint8_t),
55  (uint32_t)sizeof(int16_t),
56  (uint32_t)sizeof(uint16_t),
57  (uint32_t)sizeof(int32_t),
58  (uint32_t)sizeof(uint32_t),
59  (uint32_t)sizeof(int64_t),
60  (uint32_t)sizeof(uint64_t),
61  (uint32_t)sizeof(float),
62  (uint32_t)sizeof(double),
63  (uint32_t)0, // string, must be set to actual size by caller
64  (uint32_t)0 // binary, must be set to actual size by caller
65 };
66 
67 inline uint32_t GetDataTypeSize(eDataType dataType)
68 {
69  if (dataType >= 0 && dataType < DataTypeCount)
70  {
71  return s_eDataTypeSizes[dataType];
72  }
73  return 0;
74 }
75 
76 #if CPP11_IS_ENABLED
77 
78 // dataSize can be 0 for default size, must be set for string type
79 #define ADD_MAP_NO_VALIDATION(map, totalSize, name, member, dataSize, dataType, memberType) (map)[std::string(name)] = { (uint32_t)offsetof(MAP_TYPE, member), (uint32_t)(dataSize == 0 ? sizeof(memberType) : dataSize), dataType, name }; totalSize += sizeof(memberType);
80 
81 // note when passing member type for arrays, it must be a reference, i.e. float&
82 #define ADD_MAP(map, totalSize, name, member, dataSize, dataType, memberType) \
83  ADD_MAP_NO_VALIDATION(map, totalSize, name, member, dataSize, dataType, memberType); \
84  static_assert(is_same<decltype(MAP_TYPE::member), memberType>::value, "Member type is an unexpected type"); \
85  static_assert((uint32_t)(dataSize == 0 ? sizeof(memberType) : dataSize) == sizeof(memberType), "Member type is an unexpected size, sizeof(memberType)"); \
86  static_assert((uint32_t)(dataSize == 0 ? sizeof(memberType) : dataSize) == sizeof(MAP_TYPE::member), "Member type is an unexpected size, sizeof(MAP_TYPE::member)"); \
87  static_assert(s_eDataTypeSizes[dataType] == 0 || (uint32_t)(dataSize == 0 ? sizeof(memberType) : dataSize) == s_eDataTypeSizes[dataType], "Data type size does not match member size");
88 #define ASSERT_SIZE(s) assert(s == sizeof(MAP_TYPE))
89 
90 #else
91 
92 #define ADD_MAP_NO_VALIDATION(map, totalSize, name, member, dataSize, dataType, memberType) (map)[std::string(name)] = { (uint32_t)offsetof(MAP_TYPE, member), (uint32_t)(dataSize == 0 ? sizeof(memberType) : dataSize), dataType, name }; totalSize += sizeof(memberType);
93 #define ADD_MAP(map, totalSize, name, member, dataSize, dataType, memberType) ADD_MAP_NO_VALIDATION(map, totalSize, name, member, dataSize, dataType, memberType)
94 #define ASSERT_SIZE(s) // not supported on VS < 2015
95 
96 #endif
97 
98 static void PopulateSizeMappings(uint32_t sizeMap[DID_COUNT])
99 {
100  //memset(sizeMap, 0, sizeof(sizeMap));
101  // NOTE: If you use the line above, the compiler issues this warning:
102  // "‘sizeof’ on array function parameter ‘sizeMap’ will return size of ‘uint32_t* {aka unsigned int*}’"
103  // So, we use `sizeof(uint32_t) * DID_COUNT` instead to get the correct size.
104  memset(sizeMap, 0, sizeof(uint32_t) * DID_COUNT);
105 
106  sizeMap[DID_DEV_INFO] = sizeof(dev_info_t);
107  sizeMap[DID_MAGNETOMETER_1] = sizeof(magnetometer_t);
108  sizeMap[DID_MAGNETOMETER_2] = sizeof(magnetometer_t);
109  sizeMap[DID_BAROMETER] = sizeof(barometer_t);
110  sizeMap[DID_PREINTEGRATED_IMU] = sizeof(preintegrated_imu_t);
111  sizeMap[DID_WHEEL_ENCODER] = sizeof(wheel_encoder_t);
112  sizeMap[DID_SYS_CMD] = sizeof(system_command_t);
113  sizeMap[DID_INS_1] = sizeof(ins_1_t);
114  sizeMap[DID_INS_2] = sizeof(ins_2_t);
115  sizeMap[DID_INS_3] = sizeof(ins_3_t);
116  sizeMap[DID_INS_4] = sizeof(ins_4_t);
117  sizeMap[DID_GPS1_POS] = sizeof(gps_pos_t);
118  sizeMap[DID_GPS1_UBX_POS] = sizeof(gps_pos_t);
119  sizeMap[DID_GPS1_VEL] = sizeof(gps_vel_t);
120  sizeMap[DID_GPS2_POS] = sizeof(gps_pos_t);
121  sizeMap[DID_GPS2_VEL] = sizeof(gps_vel_t);
122  sizeMap[DID_GPS1_SAT] = sizeof(gps_sat_t);
123  sizeMap[DID_GPS2_SAT] = sizeof(gps_sat_t);
124  sizeMap[DID_GPS1_VERSION] = sizeof(gps_version_t);
125  sizeMap[DID_GPS2_VERSION] = sizeof(gps_version_t);
126  sizeMap[DID_GPS1_RTK_POS] = sizeof(gps_pos_t);
127  sizeMap[DID_GPS1_RTK_POS_REL] = sizeof(gps_rtk_rel_t);
128  sizeMap[DID_GPS1_RTK_POS_MISC] = sizeof(gps_rtk_misc_t);
129  sizeMap[DID_GPS2_RTK_CMP_REL] = sizeof(gps_rtk_rel_t);
130  sizeMap[DID_GPS2_RTK_CMP_MISC] = sizeof(gps_rtk_misc_t);
131  sizeMap[DID_SYS_PARAMS] = sizeof(sys_params_t);
132  sizeMap[DID_SYS_SENSORS] = sizeof(sys_sensors_t);
133  sizeMap[DID_FLASH_CONFIG] = sizeof(nvm_flash_cfg_t);
134  sizeMap[DID_DUAL_IMU] = sizeof(dual_imu_t);
135  sizeMap[DID_DUAL_IMU_RAW] = sizeof(dual_imu_t);
136  sizeMap[DID_GPS_BASE_RAW] = sizeof(gps_raw_t);
137  sizeMap[DID_STROBE_IN_TIME] = sizeof(strobe_in_time_t);
138  sizeMap[DID_RTOS_INFO] = sizeof(rtos_info_t);
139  sizeMap[DID_DUAL_IMU_RAW_MAG] = sizeof(imu_mag_t);
140  sizeMap[DID_CAN_CONFIG] = sizeof(can_config_t);
141 
142 
143 #ifdef USE_IS_INTERNAL
144 
145  sizeMap[DID_SENSORS_IS1] = sizeof(sensors_w_temp_t);
146  sizeMap[DID_SENSORS_IS2] = sizeof(sensors_w_temp_t);
147  sizeMap[DID_SENSORS_TC_BIAS] = sizeof(sensors_t);
148  sizeMap[DID_SCOMP] = sizeof(sensor_compensation_t);
149  sizeMap[DID_DEBUG_ARRAY] = sizeof(debug_array_t);
150  sizeMap[DID_RTK_DEBUG] = sizeof(rtk_debug_t);
151 // sizeMap[DID_RTK_STATE] = sizeof(rtk_state_t);
152  sizeMap[DID_RTK_CODE_RESIDUAL] = sizeof(rtk_residual_t);
153  sizeMap[DID_RTK_PHASE_RESIDUAL] = sizeof(rtk_residual_t);
154  sizeMap[DID_NVR_USERPAGE_G0] = sizeof(nvm_group_0_t);
155  sizeMap[DID_NVR_USERPAGE_G1] = sizeof(nvm_group_1_t);
156  sizeMap[DID_INL2_STATES] = sizeof(inl2_states_t);
157  sizeMap[DID_INL2_STATUS] = sizeof(inl2_status_t);
158  sizeMap[DID_INL2_MISC] = sizeof(inl2_misc_t);
159  sizeMap[DID_INL2_MAG_OBS_INFO] = sizeof(inl2_mag_obs_info_t);
160  sizeMap[DID_DUAL_IMU_MAG] = sizeof(imu_mag_t);
161  sizeMap[DID_PREINTEGRATED_IMU_MAG] = sizeof(pimu_mag_t);
162  sizeMap[DID_SENSORS_ADC] = sizeof(sys_sensors_adc_t);
163  sizeMap[DID_RTK_DEBUG_2] = sizeof(rtk_debug_2_t);
164 
165 #endif
166 
167 }
168 
169 static void PopulateTimestampField(uint32_t id, const data_info_t** timestamps, map_name_to_info_t mappings[DID_COUNT])
170 {
171  static const string timestampFields[] = { "time", "timeOfWeek", "timeOfWeekMs", "seconds" };
172  const map_name_to_info_t& offsetMap = mappings[id];
173 
174  if (offsetMap.size() != 0)
175  {
176  for (size_t i = 0; i < _ARRAY_ELEMENT_COUNT(timestampFields); i++)
177  {
178  map_name_to_info_t::const_iterator timestampField = offsetMap.find(timestampFields[i]);
179  if (timestampField != offsetMap.end())
180  {
181  timestamps[id] = (const data_info_t*)&timestampField->second;
182  return;
183  }
184  }
185  }
186 
187  timestamps[id] = NULLPTR; // ensure value is not garbage
188 }
189 
191 {
192  typedef dev_info_t MAP_TYPE;
193  map_name_to_info_t& m = mappings[DID_DEV_INFO];
194  uint32_t totalSize = 0;
195  ADD_MAP(m, totalSize, "reserved", reserved, 0, DataTypeUInt32, uint32_t);
196  ADD_MAP(m, totalSize, "serialNumber", serialNumber, 0, DataTypeUInt32, uint32_t);
197  ADD_MAP(m, totalSize, "hardwareVer[0]", hardwareVer[0], 0, DataTypeUInt8, uint8_t&);
198  ADD_MAP(m, totalSize, "hardwareVer[1]", hardwareVer[1], 0, DataTypeUInt8, uint8_t&);
199  ADD_MAP(m, totalSize, "hardwareVer[2]", hardwareVer[2], 0, DataTypeUInt8, uint8_t&);
200  ADD_MAP(m, totalSize, "hardwareVer[3]", hardwareVer[3], 0, DataTypeUInt8, uint8_t&);
201  ADD_MAP(m, totalSize, "firmwareVer[0]", firmwareVer[0], 0, DataTypeUInt8, uint8_t&);
202  ADD_MAP(m, totalSize, "firmwareVer[1]", firmwareVer[1], 0, DataTypeUInt8, uint8_t&);
203  ADD_MAP(m, totalSize, "firmwareVer[2]", firmwareVer[2], 0, DataTypeUInt8, uint8_t&);
204  ADD_MAP(m, totalSize, "firmwareVer[3]", firmwareVer[3], 0, DataTypeUInt8, uint8_t&);
205  ADD_MAP(m, totalSize, "buildNumber", buildNumber, 0, DataTypeUInt32, uint32_t);
206  ADD_MAP(m, totalSize, "protocolVer[0]", protocolVer[0], 0, DataTypeUInt8, uint8_t&);
207  ADD_MAP(m, totalSize, "protocolVer[1]", protocolVer[1], 0, DataTypeUInt8, uint8_t&);
208  ADD_MAP(m, totalSize, "protocolVer[2]", protocolVer[2], 0, DataTypeUInt8, uint8_t&);
209  ADD_MAP(m, totalSize, "protocolVer[3]", protocolVer[3], 0, DataTypeUInt8, uint8_t&);
210  ADD_MAP(m, totalSize, "repoRevision", repoRevision, 0, DataTypeUInt32, uint32_t);
211  ADD_MAP(m, totalSize, "manufacturer", manufacturer, DEVINFO_MANUFACTURER_STRLEN, DataTypeString, char[DEVINFO_MANUFACTURER_STRLEN]);
212  ADD_MAP(m, totalSize, "buildDate[0]", buildDate[0], 0, DataTypeUInt8, uint8_t&);
213  ADD_MAP(m, totalSize, "buildDate[1]", buildDate[1], 0, DataTypeUInt8, uint8_t&);
214  ADD_MAP(m, totalSize, "buildDate[2]", buildDate[2], 0, DataTypeUInt8, uint8_t&);
215  ADD_MAP(m, totalSize, "buildDate[3]", buildDate[3], 0, DataTypeUInt8, uint8_t&);
216  ADD_MAP(m, totalSize, "buildTime[0]", buildTime[0], 0, DataTypeUInt8, uint8_t&);
217  ADD_MAP(m, totalSize, "buildTime[1]", buildTime[1], 0, DataTypeUInt8, uint8_t&);
218  ADD_MAP(m, totalSize, "buildTime[2]", buildTime[2], 0, DataTypeUInt8, uint8_t&);
219  ADD_MAP(m, totalSize, "buildTime[3]", buildTime[3], 0, DataTypeUInt8, uint8_t&);
220  ADD_MAP(m, totalSize, "addInfo", addInfo, DEVINFO_ADDINFO_STRLEN, DataTypeString, char[DEVINFO_ADDINFO_STRLEN]);
221 
222  ASSERT_SIZE(totalSize);
223 }
224 
225 static void PopulateIMUMappings(map_name_to_info_t mappings[DID_COUNT], uint32_t dataId)
226 {
227  typedef dual_imu_t MAP_TYPE;
228  map_name_to_info_t& m = mappings[dataId];
229  uint32_t totalSize = 0;
230  ADD_MAP(m, totalSize, "time", time, 0, DataTypeDouble, double);
231  ADD_MAP(m, totalSize, "pqr1[0]", I[0].pqr[0], 0, DataTypeFloat, float&);
232  ADD_MAP(m, totalSize, "pqr1[1]", I[0].pqr[1], 0, DataTypeFloat, float&);
233  ADD_MAP(m, totalSize, "pqr1[2]", I[0].pqr[2], 0, DataTypeFloat, float&);
234  ADD_MAP(m, totalSize, "acc1[0]", I[0].acc[0], 0, DataTypeFloat, float&);
235  ADD_MAP(m, totalSize, "acc1[1]", I[0].acc[1], 0, DataTypeFloat, float&);
236  ADD_MAP(m, totalSize, "acc1[2]", I[0].acc[2], 0, DataTypeFloat, float&);
237  ADD_MAP(m, totalSize, "pqr2[0]", I[1].pqr[0], 0, DataTypeFloat, float&);
238  ADD_MAP(m, totalSize, "pqr2[1]", I[1].pqr[1], 0, DataTypeFloat, float&);
239  ADD_MAP(m, totalSize, "pqr2[2]", I[1].pqr[2], 0, DataTypeFloat, float&);
240  ADD_MAP(m, totalSize, "acc2[0]", I[1].acc[0], 0, DataTypeFloat, float&);
241  ADD_MAP(m, totalSize, "acc2[1]", I[1].acc[1], 0, DataTypeFloat, float&);
242  ADD_MAP(m, totalSize, "acc2[2]", I[1].acc[2], 0, DataTypeFloat, float&);
243  ADD_MAP(m, totalSize, "status", status, 0, DataTypeUInt32, uint32_t);
244 
245  ASSERT_SIZE(totalSize);
246 }
247 
249 {
250  typedef sys_params_t MAP_TYPE;
251  map_name_to_info_t& m = mappings[DID_SYS_PARAMS];
252  uint32_t totalSize = 0;
253  ADD_MAP(m, totalSize, "timeOfWeekMs", timeOfWeekMs, 0, DataTypeUInt32, uint32_t);
254  ADD_MAP(m, totalSize, "insStatus", insStatus, 0, DataTypeUInt32, uint32_t);
255  ADD_MAP(m, totalSize, "hdwStatus", hdwStatus, 0, DataTypeUInt32, uint32_t);
256  ADD_MAP(m, totalSize, "imuTemp", imuTemp, 0, DataTypeFloat, float);
257  ADD_MAP(m, totalSize, "baroTemp", baroTemp, 0, DataTypeFloat, float);
258  ADD_MAP(m, totalSize, "mcuTemp", mcuTemp, 0, DataTypeFloat, float);
259  ADD_MAP(m, totalSize, "reserved1", reserved1, 0, DataTypeFloat, float);
260  ADD_MAP(m, totalSize, "imuPeriodMs", imuPeriodMs, 0, DataTypeUInt32, uint32_t);
261  ADD_MAP(m, totalSize, "navPeriodMs", navPeriodMs, 0, DataTypeUInt32, uint32_t);
262  ADD_MAP(m, totalSize, "sensorTruePeriod", sensorTruePeriod, 0, DataTypeDouble, double);
263  ADD_MAP(m, totalSize, "reserved2[0]", reserved2[0], 0, DataTypeFloat, float&);
264  ADD_MAP(m, totalSize, "reserved2[1]", reserved2[1], 0, DataTypeFloat, float&);
265  ADD_MAP(m, totalSize, "genFaultCode", genFaultCode, 0, DataTypeUInt32, uint32_t);
266 
267  ASSERT_SIZE(totalSize);
268 }
269 
271 {
272  typedef sys_sensors_t MAP_TYPE;
273  map_name_to_info_t& m = mappings[DID_SYS_SENSORS];
274  uint32_t totalSize = 0;
275  ADD_MAP(m, totalSize, "time", time, 0, DataTypeDouble, double);
276  ADD_MAP(m, totalSize, "temp", temp, 0, DataTypeFloat, float);
277  ADD_MAP(m, totalSize, "pqr[0]", pqr[0], 0, DataTypeFloat, float&);
278  ADD_MAP(m, totalSize, "pqr[1]", pqr[1], 0, DataTypeFloat, float&);
279  ADD_MAP(m, totalSize, "pqr[2]", pqr[2], 0, DataTypeFloat, float&);
280  ADD_MAP(m, totalSize, "acc[0]", acc[0], 0, DataTypeFloat, float&);
281  ADD_MAP(m, totalSize, "acc[1]", acc[1], 0, DataTypeFloat, float&);
282  ADD_MAP(m, totalSize, "acc[2]", acc[2], 0, DataTypeFloat, float&);
283  ADD_MAP(m, totalSize, "mag[0]", mag[0], 0, DataTypeFloat, float&);
284  ADD_MAP(m, totalSize, "mag[1]", mag[1], 0, DataTypeFloat, float&);
285  ADD_MAP(m, totalSize, "mag[2]", mag[2], 0, DataTypeFloat, float&);
286  ADD_MAP(m, totalSize, "bar", bar, 0, DataTypeFloat, float);
287  ADD_MAP(m, totalSize, "barTemp", barTemp, 0, DataTypeFloat, float);
288  ADD_MAP(m, totalSize, "mslBar", mslBar, 0, DataTypeFloat, float);
289  ADD_MAP(m, totalSize, "humidity", humidity, 0, DataTypeFloat, float);
290  ADD_MAP(m, totalSize, "vin", vin, 0, DataTypeFloat, float);
291  ADD_MAP(m, totalSize, "ana1", ana1, 0, DataTypeFloat, float);
292  ADD_MAP(m, totalSize, "ana3", ana1, 0, DataTypeFloat, float);
293  ADD_MAP(m, totalSize, "ana4", ana1, 0, DataTypeFloat, float);
294 
295  ASSERT_SIZE(totalSize);
296 }
297 
299 {
300  typedef ins_1_t MAP_TYPE;
301  map_name_to_info_t& m = mappings[DID_INS_1];
302  uint32_t totalSize = 0;
303  ADD_MAP(m, totalSize, "week", week, 0, DataTypeUInt32, uint32_t);
304  ADD_MAP(m, totalSize, "timeOfWeek", timeOfWeek, 0, DataTypeDouble, double);
305  ADD_MAP(m, totalSize, "insStatus", insStatus, 0, DataTypeUInt32, uint32_t);
306  ADD_MAP(m, totalSize, "hdwStatus", hdwStatus, 0, DataTypeUInt32, uint32_t);
307  ADD_MAP(m, totalSize, "theta[0]", theta[0], 0, DataTypeFloat, float&);
308  ADD_MAP(m, totalSize, "theta[1]", theta[1], 0, DataTypeFloat, float&);
309  ADD_MAP(m, totalSize, "theta[2]", theta[2], 0, DataTypeFloat, float&);
310  ADD_MAP(m, totalSize, "uvw[0]", uvw[0], 0, DataTypeFloat, float&);
311  ADD_MAP(m, totalSize, "uvw[1]", uvw[1], 0, DataTypeFloat, float&);
312  ADD_MAP(m, totalSize, "uvw[2]", uvw[2], 0, DataTypeFloat, float&);
313  ADD_MAP(m, totalSize, "lla[0]", lla[0], 0, DataTypeDouble, double&);
314  ADD_MAP(m, totalSize, "lla[1]", lla[1], 0, DataTypeDouble, double&);
315  ADD_MAP(m, totalSize, "lla[2]", lla[2], 0, DataTypeDouble, double&);
316  ADD_MAP(m, totalSize, "ned[0]", ned[0], 0, DataTypeFloat, float&);
317  ADD_MAP(m, totalSize, "ned[1]", ned[1], 0, DataTypeFloat, float&);
318  ADD_MAP(m, totalSize, "ned[2]", ned[2], 0, DataTypeFloat, float&);
319 
320  ASSERT_SIZE(totalSize);
321 }
322 
323 static void PopulateINS2Mappings(map_name_to_info_t mappings[DID_COUNT], uint32_t did)
324 {
325  typedef ins_2_t MAP_TYPE;
326  map_name_to_info_t& m = mappings[did];
327  uint32_t totalSize = 0;
328  ADD_MAP(m, totalSize, "week", week, 0, DataTypeUInt32, uint32_t);
329  ADD_MAP(m, totalSize, "timeOfWeek", timeOfWeek, 0, DataTypeDouble, double);
330  ADD_MAP(m, totalSize, "insStatus", insStatus, 0, DataTypeUInt32, uint32_t);
331  ADD_MAP(m, totalSize, "hdwStatus", hdwStatus, 0, DataTypeUInt32, uint32_t);
332  ADD_MAP(m, totalSize, "qn2b[0]", qn2b[0], 0, DataTypeFloat, float&);
333  ADD_MAP(m, totalSize, "qn2b[1]", qn2b[1], 0, DataTypeFloat, float&);
334  ADD_MAP(m, totalSize, "qn2b[2]", qn2b[2], 0, DataTypeFloat, float&);
335  ADD_MAP(m, totalSize, "qn2b[3]", qn2b[3], 0, DataTypeFloat, float&);
336  ADD_MAP(m, totalSize, "uvw[0]", uvw[0], 0, DataTypeFloat, float&);
337  ADD_MAP(m, totalSize, "uvw[1]", uvw[1], 0, DataTypeFloat, float&);
338  ADD_MAP(m, totalSize, "uvw[2]", uvw[2], 0, DataTypeFloat, float&);
339  ADD_MAP(m, totalSize, "lla[0]", lla[0], 0, DataTypeDouble, double&);
340  ADD_MAP(m, totalSize, "lla[1]", lla[1], 0, DataTypeDouble, double&);
341  ADD_MAP(m, totalSize, "lla[2]", lla[2], 0, DataTypeDouble, double&);
342 
343  ASSERT_SIZE(totalSize);
344 }
345 
347 {
348  typedef ins_4_t MAP_TYPE;
349  map_name_to_info_t& m = mappings[DID_INS_4];
350  uint32_t totalSize = 0;
351  ADD_MAP(m, totalSize, "week", week, 0, DataTypeUInt32, uint32_t);
352  ADD_MAP(m, totalSize, "timeOfWeek", timeOfWeek, 0, DataTypeDouble, double);
353  ADD_MAP(m, totalSize, "insStatus", insStatus, 0, DataTypeUInt32, uint32_t);
354  ADD_MAP(m, totalSize, "hdwStatus", hdwStatus, 0, DataTypeUInt32, uint32_t);
355  ADD_MAP(m, totalSize, "qe2b[0]", qe2b[0], 0, DataTypeFloat, float&);
356  ADD_MAP(m, totalSize, "qe2b[1]", qe2b[1], 0, DataTypeFloat, float&);
357  ADD_MAP(m, totalSize, "qe2b[2]", qe2b[2], 0, DataTypeFloat, float&);
358  ADD_MAP(m, totalSize, "qe2b[3]", qe2b[3], 0, DataTypeFloat, float&);
359  ADD_MAP(m, totalSize, "ve[0]", ve[0], 0, DataTypeFloat, float&);
360  ADD_MAP(m, totalSize, "ve[1]", ve[1], 0, DataTypeFloat, float&);
361  ADD_MAP(m, totalSize, "ve[2]", ve[2], 0, DataTypeFloat, float&);
362  ADD_MAP(m, totalSize, "ecef[0]", ecef[0], 0, DataTypeDouble, double&);
363  ADD_MAP(m, totalSize, "ecef[1]", ecef[1], 0, DataTypeDouble, double&);
364  ADD_MAP(m, totalSize, "ecef[2]", ecef[2], 0, DataTypeDouble, double&);
365 
366  ASSERT_SIZE(totalSize);
367 }
368 
369 static void PopulateGpsPosMappings(map_name_to_info_t mappings[DID_COUNT], uint32_t id)
370 {
371  typedef gps_pos_t MAP_TYPE;
372  map_name_to_info_t& m = mappings[id];
373  uint32_t totalSize = 0;
374  ADD_MAP(m, totalSize, "week", week, 0, DataTypeUInt32, uint32_t);
375  ADD_MAP(m, totalSize, "timeOfWeekMs", timeOfWeekMs, 0, DataTypeUInt32, uint32_t);
376  ADD_MAP(m, totalSize, "status", status, 0, DataTypeUInt32, uint32_t);
377  ADD_MAP(m, totalSize, "ecef[0]", ecef[0], 0, DataTypeDouble, double&);
378  ADD_MAP(m, totalSize, "ecef[1]", ecef[1], 0, DataTypeDouble, double&);
379  ADD_MAP(m, totalSize, "ecef[2]", ecef[2], 0, DataTypeDouble, double&);
380  ADD_MAP(m, totalSize, "lla[0]", lla[0], 0, DataTypeDouble, double&);
381  ADD_MAP(m, totalSize, "lla[1]", lla[1], 0, DataTypeDouble, double&);
382  ADD_MAP(m, totalSize, "lla[2]", lla[2], 0, DataTypeDouble, double&);
383  ADD_MAP(m, totalSize, "hMSL", hMSL, 0, DataTypeFloat, float);
384  ADD_MAP(m, totalSize, "hAcc", hAcc, 0, DataTypeFloat, float);
385  ADD_MAP(m, totalSize, "vAcc", vAcc, 0, DataTypeFloat, float);
386  ADD_MAP(m, totalSize, "pDop", pDop, 0, DataTypeFloat, float);
387  ADD_MAP(m, totalSize, "cnoMean", cnoMean, 0, DataTypeFloat, float);
388  ADD_MAP(m, totalSize, "towOffset", towOffset, 0, DataTypeDouble, double);
389  ADD_MAP(m, totalSize, "leapS", leapS, 0, DataTypeUInt8, uint8_t);
390  ADD_MAP(m, totalSize, "reserved[0]", reserved[0], 0, DataTypeUInt8, uint8_t&);
391  ADD_MAP(m, totalSize, "reserved[1]", reserved[1], 0, DataTypeUInt8, uint8_t&);
392  ADD_MAP(m, totalSize, "reserved[2]", reserved[2], 0, DataTypeUInt8, uint8_t&);
393 
394  ASSERT_SIZE(totalSize);
395 }
396 
397 static void PopulateGpsVelMappings(map_name_to_info_t mappings[DID_COUNT], uint32_t id)
398 {
399  typedef gps_vel_t MAP_TYPE;
400  map_name_to_info_t& m = mappings[id];
401  uint32_t totalSize = 0;
402  ADD_MAP(m, totalSize, "timeOfWeekMs", timeOfWeekMs, 0, DataTypeUInt32, uint32_t);
403  ADD_MAP(m, totalSize, "vel[0]", vel[0], 0, DataTypeFloat, float&);
404  ADD_MAP(m, totalSize, "vel[1]", vel[1], 0, DataTypeFloat, float&);
405  ADD_MAP(m, totalSize, "vel[2]", vel[2], 0, DataTypeFloat, float&);
406  ADD_MAP(m, totalSize, "sAcc", sAcc, 0, DataTypeFloat, float);
407  ADD_MAP(m, totalSize, "status", status, 0, DataTypeUInt32, uint32_t);
408 
409  ASSERT_SIZE(totalSize);
410 }
411 
412 static void PopulateGPSCNOMappings(map_name_to_info_t mappings[DID_COUNT], uint32_t id)
413 {
414  typedef gps_sat_t MAP_TYPE;
415  map_name_to_info_t& m = mappings[id];
416  uint32_t totalSize = 0;
417  ADD_MAP(m, totalSize, "timeOfWeekMs", timeOfWeekMs, 0, DataTypeUInt32, uint32_t);
418  ADD_MAP(m, totalSize, "numSats", numSats, 0, DataTypeUInt32, uint32_t);
419  ADD_MAP(m, totalSize, "svId[0]", sat[0].svId, 0, DataTypeUInt8, uint8_t);
420  ADD_MAP(m, totalSize, "svId[1]", sat[1].svId, 0, DataTypeUInt8, uint8_t);
421  ADD_MAP(m, totalSize, "svId[2]", sat[2].svId, 0, DataTypeUInt8, uint8_t);
422  ADD_MAP(m, totalSize, "svId[3]", sat[3].svId, 0, DataTypeUInt8, uint8_t);
423  ADD_MAP(m, totalSize, "svId[4]", sat[4].svId, 0, DataTypeUInt8, uint8_t);
424  ADD_MAP(m, totalSize, "svId[5]", sat[5].svId, 0, DataTypeUInt8, uint8_t);
425  ADD_MAP(m, totalSize, "svId[6]", sat[6].svId, 0, DataTypeUInt8, uint8_t);
426  ADD_MAP(m, totalSize, "svId[7]", sat[7].svId, 0, DataTypeUInt8, uint8_t);
427  ADD_MAP(m, totalSize, "svId[8]", sat[8].svId, 0, DataTypeUInt8, uint8_t);
428  ADD_MAP(m, totalSize, "svId[9]", sat[9].svId, 0, DataTypeUInt8, uint8_t);
429  ADD_MAP(m, totalSize, "svId[10]", sat[10].svId, 0, DataTypeUInt8, uint8_t);
430  ADD_MAP(m, totalSize, "svId[11]", sat[11].svId, 0, DataTypeUInt8, uint8_t);
431  ADD_MAP(m, totalSize, "svId[12]", sat[12].svId, 0, DataTypeUInt8, uint8_t);
432  ADD_MAP(m, totalSize, "svId[13]", sat[13].svId, 0, DataTypeUInt8, uint8_t);
433  ADD_MAP(m, totalSize, "svId[14]", sat[14].svId, 0, DataTypeUInt8, uint8_t);
434  ADD_MAP(m, totalSize, "svId[15]", sat[15].svId, 0, DataTypeUInt8, uint8_t);
435  ADD_MAP(m, totalSize, "svId[16]", sat[16].svId, 0, DataTypeUInt8, uint8_t);
436  ADD_MAP(m, totalSize, "svId[17]", sat[17].svId, 0, DataTypeUInt8, uint8_t);
437  ADD_MAP(m, totalSize, "svId[18]", sat[18].svId, 0, DataTypeUInt8, uint8_t);
438  ADD_MAP(m, totalSize, "svId[19]", sat[19].svId, 0, DataTypeUInt8, uint8_t);
439  ADD_MAP(m, totalSize, "svId[20]", sat[20].svId, 0, DataTypeUInt8, uint8_t);
440  ADD_MAP(m, totalSize, "svId[21]", sat[21].svId, 0, DataTypeUInt8, uint8_t);
441  ADD_MAP(m, totalSize, "svId[22]", sat[22].svId, 0, DataTypeUInt8, uint8_t);
442  ADD_MAP(m, totalSize, "svId[23]", sat[23].svId, 0, DataTypeUInt8, uint8_t);
443  ADD_MAP(m, totalSize, "svId[24]", sat[24].svId, 0, DataTypeUInt8, uint8_t);
444  ADD_MAP(m, totalSize, "svId[25]", sat[25].svId, 0, DataTypeUInt8, uint8_t);
445  ADD_MAP(m, totalSize, "svId[26]", sat[26].svId, 0, DataTypeUInt8, uint8_t);
446  ADD_MAP(m, totalSize, "svId[27]", sat[27].svId, 0, DataTypeUInt8, uint8_t);
447  ADD_MAP(m, totalSize, "svId[28]", sat[28].svId, 0, DataTypeUInt8, uint8_t);
448  ADD_MAP(m, totalSize, "svId[29]", sat[29].svId, 0, DataTypeUInt8, uint8_t);
449  ADD_MAP(m, totalSize, "svId[30]", sat[30].svId, 0, DataTypeUInt8, uint8_t);
450  ADD_MAP(m, totalSize, "svId[31]", sat[31].svId, 0, DataTypeUInt8, uint8_t);
451  ADD_MAP(m, totalSize, "svId[32]", sat[32].svId, 0, DataTypeUInt8, uint8_t);
452  ADD_MAP(m, totalSize, "svId[33]", sat[33].svId, 0, DataTypeUInt8, uint8_t);
453  ADD_MAP(m, totalSize, "svId[34]", sat[34].svId, 0, DataTypeUInt8, uint8_t);
454  ADD_MAP(m, totalSize, "svId[35]", sat[35].svId, 0, DataTypeUInt8, uint8_t);
455  ADD_MAP(m, totalSize, "svId[36]", sat[36].svId, 0, DataTypeUInt8, uint8_t);
456  ADD_MAP(m, totalSize, "svId[37]", sat[37].svId, 0, DataTypeUInt8, uint8_t);
457  ADD_MAP(m, totalSize, "svId[38]", sat[38].svId, 0, DataTypeUInt8, uint8_t);
458  ADD_MAP(m, totalSize, "svId[39]", sat[39].svId, 0, DataTypeUInt8, uint8_t);
459  ADD_MAP(m, totalSize, "svId[40]", sat[40].svId, 0, DataTypeUInt8, uint8_t);
460  ADD_MAP(m, totalSize, "svId[41]", sat[41].svId, 0, DataTypeUInt8, uint8_t);
461  ADD_MAP(m, totalSize, "svId[42]", sat[42].svId, 0, DataTypeUInt8, uint8_t);
462  ADD_MAP(m, totalSize, "svId[43]", sat[43].svId, 0, DataTypeUInt8, uint8_t);
463  ADD_MAP(m, totalSize, "svId[44]", sat[44].svId, 0, DataTypeUInt8, uint8_t);
464  ADD_MAP(m, totalSize, "svId[45]", sat[45].svId, 0, DataTypeUInt8, uint8_t);
465  ADD_MAP(m, totalSize, "svId[46]", sat[46].svId, 0, DataTypeUInt8, uint8_t);
466  ADD_MAP(m, totalSize, "svId[47]", sat[47].svId, 0, DataTypeUInt8, uint8_t);
467  ADD_MAP(m, totalSize, "svId[48]", sat[48].svId, 0, DataTypeUInt8, uint8_t);
468  ADD_MAP(m, totalSize, "svId[49]", sat[49].svId, 0, DataTypeUInt8, uint8_t);
469  ADD_MAP(m, totalSize, "cno[0]", sat[0].cno, 0, DataTypeUInt8, uint8_t);
470  ADD_MAP(m, totalSize, "cno[1]", sat[1].cno, 0, DataTypeUInt8, uint8_t);
471  ADD_MAP(m, totalSize, "cno[2]", sat[2].cno, 0, DataTypeUInt8, uint8_t);
472  ADD_MAP(m, totalSize, "cno[3]", sat[3].cno, 0, DataTypeUInt8, uint8_t);
473  ADD_MAP(m, totalSize, "cno[4]", sat[4].cno, 0, DataTypeUInt8, uint8_t);
474  ADD_MAP(m, totalSize, "cno[5]", sat[5].cno, 0, DataTypeUInt8, uint8_t);
475  ADD_MAP(m, totalSize, "cno[6]", sat[6].cno, 0, DataTypeUInt8, uint8_t);
476  ADD_MAP(m, totalSize, "cno[7]", sat[7].cno, 0, DataTypeUInt8, uint8_t);
477  ADD_MAP(m, totalSize, "cno[8]", sat[8].cno, 0, DataTypeUInt8, uint8_t);
478  ADD_MAP(m, totalSize, "cno[9]", sat[9].cno, 0, DataTypeUInt8, uint8_t);
479  ADD_MAP(m, totalSize, "cno[10]", sat[10].cno, 0, DataTypeUInt8, uint8_t);
480  ADD_MAP(m, totalSize, "cno[11]", sat[11].cno, 0, DataTypeUInt8, uint8_t);
481  ADD_MAP(m, totalSize, "cno[12]", sat[12].cno, 0, DataTypeUInt8, uint8_t);
482  ADD_MAP(m, totalSize, "cno[13]", sat[13].cno, 0, DataTypeUInt8, uint8_t);
483  ADD_MAP(m, totalSize, "cno[14]", sat[14].cno, 0, DataTypeUInt8, uint8_t);
484  ADD_MAP(m, totalSize, "cno[15]", sat[15].cno, 0, DataTypeUInt8, uint8_t);
485  ADD_MAP(m, totalSize, "cno[16]", sat[16].cno, 0, DataTypeUInt8, uint8_t);
486  ADD_MAP(m, totalSize, "cno[17]", sat[17].cno, 0, DataTypeUInt8, uint8_t);
487  ADD_MAP(m, totalSize, "cno[18]", sat[18].cno, 0, DataTypeUInt8, uint8_t);
488  ADD_MAP(m, totalSize, "cno[19]", sat[19].cno, 0, DataTypeUInt8, uint8_t);
489  ADD_MAP(m, totalSize, "cno[20]", sat[20].cno, 0, DataTypeUInt8, uint8_t);
490  ADD_MAP(m, totalSize, "cno[21]", sat[21].cno, 0, DataTypeUInt8, uint8_t);
491  ADD_MAP(m, totalSize, "cno[22]", sat[22].cno, 0, DataTypeUInt8, uint8_t);
492  ADD_MAP(m, totalSize, "cno[23]", sat[23].cno, 0, DataTypeUInt8, uint8_t);
493  ADD_MAP(m, totalSize, "cno[24]", sat[24].cno, 0, DataTypeUInt8, uint8_t);
494  ADD_MAP(m, totalSize, "cno[25]", sat[25].cno, 0, DataTypeUInt8, uint8_t);
495  ADD_MAP(m, totalSize, "cno[26]", sat[26].cno, 0, DataTypeUInt8, uint8_t);
496  ADD_MAP(m, totalSize, "cno[27]", sat[27].cno, 0, DataTypeUInt8, uint8_t);
497  ADD_MAP(m, totalSize, "cno[28]", sat[28].cno, 0, DataTypeUInt8, uint8_t);
498  ADD_MAP(m, totalSize, "cno[29]", sat[29].cno, 0, DataTypeUInt8, uint8_t);
499  ADD_MAP(m, totalSize, "cno[30]", sat[30].cno, 0, DataTypeUInt8, uint8_t);
500  ADD_MAP(m, totalSize, "cno[31]", sat[31].cno, 0, DataTypeUInt8, uint8_t);
501  ADD_MAP(m, totalSize, "cno[32]", sat[32].cno, 0, DataTypeUInt8, uint8_t);
502  ADD_MAP(m, totalSize, "cno[33]", sat[33].cno, 0, DataTypeUInt8, uint8_t);
503  ADD_MAP(m, totalSize, "cno[34]", sat[34].cno, 0, DataTypeUInt8, uint8_t);
504  ADD_MAP(m, totalSize, "cno[35]", sat[35].cno, 0, DataTypeUInt8, uint8_t);
505  ADD_MAP(m, totalSize, "cno[36]", sat[36].cno, 0, DataTypeUInt8, uint8_t);
506  ADD_MAP(m, totalSize, "cno[37]", sat[37].cno, 0, DataTypeUInt8, uint8_t);
507  ADD_MAP(m, totalSize, "cno[38]", sat[38].cno, 0, DataTypeUInt8, uint8_t);
508  ADD_MAP(m, totalSize, "cno[39]", sat[39].cno, 0, DataTypeUInt8, uint8_t);
509  ADD_MAP(m, totalSize, "cno[40]", sat[40].cno, 0, DataTypeUInt8, uint8_t);
510  ADD_MAP(m, totalSize, "cno[41]", sat[41].cno, 0, DataTypeUInt8, uint8_t);
511  ADD_MAP(m, totalSize, "cno[42]", sat[42].cno, 0, DataTypeUInt8, uint8_t);
512  ADD_MAP(m, totalSize, "cno[43]", sat[43].cno, 0, DataTypeUInt8, uint8_t);
513  ADD_MAP(m, totalSize, "cno[44]", sat[44].cno, 0, DataTypeUInt8, uint8_t);
514  ADD_MAP(m, totalSize, "cno[45]", sat[45].cno, 0, DataTypeUInt8, uint8_t);
515  ADD_MAP(m, totalSize, "cno[46]", sat[46].cno, 0, DataTypeUInt8, uint8_t);
516  ADD_MAP(m, totalSize, "cno[47]", sat[47].cno, 0, DataTypeUInt8, uint8_t);
517  ADD_MAP(m, totalSize, "cno[48]", sat[48].cno, 0, DataTypeUInt8, uint8_t);
518  ADD_MAP(m, totalSize, "cno[49]", sat[49].cno, 0, DataTypeUInt8, uint8_t);
519 
520  ASSERT_SIZE(totalSize);
521 }
522 
523 static void PopulateMagnetometerMappings(map_name_to_info_t mappings[DID_COUNT], uint32_t id)
524 {
525  typedef magnetometer_t MAP_TYPE;
526  map_name_to_info_t& m = mappings[id];
527  uint32_t totalSize = 0;
528  ADD_MAP(m, totalSize, "time", time, 0, DataTypeDouble, double);
529  ADD_MAP(m, totalSize, "mag[0]", mag[0], 0, DataTypeFloat, float&);
530  ADD_MAP(m, totalSize, "mag[1]", mag[1], 0, DataTypeFloat, float&);
531  ADD_MAP(m, totalSize, "mag[2]", mag[2], 0, DataTypeFloat, float&);
532 
533  ASSERT_SIZE(totalSize);
534 }
535 
537 {
538  typedef barometer_t MAP_TYPE;
539  map_name_to_info_t& m = mappings[DID_BAROMETER];
540  uint32_t totalSize = 0;
541  ADD_MAP(m, totalSize, "time", time, 0, DataTypeDouble, double);
542  ADD_MAP(m, totalSize, "bar", bar, 0, DataTypeFloat, float);
543  ADD_MAP(m, totalSize, "mslBar", mslBar, 0, DataTypeFloat, float);
544  ADD_MAP(m, totalSize, "barTemp", barTemp, 0, DataTypeFloat, float);
545  ADD_MAP(m, totalSize, "humidity", humidity, 0, DataTypeFloat, float);
546 
547  ASSERT_SIZE(totalSize);
548 }
549 
551 {
552  typedef preintegrated_imu_t MAP_TYPE;
554  uint32_t totalSize = 0;
555  ADD_MAP(m, totalSize, "time", time, 0, DataTypeDouble, double);
556  ADD_MAP(m, totalSize, "theta1[0]", theta1[0], 0, DataTypeFloat, float&);
557  ADD_MAP(m, totalSize, "theta1[1]", theta1[1], 0, DataTypeFloat, float&);
558  ADD_MAP(m, totalSize, "theta1[2]", theta1[2], 0, DataTypeFloat, float&);
559  ADD_MAP(m, totalSize, "vel1[0]", vel1[0], 0, DataTypeFloat, float&);
560  ADD_MAP(m, totalSize, "vel1[1]", vel1[1], 0, DataTypeFloat, float&);
561  ADD_MAP(m, totalSize, "vel1[2]", vel1[2], 0, DataTypeFloat, float&);
562  ADD_MAP(m, totalSize, "theta2[0]", theta2[0], 0, DataTypeFloat, float&);
563  ADD_MAP(m, totalSize, "theta2[1]", theta2[1], 0, DataTypeFloat, float&);
564  ADD_MAP(m, totalSize, "theta2[2]", theta2[2], 0, DataTypeFloat, float&);
565  ADD_MAP(m, totalSize, "vel2[0]", vel2[0], 0, DataTypeFloat, float&);
566  ADD_MAP(m, totalSize, "vel2[1]", vel2[1], 0, DataTypeFloat, float&);
567  ADD_MAP(m, totalSize, "vel2[2]", vel2[2], 0, DataTypeFloat, float&);
568  ADD_MAP(m, totalSize, "dt", dt, 0, DataTypeFloat, float);
569  ADD_MAP(m, totalSize, "status", status, 0, DataTypeUInt32, uint32_t);
570 
571  ASSERT_SIZE(totalSize);
572 }
573 
575 {
576  typedef pimu_mag_t MAP_TYPE;
578  uint32_t totalSize = 0;
579  ADD_MAP(m, totalSize, "imutime", pimu.time, 0, DataTypeDouble, double);
580  ADD_MAP(m, totalSize, "theta1[0]", pimu.theta1[0], 0, DataTypeFloat, float&);
581  ADD_MAP(m, totalSize, "theta1[1]", pimu.theta1[1], 0, DataTypeFloat, float&);
582  ADD_MAP(m, totalSize, "theta1[2]", pimu.theta1[2], 0, DataTypeFloat, float&);
583  ADD_MAP(m, totalSize, "vel1[0]", pimu.vel1[0], 0, DataTypeFloat, float&);
584  ADD_MAP(m, totalSize, "vel1[1]", pimu.vel1[1], 0, DataTypeFloat, float&);
585  ADD_MAP(m, totalSize, "vel1[2]", pimu.vel1[2], 0, DataTypeFloat, float&);
586  ADD_MAP(m, totalSize, "theta2[0]", pimu.theta2[0], 0, DataTypeFloat, float&);
587  ADD_MAP(m, totalSize, "theta2[1]", pimu.theta2[1], 0, DataTypeFloat, float&);
588  ADD_MAP(m, totalSize, "theta2[2]", pimu.theta2[2], 0, DataTypeFloat, float&);
589  ADD_MAP(m, totalSize, "vel2[0]", pimu.vel2[0], 0, DataTypeFloat, float&);
590  ADD_MAP(m, totalSize, "vel2[1]", pimu.vel2[1], 0, DataTypeFloat, float&);
591  ADD_MAP(m, totalSize, "vel2[2]", pimu.vel2[2], 0, DataTypeFloat, float&);
592  ADD_MAP(m, totalSize, "dt", pimu.dt, 0, DataTypeFloat, float);
593  ADD_MAP(m, totalSize, "imustatus", pimu.status, 0, DataTypeUInt32, uint32_t);
594  ADD_MAP(m, totalSize, "mag1time", mag1.time, 0, DataTypeDouble, double);
595  ADD_MAP(m, totalSize, "mag1[0]", mag1.mag[0], 0, DataTypeFloat, float&);
596  ADD_MAP(m, totalSize, "mag1[1]", mag1.mag[1], 0, DataTypeFloat, float&);
597  ADD_MAP(m, totalSize, "mag1[2]", mag1.mag[2], 0, DataTypeFloat, float&);
598  ADD_MAP(m, totalSize, "mag2time", mag2.time, 0, DataTypeDouble, double);
599  ADD_MAP(m, totalSize, "mag2[0]", mag2.mag[0], 0, DataTypeFloat, float&);
600  ADD_MAP(m, totalSize, "mag2[1]", mag2.mag[1], 0, DataTypeFloat, float&);
601  ADD_MAP(m, totalSize, "mag2[2]", mag2.mag[2], 0, DataTypeFloat, float&);
602 
603  ASSERT_SIZE(totalSize);
604 }
605 
607 {
608  typedef imu_mag_t MAP_TYPE;
609  map_name_to_info_t& m = mappings[id];
610  uint32_t totalSize = 0;
611  ADD_MAP(m, totalSize, "time", imu.time, 0, DataTypeDouble, double);
612  ADD_MAP(m, totalSize, "pqr1[0]", imu.I[0].pqr[0], 0, DataTypeFloat, float&);
613  ADD_MAP(m, totalSize, "pqr1[1]", imu.I[0].pqr[1], 0, DataTypeFloat, float&);
614  ADD_MAP(m, totalSize, "pqr1[2]", imu.I[0].pqr[2], 0, DataTypeFloat, float&);
615  ADD_MAP(m, totalSize, "acc1[0]", imu.I[0].acc[0], 0, DataTypeFloat, float&);
616  ADD_MAP(m, totalSize, "acc1[1]", imu.I[0].acc[1], 0, DataTypeFloat, float&);
617  ADD_MAP(m, totalSize, "acc1[2]", imu.I[0].acc[2], 0, DataTypeFloat, float&);
618  ADD_MAP(m, totalSize, "pqr2[0]", imu.I[1].pqr[0], 0, DataTypeFloat, float&);
619  ADD_MAP(m, totalSize, "pqr2[1]", imu.I[1].pqr[1], 0, DataTypeFloat, float&);
620  ADD_MAP(m, totalSize, "pqr2[2]", imu.I[1].pqr[2], 0, DataTypeFloat, float&);
621  ADD_MAP(m, totalSize, "acc2[0]", imu.I[1].acc[0], 0, DataTypeFloat, float&);
622  ADD_MAP(m, totalSize, "acc2[1]", imu.I[1].acc[1], 0, DataTypeFloat, float&);
623  ADD_MAP(m, totalSize, "acc2[2]", imu.I[1].acc[2], 0, DataTypeFloat, float&);
624  ADD_MAP(m, totalSize, "imustatus", imu.status, 0, DataTypeUInt32, uint32_t);
625  ADD_MAP(m, totalSize, "mag1time", mag1.time, 0, DataTypeDouble, double);
626  ADD_MAP(m, totalSize, "mag1[0]", mag1.mag[0], 0, DataTypeFloat, float&);
627  ADD_MAP(m, totalSize, "mag1[1]", mag1.mag[1], 0, DataTypeFloat, float&);
628  ADD_MAP(m, totalSize, "mag1[2]", mag1.mag[2], 0, DataTypeFloat, float&);
629  ADD_MAP(m, totalSize, "mag2time", mag2.time, 0, DataTypeDouble, double);
630  ADD_MAP(m, totalSize, "mag2[0]", mag2.mag[0], 0, DataTypeFloat, float&);
631  ADD_MAP(m, totalSize, "mag2[1]", mag2.mag[1], 0, DataTypeFloat, float&);
632  ADD_MAP(m, totalSize, "mag2[2]", mag2.mag[2], 0, DataTypeFloat, float&);
633 
634  ASSERT_SIZE(totalSize);
635 }
636 
638 {
639  typedef wheel_encoder_t MAP_TYPE;
640  map_name_to_info_t& m = mappings[DID_WHEEL_ENCODER];
641  uint32_t totalSize = 0;
642  ADD_MAP(m, totalSize, "timeOfWeek", timeOfWeek, 0, DataTypeDouble, double);
643  ADD_MAP(m, totalSize, "status", status, 0, DataTypeUInt32, uint32_t);
644  ADD_MAP(m, totalSize, "theta_l", theta_l, 0, DataTypeFloat, float);
645  ADD_MAP(m, totalSize, "omega_l", omega_l, 0, DataTypeFloat, float);
646  ADD_MAP(m, totalSize, "theta_r", theta_r, 0, DataTypeFloat, float);
647  ADD_MAP(m, totalSize, "omega_r", omega_r, 0, DataTypeFloat, float);
648  ADD_MAP(m, totalSize, "wrap_count_l", wrap_count_l, 0, DataTypeUInt32, uint32_t);
649  ADD_MAP(m, totalSize, "wrap_count_r", wrap_count_r, 0, DataTypeUInt32, uint32_t);
650 
651  ASSERT_SIZE(totalSize);
652 }
653 
655 {
656  typedef system_command_t MAP_TYPE;
657  map_name_to_info_t& m = mappings[DID_SYS_CMD];
658  uint32_t totalSize = 0;
659  ADD_MAP(m, totalSize, "command", command, 0, DataTypeUInt32, uint32_t);
660  ADD_MAP(m, totalSize, "invCommand", invCommand, 0, DataTypeUInt32, uint32_t);
661 
662  ASSERT_SIZE(totalSize);
663 }
664 
666 {
667  typedef nvm_flash_cfg_t MAP_TYPE;
668  map_name_to_info_t& m = mappings[DID_FLASH_CONFIG];
669  uint32_t totalSize = 0;
670  ADD_MAP(m, totalSize, "size", size, 0, DataTypeUInt32, uint32_t);
671  ADD_MAP(m, totalSize, "checksum", checksum, 0, DataTypeUInt32, uint32_t);
672  ADD_MAP(m, totalSize, "key", key, 0, DataTypeUInt32, uint32_t);
673  ADD_MAP(m, totalSize, "startupImuDtMs", startupImuDtMs, 0, DataTypeUInt32, uint32_t);
674  ADD_MAP(m, totalSize, "startupNavDtMs", startupNavDtMs, 0, DataTypeUInt32, uint32_t);
675  ADD_MAP(m, totalSize, "ser0BaudRate", ser0BaudRate, 0, DataTypeUInt32, uint32_t);
676  ADD_MAP(m, totalSize, "ser1BaudRate", ser1BaudRate, 0, DataTypeUInt32, uint32_t);
677  ADD_MAP(m, totalSize, "insRotation[0]", insRotation[0], 0, DataTypeFloat, float&);
678  ADD_MAP(m, totalSize, "insRotation[1]", insRotation[1], 0, DataTypeFloat, float&);
679  ADD_MAP(m, totalSize, "insRotation[2]", insRotation[2], 0, DataTypeFloat, float&);
680  ADD_MAP(m, totalSize, "insOffset[0]", insOffset[0], 0, DataTypeFloat, float&);
681  ADD_MAP(m, totalSize, "insOffset[1]", insOffset[1], 0, DataTypeFloat, float&);
682  ADD_MAP(m, totalSize, "insOffset[2]", insOffset[2], 0, DataTypeFloat, float&);
683  ADD_MAP(m, totalSize, "gps1AntOffset[0]", gps1AntOffset[0], 0, DataTypeFloat, float&);
684  ADD_MAP(m, totalSize, "gps1AntOffset[1]", gps1AntOffset[1], 0, DataTypeFloat, float&);
685  ADD_MAP(m, totalSize, "gps1AntOffset[2]", gps1AntOffset[2], 0, DataTypeFloat, float&);
686  ADD_MAP(m, totalSize, "insDynModel", insDynModel, 0, DataTypeUInt8, uint8_t);
687  ADD_MAP(m, totalSize, "reserved", reserved, 0, DataTypeUInt8, uint8_t);
688  ADD_MAP(m, totalSize, "gnssSatSigConst", gnssSatSigConst, 0, DataTypeUInt16, uint16_t);
689  ADD_MAP(m, totalSize, "sysCfgBits", sysCfgBits, 0, DataTypeUInt32, uint32_t);
690  ADD_MAP(m, totalSize, "refLla[0]", refLla[0], 0, DataTypeDouble, double&);
691  ADD_MAP(m, totalSize, "refLla[1]", refLla[1], 0, DataTypeDouble, double&);
692  ADD_MAP(m, totalSize, "refLla[2]", refLla[2], 0, DataTypeDouble, double&);
693  ADD_MAP(m, totalSize, "lastLla[0]", lastLla[0], 0, DataTypeDouble, double&);
694  ADD_MAP(m, totalSize, "lastLla[1]", lastLla[1], 0, DataTypeDouble, double&);
695  ADD_MAP(m, totalSize, "lastLla[2]", lastLla[2], 0, DataTypeDouble, double&);
696  ADD_MAP(m, totalSize, "lastLlaTimeOfWeekMs", lastLlaTimeOfWeekMs, 0, DataTypeUInt32, uint32_t);
697  ADD_MAP(m, totalSize, "lastLlaWeek", lastLlaWeek, 0, DataTypeUInt32, uint32_t);
698  ADD_MAP(m, totalSize, "lastLlaUpdateDistance", lastLlaUpdateDistance, 0, DataTypeFloat, float);
699  ADD_MAP(m, totalSize, "ioConfig", ioConfig, 0, DataTypeUInt32, uint32_t);
700  ADD_MAP(m, totalSize, "cBrdConfig", cBrdConfig, 0, DataTypeUInt32, uint32_t);
701  ADD_MAP(m, totalSize, "magInclination", magInclination, 0, DataTypeFloat, float);
702  ADD_MAP(m, totalSize, "magDeclination", magDeclination, 0, DataTypeFloat, float);
703  ADD_MAP(m, totalSize, "gps2AntOffset[0]", gps2AntOffset[0], 0, DataTypeFloat, float&);
704  ADD_MAP(m, totalSize, "gps2AntOffset[1]", gps2AntOffset[1], 0, DataTypeFloat, float&);
705  ADD_MAP(m, totalSize, "gps2AntOffset[2]", gps2AntOffset[2], 0, DataTypeFloat, float&);
706  ADD_MAP(m, totalSize, "zeroVelRotation[0]", zeroVelRotation[0], 0, DataTypeFloat, float&);
707  ADD_MAP(m, totalSize, "zeroVelRotation[1]", zeroVelRotation[1], 0, DataTypeFloat, float&);
708  ADD_MAP(m, totalSize, "zeroVelRotation[2]", zeroVelRotation[2], 0, DataTypeFloat, float&);
709  ADD_MAP(m, totalSize, "zeroVelOffset[0]", zeroVelOffset[0], 0, DataTypeFloat, float&);
710  ADD_MAP(m, totalSize, "zeroVelOffset[1]", zeroVelOffset[1], 0, DataTypeFloat, float&);
711  ADD_MAP(m, totalSize, "zeroVelOffset[2]", zeroVelOffset[2], 0, DataTypeFloat, float&);
712  ADD_MAP(m, totalSize, "gpsTimeSyncPeriodMs", gpsTimeSyncPeriodMs, 0, DataTypeUInt32, uint32_t);
713  ADD_MAP(m, totalSize, "startupGPSDtMs", startupGPSDtMs, 0, DataTypeUInt32, uint32_t);
714  ADD_MAP(m, totalSize, "RTKCfgBits", RTKCfgBits, 0, DataTypeUInt32, uint32_t);
715  ADD_MAP(m, totalSize, "sensorConfig", sensorConfig, 0, DataTypeUInt32, uint32_t);
716  ADD_MAP(m, totalSize, "wheelConfig.bits", wheelConfig.bits, 0, DataTypeUInt32, uint32_t);
717  ADD_MAP(m, totalSize, "wheelConfig.e_i2l[0]", wheelConfig.e_i2l[0], 0, DataTypeFloat, float&);
718  ADD_MAP(m, totalSize, "wheelConfig.e_i2l[1]", wheelConfig.e_i2l[1], 0, DataTypeFloat, float&);
719  ADD_MAP(m, totalSize, "wheelConfig.e_i2l[2]", wheelConfig.e_i2l[2], 0, DataTypeFloat, float&);
720  ADD_MAP(m, totalSize, "wheelConfig.t_i2l[0]", wheelConfig.t_i2l[0], 0, DataTypeFloat, float&);
721  ADD_MAP(m, totalSize, "wheelConfig.t_i2l[1]", wheelConfig.t_i2l[1], 0, DataTypeFloat, float&);
722  ADD_MAP(m, totalSize, "wheelConfig.t_i2l[2]", wheelConfig.t_i2l[2], 0, DataTypeFloat, float&);
723  ADD_MAP(m, totalSize, "wheelConfig.distance", wheelConfig.distance, 0, DataTypeFloat, float);
724  ADD_MAP(m, totalSize, "wheelConfig.diameter", wheelConfig.diameter, 0, DataTypeFloat, float);
725  ADD_MAP(m, totalSize, "gpsMinimumElevation", gpsMinimumElevation, 0, DataTypeFloat, float);
726  ADD_MAP(m, totalSize, "ser2BaudRate", ser2BaudRate, 0, DataTypeUInt32, uint32_t);
727 
728  ASSERT_SIZE(totalSize);
729 }
730 
732 {
733  typedef evb_flash_cfg_t MAP_TYPE;
734  map_name_to_info_t& m = mappings[DID_EVB_FLASH_CFG];
735  uint32_t totalSize = 0;
736  ADD_MAP(m, totalSize, "size", size, 0, DataTypeUInt32, uint32_t);
737  ADD_MAP(m, totalSize, "checksum", checksum, 0, DataTypeUInt32, uint32_t);
738  ADD_MAP(m, totalSize, "key", key, 0, DataTypeUInt32, uint32_t);
739  ADD_MAP(m, totalSize, "cbPreset", cbPreset, 0, DataTypeUInt8, uint8_t);
740  ADD_MAP(m, totalSize, "reserved1[0]", reserved1[0], 0, DataTypeUInt8, uint8_t&);
741  ADD_MAP(m, totalSize, "reserved1[1]", reserved1[1], 0, DataTypeUInt8, uint8_t&);
742  ADD_MAP(m, totalSize, "reserved1[2]", reserved1[2], 0, DataTypeUInt8, uint8_t&);
743  ADD_MAP(m, totalSize, "cbf[0]", cbf[0], 0, DataTypeUInt32, uint32_t&);
744  ADD_MAP(m, totalSize, "cbf[1]", cbf[1], 0, DataTypeUInt32, uint32_t&);
745  ADD_MAP(m, totalSize, "cbf[2]", cbf[2], 0, DataTypeUInt32, uint32_t&);
746  ADD_MAP(m, totalSize, "cbf[3]", cbf[3], 0, DataTypeUInt32, uint32_t&);
747  ADD_MAP(m, totalSize, "cbf[4]", cbf[4], 0, DataTypeUInt32, uint32_t&);
748  ADD_MAP(m, totalSize, "cbf[5]", cbf[5], 0, DataTypeUInt32, uint32_t&);
749  ADD_MAP(m, totalSize, "cbf[6]", cbf[6], 0, DataTypeUInt32, uint32_t&);
750  ADD_MAP(m, totalSize, "cbf[7]", cbf[7], 0, DataTypeUInt32, uint32_t&);
751  ADD_MAP(m, totalSize, "cbf[8]", cbf[8], 0, DataTypeUInt32, uint32_t&);
752  ADD_MAP(m, totalSize, "cbf[9]", cbf[9], 0, DataTypeUInt32, uint32_t&);
753  ADD_MAP(m, totalSize, "cbOptions", cbOptions, 0, DataTypeUInt32, uint32_t);
754  ADD_MAP(m, totalSize, "bits", bits, 0, DataTypeUInt32, uint32_t);
755  ADD_MAP(m, totalSize, "radioPID", radioPID, 0, DataTypeUInt32, uint32_t);
756  ADD_MAP(m, totalSize, "radioNID", radioNID, 0, DataTypeUInt32, uint32_t);
757  ADD_MAP(m, totalSize, "radioPowerLevel", radioPowerLevel, 0, DataTypeUInt32, uint32_t);
758 
759  ADD_MAP(m, totalSize, "wifi[0].ssid", wifi[0].ssid, WIFI_SSID_PSK_SIZE, DataTypeString, char[WIFI_SSID_PSK_SIZE]);
760  ADD_MAP(m, totalSize, "wifi[0].psk", wifi[0].psk, WIFI_SSID_PSK_SIZE, DataTypeString, char[WIFI_SSID_PSK_SIZE]);
761  ADD_MAP(m, totalSize, "wifi[1].ssid", wifi[1].ssid, WIFI_SSID_PSK_SIZE, DataTypeString, char[WIFI_SSID_PSK_SIZE]);
762  ADD_MAP(m, totalSize, "wifi[1].psk", wifi[1].psk, WIFI_SSID_PSK_SIZE, DataTypeString, char[WIFI_SSID_PSK_SIZE]);
763  ADD_MAP(m, totalSize, "wifi[2].ssid", wifi[2].ssid, WIFI_SSID_PSK_SIZE, DataTypeString, char[WIFI_SSID_PSK_SIZE]);
764  ADD_MAP(m, totalSize, "wifi[2].psk", wifi[2].psk, WIFI_SSID_PSK_SIZE, DataTypeString, char[WIFI_SSID_PSK_SIZE]);
765  ADD_MAP(m, totalSize, "server[0].ipAddr[0]", server[0].ipAddr.u8[0], 0, DataTypeUInt8, uint8_t&);
766  ADD_MAP(m, totalSize, "server[0].ipAddr[1]", server[0].ipAddr.u8[1], 0, DataTypeUInt8, uint8_t&);
767  ADD_MAP(m, totalSize, "server[0].ipAddr[2]", server[0].ipAddr.u8[2], 0, DataTypeUInt8, uint8_t&);
768  ADD_MAP(m, totalSize, "server[0].ipAddr[3]", server[0].ipAddr.u8[3], 0, DataTypeUInt8, uint8_t&);
769  ADD_MAP(m, totalSize, "server[0].port", server[0].port, 0, DataTypeUInt32, uint32_t);
770  ADD_MAP(m, totalSize, "server[1].ipAddr[0]", server[1].ipAddr.u8[0], 0, DataTypeUInt8, uint8_t&);
771  ADD_MAP(m, totalSize, "server[1].ipAddr[1]", server[1].ipAddr.u8[1], 0, DataTypeUInt8, uint8_t&);
772  ADD_MAP(m, totalSize, "server[1].ipAddr[2]", server[1].ipAddr.u8[2], 0, DataTypeUInt8, uint8_t&);
773  ADD_MAP(m, totalSize, "server[1].ipAddr[3]", server[1].ipAddr.u8[3], 0, DataTypeUInt8, uint8_t&);
774  ADD_MAP(m, totalSize, "server[1].port", server[1].port, 0, DataTypeUInt32, uint32_t);
775  ADD_MAP(m, totalSize, "server[2].ipAddr[0]", server[2].ipAddr.u8[0], 0, DataTypeUInt8, uint8_t&);
776  ADD_MAP(m, totalSize, "server[2].ipAddr[1]", server[2].ipAddr.u8[1], 0, DataTypeUInt8, uint8_t&);
777  ADD_MAP(m, totalSize, "server[2].ipAddr[2]", server[2].ipAddr.u8[2], 0, DataTypeUInt8, uint8_t&);
778  ADD_MAP(m, totalSize, "server[2].ipAddr[3]", server[2].ipAddr.u8[3], 0, DataTypeUInt8, uint8_t&);
779  ADD_MAP(m, totalSize, "server[2].port", server[2].port, 0, DataTypeUInt32, uint32_t);
780 
781  ADD_MAP(m, totalSize, "encoderTickToWheelRad", encoderTickToWheelRad, 0, DataTypeFloat, float);
782  ADD_MAP(m, totalSize, "CANbaud_kbps", CANbaud_kbps, 0, DataTypeUInt32, uint32_t);
783  ADD_MAP(m, totalSize, "can_receive_address", can_receive_address, 0, DataTypeUInt32, uint32_t);
784  ADD_MAP(m, totalSize, "uinsComPort", uinsComPort, 0, DataTypeUInt8, uint8_t);
785  ADD_MAP(m, totalSize, "uinsAuxPort", uinsAuxPort, 0, DataTypeUInt8, uint8_t);
786  ADD_MAP(m, totalSize, "reserved2[0]", reserved2[0], 0, DataTypeUInt8, uint8_t&);
787  ADD_MAP(m, totalSize, "reserved2[1]", reserved2[1], 0, DataTypeUInt8, uint8_t&);
788  ADD_MAP(m, totalSize, "portOptions", portOptions, 0, DataTypeUInt32, uint32_t);
789 
790  ADD_MAP(m, totalSize, "h3sp330BaudRate", h3sp330BaudRate, 0, DataTypeUInt32, uint32_t);
791  ADD_MAP(m, totalSize, "h4xRadioBaudRate", h4xRadioBaudRate, 0, DataTypeUInt32, uint32_t);
792  ADD_MAP(m, totalSize, "h8gpioBaudRate", h8gpioBaudRate, 0, DataTypeUInt32, uint32_t);
793 
794  ASSERT_SIZE(totalSize);
795 }
796 
797 static void PopulateGpsRtkRelMappings(map_name_to_info_t mappings[DID_COUNT], uint32_t id)
798 {
799  typedef gps_rtk_rel_t MAP_TYPE;
800  map_name_to_info_t& m = mappings[id];
801  uint32_t totalSize = 0;
802  ADD_MAP(m, totalSize, "timeOfWeekMs", timeOfWeekMs, 0, DataTypeUInt32, uint32_t);
803  ADD_MAP(m, totalSize, "differentialAge", differentialAge, 0, DataTypeFloat, float);
804  ADD_MAP(m, totalSize, "arRatio", arRatio, 0, DataTypeFloat, float);
805  ADD_MAP(m, totalSize, "baseToRoverVector[0]", baseToRoverVector[0], 0, DataTypeFloat, float&);
806  ADD_MAP(m, totalSize, "baseToRoverVector[1]", baseToRoverVector[1], 0, DataTypeFloat, float&);
807  ADD_MAP(m, totalSize, "baseToRoverVector[2]", baseToRoverVector[2], 0, DataTypeFloat, float&);
808  ADD_MAP(m, totalSize, "baseToRoverDistance", baseToRoverDistance, 0, DataTypeFloat, float);
809  ADD_MAP(m, totalSize, "baseToRoverHeading", baseToRoverHeading, 0, DataTypeFloat, float);
810  ADD_MAP(m, totalSize, "baseToRoverHeadingAcc", baseToRoverHeadingAcc, 0, DataTypeFloat, float);
811  ADD_MAP(m, totalSize, "status", status, 0, DataTypeUInt32, uint32_t);
812 
813  ASSERT_SIZE(totalSize);
814 }
815 
816 static void PopulateGpsRtkMiscMappings(map_name_to_info_t mappings[DID_COUNT], uint32_t id)
817 {
818  typedef gps_rtk_misc_t MAP_TYPE;
819  map_name_to_info_t& m = mappings[id];
820  uint32_t totalSize = 0;
821  ADD_MAP(m, totalSize, "timeOfWeekMs", timeOfWeekMs, 0, DataTypeUInt32, uint32_t);
822  ADD_MAP(m, totalSize, "accuracyPos[0]", accuracyPos[0], 0, DataTypeFloat, float&);
823  ADD_MAP(m, totalSize, "accuracyPos[1]", accuracyPos[1], 0, DataTypeFloat, float&);
824  ADD_MAP(m, totalSize, "accuracyPos[2]", accuracyPos[2], 0, DataTypeFloat, float&);
825  ADD_MAP(m, totalSize, "accuracyCov[0]", accuracyCov[0], 0, DataTypeFloat, float&);
826  ADD_MAP(m, totalSize, "accuracyCov[1]", accuracyCov[1], 0, DataTypeFloat, float&);
827  ADD_MAP(m, totalSize, "accuracyCov[2]", accuracyCov[2], 0, DataTypeFloat, float&);
828  ADD_MAP(m, totalSize, "arThreshold", arThreshold, 0, DataTypeFloat, float);
829  ADD_MAP(m, totalSize, "gDop", gDop, 0, DataTypeFloat, float);
830  ADD_MAP(m, totalSize, "hDop", hDop, 0, DataTypeFloat, float);
831  ADD_MAP(m, totalSize, "vDop", vDop, 0, DataTypeFloat, float);
832  ADD_MAP(m, totalSize, "baseLla[0]", baseLla[0], 0, DataTypeDouble, double&);
833  ADD_MAP(m, totalSize, "baseLla[1]", baseLla[1], 0, DataTypeDouble, double&);
834  ADD_MAP(m, totalSize, "baseLla[2]", baseLla[2], 0, DataTypeDouble, double&);
835  ADD_MAP(m, totalSize, "cycleSlipCount", cycleSlipCount, 0, DataTypeUInt32, uint32_t);
836  ADD_MAP(m, totalSize, "roverGpsObservationCount", roverGpsObservationCount, 0, DataTypeUInt32, uint32_t);
837  ADD_MAP(m, totalSize, "baseGpsObservationCount", baseGpsObservationCount, 0, DataTypeUInt32, uint32_t);
838  ADD_MAP(m, totalSize, "roverGlonassObservationCount", roverGlonassObservationCount, 0, DataTypeUInt32, uint32_t);
839  ADD_MAP(m, totalSize, "baseGlonassObservationCount", baseGlonassObservationCount, 0, DataTypeUInt32, uint32_t);
840  ADD_MAP(m, totalSize, "roverGalileoObservationCount", roverGalileoObservationCount, 0, DataTypeUInt32, uint32_t);
841  ADD_MAP(m, totalSize, "baseGalileoObservationCount", baseGalileoObservationCount, 0, DataTypeUInt32, uint32_t);
842  ADD_MAP(m, totalSize, "roverBeidouObservationCount", roverBeidouObservationCount, 0, DataTypeUInt32, uint32_t);
843  ADD_MAP(m, totalSize, "baseBeidouObservationCount", baseBeidouObservationCount, 0, DataTypeUInt32, uint32_t);
844  ADD_MAP(m, totalSize, "roverQzsObservationCount", roverQzsObservationCount, 0, DataTypeUInt32, uint32_t);
845  ADD_MAP(m, totalSize, "baseQzsObservationCount", baseQzsObservationCount, 0, DataTypeUInt32, uint32_t);
846  ADD_MAP(m, totalSize, "roverGpsEphemerisCount", roverGpsEphemerisCount, 0, DataTypeUInt32, uint32_t);
847  ADD_MAP(m, totalSize, "baseGpsEphemerisCount", baseGpsEphemerisCount, 0, DataTypeUInt32, uint32_t);
848  ADD_MAP(m, totalSize, "roverGlonassEphemerisCount", roverGlonassEphemerisCount, 0, DataTypeUInt32, uint32_t);
849  ADD_MAP(m, totalSize, "baseGlonassEphemerisCount", baseGlonassEphemerisCount, 0, DataTypeUInt32, uint32_t);
850  ADD_MAP(m, totalSize, "roverGalileoEphemerisCount", roverGalileoEphemerisCount, 0, DataTypeUInt32, uint32_t);
851  ADD_MAP(m, totalSize, "baseGalileoEphemerisCount", baseGalileoEphemerisCount, 0, DataTypeUInt32, uint32_t);
852  ADD_MAP(m, totalSize, "roverBeidouEphemerisCount", roverBeidouEphemerisCount, 0, DataTypeUInt32, uint32_t);
853  ADD_MAP(m, totalSize, "baseBeidouEphemerisCount", baseBeidouEphemerisCount, 0, DataTypeUInt32, uint32_t);
854  ADD_MAP(m, totalSize, "roverQzsEphemerisCount", roverQzsEphemerisCount, 0, DataTypeUInt32, uint32_t);
855  ADD_MAP(m, totalSize, "baseQzsEphemerisCount", baseQzsEphemerisCount, 0, DataTypeUInt32, uint32_t);
856  ADD_MAP(m, totalSize, "roverSbasCount", roverSbasCount, 0, DataTypeUInt32, uint32_t);
857  ADD_MAP(m, totalSize, "baseSbasCount", baseSbasCount, 0, DataTypeUInt32, uint32_t);
858  ADD_MAP(m, totalSize, "baseAntennaCount", baseAntennaCount, 0, DataTypeUInt32, uint32_t);
859  ADD_MAP(m, totalSize, "ionUtcAlmCount", ionUtcAlmCount, 0, DataTypeUInt32, uint32_t);
860  ADD_MAP(m, totalSize, "correctionChecksumFailures", correctionChecksumFailures, 0, DataTypeUInt32, uint32_t);
861  ADD_MAP(m, totalSize, "timeToFirstFixMs", timeToFirstFixMs, 0, DataTypeUInt32, uint32_t);
862 
863  ASSERT_SIZE(totalSize);
864 }
865 
866 static void PopulateGpsRawMappings(map_name_to_info_t mappings[DID_COUNT], uint32_t id)
867 {
868  typedef gps_raw_t MAP_TYPE;
869  map_name_to_info_t& m = mappings[id];
870  uint32_t totalSize = 0;
871 
872  ADD_MAP(m, totalSize, "receiveIndex", receiverIndex, 0, DataTypeUInt8, uint8_t);
873  ADD_MAP(m, totalSize, "dataType", dataType, 0, DataTypeUInt8, uint8_t);
874  ADD_MAP(m, totalSize, "obsCount", obsCount, 0, DataTypeUInt8, uint8_t);
875  ADD_MAP(m, totalSize, "reserved", reserved, 0, DataTypeUInt8, uint8_t);
876  ADD_MAP(m, totalSize, "dataBuf", data.buf, 0, DataTypeBinary, uint8_t[MEMBERSIZE(MAP_TYPE, data.buf)]);
877 
878  ASSERT_SIZE(totalSize);
879 }
880 
882 {
883  typedef strobe_in_time_t MAP_TYPE;
884  map_name_to_info_t& m = mappings[DID_STROBE_IN_TIME];
885  uint32_t totalSize = 0;
886 
887  ADD_MAP(m, totalSize, "week", week, 0, DataTypeUInt32, uint32_t);
888  ADD_MAP(m, totalSize, "timeOfWeekMs", timeOfWeekMs, 0, DataTypeUInt32, uint32_t);
889  ADD_MAP(m, totalSize, "pin", pin, 0, DataTypeUInt32, uint32_t);
890  ADD_MAP(m, totalSize, "count", count, 0, DataTypeUInt32, uint32_t);
891 
892  ASSERT_SIZE(totalSize);
893 }
894 
896 {
897  typedef rtos_info_t MAP_TYPE;
898  map_name_to_info_t& m = mappings[DID_RTOS_INFO];
899  uint32_t totalSize = 0;
900 
901  ADD_MAP(m, totalSize, "name[0]", task[0].name, MAX_TASK_NAME_LEN, DataTypeString, char[MAX_TASK_NAME_LEN]);
902  ADD_MAP(m, totalSize, "priority[0]", task[0].priority, 0, DataTypeUInt32, uint32_t);
903  ADD_MAP(m, totalSize, "stackUnused[0]", task[0].stackUnused, 0, DataTypeUInt32, uint32_t);
904  ADD_MAP(m, totalSize, "periodMs[0]", task[0].periodMs, 0, DataTypeUInt32, uint32_t);
905  ADD_MAP(m, totalSize, "runTimeUs[0]", task[0].runTimeUs, 0, DataTypeUInt32, uint32_t);
906  ADD_MAP(m, totalSize, "maxRunTimeUs[0]", task[0].maxRunTimeUs, 0, DataTypeUInt32, uint32_t);
907  ADD_MAP(m, totalSize, "averageRunTimeUs[0]", task[0].averageRunTimeUs, 0, DataTypeFloat, float);
908  ADD_MAP(m, totalSize, "gapCount[0]", task[0].gapCount, 0, DataTypeUInt32, uint32_t);
909  ADD_MAP(m, totalSize, "cpuUsage[0]", task[0].cpuUsage, 0, DataTypeFloat, f_t);
910  ADD_MAP(m, totalSize, "handle[0]", task[0].handle, 0, DataTypeUInt32, uint32_t);
911 
912  ADD_MAP(m, totalSize, "name[1]", task[1].name, MAX_TASK_NAME_LEN, DataTypeString, char[MAX_TASK_NAME_LEN]);
913  ADD_MAP(m, totalSize, "priority[1]", task[1].priority, 0, DataTypeUInt32, uint32_t);
914  ADD_MAP(m, totalSize, "stackUnused[1]", task[1].stackUnused, 0, DataTypeUInt32, uint32_t);
915  ADD_MAP(m, totalSize, "periodMs[1]", task[1].periodMs, 0, DataTypeUInt32, uint32_t);
916  ADD_MAP(m, totalSize, "runTimeUs[1]", task[1].runTimeUs, 0, DataTypeUInt32, uint32_t);
917  ADD_MAP(m, totalSize, "maxRunTimeUs[1]", task[1].maxRunTimeUs, 0, DataTypeUInt32, uint32_t);
918  ADD_MAP(m, totalSize, "averageRunTimeUs[1]", task[1].averageRunTimeUs, 0, DataTypeFloat, float);
919  ADD_MAP(m, totalSize, "gapCount[1]", task[1].gapCount, 0, DataTypeUInt32, uint32_t);
920  ADD_MAP(m, totalSize, "cpuUsage[1]", task[1].cpuUsage, 0, DataTypeFloat, f_t);
921  ADD_MAP(m, totalSize, "handle[1]", task[1].handle, 0, DataTypeUInt32, uint32_t);
922 
923  ADD_MAP(m, totalSize, "name[2]", task[2].name, MAX_TASK_NAME_LEN, DataTypeString, char[MAX_TASK_NAME_LEN]);
924  ADD_MAP(m, totalSize, "priority[2]", task[2].priority, 0, DataTypeUInt32, uint32_t);
925  ADD_MAP(m, totalSize, "stackUnused[2]", task[2].stackUnused, 0, DataTypeUInt32, uint32_t);
926  ADD_MAP(m, totalSize, "periodMs[2]", task[2].periodMs, 0, DataTypeUInt32, uint32_t);
927  ADD_MAP(m, totalSize, "runTimeUs[2]", task[2].runTimeUs, 0, DataTypeUInt32, uint32_t);
928  ADD_MAP(m, totalSize, "maxRunTimeUs[2]", task[2].maxRunTimeUs, 0, DataTypeUInt32, uint32_t);
929  ADD_MAP(m, totalSize, "averageRunTimeUs[2]", task[2].averageRunTimeUs, 0, DataTypeFloat, float);
930  ADD_MAP(m, totalSize, "gapCount[2]", task[2].gapCount, 0, DataTypeUInt32, uint32_t);
931  ADD_MAP(m, totalSize, "cpuUsage[2]", task[2].cpuUsage, 0, DataTypeFloat, f_t);
932  ADD_MAP(m, totalSize, "handle[2]", task[2].handle, 0, DataTypeUInt32, uint32_t);
933 
934  ADD_MAP(m, totalSize, "name[3]", task[3].name, MAX_TASK_NAME_LEN, DataTypeString, char[MAX_TASK_NAME_LEN]);
935  ADD_MAP(m, totalSize, "priority[3]", task[3].priority, 0, DataTypeUInt32, uint32_t);
936  ADD_MAP(m, totalSize, "stackUnused[3]", task[3].stackUnused, 0, DataTypeUInt32, uint32_t);
937  ADD_MAP(m, totalSize, "periodMs[3]", task[3].periodMs, 0, DataTypeUInt32, uint32_t);
938  ADD_MAP(m, totalSize, "runTimeUs[3]", task[3].runTimeUs, 0, DataTypeUInt32, uint32_t);
939  ADD_MAP(m, totalSize, "maxRunTimeUs[3]", task[3].maxRunTimeUs, 0, DataTypeUInt32, uint32_t);
940  ADD_MAP(m, totalSize, "averageRunTimeUs[3]", task[3].averageRunTimeUs, 0, DataTypeFloat, float);
941  ADD_MAP(m, totalSize, "gapCount[3]", task[3].gapCount, 0, DataTypeUInt32, uint32_t);
942  ADD_MAP(m, totalSize, "cpuUsage[3]", task[3].cpuUsage, 0, DataTypeFloat, f_t);
943  ADD_MAP(m, totalSize, "handle[3]", task[3].handle, 0, DataTypeUInt32, uint32_t);
944 
945  ADD_MAP(m, totalSize, "name[4]", task[4].name, MAX_TASK_NAME_LEN, DataTypeString, char[MAX_TASK_NAME_LEN]);
946  ADD_MAP(m, totalSize, "priority[4]", task[4].priority, 0, DataTypeUInt32, uint32_t);
947  ADD_MAP(m, totalSize, "stackUnused[4]", task[4].stackUnused, 0, DataTypeUInt32, uint32_t);
948  ADD_MAP(m, totalSize, "periodMs[4]", task[4].periodMs, 0, DataTypeUInt32, uint32_t);
949  ADD_MAP(m, totalSize, "runTimeUs[4]", task[4].runTimeUs, 0, DataTypeUInt32, uint32_t);
950  ADD_MAP(m, totalSize, "maxRunTimeUs[4]", task[4].maxRunTimeUs, 0, DataTypeUInt32, uint32_t);
951  ADD_MAP(m, totalSize, "averageRunTimeUs[4]", task[4].averageRunTimeUs, 0, DataTypeFloat, float);
952  ADD_MAP(m, totalSize, "gapCount[4]", task[4].gapCount, 0, DataTypeUInt32, uint32_t);
953  ADD_MAP(m, totalSize, "cpuUsage[4]", task[4].cpuUsage, 0, DataTypeFloat, f_t);
954  ADD_MAP(m, totalSize, "handle[4]", task[4].handle, 0, DataTypeUInt32, uint32_t);
955 
956  ADD_MAP(m, totalSize, "name[5]", task[5].name, MAX_TASK_NAME_LEN, DataTypeString, char[MAX_TASK_NAME_LEN]);
957  ADD_MAP(m, totalSize, "priority[5]", task[5].priority, 0, DataTypeUInt32, uint32_t);
958  ADD_MAP(m, totalSize, "stackUnused[5]", task[5].stackUnused, 0, DataTypeUInt32, uint32_t);
959  ADD_MAP(m, totalSize, "periodMs[5]", task[5].periodMs, 0, DataTypeUInt32, uint32_t);
960  ADD_MAP(m, totalSize, "runTimeUs[5]", task[5].runTimeUs, 0, DataTypeUInt32, uint32_t);
961  ADD_MAP(m, totalSize, "maxRunTimeUs[5]", task[5].maxRunTimeUs, 0, DataTypeUInt32, uint32_t);
962  ADD_MAP(m, totalSize, "averageRunTimeUs[5]", task[5].averageRunTimeUs, 0, DataTypeFloat, float);
963  ADD_MAP(m, totalSize, "gapCount[5]", task[5].gapCount, 0, DataTypeUInt32, uint32_t);
964  ADD_MAP(m, totalSize, "cpuUsage[5]", task[5].cpuUsage, 0, DataTypeFloat, f_t);
965  ADD_MAP(m, totalSize, "handle[5]", task[5].handle, 0, DataTypeUInt32, uint32_t);
966 
967  ADD_MAP(m, totalSize, "freeHeapSize", freeHeapSize, 0, DataTypeUInt32, uint32_t);
968  ADD_MAP(m, totalSize, "mallocSize", mallocSize, 0, DataTypeUInt32, uint32_t);
969  ADD_MAP(m, totalSize, "freeSize", freeSize, 0, DataTypeUInt32, uint32_t);
970 
971  ASSERT_SIZE(totalSize);
972 }
974 {
975  typedef can_config_t MAP_TYPE;
976  map_name_to_info_t& m = mappings[DID_CAN_CONFIG];
977  uint32_t totalSize = 0;
978  ADD_MAP(m, totalSize, "can_period_mult[CID_INS_TIME]", can_period_mult[CID_INS_TIME], 0, DataTypeUInt32, uint32_t&);
979  ADD_MAP(m, totalSize, "can_period_mult[CID_INS_STATUS]", can_period_mult[CID_INS_STATUS], 0, DataTypeUInt32, uint32_t&);
980  ADD_MAP(m, totalSize, "can_period_mult[CID_INS_EULER]", can_period_mult[CID_INS_EULER], 0, DataTypeUInt32, uint32_t&);
981  ADD_MAP(m, totalSize, "can_period_mult[CID_INS_QUATN2B]", can_period_mult[CID_INS_QUATN2B], 0, DataTypeUInt32, uint32_t&);
982  ADD_MAP(m, totalSize, "can_period_mult[CID_INS_QUATE2B]", can_period_mult[CID_INS_QUATE2B], 0, DataTypeUInt32, uint32_t&);
983  ADD_MAP(m, totalSize, "can_period_mult[CID_INS_UVW]", can_period_mult[CID_INS_UVW], 0, DataTypeUInt32, uint32_t&);
984  ADD_MAP(m, totalSize, "can_period_mult[CID_INS_VE]", can_period_mult[CID_INS_VE], 0, DataTypeUInt32, uint32_t&);
985  ADD_MAP(m, totalSize, "can_period_mult[CID_INS_LAT]", can_period_mult[CID_INS_LAT], 0, DataTypeUInt32, uint32_t&);
986  ADD_MAP(m, totalSize, "can_period_mult[CID_INS_LON]", can_period_mult[CID_INS_LON], 0, DataTypeUInt32, uint32_t&);
987  ADD_MAP(m, totalSize, "can_period_mult[CID_INS_ALT]", can_period_mult[CID_INS_ALT], 0, DataTypeUInt32, uint32_t&);
988  ADD_MAP(m, totalSize, "can_period_mult[CID_INS_NORTH_EAST]", can_period_mult[CID_INS_NORTH_EAST], 0, DataTypeUInt32, uint32_t&);
989  ADD_MAP(m, totalSize, "can_period_mult[CID_INS_DOWN]", can_period_mult[CID_INS_DOWN], 0, DataTypeUInt32, uint32_t&);
990  ADD_MAP(m, totalSize, "can_period_mult[CID_INS_ECEF_X]", can_period_mult[CID_INS_ECEF_X], 0, DataTypeUInt32, uint32_t&);
991  ADD_MAP(m, totalSize, "can_period_mult[CID_INS_ECEF_Y]", can_period_mult[CID_INS_ECEF_Y], 0, DataTypeUInt32, uint32_t&);
992  ADD_MAP(m, totalSize, "can_period_mult[CID_INS_ECEF_Z]", can_period_mult[CID_INS_ECEF_Z], 0, DataTypeUInt32, uint32_t&);
993  ADD_MAP(m, totalSize, "can_period_mult[CID_INS_MSL]", can_period_mult[CID_INS_MSL], 0, DataTypeUInt32, uint32_t&);
994  ADD_MAP(m, totalSize, "can_period_mult[CID_PREINT_PX]", can_period_mult[CID_PREINT_PX], 0, DataTypeUInt32, uint32_t&);
995  ADD_MAP(m, totalSize, "can_period_mult[CID_PREINT_QY]", can_period_mult[CID_PREINT_QY], 0, DataTypeUInt32, uint32_t&);
996  ADD_MAP(m, totalSize, "can_period_mult[CID_PREINT_RZ]", can_period_mult[CID_PREINT_RZ], 0, DataTypeUInt32, uint32_t&);
997  ADD_MAP(m, totalSize, "can_period_mult[CID_DUAL_PX]", can_period_mult[CID_DUAL_PX], 0, DataTypeUInt32, uint32_t&);
998  ADD_MAP(m, totalSize, "can_period_mult[CID_DUAL_QY]", can_period_mult[CID_DUAL_QY], 0, DataTypeUInt32, uint32_t&);
999  ADD_MAP(m, totalSize, "can_period_mult[CID_DUAL_RZ]", can_period_mult[CID_DUAL_RZ], 0, DataTypeUInt32, uint32_t&);
1000  ADD_MAP(m, totalSize, "can_period_mult[CID_GPS1_POS]", can_period_mult[CID_GPS1_POS], 0, DataTypeUInt32, uint32_t&);
1001  ADD_MAP(m, totalSize, "can_period_mult[CID_ROLL_ROLLRATE]", can_period_mult[CID_ROLL_ROLLRATE], 0, DataTypeUInt32, uint32_t&);
1002  ADD_MAP(m, totalSize, "can_period_mult[CID_GPS1_RTK_REL]", can_period_mult[CID_GPS1_RTK_REL], 0, DataTypeUInt32, uint32_t&);
1003  ADD_MAP(m, totalSize, "can_transmit_address[CID_INS_TIME]", can_transmit_address[CID_INS_TIME], 0, DataTypeUInt32, uint32_t&);
1004  ADD_MAP(m, totalSize, "can_transmit_address[CID_INS_STATUS]", can_transmit_address[CID_INS_STATUS], 0, DataTypeUInt32, uint32_t&);
1005  ADD_MAP(m, totalSize, "can_transmit_address[CID_INS_EULER]", can_transmit_address[CID_INS_EULER], 0, DataTypeUInt32, uint32_t&);
1006  ADD_MAP(m, totalSize, "can_transmit_address[CID_INS_QUATN2B]", can_transmit_address[CID_INS_QUATN2B], 0, DataTypeUInt32, uint32_t&);
1007  ADD_MAP(m, totalSize, "can_transmit_address[CID_INS_QUATE2B]", can_transmit_address[CID_INS_QUATE2B], 0, DataTypeUInt32, uint32_t&);
1008  ADD_MAP(m, totalSize, "can_transmit_address[CID_INS_UVW]", can_transmit_address[CID_INS_UVW], 0, DataTypeUInt32, uint32_t&);
1009  ADD_MAP(m, totalSize, "can_transmit_address[CID_INS_VE]", can_transmit_address[CID_INS_VE], 0, DataTypeUInt32, uint32_t&);
1010  ADD_MAP(m, totalSize, "can_transmit_address[CID_INS_LAT]", can_transmit_address[CID_INS_LAT], 0, DataTypeUInt32, uint32_t&);
1011  ADD_MAP(m, totalSize, "can_transmit_address[CID_INS_LON]", can_transmit_address[CID_INS_LON], 0, DataTypeUInt32, uint32_t&);
1012  ADD_MAP(m, totalSize, "can_transmit_address[CID_INS_ALT]", can_transmit_address[CID_INS_ALT], 0, DataTypeUInt32, uint32_t&);
1013  ADD_MAP(m, totalSize, "can_transmit_address[CID_INS_NORTH_EAST]", can_transmit_address[CID_INS_NORTH_EAST], 0, DataTypeUInt32, uint32_t&);
1014  ADD_MAP(m, totalSize, "can_transmit_address[CID_INS_DOWN]", can_transmit_address[CID_INS_DOWN], 0, DataTypeUInt32, uint32_t&);
1015  ADD_MAP(m, totalSize, "can_transmit_address[CID_INS_ECEF_X]", can_transmit_address[CID_INS_ECEF_X], 0, DataTypeUInt32, uint32_t&);
1016  ADD_MAP(m, totalSize, "can_transmit_address[CID_INS_ECEF_Y]", can_transmit_address[CID_INS_ECEF_Y], 0, DataTypeUInt32, uint32_t&);
1017  ADD_MAP(m, totalSize, "can_transmit_address[CID_INS_ECEF_Z]", can_transmit_address[CID_INS_ECEF_Z], 0, DataTypeUInt32, uint32_t&);
1018  ADD_MAP(m, totalSize, "can_transmit_address[CID_INS_MSL]", can_transmit_address[CID_INS_MSL], 0, DataTypeUInt32, uint32_t&);
1019  ADD_MAP(m, totalSize, "can_transmit_address[CID_PREINT_PX]", can_transmit_address[CID_PREINT_PX], 0, DataTypeUInt32, uint32_t&);
1020  ADD_MAP(m, totalSize, "can_transmit_address[CID_PREINT_QY]", can_transmit_address[CID_PREINT_QY], 0, DataTypeUInt32, uint32_t&);
1021  ADD_MAP(m, totalSize, "can_transmit_address[CID_PREINT_RZ]", can_transmit_address[CID_PREINT_RZ], 0, DataTypeUInt32, uint32_t&);
1022  ADD_MAP(m, totalSize, "can_transmit_address[CID_DUAL_PX]", can_transmit_address[CID_DUAL_PX], 0, DataTypeUInt32, uint32_t&);
1023  ADD_MAP(m, totalSize, "can_transmit_address[CID_DUAL_QY]", can_transmit_address[CID_DUAL_QY], 0, DataTypeUInt32, uint32_t&);
1024  ADD_MAP(m, totalSize, "can_transmit_address[CID_DUAL_RZ]", can_transmit_address[CID_DUAL_RZ], 0, DataTypeUInt32, uint32_t&);
1025  ADD_MAP(m, totalSize, "can_transmit_address[CID_GPS1_POS]", can_transmit_address[CID_GPS1_POS], 0, DataTypeUInt32, uint32_t&);
1026  ADD_MAP(m, totalSize, "can_transmit_address[CID_GPS1_RTK_REL]", can_transmit_address[CID_GPS1_RTK_REL], 0, DataTypeUInt32, uint32_t&);
1027  ADD_MAP(m, totalSize, "can_transmit_address[CID_ROLL_ROLLRATE]", can_transmit_address[CID_ROLL_ROLLRATE], 0, DataTypeUInt32, uint32_t&);
1028  ADD_MAP(m, totalSize, "can_baudrate_kbps", can_baudrate_kbps, 0, DataTypeUInt32, uint32_t);
1029  ADD_MAP(m, totalSize, "can_receive_address", can_receive_address, 0, DataTypeUInt32, uint32_t);
1030 
1031  ASSERT_SIZE(totalSize);
1032 }
1033 
1035 {
1036  typedef diag_msg_t MAP_TYPE;
1038  uint32_t totalSize = 0;
1039  ADD_MAP(m, totalSize, "timeOfWeekMs", timeOfWeekMs, 0, DataTypeUInt32, uint32_t);
1040  ADD_MAP(m, totalSize, "messageLength", messageLength, 0, DataTypeUInt32, uint32_t);
1041  ADD_MAP(m, totalSize, "message", message, MEMBERSIZE(diag_msg_t, message), DataTypeString, char[MEMBERSIZE(diag_msg_t, message)]);
1042 
1043  ASSERT_SIZE(totalSize);
1044 }
1045 
1046 #ifdef USE_IS_INTERNAL
1047 
1048 static void PopulateSensorsADCMappings(map_name_to_info_t mappings[DID_COUNT])
1049 {
1050  typedef sys_sensors_adc_t MAP_TYPE;
1051  map_name_to_info_t& m = mappings[DID_SENSORS_ADC];
1052  uint32_t totalSize = 0;
1053  ADD_MAP(m, totalSize, "time", time, 0, DataTypeDouble, double);
1054  ADD_MAP(m, totalSize, "pqr1[0]", mpu[0].pqr[0], 0, DataTypeFloat, float&);
1055  ADD_MAP(m, totalSize, "pqr1[1]", mpu[0].pqr[1], 0, DataTypeFloat, float&);
1056  ADD_MAP(m, totalSize, "pqr1[2]", mpu[0].pqr[2], 0, DataTypeFloat, float&);
1057  ADD_MAP(m, totalSize, "acc1[0]", mpu[0].acc[0], 0, DataTypeFloat, float&);
1058  ADD_MAP(m, totalSize, "acc1[1]", mpu[0].acc[1], 0, DataTypeFloat, float&);
1059  ADD_MAP(m, totalSize, "acc1[2]", mpu[0].acc[2], 0, DataTypeFloat, float&);
1060  ADD_MAP(m, totalSize, "mag1[0]", mpu[0].mag[0], 0, DataTypeFloat, float&);
1061  ADD_MAP(m, totalSize, "mag1[1]", mpu[0].mag[1], 0, DataTypeFloat, float&);
1062  ADD_MAP(m, totalSize, "mag1[2]", mpu[0].mag[2], 0, DataTypeFloat, float&);
1063  ADD_MAP(m, totalSize, "temp1", mpu[0].temp, 0, DataTypeFloat, float);
1064  ADD_MAP(m, totalSize, "pqr2[0]", mpu[1].pqr[0], 0, DataTypeFloat, float&);
1065  ADD_MAP(m, totalSize, "pqr2[1]", mpu[1].pqr[1], 0, DataTypeFloat, float&);
1066  ADD_MAP(m, totalSize, "pqr2[2]", mpu[1].pqr[2], 0, DataTypeFloat, float&);
1067  ADD_MAP(m, totalSize, "acc2[0]", mpu[1].acc[0], 0, DataTypeFloat, float&);
1068  ADD_MAP(m, totalSize, "acc2[1]", mpu[1].acc[1], 0, DataTypeFloat, float&);
1069  ADD_MAP(m, totalSize, "acc2[2]", mpu[1].acc[2], 0, DataTypeFloat, float&);
1070  ADD_MAP(m, totalSize, "mag2[0]", mpu[1].mag[0], 0, DataTypeFloat, float&);
1071  ADD_MAP(m, totalSize, "mag2[1]", mpu[1].mag[1], 0, DataTypeFloat, float&);
1072  ADD_MAP(m, totalSize, "mag2[2]", mpu[1].mag[2], 0, DataTypeFloat, float&);
1073  ADD_MAP(m, totalSize, "temp2", mpu[1].temp, 0, DataTypeFloat, float);
1074  ADD_MAP(m, totalSize, "bar", bar, 0, DataTypeFloat, float);
1075  ADD_MAP(m, totalSize, "barTemp", barTemp, 0, DataTypeFloat, float);
1076  ADD_MAP(m, totalSize, "humidity", humidity, 0, DataTypeFloat, float);
1077  ADD_MAP(m, totalSize, "ana[0]", ana[0], 0, DataTypeFloat, float&);
1078  ADD_MAP(m, totalSize, "ana[1]", ana[1], 0, DataTypeFloat, float&);
1079  ADD_MAP(m, totalSize, "ana[2]", ana[2], 0, DataTypeFloat, float&);
1080  ADD_MAP(m, totalSize, "ana[3]", ana[3], 0, DataTypeFloat, float&);
1081 
1082  ASSERT_SIZE(totalSize);
1083 }
1084 
1085 static void PopulateSensorsISMappings(map_name_to_info_t mappings[DID_COUNT], uint32_t id)
1086 {
1087  typedef sensors_w_temp_t MAP_TYPE;
1088  map_name_to_info_t& m = mappings[id];
1089  uint32_t totalSize = 0;
1090  ADD_MAP(m, totalSize, "pqr1[0]", mpu[0].pqr[0], 0, DataTypeFloat, float&);
1091  ADD_MAP(m, totalSize, "pqr1[1]", mpu[0].pqr[1], 0, DataTypeFloat, float&);
1092  ADD_MAP(m, totalSize, "pqr1[2]", mpu[0].pqr[2], 0, DataTypeFloat, float&);
1093  ADD_MAP(m, totalSize, "acc1[0]", mpu[0].acc[0], 0, DataTypeFloat, float&);
1094  ADD_MAP(m, totalSize, "acc1[1]", mpu[0].acc[1], 0, DataTypeFloat, float&);
1095  ADD_MAP(m, totalSize, "acc1[2]", mpu[0].acc[2], 0, DataTypeFloat, float&);
1096  ADD_MAP(m, totalSize, "mag1[0]", mpu[0].mag[0], 0, DataTypeFloat, float&);
1097  ADD_MAP(m, totalSize, "mag1[1]", mpu[0].mag[1], 0, DataTypeFloat, float&);
1098  ADD_MAP(m, totalSize, "mag1[2]", mpu[0].mag[2], 0, DataTypeFloat, float&);
1099  ADD_MAP(m, totalSize, "temp1", mpu[0].temp, 0, DataTypeFloat, float);
1100  ADD_MAP(m, totalSize, "pqr2[0]", mpu[1].pqr[0], 0, DataTypeFloat, float&);
1101  ADD_MAP(m, totalSize, "pqr2[1]", mpu[1].pqr[1], 0, DataTypeFloat, float&);
1102  ADD_MAP(m, totalSize, "pqr2[2]", mpu[1].pqr[2], 0, DataTypeFloat, float&);
1103  ADD_MAP(m, totalSize, "acc2[0]", mpu[1].acc[0], 0, DataTypeFloat, float&);
1104  ADD_MAP(m, totalSize, "acc2[1]", mpu[1].acc[1], 0, DataTypeFloat, float&);
1105  ADD_MAP(m, totalSize, "acc2[2]", mpu[1].acc[2], 0, DataTypeFloat, float&);
1106  ADD_MAP(m, totalSize, "mag2[0]", mpu[1].mag[0], 0, DataTypeFloat, float&);
1107  ADD_MAP(m, totalSize, "mag2[1]", mpu[1].mag[1], 0, DataTypeFloat, float&);
1108  ADD_MAP(m, totalSize, "mag2[2]", mpu[1].mag[2], 0, DataTypeFloat, float&);
1109  ADD_MAP(m, totalSize, "temp2", mpu[1].temp, 0, DataTypeFloat, float);
1110 
1111  ASSERT_SIZE(totalSize);
1112 }
1113 
1114 static void PopulateSensorsTCMappings(map_name_to_info_t mappings[DID_COUNT])
1115 {
1116  typedef sensors_t MAP_TYPE;
1117  map_name_to_info_t& m = mappings[DID_SENSORS_TC_BIAS];
1118  uint32_t totalSize = 0;
1119  ADD_MAP(m, totalSize, "pqr1[0]", mpu[0].pqr[0], 0, DataTypeFloat, float&);
1120  ADD_MAP(m, totalSize, "pqr1[1]", mpu[0].pqr[1], 0, DataTypeFloat, float&);
1121  ADD_MAP(m, totalSize, "pqr1[2]", mpu[0].pqr[2], 0, DataTypeFloat, float&);
1122  ADD_MAP(m, totalSize, "acc1[0]", mpu[0].acc[0], 0, DataTypeFloat, float&);
1123  ADD_MAP(m, totalSize, "acc1[1]", mpu[0].acc[1], 0, DataTypeFloat, float&);
1124  ADD_MAP(m, totalSize, "acc1[2]", mpu[0].acc[2], 0, DataTypeFloat, float&);
1125  ADD_MAP(m, totalSize, "mag1[0]", mpu[0].mag[0], 0, DataTypeFloat, float&);
1126  ADD_MAP(m, totalSize, "mag1[1]", mpu[0].mag[1], 0, DataTypeFloat, float&);
1127  ADD_MAP(m, totalSize, "mag1[2]", mpu[0].mag[2], 0, DataTypeFloat, float&);
1128  ADD_MAP(m, totalSize, "pqr2[0]", mpu[1].pqr[0], 0, DataTypeFloat, float&);
1129  ADD_MAP(m, totalSize, "pqr2[1]", mpu[1].pqr[1], 0, DataTypeFloat, float&);
1130  ADD_MAP(m, totalSize, "pqr2[2]", mpu[1].pqr[2], 0, DataTypeFloat, float&);
1131  ADD_MAP(m, totalSize, "acc2[0]", mpu[1].acc[0], 0, DataTypeFloat, float&);
1132  ADD_MAP(m, totalSize, "acc2[1]", mpu[1].acc[1], 0, DataTypeFloat, float&);
1133  ADD_MAP(m, totalSize, "acc2[2]", mpu[1].acc[2], 0, DataTypeFloat, float&);
1134  ADD_MAP(m, totalSize, "mag2[0]", mpu[1].mag[0], 0, DataTypeFloat, float&);
1135  ADD_MAP(m, totalSize, "mag2[1]", mpu[1].mag[1], 0, DataTypeFloat, float&);
1136  ADD_MAP(m, totalSize, "mag2[2]", mpu[1].mag[2], 0, DataTypeFloat, float&);
1137 
1138  ASSERT_SIZE(totalSize);
1139 }
1140 
1141 static void PopulateSensorsCompMappings(map_name_to_info_t mappings[DID_COUNT])
1142 {
1143  typedef sensor_compensation_t MAP_TYPE;
1144  map_name_to_info_t& m = mappings[DID_SCOMP];
1145  uint32_t totalSize = 0;
1146  ADD_MAP(m, totalSize, "pqr1[0]", mpu[0].lpfLsb.pqr[0], 0, DataTypeFloat, float&);
1147  ADD_MAP(m, totalSize, "pqr1[1]", mpu[0].lpfLsb.pqr[1], 0, DataTypeFloat, float&);
1148  ADD_MAP(m, totalSize, "pqr1[2]", mpu[0].lpfLsb.pqr[2], 0, DataTypeFloat, float&);
1149  ADD_MAP(m, totalSize, "acc1[0]", mpu[0].lpfLsb.acc[0], 0, DataTypeFloat, float&);
1150  ADD_MAP(m, totalSize, "acc1[1]", mpu[0].lpfLsb.acc[1], 0, DataTypeFloat, float&);
1151  ADD_MAP(m, totalSize, "acc1[2]", mpu[0].lpfLsb.acc[2], 0, DataTypeFloat, float&);
1152  ADD_MAP(m, totalSize, "mag1[0]", mpu[0].lpfLsb.mag[0], 0, DataTypeFloat, float&);
1153  ADD_MAP(m, totalSize, "mag1[1]", mpu[0].lpfLsb.mag[1], 0, DataTypeFloat, float&);
1154  ADD_MAP(m, totalSize, "mag1[2]", mpu[0].lpfLsb.mag[2], 0, DataTypeFloat, float&);
1155  ADD_MAP(m, totalSize, "temp1", mpu[0].lpfLsb.temp, 0, DataTypeFloat, float);
1156  ADD_MAP(m, totalSize, "temp2", mpu[0].temp, 0, DataTypeFloat, float);
1157  ADD_MAP(m, totalSize, "tempRampRate1", mpu[0].tempRampRate, 0, DataTypeFloat, float);
1158  ADD_MAP(m, totalSize, "tci1", mpu[0].tci, 0, DataTypeUInt32, uint32_t);
1159  ADD_MAP(m, totalSize, "numTcPts1", mpu[0].numTcPts, 0, DataTypeUInt32, uint32_t);
1160  ADD_MAP(m, totalSize, "dtTemp1", mpu[0].dtTemp, 0, DataTypeFloat, float);
1161  ADD_MAP(m, totalSize, "pqr2[0]", mpu[1].lpfLsb.pqr[0], 0, DataTypeFloat, float&);
1162  ADD_MAP(m, totalSize, "pqr2[1]", mpu[1].lpfLsb.pqr[1], 0, DataTypeFloat, float&);
1163  ADD_MAP(m, totalSize, "pqr2[2]", mpu[1].lpfLsb.pqr[2], 0, DataTypeFloat, float&);
1164  ADD_MAP(m, totalSize, "acc2[0]", mpu[1].lpfLsb.acc[0], 0, DataTypeFloat, float&);
1165  ADD_MAP(m, totalSize, "acc2[1]", mpu[1].lpfLsb.acc[1], 0, DataTypeFloat, float&);
1166  ADD_MAP(m, totalSize, "acc2[2]", mpu[1].lpfLsb.acc[2], 0, DataTypeFloat, float&);
1167  ADD_MAP(m, totalSize, "mag2[0]", mpu[1].lpfLsb.mag[0], 0, DataTypeFloat, float&);
1168  ADD_MAP(m, totalSize, "mag2[1]", mpu[1].lpfLsb.mag[1], 0, DataTypeFloat, float&);
1169  ADD_MAP(m, totalSize, "mag2[2]", mpu[1].lpfLsb.mag[2], 0, DataTypeFloat, float&);
1170  ADD_MAP(m, totalSize, "temp3", mpu[1].lpfLsb.temp, 0, DataTypeFloat, float);
1171  ADD_MAP(m, totalSize, "temp4", mpu[1].temp, 0, DataTypeFloat, float);
1172  ADD_MAP(m, totalSize, "tempRampRate2", mpu[1].tempRampRate, 0, DataTypeFloat, float);
1173  ADD_MAP(m, totalSize, "tci2", mpu[1].tci, 0, DataTypeUInt32, uint32_t);
1174  ADD_MAP(m, totalSize, "numTcPts2", mpu[1].numTcPts, 0, DataTypeUInt32, uint32_t);
1175  ADD_MAP(m, totalSize, "dtTemp2", mpu[1].dtTemp, 0, DataTypeFloat, float);
1176  ADD_MAP(m, totalSize, "sampleCount", sampleCount, 0, DataTypeUInt32, uint32_t);
1177  ADD_MAP(m, totalSize, "calState", calState, 0, DataTypeUInt32, uint32_t);
1178  ADD_MAP(m, totalSize, "alignAccel[0]", alignAccel[0], 0, DataTypeFloat, float&);
1179  ADD_MAP(m, totalSize, "alignAccel[1]", alignAccel[1], 0, DataTypeFloat, float&);
1180  ADD_MAP(m, totalSize, "alignAccel[2]", alignAccel[2], 0, DataTypeFloat, float&);
1181  ADD_MAP(m, totalSize, "status", status, 0, DataTypeUInt32, uint32_t);
1182 
1183  ASSERT_SIZE(totalSize);
1184 }
1185 
1186 static void PopulateDebugArrayMappings(map_name_to_info_t mappings[DID_COUNT])
1187 {
1188  typedef debug_array_t MAP_TYPE;
1189  map_name_to_info_t& m = mappings[DID_DEBUG_ARRAY];
1190  uint32_t totalSize = 0;
1191  ADD_MAP(m, totalSize, "i[0]", i[0], 0, DataTypeInt32, int32_t&);
1192  ADD_MAP(m, totalSize, "i[1]", i[1], 0, DataTypeInt32, int32_t&);
1193  ADD_MAP(m, totalSize, "i[2]", i[2], 0, DataTypeInt32, int32_t&);
1194  ADD_MAP(m, totalSize, "i[3]", i[3], 0, DataTypeInt32, int32_t&);
1195  ADD_MAP(m, totalSize, "i[4]", i[4], 0, DataTypeInt32, int32_t&);
1196  ADD_MAP(m, totalSize, "i[5]", i[5], 0, DataTypeInt32, int32_t&);
1197  ADD_MAP(m, totalSize, "i[6]", i[6], 0, DataTypeInt32, int32_t&);
1198  ADD_MAP(m, totalSize, "i[7]", i[7], 0, DataTypeInt32, int32_t&);
1199  ADD_MAP(m, totalSize, "i[8]", i[8], 0, DataTypeInt32, int32_t&);
1200  ADD_MAP(m, totalSize, "f[0]", f[0], 0, DataTypeFloat, float&);
1201  ADD_MAP(m, totalSize, "f[1]", f[1], 0, DataTypeFloat, float&);
1202  ADD_MAP(m, totalSize, "f[2]", f[2], 0, DataTypeFloat, float&);
1203  ADD_MAP(m, totalSize, "f[3]", f[3], 0, DataTypeFloat, float&);
1204  ADD_MAP(m, totalSize, "f[4]", f[4], 0, DataTypeFloat, float&);
1205  ADD_MAP(m, totalSize, "f[5]", f[5], 0, DataTypeFloat, float&);
1206  ADD_MAP(m, totalSize, "f[6]", f[6], 0, DataTypeFloat, float&);
1207  ADD_MAP(m, totalSize, "f[7]", f[7], 0, DataTypeFloat, float&);
1208  ADD_MAP(m, totalSize, "f[8]", f[8], 0, DataTypeFloat, float&);
1209  ADD_MAP(m, totalSize, "lf[0]", lf[0], 0, DataTypeDouble, double&);
1210  ADD_MAP(m, totalSize, "lf[1]", lf[1], 0, DataTypeDouble, double&);
1211  ADD_MAP(m, totalSize, "lf[2]", lf[2], 0, DataTypeDouble, double&);
1212 
1213  ASSERT_SIZE(totalSize);
1214 }
1215 
1216 static void PopulateUserPage0Mappings(map_name_to_info_t mappings[DID_COUNT])
1217 {
1218  typedef nvm_group_0_t MAP_TYPE;
1219  map_name_to_info_t& m = mappings[DID_NVR_USERPAGE_G0];
1220  uint32_t totalSize = 0;
1221  ADD_MAP(m, totalSize, "size", size, 0, DataTypeUInt32, uint32_t);
1222  ADD_MAP(m, totalSize, "checksum", checksum, 0, DataTypeUInt32, uint32_t);
1223  ADD_MAP(m, totalSize, "key", key, 0, DataTypeUInt32, uint32_t);
1224  ADD_MAP(m, totalSize, "lockBits", lockBits, 0, DataTypeUInt32, uint32_t);
1225  ADD_MAP(m, totalSize, "featureBits", featureBits, 0, DataTypeUInt32, uint32_t);
1226  ADD_MAP(m, totalSize, "featureHash1", featureHash1, 0, DataTypeUInt32, uint32_t);
1227  ADD_MAP(m, totalSize, "featureHash2", featureHash2, 0, DataTypeUInt32, uint32_t);
1228 
1229  ASSERT_SIZE(totalSize);
1230 }
1231 
1232 static void PopulateUserPage1Mappings(map_name_to_info_t mappings[DID_COUNT])
1233 {
1234  typedef nvm_group_1_t MAP_TYPE;
1235  map_name_to_info_t& m = mappings[DID_NVR_USERPAGE_G1];
1236  uint32_t totalSize = 0;
1237  ADD_MAP(m, totalSize, "size", size, 0, DataTypeUInt32, uint32_t);
1238  ADD_MAP(m, totalSize, "checksum", checksum, 0, DataTypeUInt32, uint32_t);
1239  ADD_MAP(m, totalSize, "key", key, 0, DataTypeUInt32, uint32_t);
1240  ADD_MAP(m, totalSize, "bKpqr", cf.bKpqr, 0, DataTypeFloat, float);
1241  ADD_MAP(m, totalSize, "bKuvw", cf.bKuvw, 0, DataTypeFloat, float);
1242  ADD_MAP(m, totalSize, "oKat1", cf.oKat1, 0, DataTypeFloat, float);
1243  ADD_MAP(m, totalSize, "oKat2", cf.oKat2, 0, DataTypeFloat, float);
1244  ADD_MAP(m, totalSize, "oKuvw", cf.oKuvw, 0, DataTypeFloat, float);
1245  ADD_MAP(m, totalSize, "oKlla", cf.oKlla, 0, DataTypeFloat, float);
1246  ADD_MAP(m, totalSize, "mag.bias_cal[0]", mag.bias_cal[0], 0, DataTypeFloat, float&);
1247  ADD_MAP(m, totalSize, "mag.bias_cal[1]", mag.bias_cal[1], 0, DataTypeFloat, float&);
1248  ADD_MAP(m, totalSize, "mag.bias_cal[2]", mag.bias_cal[2], 0, DataTypeFloat, float&);
1249  ADD_MAP(m, totalSize, "mag.Wcal[0]", mag.Wcal[0], 0, DataTypeFloat, float&);
1250  ADD_MAP(m, totalSize, "mag.Wcal[1]", mag.Wcal[1], 0, DataTypeFloat, float&);
1251  ADD_MAP(m, totalSize, "mag.Wcal[2]", mag.Wcal[2], 0, DataTypeFloat, float&);
1252  ADD_MAP(m, totalSize, "mag.Wcal[3]", mag.Wcal[3], 0, DataTypeFloat, float&);
1253  ADD_MAP(m, totalSize, "mag.Wcal[4]", mag.Wcal[4], 0, DataTypeFloat, float&);
1254  ADD_MAP(m, totalSize, "mag.Wcal[5]", mag.Wcal[5], 0, DataTypeFloat, float&);
1255  ADD_MAP(m, totalSize, "mag.Wcal[6]", mag.Wcal[6], 0, DataTypeFloat, float&);
1256  ADD_MAP(m, totalSize, "mag.Wcal[7]", mag.Wcal[7], 0, DataTypeFloat, float&);
1257  ADD_MAP(m, totalSize, "mag.Wcal[8]", mag.Wcal[8], 0, DataTypeFloat, float&);
1258  ADD_MAP(m, totalSize, "mag.DtD[0]", mag.DtD[0], 0, DataTypeFloat, float&);
1259  ADD_MAP(m, totalSize, "mag.DtD[1]", mag.DtD[1], 0, DataTypeFloat, float&);
1260  ADD_MAP(m, totalSize, "mag.DtD[2]", mag.DtD[2], 0, DataTypeFloat, float&);
1261  ADD_MAP(m, totalSize, "mag.DtD[3]", mag.DtD[3], 0, DataTypeFloat, float&);
1262  ADD_MAP(m, totalSize, "mag.DtD[4]", mag.DtD[4], 0, DataTypeFloat, float&);
1263  ADD_MAP(m, totalSize, "mag.DtD[5]", mag.DtD[5], 0, DataTypeFloat, float&);
1264  ADD_MAP(m, totalSize, "mag.DtD[6]", mag.DtD[6], 0, DataTypeFloat, float&);
1265  ADD_MAP(m, totalSize, "mag.DtD[7]", mag.DtD[7], 0, DataTypeFloat, float&);
1266  ADD_MAP(m, totalSize, "mag.DtD[8]", mag.DtD[8], 0, DataTypeFloat, float&);
1267  ADD_MAP(m, totalSize, "mag.DtD[9]", mag.DtD[9], 0, DataTypeFloat, float&);
1268  ADD_MAP(m, totalSize, "mag.DtD[10]", mag.DtD[10], 0, DataTypeFloat, float&);
1269  ADD_MAP(m, totalSize, "mag.DtD[11]", mag.DtD[11], 0, DataTypeFloat, float&);
1270  ADD_MAP(m, totalSize, "mag.DtD[12]", mag.DtD[12], 0, DataTypeFloat, float&);
1271  ADD_MAP(m, totalSize, "mag.DtD[13]", mag.DtD[13], 0, DataTypeFloat, float&);
1272  ADD_MAP(m, totalSize, "mag.DtD[14]", mag.DtD[14], 0, DataTypeFloat, float&);
1273  ADD_MAP(m, totalSize, "mag.DtD[15]", mag.DtD[15], 0, DataTypeFloat, float&);
1274  ADD_MAP(m, totalSize, "mag.DtD[16]", mag.DtD[16], 0, DataTypeFloat, float&);
1275  ADD_MAP(m, totalSize, "mag.DtD[17]", mag.DtD[17], 0, DataTypeFloat, float&);
1276  ADD_MAP(m, totalSize, "mag.DtD[18]", mag.DtD[18], 0, DataTypeFloat, float&);
1277  ADD_MAP(m, totalSize, "mag.DtD[19]", mag.DtD[19], 0, DataTypeFloat, float&);
1278  ADD_MAP(m, totalSize, "mag.DtD[20]", mag.DtD[20], 0, DataTypeFloat, float&);
1279  ADD_MAP(m, totalSize, "mag.DtD[21]", mag.DtD[21], 0, DataTypeFloat, float&);
1280  ADD_MAP(m, totalSize, "mag.DtD[22]", mag.DtD[22], 0, DataTypeFloat, float&);
1281  ADD_MAP(m, totalSize, "mag.DtD[23]", mag.DtD[23], 0, DataTypeFloat, float&);
1282  ADD_MAP(m, totalSize, "mag.DtD[24]", mag.DtD[24], 0, DataTypeFloat, float&);
1283  ADD_MAP(m, totalSize, "mag.DtD[25]", mag.DtD[25], 0, DataTypeFloat, float&);
1284  ADD_MAP(m, totalSize, "mag.DtD[26]", mag.DtD[26], 0, DataTypeFloat, float&);
1285  ADD_MAP(m, totalSize, "mag.DtD[27]", mag.DtD[27], 0, DataTypeFloat, float&);
1286  ADD_MAP(m, totalSize, "mag.DtD[28]", mag.DtD[28], 0, DataTypeFloat, float&);
1287  ADD_MAP(m, totalSize, "mag.DtD[29]", mag.DtD[29], 0, DataTypeFloat, float&);
1288  ADD_MAP(m, totalSize, "mag.DtD[30]", mag.DtD[30], 0, DataTypeFloat, float&);
1289  ADD_MAP(m, totalSize, "mag.DtD[31]", mag.DtD[31], 0, DataTypeFloat, float&);
1290  ADD_MAP(m, totalSize, "mag.DtD[32]", mag.DtD[32], 0, DataTypeFloat, float&);
1291  ADD_MAP(m, totalSize, "mag.DtD[33]", mag.DtD[33], 0, DataTypeFloat, float&);
1292  ADD_MAP(m, totalSize, "mag.DtD[34]", mag.DtD[34], 0, DataTypeFloat, float&);
1293  ADD_MAP(m, totalSize, "mag.DtD[35]", mag.DtD[35], 0, DataTypeFloat, float&);
1294  ADD_MAP(m, totalSize, "mag.DtD[36]", mag.DtD[36], 0, DataTypeFloat, float&);
1295  ADD_MAP(m, totalSize, "mag.DtD[37]", mag.DtD[37], 0, DataTypeFloat, float&);
1296  ADD_MAP(m, totalSize, "mag.DtD[38]", mag.DtD[38], 0, DataTypeFloat, float&);
1297  ADD_MAP(m, totalSize, "mag.DtD[39]", mag.DtD[39], 0, DataTypeFloat, float&);
1298  ADD_MAP(m, totalSize, "mag.DtD[40]", mag.DtD[40], 0, DataTypeFloat, float&);
1299  ADD_MAP(m, totalSize, "mag.DtD[41]", mag.DtD[41], 0, DataTypeFloat, float&);
1300  ADD_MAP(m, totalSize, "mag.DtD[42]", mag.DtD[42], 0, DataTypeFloat, float&);
1301  ADD_MAP(m, totalSize, "mag.DtD[43]", mag.DtD[43], 0, DataTypeFloat, float&);
1302  ADD_MAP(m, totalSize, "mag.DtD[44]", mag.DtD[44], 0, DataTypeFloat, float&);
1303  ADD_MAP(m, totalSize, "mag.DtD[45]", mag.DtD[45], 0, DataTypeFloat, float&);
1304  ADD_MAP(m, totalSize, "mag.DtD[46]", mag.DtD[46], 0, DataTypeFloat, float&);
1305  ADD_MAP(m, totalSize, "mag.DtD[47]", mag.DtD[47], 0, DataTypeFloat, float&);
1306  ADD_MAP(m, totalSize, "mag.DtD[48]", mag.DtD[48], 0, DataTypeFloat, float&);
1307  ADD_MAP(m, totalSize, "mag.DtD[49]", mag.DtD[49], 0, DataTypeFloat, float&);
1308  ADD_MAP(m, totalSize, "mag.DtD[50]", mag.DtD[50], 0, DataTypeFloat, float&);
1309  ADD_MAP(m, totalSize, "mag.DtD[51]", mag.DtD[51], 0, DataTypeFloat, float&);
1310  ADD_MAP(m, totalSize, "mag.DtD[52]", mag.DtD[52], 0, DataTypeFloat, float&);
1311  ADD_MAP(m, totalSize, "mag.DtD[53]", mag.DtD[53], 0, DataTypeFloat, float&);
1312  ADD_MAP(m, totalSize, "mag.DtD[54]", mag.DtD[54], 0, DataTypeFloat, float&);
1313  ADD_MAP(m, totalSize, "mag.DtD[55]", mag.DtD[55], 0, DataTypeFloat, float&);
1314  ADD_MAP(m, totalSize, "mag.DtD[56]", mag.DtD[56], 0, DataTypeFloat, float&);
1315  ADD_MAP(m, totalSize, "mag.DtD[57]", mag.DtD[57], 0, DataTypeFloat, float&);
1316  ADD_MAP(m, totalSize, "mag.DtD[58]", mag.DtD[58], 0, DataTypeFloat, float&);
1317  ADD_MAP(m, totalSize, "mag.DtD[59]", mag.DtD[59], 0, DataTypeFloat, float&);
1318  ADD_MAP(m, totalSize, "mag.DtD[60]", mag.DtD[60], 0, DataTypeFloat, float&);
1319  ADD_MAP(m, totalSize, "mag.DtD[61]", mag.DtD[61], 0, DataTypeFloat, float&);
1320  ADD_MAP(m, totalSize, "mag.DtD[62]", mag.DtD[62], 0, DataTypeFloat, float&);
1321  ADD_MAP(m, totalSize, "mag.DtD[63]", mag.DtD[63], 0, DataTypeFloat, float&);
1322  ADD_MAP(m, totalSize, "mag.DtD[64]", mag.DtD[64], 0, DataTypeFloat, float&);
1323  ADD_MAP(m, totalSize, "mag.DtD[65]", mag.DtD[65], 0, DataTypeFloat, float&);
1324  ADD_MAP(m, totalSize, "mag.DtD[66]", mag.DtD[66], 0, DataTypeFloat, float&);
1325  ADD_MAP(m, totalSize, "mag.DtD[67]", mag.DtD[67], 0, DataTypeFloat, float&);
1326  ADD_MAP(m, totalSize, "mag.DtD[68]", mag.DtD[68], 0, DataTypeFloat, float&);
1327  ADD_MAP(m, totalSize, "mag.DtD[69]", mag.DtD[69], 0, DataTypeFloat, float&);
1328  ADD_MAP(m, totalSize, "mag.DtD[70]", mag.DtD[70], 0, DataTypeFloat, float&);
1329  ADD_MAP(m, totalSize, "mag.DtD[71]", mag.DtD[71], 0, DataTypeFloat, float&);
1330  ADD_MAP(m, totalSize, "mag.DtD[72]", mag.DtD[72], 0, DataTypeFloat, float&);
1331  ADD_MAP(m, totalSize, "mag.DtD[73]", mag.DtD[73], 0, DataTypeFloat, float&);
1332  ADD_MAP(m, totalSize, "mag.DtD[74]", mag.DtD[74], 0, DataTypeFloat, float&);
1333  ADD_MAP(m, totalSize, "mag.DtD[75]", mag.DtD[75], 0, DataTypeFloat, float&);
1334  ADD_MAP(m, totalSize, "mag.DtD[76]", mag.DtD[76], 0, DataTypeFloat, float&);
1335  ADD_MAP(m, totalSize, "mag.DtD[77]", mag.DtD[77], 0, DataTypeFloat, float&);
1336  ADD_MAP(m, totalSize, "mag.DtD[78]", mag.DtD[78], 0, DataTypeFloat, float&);
1337  ADD_MAP(m, totalSize, "mag.DtD[79]", mag.DtD[79], 0, DataTypeFloat, float&);
1338  ADD_MAP(m, totalSize, "mag.DtD[80]", mag.DtD[80], 0, DataTypeFloat, float&);
1339  ADD_MAP(m, totalSize, "mag.DtD[81]", mag.DtD[81], 0, DataTypeFloat, float&);
1340  ADD_MAP(m, totalSize, "mag.DtD[82]", mag.DtD[82], 0, DataTypeFloat, float&);
1341  ADD_MAP(m, totalSize, "mag.DtD[83]", mag.DtD[83], 0, DataTypeFloat, float&);
1342  ADD_MAP(m, totalSize, "mag.DtD[84]", mag.DtD[84], 0, DataTypeFloat, float&);
1343  ADD_MAP(m, totalSize, "mag.DtD[85]", mag.DtD[85], 0, DataTypeFloat, float&);
1344  ADD_MAP(m, totalSize, "mag.DtD[86]", mag.DtD[86], 0, DataTypeFloat, float&);
1345  ADD_MAP(m, totalSize, "mag.DtD[87]", mag.DtD[87], 0, DataTypeFloat, float&);
1346  ADD_MAP(m, totalSize, "mag.DtD[88]", mag.DtD[88], 0, DataTypeFloat, float&);
1347  ADD_MAP(m, totalSize, "mag.DtD[89]", mag.DtD[89], 0, DataTypeFloat, float&);
1348  ADD_MAP(m, totalSize, "mag.DtD[90]", mag.DtD[90], 0, DataTypeFloat, float&);
1349  ADD_MAP(m, totalSize, "mag.DtD[91]", mag.DtD[91], 0, DataTypeFloat, float&);
1350  ADD_MAP(m, totalSize, "mag.DtD[92]", mag.DtD[92], 0, DataTypeFloat, float&);
1351  ADD_MAP(m, totalSize, "mag.DtD[93]", mag.DtD[93], 0, DataTypeFloat, float&);
1352  ADD_MAP(m, totalSize, "mag.DtD[94]", mag.DtD[94], 0, DataTypeFloat, float&);
1353  ADD_MAP(m, totalSize, "mag.DtD[95]", mag.DtD[95], 0, DataTypeFloat, float&);
1354  ADD_MAP(m, totalSize, "mag.DtD[96]", mag.DtD[96], 0, DataTypeFloat, float&);
1355  ADD_MAP(m, totalSize, "mag.DtD[97]", mag.DtD[97], 0, DataTypeFloat, float&);
1356  ADD_MAP(m, totalSize, "mag.DtD[98]", mag.DtD[98], 0, DataTypeFloat, float&);
1357  ADD_MAP(m, totalSize, "mag.DtD[99]", mag.DtD[99], 0, DataTypeFloat, float&);
1358 
1359  ASSERT_SIZE(totalSize);
1360 }
1361 static void PopulateInl2MagObsInfo(map_name_to_info_t mappings[DID_COUNT])
1362 {
1363  typedef inl2_mag_obs_info_t MAP_TYPE;
1365  uint32_t totalSize = 0;
1366  ADD_MAP(m, totalSize, "timeOfWeekMs", timeOfWeekMs, 0, DataTypeUInt32, uint32_t);
1367  ADD_MAP(m, totalSize, "Ncal_samples", Ncal_samples, 0, DataTypeUInt32, uint32_t);
1368  ADD_MAP(m, totalSize, "ready", ready, 0, DataTypeUInt32, uint32_t);
1369  ADD_MAP(m, totalSize, "calibrated", calibrated, 0, DataTypeUInt32, uint32_t);
1370  ADD_MAP(m, totalSize, "auto_recal", auto_recal, 0, DataTypeUInt32, uint32_t);
1371  ADD_MAP(m, totalSize, "outlier", outlier, 0, DataTypeUInt32, uint32_t);
1372  ADD_MAP(m, totalSize, "magHdg", magHdg, 0, DataTypeFloat, float);
1373  ADD_MAP(m, totalSize, "insHdg", insHdg, 0, DataTypeFloat, float);
1374  ADD_MAP(m, totalSize, "magInsHdgDelta", magInsHdgDelta, 0, DataTypeFloat, float);
1375  ADD_MAP(m, totalSize, "nis", nis, 0, DataTypeFloat, float);
1376  ADD_MAP(m, totalSize, "nis_threshold", nis_threshold, 0, DataTypeFloat, float);
1377  ADD_MAP(m, totalSize, "Wcal[0]", Wcal[0], 0, DataTypeFloat, float&);
1378  ADD_MAP(m, totalSize, "Wcal[1]", Wcal[1], 0, DataTypeFloat, float&);
1379  ADD_MAP(m, totalSize, "Wcal[2]", Wcal[2], 0, DataTypeFloat, float&);
1380  ADD_MAP(m, totalSize, "Wcal[3]", Wcal[3], 0, DataTypeFloat, float&);
1381  ADD_MAP(m, totalSize, "Wcal[4]", Wcal[4], 0, DataTypeFloat, float&);
1382  ADD_MAP(m, totalSize, "Wcal[5]", Wcal[5], 0, DataTypeFloat, float&);
1383  ADD_MAP(m, totalSize, "Wcal[6]", Wcal[6], 0, DataTypeFloat, float&);
1384  ADD_MAP(m, totalSize, "Wcal[7]", Wcal[7], 0, DataTypeFloat, float&);
1385  ADD_MAP(m, totalSize, "Wcal[8]", Wcal[8], 0, DataTypeFloat, float&);
1386  ADD_MAP(m, totalSize, "activeCalSet", activeCalSet, 0, DataTypeUInt32, uint32_t);
1387  ADD_MAP(m, totalSize, "magHdgOffset", magHdgOffset, 0, DataTypeFloat, float);
1388  ADD_MAP(m, totalSize, "Tcal", Tcal, 0, DataTypeFloat, float);
1389  ADD_MAP(m, totalSize, "bias_cal[0]", bias_cal[0], 0, DataTypeFloat, float&);
1390  ADD_MAP(m, totalSize, "bias_cal[1]", bias_cal[1], 0, DataTypeFloat, float&);
1391  ADD_MAP(m, totalSize, "bias_cal[2]", bias_cal[2], 0, DataTypeFloat, float&);
1392 
1393  ASSERT_SIZE(totalSize);
1394 }
1395 static void PopulateInl2StatesMappings(map_name_to_info_t mappings[DID_COUNT])
1396 {
1397  typedef inl2_states_t MAP_TYPE;
1398  map_name_to_info_t& m = mappings[DID_INL2_STATES];
1399  uint32_t totalSize = 0;
1400  ADD_MAP(m, totalSize, "timeOfWeek", timeOfWeek, 0, DataTypeDouble, double);
1401  ADD_MAP(m, totalSize, "qe2b[0]", qe2b[0], 0, DataTypeFloat, float&);
1402  ADD_MAP(m, totalSize, "qe2b[1]", qe2b[1], 0, DataTypeFloat, float&);
1403  ADD_MAP(m, totalSize, "qe2b[2]", qe2b[2], 0, DataTypeFloat, float&);
1404  ADD_MAP(m, totalSize, "qe2b[3]", qe2b[3], 0, DataTypeFloat, float&);
1405  ADD_MAP(m, totalSize, "ve[0]", ve[0], 0, DataTypeFloat, float&);
1406  ADD_MAP(m, totalSize, "ve[1]", ve[1], 0, DataTypeFloat, float&);
1407  ADD_MAP(m, totalSize, "ve[2]", ve[2], 0, DataTypeFloat, float&);
1408  ADD_MAP(m, totalSize, "ecef[0]", ecef[0], 0, DataTypeDouble, double&);
1409  ADD_MAP(m, totalSize, "ecef[1]", ecef[1], 0, DataTypeDouble, double&);
1410  ADD_MAP(m, totalSize, "ecef[2]", ecef[2], 0, DataTypeDouble, double&);
1411  ADD_MAP(m, totalSize, "biasPqr[0]", biasPqr[0], 0, DataTypeFloat, float&);
1412  ADD_MAP(m, totalSize, "biasPqr[1]", biasPqr[1], 0, DataTypeFloat, float&);
1413  ADD_MAP(m, totalSize, "biasPqr[2]", biasPqr[2], 0, DataTypeFloat, float&);
1414  ADD_MAP(m, totalSize, "biasAcc[0]", biasAcc[0], 0, DataTypeFloat, float&);
1415  ADD_MAP(m, totalSize, "biasAcc[1]", biasAcc[1], 0, DataTypeFloat, float&);
1416  ADD_MAP(m, totalSize, "biasAcc[2]", biasAcc[2], 0, DataTypeFloat, float&);
1417  ADD_MAP(m, totalSize, "biasBaro", biasBaro, 0, DataTypeFloat, float);
1418  ADD_MAP(m, totalSize, "magDec", magDec, 0, DataTypeFloat, float);
1419  ADD_MAP(m, totalSize, "magInc", magInc, 0, DataTypeFloat, float);
1420 
1421  ASSERT_SIZE(totalSize);
1422 }
1423 
1424 // static void PopulateRtkStateMappings(map_name_to_info_t mappings[DID_COUNT])
1425 // {
1426 // typedef rtk_state_t MAP_TYPE;
1427 // map_name_to_info_t& m = mappings[DID_RTK_STATE];
1428 // uint32_t totalSize = 0;
1429 // ADD_MAP(m, totalSize, "time.time", time.time, 0, DataTypeInt64, int64_t);
1430 // ADD_MAP(m, totalSize, "time.sec", time.sec, 0, DataTypeDouble, double);
1431 // ADD_MAP(m, totalSize, "rp[0]", rp_ecef[0], 0, DataTypeDouble, double&);
1432 // ADD_MAP(m, totalSize, "rp[1]", rp_ecef[1], 0, DataTypeDouble, double&);
1433 // ADD_MAP(m, totalSize, "rp[2]", rp_ecef[2], 0, DataTypeDouble, double&);
1434 // ADD_MAP(m, totalSize, "rv[0]", rv_ecef[0], 0, DataTypeDouble, double&);
1435 // ADD_MAP(m, totalSize, "rv[1]", rv_ecef[1], 0, DataTypeDouble, double&);
1436 // ADD_MAP(m, totalSize, "rv[2]", rv_ecef[2], 0, DataTypeDouble, double&);
1437 // ADD_MAP(m, totalSize, "ra[0]", ra_ecef[0], 0, DataTypeDouble, double&);
1438 // ADD_MAP(m, totalSize, "ra[1]", ra_ecef[1], 0, DataTypeDouble, double&);
1439 // ADD_MAP(m, totalSize, "ra[2]", ra_ecef[2], 0, DataTypeDouble, double&);
1440 //
1441 // ADD_MAP(m, totalSize, "bp[0]", bp_ecef[0], 0, DataTypeDouble, double&);
1442 // ADD_MAP(m, totalSize, "bp[1]", bp_ecef[1], 0, DataTypeDouble, double&);
1443 // ADD_MAP(m, totalSize, "bp[2]", bp_ecef[2], 0, DataTypeDouble, double&);
1444 // ADD_MAP(m, totalSize, "bv[0]", bv_ecef[0], 0, DataTypeDouble, double&);
1445 // ADD_MAP(m, totalSize, "bv[1]", bv_ecef[1], 0, DataTypeDouble, double&);
1446 // ADD_MAP(m, totalSize, "bv[2]", bv_ecef[2], 0, DataTypeDouble, double&);
1447 // }
1448 
1449 static void PopulateRtkResidualMappings(map_name_to_info_t mappings[DID_COUNT], int DID)
1450 {
1451  typedef rtk_residual_t MAP_TYPE;
1452  map_name_to_info_t& m = mappings[DID];
1453  uint32_t totalSize = 0;
1454  ADD_MAP(m, totalSize, "time.time", time.time, 0, DataTypeInt64, int64_t);
1455  ADD_MAP(m, totalSize, "time.sec", time.sec, 0, DataTypeDouble, double);
1456  ADD_MAP(m, totalSize, "nv", nv, 0, DataTypeInt32, int32_t);
1457 }
1458 
1459 static void PopulateRtkDebugMappings(map_name_to_info_t mappings[DID_COUNT])
1460 {
1461  typedef rtk_debug_t MAP_TYPE;
1462  map_name_to_info_t& m = mappings[DID_RTK_DEBUG];
1463  uint32_t totalSize = 0;
1464 
1465  ADD_MAP(m, totalSize, "time.time", time.time, 0, DataTypeInt64, int64_t);
1466  ADD_MAP(m, totalSize, "time.sec", time.sec, 0, DataTypeDouble, double);
1467 
1468  ADD_MAP(m, totalSize, "rej_ovfl", rej_ovfl, 0, DataTypeUInt8, uint8_t);
1469  ADD_MAP(m, totalSize, "code_outlier", code_outlier, 0, DataTypeUInt8, uint8_t);
1470  ADD_MAP(m, totalSize, "phase_outlier", phase_outlier, 0, DataTypeUInt8, uint8_t);
1471  ADD_MAP(m, totalSize, "code_large_residual", code_large_residual, 0, DataTypeUInt8, uint8_t);
1472 
1473  ADD_MAP(m, totalSize, "phase_large_residual", phase_large_residual, 0, DataTypeUInt8, uint8_t);
1474  ADD_MAP(m, totalSize, "invalid_base_position", invalid_base_position, 0, DataTypeUInt8, uint8_t);
1475  ADD_MAP(m, totalSize, "bad_baseline_holdamb", bad_baseline_holdamb, 0, DataTypeUInt8, uint8_t);
1476  ADD_MAP(m, totalSize, "base_position_error", base_position_error, 0, DataTypeUInt8, uint8_t);
1477 
1478  ADD_MAP(m, totalSize, "outc_ovfl", outc_ovfl, 0, DataTypeUInt8, uint8_t);
1479  ADD_MAP(m, totalSize, "reset_timer", reset_timer, 0, DataTypeUInt8, uint8_t);
1480  ADD_MAP(m, totalSize, "use_ubx_position", use_ubx_position, 0, DataTypeUInt8, uint8_t);
1481  ADD_MAP(m, totalSize, "large_v2b", large_v2b, 0, DataTypeUInt8, uint8_t);
1482 
1483  ADD_MAP(m, totalSize, "base_position_update", base_position_update, 0, DataTypeUInt8, uint8_t);
1484  ADD_MAP(m, totalSize, "rover_position_error", rover_position_error, 0, DataTypeUInt8, uint8_t);
1485  ADD_MAP(m, totalSize, "reset_bias", reset_bias, 0, DataTypeUInt8, uint8_t);
1486  ADD_MAP(m, totalSize, "start_relpos", start_relpos, 0, DataTypeUInt8, uint8_t);
1487 
1488  ADD_MAP(m, totalSize, "end_relpos", end_relpos, 0, DataTypeUInt8, uint8_t);
1489  ADD_MAP(m, totalSize, "start_rtkpos", start_rtkpos, 0, DataTypeUInt8, uint8_t);
1490  ADD_MAP(m, totalSize, "pnt_pos_error", pnt_pos_error, 0, DataTypeUInt8, uint8_t);
1491  ADD_MAP(m, totalSize, "no_base_obs_data", no_base_obs_data, 0, DataTypeUInt8, uint8_t);
1492 
1493  ADD_MAP(m, totalSize, "diff_age_error", diff_age_error, 0, DataTypeUInt8, uint8_t);
1494  ADD_MAP(m, totalSize, "moveb_time_sync_error", moveb_time_sync_error, 0, DataTypeUInt8, uint8_t);
1495  ADD_MAP(m, totalSize, "waiting_for_rover_packet", waiting_for_rover_packet, 0, DataTypeUInt8, uint8_t);
1496  ADD_MAP(m, totalSize, "waiting_for_base_packet", waiting_for_base_packet, 0, DataTypeUInt8, uint8_t);
1497 
1498  ADD_MAP(m, totalSize, "lsq_error", lsq_error, 0, DataTypeUInt8, uint8_t);
1499  ADD_MAP(m, totalSize, "lack_of_valid_sats", lack_of_valid_sats, 0, DataTypeUInt8, uint8_t);
1500  ADD_MAP(m, totalSize, "divergent_pnt_pos_iteration", divergent_pnt_pos_iteration, 0, DataTypeUInt8, uint8_t);
1501  ADD_MAP(m, totalSize, "chi_square_error", chi_square_error, 0, DataTypeUInt8, uint8_t);
1502 
1503  ADD_MAP(m, totalSize, "cycle_slips", cycle_slips, 0, DataTypeUInt32, uint32_t);
1504 
1505  ADD_MAP(m, totalSize, "ubx_error", ubx_error, 0, DataTypeFloat, float);
1506 
1507  ADD_MAP(m, totalSize, "solStatus", solStatus, 0, DataTypeUInt8, uint8_t);
1508  ADD_MAP(m, totalSize, "rescode_err_marker", rescode_err_marker, 0, DataTypeUInt8, uint8_t);
1509  ADD_MAP(m, totalSize, "error_count", error_count, 0, DataTypeUInt8, uint8_t);
1510  ADD_MAP(m, totalSize, "error_code", error_code, 0, DataTypeUInt8, uint8_t);
1511 
1512  ADD_MAP(m, totalSize, "dist2base", dist2base, 0, DataTypeFloat, float);
1513 
1514  ADD_MAP(m, totalSize, "reserved1", reserved1, 0, DataTypeUInt8, uint8_t);
1515  ADD_MAP(m, totalSize, "gdop_error", gdop_error, 0, DataTypeUInt8, uint8_t);
1516  ADD_MAP(m, totalSize, "warning_code", warning_code, 0, DataTypeUInt8, uint8_t);
1517  ADD_MAP(m, totalSize, "warning_count", warning_count, 0, DataTypeUInt8, uint8_t);
1518 
1519  ADD_MAP(m, totalSize, "double_debug[0]", double_debug[0], 0, DataTypeDouble, double&);
1520  ADD_MAP(m, totalSize, "double_debug[1]", double_debug[1], 0, DataTypeDouble, double&);
1521  ADD_MAP(m, totalSize, "double_debug[2]", double_debug[2], 0, DataTypeDouble, double&);
1522  ADD_MAP(m, totalSize, "double_debug[3]", double_debug[3], 0, DataTypeDouble, double&);
1523 
1524  ADD_MAP(m, totalSize, "debug[0]", debug[0], 0, DataTypeUInt8, uint8_t&);
1525  ADD_MAP(m, totalSize, "debug[1]", debug[1], 0, DataTypeUInt8, uint8_t&);
1526  ADD_MAP(m, totalSize, "obs_count_bas", obs_count_bas, 0, DataTypeUInt8, uint8_t);
1527  ADD_MAP(m, totalSize, "obs_count_rov", obs_count_rov, 0, DataTypeUInt8, uint8_t);
1528 
1529  ADD_MAP(m, totalSize, "obs_pairs_filtered", obs_pairs_filtered, 0, DataTypeUInt8, uint8_t);
1530  ADD_MAP(m, totalSize, "obs_pairs_used", obs_pairs_used, 0, DataTypeUInt8, uint8_t);
1531  ADD_MAP(m, totalSize, "raw_ptr_queue_overrun", raw_ptr_queue_overrun, 0, DataTypeUInt8, uint8_t);
1532  ADD_MAP(m, totalSize, "raw_dat_queue_overrun", raw_dat_queue_overrun, 0, DataTypeUInt8, uint8_t);
1533 }
1534 
1535 
1536 static void PopulateRtkDebug2Mappings(map_name_to_info_t mappings[DID_COUNT])
1537 {
1538  typedef rtk_debug_2_t MAP_TYPE;
1539  map_name_to_info_t& m = mappings[DID_RTK_DEBUG_2];
1540  uint32_t totalSize = 0;
1541 
1542  ADD_MAP(m, totalSize, "time.time", time.time, 0, DataTypeInt64, int64_t);
1543  ADD_MAP(m, totalSize, "time.sec", time.sec, 0, DataTypeDouble, double);
1544 
1545 #if 0 // This doesn't work in Linux
1546 
1547  char str[50];
1548  for (int i = 0; i < NUMSATSOL; i++)
1549  {
1550  SNPRINTF(str, sizeof(str), "satBiasFloat[%d]", i);
1551  ADD_MAP(m, totalSize, str, satBiasFloat[i], 0, DataTypeFloat, float&);
1552  }
1553 
1554  for (int i = 0; i < NUMSATSOL; i++)
1555  {
1556  SNPRINTF(str, sizeof(str), "satBiasFix[%d]", i);
1557  ADD_MAP(m, totalSize, str, satBiasFix[i], 0, DataTypeFloat, float&);
1558  }
1559 
1560  for (int i = 0; i < NUMSATSOL; i++)
1561  {
1562  SNPRINTF(str, sizeof(str), "qualL[%d]", i);
1563  ADD_MAP(m, totalSize, str, qualL[i], 0, DataTypeUInt8, uint8_t&);
1564  }
1565 
1566  for (int i = 0; i < NUMSATSOL; i++)
1567  {
1568  SNPRINTF(str, sizeof(str), "sat[%d]", i);
1569  ADD_MAP(m, totalSize, str, sat[i], 0, DataTypeUInt8, uint8_t&);
1570  }
1571 
1572  for (int i = 0; i < NUMSATSOL; i++)
1573  {
1574  SNPRINTF(str, sizeof(str), "satBiasCov[%d]", i);
1575  ADD_MAP(m, totalSize, str, satBiasStd[i], 0, DataTypeFloat, float&);
1576  }
1577 
1578 #else
1579 
1580  ADD_MAP(m, totalSize, "satBiasFloat[0]", satBiasFloat[0], 0, DataTypeFloat, float&);
1581  ADD_MAP(m, totalSize, "satBiasFloat[1]", satBiasFloat[1], 0, DataTypeFloat, float&);
1582  ADD_MAP(m, totalSize, "satBiasFloat[2]", satBiasFloat[2], 0, DataTypeFloat, float&);
1583  ADD_MAP(m, totalSize, "satBiasFloat[3]", satBiasFloat[3], 0, DataTypeFloat, float&);
1584  ADD_MAP(m, totalSize, "satBiasFloat[4]", satBiasFloat[4], 0, DataTypeFloat, float&);
1585  ADD_MAP(m, totalSize, "satBiasFloat[5]", satBiasFloat[5], 0, DataTypeFloat, float&);
1586  ADD_MAP(m, totalSize, "satBiasFloat[6]", satBiasFloat[6], 0, DataTypeFloat, float&);
1587  ADD_MAP(m, totalSize, "satBiasFloat[7]", satBiasFloat[7], 0, DataTypeFloat, float&);
1588  ADD_MAP(m, totalSize, "satBiasFloat[8]", satBiasFloat[8], 0, DataTypeFloat, float&);
1589  ADD_MAP(m, totalSize, "satBiasFloat[9]", satBiasFloat[9], 0, DataTypeFloat, float&);
1590  ADD_MAP(m, totalSize, "satBiasFloat[10]", satBiasFloat[10], 0, DataTypeFloat, float&);
1591  ADD_MAP(m, totalSize, "satBiasFloat[11]", satBiasFloat[11], 0, DataTypeFloat, float&);
1592  ADD_MAP(m, totalSize, "satBiasFloat[12]", satBiasFloat[12], 0, DataTypeFloat, float&);
1593  ADD_MAP(m, totalSize, "satBiasFloat[13]", satBiasFloat[13], 0, DataTypeFloat, float&);
1594  ADD_MAP(m, totalSize, "satBiasFloat[14]", satBiasFloat[14], 0, DataTypeFloat, float&);
1595  ADD_MAP(m, totalSize, "satBiasFloat[15]", satBiasFloat[15], 0, DataTypeFloat, float&);
1596  ADD_MAP(m, totalSize, "satBiasFloat[16]", satBiasFloat[16], 0, DataTypeFloat, float&);
1597  ADD_MAP(m, totalSize, "satBiasFloat[17]", satBiasFloat[17], 0, DataTypeFloat, float&);
1598  ADD_MAP(m, totalSize, "satBiasFloat[18]", satBiasFloat[18], 0, DataTypeFloat, float&);
1599  ADD_MAP(m, totalSize, "satBiasFloat[19]", satBiasFloat[19], 0, DataTypeFloat, float&);
1600  ADD_MAP(m, totalSize, "satBiasFloat[20]", satBiasFloat[20], 0, DataTypeFloat, float&);
1601  ADD_MAP(m, totalSize, "satBiasFloat[21]", satBiasFloat[21], 0, DataTypeFloat, float&);
1602 
1603  ADD_MAP(m, totalSize, "satBiasFix[0]", satBiasFix[0], 0, DataTypeFloat, float&);
1604  ADD_MAP(m, totalSize, "satBiasFix[1]", satBiasFix[1], 0, DataTypeFloat, float&);
1605  ADD_MAP(m, totalSize, "satBiasFix[2]", satBiasFix[2], 0, DataTypeFloat, float&);
1606  ADD_MAP(m, totalSize, "satBiasFix[3]", satBiasFix[3], 0, DataTypeFloat, float&);
1607  ADD_MAP(m, totalSize, "satBiasFix[4]", satBiasFix[4], 0, DataTypeFloat, float&);
1608  ADD_MAP(m, totalSize, "satBiasFix[5]", satBiasFix[5], 0, DataTypeFloat, float&);
1609  ADD_MAP(m, totalSize, "satBiasFix[6]", satBiasFix[6], 0, DataTypeFloat, float&);
1610  ADD_MAP(m, totalSize, "satBiasFix[7]", satBiasFix[7], 0, DataTypeFloat, float&);
1611  ADD_MAP(m, totalSize, "satBiasFix[8]", satBiasFix[8], 0, DataTypeFloat, float&);
1612  ADD_MAP(m, totalSize, "satBiasFix[9]", satBiasFix[9], 0, DataTypeFloat, float&);
1613  ADD_MAP(m, totalSize, "satBiasFix[10]", satBiasFix[10], 0, DataTypeFloat, float&);
1614  ADD_MAP(m, totalSize, "satBiasFix[11]", satBiasFix[11], 0, DataTypeFloat, float&);
1615  ADD_MAP(m, totalSize, "satBiasFix[12]", satBiasFix[12], 0, DataTypeFloat, float&);
1616  ADD_MAP(m, totalSize, "satBiasFix[13]", satBiasFix[13], 0, DataTypeFloat, float&);
1617  ADD_MAP(m, totalSize, "satBiasFix[14]", satBiasFix[14], 0, DataTypeFloat, float&);
1618  ADD_MAP(m, totalSize, "satBiasFix[15]", satBiasFix[15], 0, DataTypeFloat, float&);
1619  ADD_MAP(m, totalSize, "satBiasFix[16]", satBiasFix[16], 0, DataTypeFloat, float&);
1620  ADD_MAP(m, totalSize, "satBiasFix[17]", satBiasFix[17], 0, DataTypeFloat, float&);
1621  ADD_MAP(m, totalSize, "satBiasFix[18]", satBiasFix[18], 0, DataTypeFloat, float&);
1622  ADD_MAP(m, totalSize, "satBiasFix[19]", satBiasFix[19], 0, DataTypeFloat, float&);
1623  ADD_MAP(m, totalSize, "satBiasFix[20]", satBiasFix[20], 0, DataTypeFloat, float&);
1624  ADD_MAP(m, totalSize, "satBiasFix[21]", satBiasFix[21], 0, DataTypeFloat, float&);
1625 
1626  ADD_MAP(m, totalSize, "qualL[0]", qualL[0], 0, DataTypeUInt8, uint8_t&);
1627  ADD_MAP(m, totalSize, "qualL[1]", qualL[1], 0, DataTypeUInt8, uint8_t&);
1628  ADD_MAP(m, totalSize, "qualL[2]", qualL[2], 0, DataTypeUInt8, uint8_t&);
1629  ADD_MAP(m, totalSize, "qualL[3]", qualL[3], 0, DataTypeUInt8, uint8_t&);
1630  ADD_MAP(m, totalSize, "qualL[4]", qualL[4], 0, DataTypeUInt8, uint8_t&);
1631  ADD_MAP(m, totalSize, "qualL[5]", qualL[5], 0, DataTypeUInt8, uint8_t&);
1632  ADD_MAP(m, totalSize, "qualL[6]", qualL[6], 0, DataTypeUInt8, uint8_t&);
1633  ADD_MAP(m, totalSize, "qualL[7]", qualL[7], 0, DataTypeUInt8, uint8_t&);
1634  ADD_MAP(m, totalSize, "qualL[8]", qualL[8], 0, DataTypeUInt8, uint8_t&);
1635  ADD_MAP(m, totalSize, "qualL[9]", qualL[9], 0, DataTypeUInt8, uint8_t&);
1636  ADD_MAP(m, totalSize, "qualL[10]", qualL[10], 0, DataTypeUInt8, uint8_t&);
1637  ADD_MAP(m, totalSize, "qualL[11]", qualL[11], 0, DataTypeUInt8, uint8_t&);
1638  ADD_MAP(m, totalSize, "qualL[12]", qualL[12], 0, DataTypeUInt8, uint8_t&);
1639  ADD_MAP(m, totalSize, "qualL[13]", qualL[13], 0, DataTypeUInt8, uint8_t&);
1640  ADD_MAP(m, totalSize, "qualL[14]", qualL[14], 0, DataTypeUInt8, uint8_t&);
1641  ADD_MAP(m, totalSize, "qualL[15]", qualL[15], 0, DataTypeUInt8, uint8_t&);
1642  ADD_MAP(m, totalSize, "qualL[16]", qualL[16], 0, DataTypeUInt8, uint8_t&);
1643  ADD_MAP(m, totalSize, "qualL[17]", qualL[17], 0, DataTypeUInt8, uint8_t&);
1644  ADD_MAP(m, totalSize, "qualL[18]", qualL[18], 0, DataTypeUInt8, uint8_t&);
1645  ADD_MAP(m, totalSize, "qualL[19]", qualL[19], 0, DataTypeUInt8, uint8_t&);
1646  ADD_MAP(m, totalSize, "qualL[20]", qualL[20], 0, DataTypeUInt8, uint8_t&);
1647  ADD_MAP(m, totalSize, "qualL[21]", qualL[21], 0, DataTypeUInt8, uint8_t&);
1648 
1649  ADD_MAP(m, totalSize, "sat[0]", sat[0], 0, DataTypeUInt8, uint8_t&);
1650  ADD_MAP(m, totalSize, "sat[1]", sat[1], 0, DataTypeUInt8, uint8_t&);
1651  ADD_MAP(m, totalSize, "sat[2]", sat[2], 0, DataTypeUInt8, uint8_t&);
1652  ADD_MAP(m, totalSize, "sat[3]", sat[3], 0, DataTypeUInt8, uint8_t&);
1653  ADD_MAP(m, totalSize, "sat[4]", sat[4], 0, DataTypeUInt8, uint8_t&);
1654  ADD_MAP(m, totalSize, "sat[5]", sat[5], 0, DataTypeUInt8, uint8_t&);
1655  ADD_MAP(m, totalSize, "sat[6]", sat[6], 0, DataTypeUInt8, uint8_t&);
1656  ADD_MAP(m, totalSize, "sat[7]", sat[7], 0, DataTypeUInt8, uint8_t&);
1657  ADD_MAP(m, totalSize, "sat[8]", sat[8], 0, DataTypeUInt8, uint8_t&);
1658  ADD_MAP(m, totalSize, "sat[9]", sat[9], 0, DataTypeUInt8, uint8_t&);
1659  ADD_MAP(m, totalSize, "sat[10]", sat[10], 0, DataTypeUInt8, uint8_t&);
1660  ADD_MAP(m, totalSize, "sat[11]", sat[11], 0, DataTypeUInt8, uint8_t&);
1661  ADD_MAP(m, totalSize, "sat[12]", sat[12], 0, DataTypeUInt8, uint8_t&);
1662  ADD_MAP(m, totalSize, "sat[13]", sat[13], 0, DataTypeUInt8, uint8_t&);
1663  ADD_MAP(m, totalSize, "sat[14]", sat[14], 0, DataTypeUInt8, uint8_t&);
1664  ADD_MAP(m, totalSize, "sat[15]", sat[15], 0, DataTypeUInt8, uint8_t&);
1665  ADD_MAP(m, totalSize, "sat[16]", sat[16], 0, DataTypeUInt8, uint8_t&);
1666  ADD_MAP(m, totalSize, "sat[17]", sat[17], 0, DataTypeUInt8, uint8_t&);
1667  ADD_MAP(m, totalSize, "sat[18]", sat[18], 0, DataTypeUInt8, uint8_t&);
1668  ADD_MAP(m, totalSize, "sat[19]", sat[19], 0, DataTypeUInt8, uint8_t&);
1669  ADD_MAP(m, totalSize, "sat[20]", sat[20], 0, DataTypeUInt8, uint8_t&);
1670  ADD_MAP(m, totalSize, "sat[21]", sat[21], 0, DataTypeUInt8, uint8_t&);
1671 
1672  ADD_MAP(m, totalSize, "satBiasStd[0]", satBiasStd[0], 0, DataTypeFloat, float&);
1673  ADD_MAP(m, totalSize, "satBiasStd[1]", satBiasStd[1], 0, DataTypeFloat, float&);
1674  ADD_MAP(m, totalSize, "satBiasStd[2]", satBiasStd[2], 0, DataTypeFloat, float&);
1675  ADD_MAP(m, totalSize, "satBiasStd[3]", satBiasStd[3], 0, DataTypeFloat, float&);
1676  ADD_MAP(m, totalSize, "satBiasStd[4]", satBiasStd[4], 0, DataTypeFloat, float&);
1677  ADD_MAP(m, totalSize, "satBiasStd[5]", satBiasStd[5], 0, DataTypeFloat, float&);
1678  ADD_MAP(m, totalSize, "satBiasStd[6]", satBiasStd[6], 0, DataTypeFloat, float&);
1679  ADD_MAP(m, totalSize, "satBiasStd[7]", satBiasStd[7], 0, DataTypeFloat, float&);
1680  ADD_MAP(m, totalSize, "satBiasStd[8]", satBiasStd[8], 0, DataTypeFloat, float&);
1681  ADD_MAP(m, totalSize, "satBiasStd[9]", satBiasStd[9], 0, DataTypeFloat, float&);
1682  ADD_MAP(m, totalSize, "satBiasStd[10]", satBiasStd[10], 0, DataTypeFloat, float&);
1683  ADD_MAP(m, totalSize, "satBiasStd[11]", satBiasStd[11], 0, DataTypeFloat, float&);
1684  ADD_MAP(m, totalSize, "satBiasStd[12]", satBiasStd[12], 0, DataTypeFloat, float&);
1685  ADD_MAP(m, totalSize, "satBiasStd[13]", satBiasStd[13], 0, DataTypeFloat, float&);
1686  ADD_MAP(m, totalSize, "satBiasStd[14]", satBiasStd[14], 0, DataTypeFloat, float&);
1687  ADD_MAP(m, totalSize, "satBiasStd[15]", satBiasStd[15], 0, DataTypeFloat, float&);
1688  ADD_MAP(m, totalSize, "satBiasStd[16]", satBiasStd[16], 0, DataTypeFloat, float&);
1689  ADD_MAP(m, totalSize, "satBiasStd[17]", satBiasStd[17], 0, DataTypeFloat, float&);
1690  ADD_MAP(m, totalSize, "satBiasStd[18]", satBiasStd[18], 0, DataTypeFloat, float&);
1691  ADD_MAP(m, totalSize, "satBiasStd[19]", satBiasStd[19], 0, DataTypeFloat, float&);
1692  ADD_MAP(m, totalSize, "satBiasStd[20]", satBiasStd[20], 0, DataTypeFloat, float&);
1693  ADD_MAP(m, totalSize, "satBiasStd[21]", satBiasStd[21], 0, DataTypeFloat, float&);
1694 
1695  ADD_MAP(m, totalSize, "satLockCnt[0]", satLockCnt[0], 0, DataTypeInt8, int8_t&);
1696  ADD_MAP(m, totalSize, "satLockCnt[1]", satLockCnt[1], 0, DataTypeInt8, int8_t&);
1697  ADD_MAP(m, totalSize, "satLockCnt[2]", satLockCnt[2], 0, DataTypeInt8, int8_t&);
1698  ADD_MAP(m, totalSize, "satLockCnt[3]", satLockCnt[3], 0, DataTypeInt8, int8_t&);
1699  ADD_MAP(m, totalSize, "satLockCnt[4]", satLockCnt[4], 0, DataTypeInt8, int8_t&);
1700  ADD_MAP(m, totalSize, "satLockCnt[5]", satLockCnt[5], 0, DataTypeInt8, int8_t&);
1701  ADD_MAP(m, totalSize, "satLockCnt[6]", satLockCnt[6], 0, DataTypeInt8, int8_t&);
1702  ADD_MAP(m, totalSize, "satLockCnt[7]", satLockCnt[7], 0, DataTypeInt8, int8_t&);
1703  ADD_MAP(m, totalSize, "satLockCnt[8]", satLockCnt[8], 0, DataTypeInt8, int8_t&);
1704  ADD_MAP(m, totalSize, "satLockCnt[9]", satLockCnt[9], 0, DataTypeInt8, int8_t&);
1705  ADD_MAP(m, totalSize, "satLockCnt[10]", satLockCnt[10], 0, DataTypeInt8, int8_t&);
1706  ADD_MAP(m, totalSize, "satLockCnt[11]", satLockCnt[11], 0, DataTypeInt8, int8_t&);
1707  ADD_MAP(m, totalSize, "satLockCnt[12]", satLockCnt[12], 0, DataTypeInt8, int8_t&);
1708  ADD_MAP(m, totalSize, "satLockCnt[13]", satLockCnt[13], 0, DataTypeInt8, int8_t&);
1709  ADD_MAP(m, totalSize, "satLockCnt[14]", satLockCnt[14], 0, DataTypeInt8, int8_t&);
1710  ADD_MAP(m, totalSize, "satLockCnt[15]", satLockCnt[15], 0, DataTypeInt8, int8_t&);
1711  ADD_MAP(m, totalSize, "satLockCnt[16]", satLockCnt[16], 0, DataTypeInt8, int8_t&);
1712  ADD_MAP(m, totalSize, "satLockCnt[17]", satLockCnt[17], 0, DataTypeInt8, int8_t&);
1713  ADD_MAP(m, totalSize, "satLockCnt[18]", satLockCnt[18], 0, DataTypeInt8, int8_t&);
1714  ADD_MAP(m, totalSize, "satLockCnt[19]", satLockCnt[19], 0, DataTypeInt8, int8_t&);
1715  ADD_MAP(m, totalSize, "satLockCnt[20]", satLockCnt[20], 0, DataTypeInt8, int8_t&);
1716  ADD_MAP(m, totalSize, "satLockCnt[21]", satLockCnt[21], 0, DataTypeInt8, int8_t&);
1717 
1718 #endif
1719 
1720  ADD_MAP(m, totalSize, "num_biases", num_biases, 0, DataTypeUInt8, uint8_t);
1721 }
1722 
1723 #endif // USE_IS_INTERNAL
1724 
1726 {
1743  //PopulateGPSCNOMappings(m_lookupInfo, DID_GPS1_SAT); // too much data, we don't want to log this
1744  //PopulateGPSCNOMappings(m_lookupInfo, DID_GPS2_SAT); // too much data, we don't want to log this
1761 // PopulateRtosInfoMappings(m_lookupInfo);
1764 
1765 #ifdef USE_IS_INTERNAL
1766 
1767  PopulateSensorsADCMappings(m_lookupInfo);
1768  PopulateSensorsISMappings(m_lookupInfo, DID_SENSORS_IS1);
1769  PopulateSensorsISMappings(m_lookupInfo, DID_SENSORS_IS2);
1770  PopulateSensorsTCMappings(m_lookupInfo);
1771  PopulateSensorsCompMappings(m_lookupInfo);
1772  PopulateDebugArrayMappings(m_lookupInfo);
1773  PopulateUserPage0Mappings(m_lookupInfo);
1774  PopulateUserPage1Mappings(m_lookupInfo);
1775  PopulateInl2MagObsInfo(m_lookupInfo);
1776  PopulateInl2StatesMappings(m_lookupInfo);
1777 // PopulateRtkStateMappings(m_lookupInfo);
1778 // PopulateRtkResidualMappings(m_lookupInfo, DID_RTK_CODE_RESIDUAL);
1779 // PopulateRtkResidualMappings(m_lookupInfo, DID_RTK_PHASE_RESIDUAL);
1780  PopulateRtkDebugMappings(m_lookupInfo);
1781  PopulateRtkDebug2Mappings(m_lookupInfo);
1785 
1786 #endif
1787 
1788  // this mustcome last
1789  for (uint32_t id = 0; id < DID_COUNT; id++)
1790  {
1792  }
1793 }
1794 
1795 
1797 {
1798 }
1799 
1800 
1801 const char* cISDataMappings::GetDataSetName(uint32_t dataId)
1802 {
1803  static const char* s_dataIdNames[] =
1804  {
1805  "null", // 0: DID_NULL
1806  "devInfo", // 1: DID_DEV_INFO,
1807  "sysFault", // 2: DID_SYS_FAULT
1808  "preintegratedImu", // 3: DID_PREINTEGRATED_IMU
1809  "ins1", // 4: DID_INS_1
1810  "ins2", // 5: DID_INS_2
1811  "gpsPos", // 6: DID_GPS1_POS
1812  "config", // 7: DID_SYS_CMD
1813  "ascii_msg", // 8: DID_ASCII_BCAST_PERIOD
1814  "misc", // 9: DID_INS_MISC
1815  "sysParams", // 10: DID_SYS_PARAMS
1816  "sysSensors", // 11: DID_SYS_SENSORS
1817  "flashCfg", // 12: DID_FLASH_CONFIG
1818  "gps1Pos", // 13: DID_GPS1_UBX_POS
1819  "gps2Pos", // 14: DID_GPS2_POS
1820  "gps1CNO", // 15: DID_GPS1_SAT
1821  "gps2CNO", // 16: DID_GPS2_SAT
1822  "gps1Version", // 17: DID_GPS1_VERSION
1823  "gps2Version", // 18: DID_GPS2_VERSION
1824  "magCal", // 19: DID_MAG_CAL
1825  "diagnosticInfo", // 20: DID_INTERNAL_DIAGNOSTIC
1826  "gpsRtkPosRel", // 21: DID_GPS1_RTK_POS_REL
1827  "gpsRtkPosMisc", // 22: DID_GPS1_RTK_POS_MISC
1828  "featureBits", // 23: DID_FEATURE_BITS
1829  "sensorIS1", // 24: DID_SENSORS_IS1
1830  "sensorIS2", // 25: DID_SENSORS_IS2
1831  "sensorTCbias", // 26: DID_SENSORS_TC_BIAS
1832  "ioServos", // 27: DID_IO
1833  "sensorLSB", // 28: DID_SENSORS_ADC
1834  "scomp", // 29: DID_SCOMP
1835  "gps1Vel", // 30: DID_GPS1_VEL
1836  "gps2Vel", // 31: DID_GPS2_VEL
1837  "hdwParams", // 32: DID_HDW_PARAMS
1838  "userPageNvr", // 33: DID_NVR_MANAGE_USERPAGE
1839  "userPageSn", // 34: DID_NVR_USERPAGE_SN
1840  "userpage0", // 35: DID_NVR_USERPAGE_G0
1841  "userpage1", // 36: DID_NVR_USERPAGE_G1
1842  "debugString", // 37: DID_DEBUG_STRING
1843  "rtosInfo", // 38: DID_RTOS_INFO
1844  "debugArray", // 39: DID_DEBUG_ARRAY
1845  "sensorCal1", // 40: DID_SENSORS_CAL1
1846  "sensorCal2", // 41: DID_SENSORS_CAL2
1847  "sensorCalSC", // 42: DID_CAL_SC
1848  "sensorCalSC1", // 43: DID_CAL_SC1
1849  "sensorCalSC2", // 44: DID_CAL_SC2
1850  "sensorSigma", // 45: DID_SYS_SENSORS_SIGMA
1851  "sensorAdcSigma", // 46: DID_SENSORS_ADC_SIGMA
1852  "insDev1", // 47: DID_INS_DEV_1
1853  "inl2States", // 48: DID_INL2_STATES
1854  "inl2CovarianceLD", // 49: DID_INL2_COVARIANCE_LD
1855  "inl2Status", // 50: DID_INL2_STATUS
1856  "inl2Misc", // 51: DID_INL2_MISC
1857  "magnetometer1", // 52: DID_MAGNETOMETER_1
1858  "barometer", // 53: DID_BAROMETER
1859  "gps1RtkPos", // 54: DID_GPS1_RTK_POS
1860  "magnetometer2", // 55: DID_MAGNETOMETER_2
1861  "commLoopback", // 56: DID_COMMUNICATIONS_LOOPBACK
1862  "imuDualRaw", // 57: DID_DUAL_IMU_RAW
1863  "imuDual", // 58: DID_DUAL_IMU
1864  "inl2MagObs", // 59: DID_INL2_MAG_OBS_INFO
1865  "gpsBaseRaw", // 60: DID_GPS_BASE_RAW
1866  "gpsRtkOptions", // 61: DID_GPS_RTK_OPT
1867  "userPageInternal", // 62: DID_NVR_USERPAGE_INTERNAL
1868  "manufacturingInfo", // 63: DID_MANUFACTURING_INFO
1869  "bit", // 64: DID_BIT
1870  "ins3", // 65: DID_INS_3
1871  "ins4", // 66: DID_INS_4
1872  "inl2NedSigma", // 67: DID_INL2_NED_SIGMA
1873  "strobeInTime", // 68: DID_STROBE_IN_TIME
1874  "gps1Raw", // 69: DID_GPS1_RAW
1875  "gps2Raw", // 70: DID_GPS2_RAW
1876  "wheelEncoder", // 71: DID_WHEEL_ENCODER
1877  "diagnosticMsg", // 72: DID_DIAGNOSTIC_MESSAGE
1878  "surveyIn", // 73: DID_SURVEY_IN
1879  "sensorCalSCInfo", // 74: DID_CAL_SC_INFO
1880  "portMonitor", // 75: DID_PORT_MONITOR
1881  "rtkState", // 76: DID_RTK_STATE
1882  "rtkPhaseResidual", // 77: DID_RTK_PHASE_RESIDUAL
1883  "rtkCodeResidual", // 78: DID_RTK_CODE_RESIDUAL
1884  "rtkDebug", // 79: DID_RTK_DEBUG
1885  "evbStatus", // 80: DID_EVB_STATUS
1886  "evbFlashCfg", // 81: DID_EVB_FLASH_CFG
1887  "evb2DebugArray", // 82: DID_EVB_DEBUG_ARRAY
1888  "evbRtosInfo", // 83: DID_EVB_RTOS_INFO
1889  "imu_mag_raw", // 84: DID_DUAL_IMU_RAW_MAG
1890  "imu_mag", // 85: DID_DUAL_IMU_MAG
1891  "pimu_mag", // 86: DID_PREINTEGRATED_IMU_MAG
1892  "wheelConfig", // 87: DID_WHEEL_CONFIG
1893  "positionMeasurement", // 88: DID_POSITION_MEASUREMENT
1894  "rtkDebug2", // 89: DID_RTK_DEBUG_2
1895  "canconfig", // 90:
1896  "gps2RtkCmpRel", // 91: DID_GPS2_RTK_CMP_REL
1897  "gps2RtkCmpMisc", // 92: DID_GPS2_RTK_CMP_MISC
1898  "unused_93", // 93:
1899  "unused_94", // 94:
1900  "unused_95" // 95:
1901  };
1902 
1903  STATIC_ASSERT(_ARRAY_ELEMENT_COUNT(s_dataIdNames) == DID_COUNT);
1904 
1905  if (dataId < DID_COUNT)
1906  {
1907  return s_dataIdNames[dataId];
1908  }
1909  return "unknown";
1910 }
1911 
1912 
1914 {
1915 
1916 #if PLATFORM_IS_EMBEDDED
1917 
1918  if (s_map == NULLPTR)
1919  {
1920  s_map = new cISDataMappings();
1921  }
1922 
1923 #endif
1924 
1925  if (dataId < DID_COUNT)
1926  {
1927 
1928 #if PLATFORM_IS_EMBEDDED
1929 
1930  return &s_map->m_lookupInfo[dataId];
1931 
1932 #else
1933 
1934  return &s_map.m_lookupInfo[dataId];
1935 
1936 #endif
1937 
1938  }
1939  return NULLPTR;
1940 }
1941 
1942 
1943 uint32_t cISDataMappings::GetSize(uint32_t dataId)
1944 {
1945 
1946 #if PLATFORM_IS_EMBEDDED
1947 
1948  if (s_map == NULLPTR)
1949  {
1950  s_map = new cISDataMappings();
1951  }
1952 
1953 #endif
1954 
1955 #if PLATFORM_IS_EMBEDDED
1956 
1957  return (dataId < DID_MAX_COUNT ? s_map->m_lookupSize[dataId] : 0);
1958 
1959 #else
1960 
1961  return (dataId < DID_MAX_COUNT ? s_map.m_lookupSize[dataId] : 0);
1962 
1963 #endif
1964 
1965 }
1966 
1967 
1968 bool cISDataMappings::StringToData(const char* stringBuffer, int stringLength, const p_data_hdr_t* hdr, uint8_t* dataBuffer, const data_info_t& info, int radix, bool json)
1969 {
1970  const uint8_t* ptr;
1971  if (!CanGetFieldData(info, hdr, dataBuffer, ptr))
1972  {
1973  return false;
1974  }
1975 
1976  switch (info.dataType)
1977  {
1978  case DataTypeInt8:
1979  *(int8_t*)ptr = (int8_t)strtol(stringBuffer, NULL, radix);
1980  break;
1981 
1982  case DataTypeUInt8:
1983  *(uint8_t*)ptr = (uint8_t)strtoul(stringBuffer, NULL, radix);
1984  break;
1985 
1986  case DataTypeInt16:
1987  *(int16_t*)ptr = (int16_t)strtol(stringBuffer, NULL, radix);
1988  break;
1989 
1990  case DataTypeUInt16:
1991  *(uint16_t*)ptr = (uint16_t)strtoul(stringBuffer, NULL, radix);
1992  break;
1993 
1994  case DataTypeInt32:
1995  *(int32_t*)ptr = (int32_t)strtol(stringBuffer, NULL, radix);
1996  break;
1997 
1998  case DataTypeUInt32:
1999  *(uint32_t*)ptr = (uint32_t)strtoul(stringBuffer, NULL, radix);
2000  break;
2001 
2002  case DataTypeInt64:
2003  *(int64_t*)ptr = (int64_t)strtoll(stringBuffer, NULL, radix);
2004  break;
2005 
2006  case DataTypeUInt64:
2007  *(uint64_t*)ptr = (uint64_t)strtoull(stringBuffer, NULL, radix);
2008  break;
2009 
2010  case DataTypeFloat:
2011  *(float*)ptr = strtof(stringBuffer, NULL);
2012  break;
2013 
2014  case DataTypeDouble:
2015  *(double*)ptr = strtod(stringBuffer, NULL);
2016  break;
2017 
2018  case DataTypeString:
2019  {
2020  string s2(stringBuffer);
2021  if (json)
2022  {
2023  char c;
2024  bool escaped = false;
2025  for (size_t i = 0; i < s2.size(); i++)
2026  {
2027  c = s2[i];
2028  if (c == '\\')
2029  {
2030  if (!escaped)
2031  {
2032  escaped = true;
2033  s2.erase(i);
2034  continue;
2035  }
2036  }
2037  escaped = false;
2038  }
2039  s2 = stringBuffer;
2040  }
2041  else
2042  {
2043  s2.erase(std::remove(s2.begin(), s2.end(), '"'), s2.end());
2044  }
2045  // ensure string fits with null terminator
2046  s2.resize(info.dataSize - 1);
2047  memcpy((void*)ptr, s2.data(), s2.length());
2048  memset((uint8_t*)ptr + s2.length(), 0, info.dataSize - s2.length());
2049  } break;
2050 
2051  case DataTypeBinary:
2052  {
2053  // convert hex data back to binary
2054  size_t len = _MIN(1020, stringLength);
2055  len -= (len % 2);
2056  uint8_t* ptr2 = (uint8_t*)ptr;
2057  for (size_t i = 0; i != len; i += 2)
2058  {
2059  *ptr2 = (getHexValue(stringBuffer[i + 1]) << 4) | getHexValue(stringBuffer[i + 2]);
2060  }
2061  } break;
2062 
2063  default:
2064  return false;
2065  }
2066 
2067  return true;
2068 }
2069 
2070 
2071 bool cISDataMappings::DataToString(const data_info_t& info, const p_data_hdr_t* hdr, const uint8_t* dataBuffer, data_mapping_string_t stringBuffer, bool json)
2072 {
2073  const uint8_t* ptr;
2074  if (!CanGetFieldData(info, hdr, dataBuffer, ptr))
2075  {
2076  // pick a default string
2077  if (info.dataType == DataTypeString)
2078  {
2079  stringBuffer[0] = '"';
2080  stringBuffer[1] = '"';
2081  stringBuffer[2] = '\0';
2082  }
2083  else if (info.dataType == DataTypeBinary)
2084  {
2085  if (json)
2086  {
2087  stringBuffer[0] = '"';
2088  stringBuffer[1] = '"';
2089  stringBuffer[2] = '\0';
2090  }
2091  else
2092  {
2093  stringBuffer[0] = '\0';
2094  }
2095  }
2096  else
2097  {
2098  stringBuffer[0] = '0';
2099  stringBuffer[1] = '\0';
2100  }
2101  return false;
2102  }
2103 
2104  switch (info.dataType)
2105  {
2106  case DataTypeInt8:
2107  SNPRINTF(stringBuffer, IS_DATA_MAPPING_MAX_STRING_LENGTH, "%d", (int)*(int8_t*)ptr);
2108  break;
2109 
2110  case DataTypeUInt8:
2111  SNPRINTF(stringBuffer, IS_DATA_MAPPING_MAX_STRING_LENGTH, "%u", (unsigned int)*(uint8_t*)ptr);
2112  break;
2113 
2114  case DataTypeInt16:
2115  SNPRINTF(stringBuffer, IS_DATA_MAPPING_MAX_STRING_LENGTH, "%d", (int)*(int16_t*)ptr);
2116  break;
2117 
2118  case DataTypeUInt16:
2119  SNPRINTF(stringBuffer, IS_DATA_MAPPING_MAX_STRING_LENGTH, "%u", (unsigned int)*(uint16_t*)ptr);
2120  break;
2121 
2122  case DataTypeInt32:
2123  SNPRINTF(stringBuffer, IS_DATA_MAPPING_MAX_STRING_LENGTH, "%d", (int)*(int32_t*)ptr);
2124  break;
2125 
2126  case DataTypeUInt32:
2127  SNPRINTF(stringBuffer, IS_DATA_MAPPING_MAX_STRING_LENGTH, "%u", (unsigned int)*(uint32_t*)ptr);
2128  break;
2129 
2130  case DataTypeInt64:
2131  SNPRINTF(stringBuffer, IS_DATA_MAPPING_MAX_STRING_LENGTH, "%lld", (long long)*(int64_t*)ptr);
2132  break;
2133 
2134  case DataTypeUInt64:
2135  SNPRINTF(stringBuffer, IS_DATA_MAPPING_MAX_STRING_LENGTH, "%llu", (unsigned long long)*(uint64_t*)ptr);
2136  break;
2137 
2138  case DataTypeFloat:
2139  SNPRINTF(stringBuffer, IS_DATA_MAPPING_MAX_STRING_LENGTH, "%.9g", *(float*)ptr);
2140  break;
2141 
2142  case DataTypeDouble:
2143  SNPRINTF(stringBuffer, IS_DATA_MAPPING_MAX_STRING_LENGTH, "%.17g", *(double*)ptr);
2144  break;
2145 
2146  case DataTypeString:
2147  {
2148  stringBuffer[0] = '"';
2149  int tempIndex = 1;
2150  char* bufPtr2 = (char*)(dataBuffer + info.dataOffset);
2151  char* bufPtrEnd = bufPtr2 + _MIN(IS_DATA_MAPPING_MAX_STRING_LENGTH, info.dataSize) - 3;
2152  for (; bufPtr2 < bufPtrEnd && *bufPtr2 != '\0'; bufPtr2++)
2153  {
2154  if (json)
2155  {
2156  if (IS_JSON_ESCAPE_CHAR(*bufPtr2))
2157  {
2158  if (bufPtr2 < bufPtrEnd - 1)
2159  {
2160  stringBuffer[tempIndex++] = '\\';
2161  }
2162  else
2163  {
2164  break;
2165  }
2166  }
2167  }
2168  stringBuffer[tempIndex++] = *bufPtr2;
2169  }
2170  stringBuffer[tempIndex++] = '"';
2171  stringBuffer[tempIndex] = '\0';
2172  } break;
2173 
2174  case DataTypeBinary:
2175  {
2176  size_t hexIndex = 1;
2177  if (json)
2178  {
2179  stringBuffer[0] = '"';
2180  }
2181  // convert to hex
2182  const unsigned char* hexTable = getHexLookupTable();
2183  for (size_t i = 0; i < info.dataSize; i++)
2184  {
2185  stringBuffer[hexIndex++] = hexTable[0x0F & (dataBuffer[i] >> 4)];
2186  stringBuffer[hexIndex++] = hexTable[0x0F & dataBuffer[i]];
2187  }
2188  if (json)
2189  {
2190  stringBuffer[hexIndex++] = '"';
2191  }
2192  stringBuffer[hexIndex] = '\0';
2193  } break;
2194 
2195  default:
2196  stringBuffer[0] = '\0';
2197  return false;
2198  }
2199  return true;
2200 }
2201 
2202 double cISDataMappings::GetTimestamp(const p_data_hdr_t* hdr, const uint8_t* buf)
2203 {
2204  if (hdr == NULL || buf == NULL || hdr->id == 0 || hdr->id >= DID_COUNT || hdr->size == 0)
2205  {
2206  return 0.0;
2207  }
2208 
2209  // raw data types with observation use a custom timestamp function
2210  if (hdr->id == DID_GPS1_RAW || hdr->id == DID_GPS2_RAW || hdr->id == DID_GPS_BASE_RAW)
2211  {
2212  gps_raw_t* raw = (gps_raw_t*)buf;
2214  {
2215  const obsd_t& obs = raw->data.obs[0];
2216  return obs.time.sec + (double)obs.time.time;
2217  }
2218  return 0.0;
2219  }
2220 
2221 #if PLATFORM_IS_EMBEDDED
2222 
2223  if (s_map == NULLPTR)
2224  {
2225  s_map = new cISDataMappings();
2226  }
2227 
2228 #endif
2229 
2230  const data_info_t* timeStampField =
2231 
2232 #if PLATFORM_IS_EMBEDDED
2233 
2234  s_map->m_timestampFields[hdr->id];
2235 
2236 #else
2237 
2238  s_map.m_timestampFields[hdr->id];
2239 
2240 #endif
2241 
2242  if (timeStampField != NULLPTR)
2243  {
2244  const uint8_t* ptr;
2245  if (CanGetFieldData(*timeStampField, hdr, (uint8_t*)buf, ptr))
2246  {
2247  if (timeStampField->dataType == DataTypeDouble)
2248  {
2249  // field is seconds, use as is
2250  return *(double*)ptr;
2251  }
2252  else if (timeStampField->dataType == DataTypeUInt32)
2253  {
2254  // field is milliseconds, convert to seconds
2255  return 0.001 * (*(uint32_t*)ptr);
2256  }
2257  }
2258  }
2259  return 0.0;
2260 }
2261 
2262 bool cISDataMappings::CanGetFieldData(const data_info_t& info, const p_data_hdr_t* hdr, const uint8_t* buf, const uint8_t*& ptr)
2263 {
2264  if (buf == NULL)
2265  {
2266  return false;
2267  }
2268  else if (hdr == NULL)
2269  {
2270  // assume buf is large enough for the full data structure
2271  ptr = buf + info.dataOffset;
2272  return true;
2273  }
2274  int32_t fullSize = (hdr->size == 0 ? GetSize(hdr->id) : hdr->size);
2275  int32_t offset = (int32_t)info.dataOffset - (int32_t)hdr->offset;
2276  if (offset >= 0 && offset <= fullSize - (int32_t)info.dataSize)
2277  {
2278  ptr = (buf + offset);
2279  return true;
2280  }
2281  ptr = NULL;
2282  return false;
2283 }
#define _MIN(a, b)
Definition: ISConstants.h:298
static bool IS_JSON_ESCAPE_CHAR(char c)
Definition: DataJSON.h:25
static void PopulateFlashConfigMappings(map_name_to_info_t mappings[DID_COUNT])
#define DID_DUAL_IMU
Definition: data_sets.h:92
struct PACKED can_config_t
static const char * GetDataSetName(uint32_t dataId)
static const map_name_to_info_t * GetMapInfo(uint32_t dataId)
static void PopulateConfigMappings(map_name_to_info_t mappings[DID_COUNT])
#define ASSERT_SIZE(s)
struct PACKED rtk_residual_t
uint32_t GetDataTypeSize(eDataType dataType)
static void PopulateGpsRawMappings(map_name_to_info_t mappings[DID_COUNT], uint32_t id)
static void PopulateIMUMagnetometerMappings(map_name_to_info_t mappings[DID_COUNT], uint32_t id)
struct PACKED debug_array_t
static void PopulateGPSCNOMappings(map_name_to_info_t mappings[DID_COUNT], uint32_t id)
#define DID_RTK_DEBUG_2
Definition: data_sets.h:123
struct PACKED gps_pos_t
struct PACKED gps_sat_t
float f_t
Definition: ISConstants.h:786
static void PopulateBarometerMappings(map_name_to_info_t mappings[DID_COUNT])
#define DEVINFO_MANUFACTURER_STRLEN
Definition: data_sets.h:149
#define DID_GPS1_VEL
Definition: data_sets.h:64
static void PopulateCanConfigMappings(map_name_to_info_t mappings[DID_COUNT])
uint32_t dataSize
Definition: DataCSV.h:50
static void PopulateGpsRtkMiscMappings(map_name_to_info_t mappings[DID_COUNT], uint32_t id)
uint32_t id
Definition: ISComm.h:376
#define DID_INS_1
Definition: data_sets.h:38
struct PACKED inl2_status_t
uint32_t size
Definition: ISComm.h:379
static void PopulateRtosInfoMappings(map_name_to_info_t mappings[DID_COUNT])
#define DEVINFO_ADDINFO_STRLEN
Definition: data_sets.h:150
CONST_EXPRESSION uint32_t s_eDataTypeSizes[DataTypeCount]
#define DID_GPS2_RTK_CMP_REL
Definition: data_sets.h:125
#define DID_SENSORS_IS2
Definition: data_sets.h:59
uint32_t dataOffset
Definition: DataCSV.h:49
obsd_t obs[MAX_OBSERVATION_COUNT_IN_RTK_MESSAGE]
Definition: data_sets.h:2883
uGpsRawData data
Definition: data_sets.h:2920
#define DID_DUAL_IMU_MAG
Definition: data_sets.h:119
#define DID_GPS1_UBX_POS
Definition: data_sets.h:40
size_t count(InputIterator first, InputIterator last, T const &item)
Definition: catch.hpp:3206
#define DID_SCOMP
Definition: data_sets.h:63
struct PACKED wheel_encoder_t
struct PACKED ins_1_t
#define DID_COUNT
Definition: data_sets.h:138
struct PACKED sys_params_t
#define DID_DEV_INFO
Definition: data_sets.h:35
#define DID_INS_2
Definition: data_sets.h:39
uint32_t m_lookupSize[DID_COUNT]
static void PopulateEvbFlashCfgMappings(map_name_to_info_t mappings[DID_COUNT])
static void PopulateIMUDeltaThetaVelocityMappings(map_name_to_info_t mappings[DID_COUNT])
#define NULL
Definition: nm_bsp.h:52
static cISDataMappings s_map
struct PACKED rtos_info_t
struct PACKED sys_sensors_adc_t
#define DID_GPS2_VERSION
Definition: data_sets.h:52
static void PopulateSysSensorsMappings(map_name_to_info_t mappings[DID_COUNT])
#define WIFI_SSID_PSK_SIZE
Definition: data_sets.h:3085
#define DID_PREINTEGRATED_IMU
Definition: data_sets.h:37
struct PACKED dual_imu_t
#define DID_SYS_PARAMS
Definition: data_sets.h:44
#define DID_INL2_MISC
Definition: data_sets.h:85
#define DID_PREINTEGRATED_IMU_MAG
Definition: data_sets.h:120
struct PACKED gps_rtk_misc_t
#define DID_SENSORS_TC_BIAS
Definition: data_sets.h:60
#define DID_GPS_BASE_RAW
Definition: data_sets.h:94
#define NULLPTR
Definition: ISConstants.h:426
#define CONST_EXPRESSION
Definition: ISConstants.h:411
#define MEMBERSIZE(type, member)
Definition: ISConstants.h:334
struct PACKED strobe_in_time_t
#define DID_MAGNETOMETER_2
Definition: data_sets.h:89
const unsigned char * getHexLookupTable()
static bool StringToData(const char *stringBuffer, int stringLength, const p_data_hdr_t *hdr, uint8_t *dataBuffer, const data_info_t &info, int radix=10, bool json=false)
char data_mapping_string_t[IS_DATA_MAPPING_MAX_STRING_LENGTH]
static double GetTimestamp(const p_data_hdr_t *hdr, const uint8_t *buf)
struct PACKED inl2_mag_obs_info_t
static void PopulateDeviceInfoMappings(map_name_to_info_t mappings[DID_COUNT])
static void PopulateINS1Mappings(map_name_to_info_t mappings[DID_COUNT])
#define DID_GPS1_VERSION
Definition: data_sets.h:51
#define DID_GPS1_SAT
Definition: data_sets.h:49
def hdwStatus(hstatus)
Hardware Status #####.
static void PopulateGpsPosMappings(map_name_to_info_t mappings[DID_COUNT], uint32_t id)
map_name_to_info_t m_lookupInfo[DID_COUNT]
ROSLIB_DECL std::string command(const std::string &cmd)
struct PACKED inl2_states_t
#define DID_CAN_CONFIG
Definition: data_sets.h:124
#define DID_SYS_CMD
Definition: data_sets.h:41
#define DID_GPS2_RAW
Definition: data_sets.h:104
uint8_t getHexValue(unsigned char hex)
#define DID_NVR_USERPAGE_G1
Definition: data_sets.h:70
static void PopulateIMUMappings(map_name_to_info_t mappings[DID_COUNT], uint32_t dataId)
#define DID_SENSORS_IS1
Definition: data_sets.h:58
struct PACKED ins_3_t
#define DID_GPS2_RTK_CMP_MISC
Definition: data_sets.h:126
#define DID_GPS1_RAW
Definition: data_sets.h:103
#define DID_FLASH_CONFIG
Definition: data_sets.h:46
struct PACKED gps_version_t
const unsigned char g_asciiToLowerMap[256]
static bool CanGetFieldData(const data_info_t &info, const p_data_hdr_t *hdr, const uint8_t *buf, const uint8_t *&ptr)
#define DID_RTK_DEBUG
Definition: data_sets.h:113
#define DID_GPS2_POS
Definition: data_sets.h:48
#define DID_DIAGNOSTIC_MESSAGE
Definition: data_sets.h:106
struct PACKED preintegrated_imu_t
static void PopulateGpsRtkRelMappings(map_name_to_info_t mappings[DID_COUNT], uint32_t id)
static void PopulateStrobeInTimeMappings(map_name_to_info_t mappings[DID_COUNT])
static uint32_t GetSize(uint32_t dataId)
static void PopulateTimestampField(uint32_t id, const data_info_t **timestamps, map_name_to_info_t mappings[DID_COUNT])
static void PopulateINS2Mappings(map_name_to_info_t mappings[DID_COUNT], uint32_t did)
const data_info_t * m_timestampFields[DID_COUNT]
#define IS_DATA_MAPPING_MAX_STRING_LENGTH
Definition: DataCSV.h:24
static void PopulateMagnetometerMappings(map_name_to_info_t mappings[DID_COUNT], uint32_t id)
#define NUMSATSOL
Definition: data_sets.h:3776
#define DID_MAGNETOMETER_1
Definition: data_sets.h:86
#define SNPRINTF
Definition: ISConstants.h:146
#define DID_RTK_CODE_RESIDUAL
Definition: data_sets.h:112
struct PACKED barometer_t
USBInterfaceDescriptor data
def insStatus(istatus)
INS Status #####.
#define DID_DUAL_IMU_RAW_MAG
Definition: data_sets.h:118
uint16_t reserved
struct PACKED gps_rtk_rel_t
#define DID_EVB_FLASH_CFG
Definition: data_sets.h:115
struct PACKED nvm_flash_cfg_t
#define MAX_TASK_NAME_LEN
Definition: data_sets.h:3408
#define DID_GPS1_POS
Definition: data_sets.h:47
static void PopulateWheelEncoderMappings(map_name_to_info_t mappings[DID_COUNT])
struct PACKED sys_sensors_t
static void PopulateSysParamsMappings(map_name_to_info_t mappings[DID_COUNT])
static void PopulateSizeMappings(uint32_t sizeMap[DID_COUNT])
virtual ~cISDataMappings()
#define DID_SYS_SENSORS
Definition: data_sets.h:45
static bool DataToString(const data_info_t &info, const p_data_hdr_t *hdr, const uint8_t *dataBuffer, data_mapping_string_t stringBuffer, bool json=false)
#define DID_INL2_MAG_OBS_INFO
Definition: data_sets.h:93
#define DID_GPS2_SAT
Definition: data_sets.h:50
#define DID_INS_3
Definition: data_sets.h:99
#define DID_DUAL_IMU_RAW
Definition: data_sets.h:91
#define STATIC_ASSERT(exp)
Definition: ISConstants.h:416
struct PACKED pimu_mag_t
#define DID_WHEEL_ENCODER
Definition: data_sets.h:105
#define DID_GPS1_RTK_POS
Definition: data_sets.h:88
static void PopulateDiagMsgMappings(map_name_to_info_t mappings[DID_COUNT])
struct PACKED magnetometer_t
struct PACKED system_command_t
#define DID_STROBE_IN_TIME
Definition: data_sets.h:102
map< string, data_info_t, sCaseInsensitiveCompare > map_name_to_info_t
#define DID_INL2_STATUS
Definition: data_sets.h:84
struct PACKED gps_raw_t
static void PopulateIMUDeltaThetaVelocityMagMappings(map_name_to_info_t mappings[DID_COUNT])
eDataType dataType
Definition: DataCSV.h:51
struct PACKED ins_4_t
#define DID_NVR_USERPAGE_G0
Definition: data_sets.h:69
#define DID_GPS1_RTK_POS_REL
Definition: data_sets.h:55
struct PACKED ins_2_t
struct PACKED gps_vel_t
static void PopulateINS4Mappings(map_name_to_info_t mappings[DID_COUNT])
uint8_t obsCount
Definition: data_sets.h:2914
#define _ARRAY_ELEMENT_COUNT(a)
Definition: ISConstants.h:326
is_can_time time
Definition: CAN_comm.h:252
struct PACKED rtk_debug_t
struct PACKED dev_info_t
uint8_t dataType
Definition: data_sets.h:2911
uint32_t offset
Definition: ISComm.h:382
#define DID_DEBUG_ARRAY
Definition: data_sets.h:73
#define DID_INS_4
Definition: data_sets.h:100
eDataType
Definition: DataCSV.h:26
struct PACKED imu_mag_t
#define DID_BAROMETER
Definition: data_sets.h:87
#define DID_RTOS_INFO
Definition: data_sets.h:72
#define DID_GPS2_VEL
Definition: data_sets.h:65
#define ADD_MAP(map, totalSize, name, member, dataSize, dataType, memberType)
#define DID_INL2_STATES
Definition: data_sets.h:82
#define DID_MAX_COUNT
Definition: data_sets.h:141
static void PopulateGpsVelMappings(map_name_to_info_t mappings[DID_COUNT], uint32_t id)
#define DID_RTK_PHASE_RESIDUAL
Definition: data_sets.h:111
#define DID_GPS1_RTK_POS_MISC
Definition: data_sets.h:56
#define DID_SENSORS_ADC
Definition: data_sets.h:62


inertial_sense_ros
Author(s):
autogenerated on Sun Feb 28 2021 03:17:57