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

Method getStatus

app/src/API/Handlers/CSVPlayerHandler.cpp:291–308  ·  view source on GitHub ↗

* @brief Get player status */

Source from the content-addressed store, hash-verified

289 * @brief Get player status
290 */
291API::CommandResponse API::Handlers::CSVPlayerHandler::getStatus(const QString& id,
292 const QJsonObject& params)
293{
294 Q_UNUSED(params)
295
296 auto& player = CSV::Player::instance();
297
298 QJsonObject result;
299 result[QStringLiteral("isOpen")] = player.isOpen();
300 result[QStringLiteral("isPlaying")] = player.isPlaying();
301 result[QStringLiteral("frameCount")] = player.frameCount();
302 result[QStringLiteral("framePosition")] = player.framePosition();
303 result[QStringLiteral("progress")] = player.progress();
304 result[QStringLiteral("timestamp")] = player.timestamp();
305 result[QStringLiteral("filename")] = player.filename();
306
307 return CommandResponse::makeSuccess(id, result);
308}

Callers

nothing calls this directly

Calls 6

isOpenMethod · 0.45
isPlayingMethod · 0.45
frameCountMethod · 0.45
framePositionMethod · 0.45
progressMethod · 0.45
filenameMethod · 0.45

Tested by

no test coverage detected