MCPcopy Create free account
hub / github.com/comaps/comaps / ReadDataPoints

Function ReadDataPoints

tools/track_analyzing/log_parser.cpp:28–46  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

26namespace
27{
28vector<DataPoint> ReadDataPoints(string const & data)
29{
30 string const decoded = FromHex(data);
31 vector<DataPoint> points;
32 MemReaderWithExceptions memReader(decoded.data(), decoded.size());
33 ReaderSource<MemReaderWithExceptions> src(memReader);
34
35 try
36 {
37 coding::TrafficGPSEncoder::DeserializeDataPoints(coding::TrafficGPSEncoder::kLatestVersion, src, points);
38 }
39 catch (Reader::SizeException const & e)
40 {
41 points.clear();
42 LOG(LERROR, ("DataPoint is corrupted. data:", data));
43 LOG(LINFO, ("Continue reading..."));
44 }
45 return points;
46}
47
48class PointToMwmId final
49{

Callers 1

ParseUserTracksMethod · 0.85

Calls 4

FromHexFunction · 0.85
dataMethod · 0.45
sizeMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected