MCPcopy Create free account
hub / github.com/PlotJuggler/PlotJuggler / readForOffset

Function readForOffset

pj_datastore/src/plugin_data_host.cpp:96–106  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

94}
95
96[[nodiscard]] uint64_t readForOffset(const encoding::FrameOfReferenceEncoded& enc, std::size_t row) {
97 const uint8_t* data = enc.offsets.data();
98 switch (enc.offset_bytes) {
99 case 1:
100 return loadFromBytes<uint8_t>(data + row);
101 case 2:
102 return loadFromBytes<uint16_t>(data + row * 2);
103 default:
104 return loadFromBytes<uint32_t>(data + row * 4);
105 }
106}
107
108template <typename T>
109[[nodiscard]] T decodeNumericExact(const TopicChunk& chunk, std::size_t col_index, std::size_t row) {

Callers 1

decodeNumericExactFunction · 0.85

Calls 1

dataMethod · 0.45

Tested by

no test coverage detected