30 #ifdef USE_IS_INTERNAL 31 #include "../../cpp/libs/IS_internal.h" 34 #if PLATFORM_IS_EMBEDDED 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
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),
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); 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)) 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 104 memset(sizeMap, 0,
sizeof(uint32_t) * DID_COUNT);
143 #ifdef USE_IS_INTERNAL 148 sizeMap[
DID_SCOMP] =
sizeof(sensor_compensation_t);
171 static const string timestampFields[] = {
"time",
"timeOfWeek",
"timeOfWeekMs",
"seconds" };
174 if (offsetMap.size() != 0)
178 map_name_to_info_t::const_iterator timestampField = offsetMap.find(timestampFields[i]);
179 if (timestampField != offsetMap.end())
181 timestamps[id] = (
const data_info_t*)×tampField->second;
194 uint32_t totalSize = 0;
229 uint32_t totalSize = 0;
252 uint32_t totalSize = 0;
274 uint32_t totalSize = 0;
302 uint32_t totalSize = 0;
327 uint32_t totalSize = 0;
350 uint32_t totalSize = 0;
373 uint32_t totalSize = 0;
401 uint32_t totalSize = 0;
416 uint32_t totalSize = 0;
527 uint32_t totalSize = 0;
540 uint32_t totalSize = 0;
554 uint32_t totalSize = 0;
578 uint32_t totalSize = 0;
610 uint32_t totalSize = 0;
641 uint32_t totalSize = 0;
658 uint32_t totalSize = 0;
669 uint32_t totalSize = 0;
735 uint32_t totalSize = 0;
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&);
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&);
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&);
801 uint32_t totalSize = 0;
820 uint32_t totalSize = 0;
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);
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);
860 ADD_MAP(m, totalSize,
"correctionChecksumFailures", correctionChecksumFailures, 0,
DataTypeUInt32, uint32_t);
870 uint32_t totalSize = 0;
885 uint32_t totalSize = 0;
899 uint32_t totalSize = 0;
907 ADD_MAP(m, totalSize,
"averageRunTimeUs[0]", task[0].averageRunTimeUs, 0,
DataTypeFloat,
float);
912 ADD_MAP(m, totalSize,
"name[1]", task[1].name, MAX_TASK_NAME_LEN,
DataTypeString,
char[MAX_TASK_NAME_LEN]);
918 ADD_MAP(m, totalSize,
"averageRunTimeUs[1]", task[1].averageRunTimeUs, 0,
DataTypeFloat,
float);
923 ADD_MAP(m, totalSize,
"name[2]", task[2].name, MAX_TASK_NAME_LEN,
DataTypeString,
char[MAX_TASK_NAME_LEN]);
929 ADD_MAP(m, totalSize,
"averageRunTimeUs[2]", task[2].averageRunTimeUs, 0,
DataTypeFloat,
float);
934 ADD_MAP(m, totalSize,
"name[3]", task[3].name, MAX_TASK_NAME_LEN,
DataTypeString,
char[MAX_TASK_NAME_LEN]);
940 ADD_MAP(m, totalSize,
"averageRunTimeUs[3]", task[3].averageRunTimeUs, 0,
DataTypeFloat,
float);
945 ADD_MAP(m, totalSize,
"name[4]", task[4].name, MAX_TASK_NAME_LEN,
DataTypeString,
char[MAX_TASK_NAME_LEN]);
951 ADD_MAP(m, totalSize,
"averageRunTimeUs[4]", task[4].averageRunTimeUs, 0,
DataTypeFloat,
float);
956 ADD_MAP(m, totalSize,
"name[5]", task[5].name, MAX_TASK_NAME_LEN,
DataTypeString,
char[MAX_TASK_NAME_LEN]);
962 ADD_MAP(m, totalSize,
"averageRunTimeUs[5]", task[5].averageRunTimeUs, 0,
DataTypeFloat,
float);
977 uint32_t totalSize = 0;
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&);
1038 uint32_t totalSize = 0;
1046 #ifdef USE_IS_INTERNAL 1052 uint32_t totalSize = 0;
1087 typedef sensors_w_temp_t MAP_TYPE;
1089 uint32_t totalSize = 0;
1116 typedef sensors_t MAP_TYPE;
1118 uint32_t totalSize = 0;
1143 typedef sensor_compensation_t MAP_TYPE;
1145 uint32_t totalSize = 0;
1190 uint32_t totalSize = 0;
1218 typedef nvm_group_0_t MAP_TYPE;
1220 uint32_t totalSize = 0;
1234 typedef nvm_group_1_t MAP_TYPE;
1236 uint32_t totalSize = 0;
1365 uint32_t totalSize = 0;
1399 uint32_t totalSize = 0;
1453 uint32_t totalSize = 0;
1463 uint32_t totalSize = 0;
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);
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);
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);
1500 ADD_MAP(m, totalSize,
"divergent_pnt_pos_iteration", divergent_pnt_pos_iteration, 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);
1538 typedef rtk_debug_2_t MAP_TYPE;
1540 uint32_t totalSize = 0;
1545 #if 0 // This doesn't work in Linux 1550 SNPRINTF(str,
sizeof(str),
"satBiasFloat[%d]", i);
1556 SNPRINTF(str,
sizeof(str),
"satBiasFix[%d]", i);
1562 SNPRINTF(str,
sizeof(str),
"qualL[%d]", i);
1568 SNPRINTF(str,
sizeof(str),
"sat[%d]", i);
1574 SNPRINTF(str,
sizeof(str),
"satBiasCov[%d]", i);
1723 #endif // USE_IS_INTERNAL 1765 #ifdef USE_IS_INTERNAL 1789 for (uint32_t
id = 0;
id <
DID_COUNT;
id++)
1803 static const char* s_dataIdNames[] =
1868 "manufacturingInfo",
1893 "positionMeasurement",
1907 return s_dataIdNames[dataId];
1916 #if PLATFORM_IS_EMBEDDED 1928 #if PLATFORM_IS_EMBEDDED 1946 #if PLATFORM_IS_EMBEDDED 1955 #if PLATFORM_IS_EMBEDDED 1957 return (dataId < DID_MAX_COUNT ? s_map->
m_lookupSize[dataId] : 0);
1979 *(int8_t*)ptr = (int8_t)strtol(stringBuffer,
NULL, radix);
1983 *(uint8_t*)ptr = (uint8_t)strtoul(stringBuffer,
NULL, radix);
1987 *(int16_t*)ptr = (int16_t)strtol(stringBuffer,
NULL, radix);
1991 *(uint16_t*)ptr = (uint16_t)strtoul(stringBuffer,
NULL, radix);
1995 *(int32_t*)ptr = (int32_t)strtol(stringBuffer,
NULL, radix);
1999 *(uint32_t*)ptr = (uint32_t)strtoul(stringBuffer,
NULL, radix);
2003 *(int64_t*)ptr = (int64_t)strtoll(stringBuffer,
NULL, radix);
2007 *(uint64_t*)ptr = (uint64_t)strtoull(stringBuffer,
NULL, radix);
2011 *(
float*)ptr = strtof(stringBuffer,
NULL);
2015 *(
double*)ptr = strtod(stringBuffer,
NULL);
2020 string s2(stringBuffer);
2024 bool escaped =
false;
2025 for (
size_t i = 0; i < s2.size(); i++)
2043 s2.erase(std::remove(s2.begin(), s2.end(),
'"'), s2.end());
2047 memcpy((
void*)ptr, s2.data(), s2.length());
2048 memset((uint8_t*)ptr + s2.length(), 0, info.
dataSize - s2.length());
2054 size_t len =
_MIN(1020, stringLength);
2056 uint8_t* ptr2 = (uint8_t*)ptr;
2057 for (
size_t i = 0; i != len; i += 2)
2079 stringBuffer[0] =
'"';
2080 stringBuffer[1] =
'"';
2081 stringBuffer[2] =
'\0';
2087 stringBuffer[0] =
'"';
2088 stringBuffer[1] =
'"';
2089 stringBuffer[2] =
'\0';
2093 stringBuffer[0] =
'\0';
2098 stringBuffer[0] =
'0';
2099 stringBuffer[1] =
'\0';
2148 stringBuffer[0] =
'"';
2150 char* bufPtr2 = (
char*)(dataBuffer + info.
dataOffset);
2152 for (; bufPtr2 < bufPtrEnd && *bufPtr2 !=
'\0'; bufPtr2++)
2158 if (bufPtr2 < bufPtrEnd - 1)
2160 stringBuffer[tempIndex++] =
'\\';
2168 stringBuffer[tempIndex++] = *bufPtr2;
2170 stringBuffer[tempIndex++] =
'"';
2171 stringBuffer[tempIndex] =
'\0';
2176 size_t hexIndex = 1;
2179 stringBuffer[0] =
'"';
2183 for (
size_t i = 0; i < info.
dataSize; i++)
2185 stringBuffer[hexIndex++] = hexTable[0x0F & (dataBuffer[i] >> 4)];
2186 stringBuffer[hexIndex++] = hexTable[0x0F & dataBuffer[i]];
2190 stringBuffer[hexIndex++] =
'"';
2192 stringBuffer[hexIndex] =
'\0';
2196 stringBuffer[0] =
'\0';
2216 return obs.
time.sec + (double)obs.
time.time;
2221 #if PLATFORM_IS_EMBEDDED 2232 #if PLATFORM_IS_EMBEDDED 2242 if (timeStampField !=
NULLPTR)
2250 return *(
double*)ptr;
2255 return 0.001 * (*(uint32_t*)ptr);
2268 else if (hdr ==
NULL)
2276 if (offset >= 0 && offset <= fullSize - (int32_t)info.
dataSize)
2278 ptr = (buf + offset);
static bool IS_JSON_ESCAPE_CHAR(char c)
static void PopulateFlashConfigMappings(map_name_to_info_t mappings[DID_COUNT])
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])
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)
static void PopulateBarometerMappings(map_name_to_info_t mappings[DID_COUNT])
#define DEVINFO_MANUFACTURER_STRLEN
static void PopulateCanConfigMappings(map_name_to_info_t mappings[DID_COUNT])
static void PopulateGpsRtkMiscMappings(map_name_to_info_t mappings[DID_COUNT], uint32_t id)
struct PACKED inl2_status_t
static void PopulateRtosInfoMappings(map_name_to_info_t mappings[DID_COUNT])
#define DEVINFO_ADDINFO_STRLEN
CONST_EXPRESSION uint32_t s_eDataTypeSizes[DataTypeCount]
#define DID_GPS2_RTK_CMP_REL
obsd_t obs[MAX_OBSERVATION_COUNT_IN_RTK_MESSAGE]
size_t count(InputIterator first, InputIterator last, T const &item)
struct PACKED wheel_encoder_t
struct PACKED sys_params_t
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])
static cISDataMappings s_map
struct PACKED rtos_info_t
struct PACKED sys_sensors_adc_t
static void PopulateSysSensorsMappings(map_name_to_info_t mappings[DID_COUNT])
#define WIFI_SSID_PSK_SIZE
#define DID_PREINTEGRATED_IMU
#define DID_PREINTEGRATED_IMU_MAG
struct PACKED gps_rtk_misc_t
#define DID_SENSORS_TC_BIAS
#define MEMBERSIZE(type, member)
struct PACKED strobe_in_time_t
#define DID_MAGNETOMETER_2
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])
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
uint8_t getHexValue(unsigned char hex)
#define DID_NVR_USERPAGE_G1
static void PopulateIMUMappings(map_name_to_info_t mappings[DID_COUNT], uint32_t dataId)
#define DID_GPS2_RTK_CMP_MISC
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_DIAGNOSTIC_MESSAGE
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
static void PopulateMagnetometerMappings(map_name_to_info_t mappings[DID_COUNT], uint32_t id)
#define DID_MAGNETOMETER_1
#define DID_RTK_CODE_RESIDUAL
struct PACKED barometer_t
USBInterfaceDescriptor data
#define DID_DUAL_IMU_RAW_MAG
struct PACKED gps_rtk_rel_t
#define DID_EVB_FLASH_CFG
struct PACKED nvm_flash_cfg_t
#define MAX_TASK_NAME_LEN
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()
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
#define STATIC_ASSERT(exp)
#define DID_WHEEL_ENCODER
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
map< string, data_info_t, sCaseInsensitiveCompare > map_name_to_info_t
static void PopulateIMUDeltaThetaVelocityMagMappings(map_name_to_info_t mappings[DID_COUNT])
#define DID_NVR_USERPAGE_G0
#define DID_GPS1_RTK_POS_REL
static void PopulateINS4Mappings(map_name_to_info_t mappings[DID_COUNT])
#define _ARRAY_ELEMENT_COUNT(a)
struct PACKED rtk_debug_t
#define ADD_MAP(map, totalSize, name, member, dataSize, dataType, memberType)
static void PopulateGpsVelMappings(map_name_to_info_t mappings[DID_COUNT], uint32_t id)
#define DID_RTK_PHASE_RESIDUAL
#define DID_GPS1_RTK_POS_MISC