MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / setStartSequences

Method setStartSequences

app/src/IO/FrameReader.cpp:224–238  ·  view source on GitHub ↗

* @brief Configures the frame start delimiters and precomputes their KMP tables. */

Source from the content-addressed store, hash-verified

222 * @brief Configures the frame start delimiters and precomputes their KMP tables.
223 */
224void IO::FrameReader::setStartSequences(const QList<QByteArray>& starts)
225{
226 m_startSequences.clear();
227 m_startSequenceLps.clear();
228
229 for (const auto& s : starts) {
230 if (s.isEmpty())
231 continue;
232
233 m_startSequences.append(s);
234 m_startSequenceLps.append(m_circularBuffer.buildKMPTable(s));
235 }
236
237 Q_ASSERT(m_startSequences.size() == m_startSequenceLps.size());
238}
239
240/**
241 * @brief Configures the frame end delimiters and precomputes their KMP tables.

Callers 2

startFrameReaderMethod · 0.80
configureAndFeedFunction · 0.80

Calls 5

isEmptyMethod · 0.80
buildKMPTableMethod · 0.80
clearMethod · 0.45
appendMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected