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

Method play

app/src/CSV/Player.cpp:152–171  ·  view source on GitHub ↗

* @brief Starts CSV playback at the original capture speed. */

Source from the content-addressed store, hash-verified

150 * @brief Starts CSV playback at the original capture speed.
151 */
152void CSV::Player::play()
153{
154 Q_ASSERT(isOpen());
155 Q_ASSERT(!m_csvData.isEmpty());
156
157 if (frameCount() <= 0)
158 return;
159
160 if (m_framePos >= frameCount() - 1)
161 m_framePos = 0;
162
163 m_startTimestamp = getDateTime(m_framePos);
164 m_elapsedTimer.start();
165
166 if (m_useHighPrecisionTimestamps && m_framePos < m_timestampCache.size())
167 m_startTimestampSeconds = m_timestampCache[m_framePos];
168
169 m_playing = true;
170 Q_EMIT playerStateChanged();
171}
172
173/**
174 * @brief Pauses CSV playback.

Callers 2

setPausedMethod · 0.45
setPausedMethod · 0.45

Calls 3

isEmptyMethod · 0.80
startMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected