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

Method getScript

app/src/API/Handlers/ControlScriptHandler.cpp:108–116  ·  view source on GitHub ↗

* @brief Returns the current control-script source. */

Source from the content-addressed store, hash-verified

106 * @brief Returns the current control-script source.
107 */
108API::CommandResponse API::Handlers::ControlScriptHandler::getScript(const QString& id,
109 const QJsonObject& params)
110{
111 Q_UNUSED(params)
112
113 QJsonObject result;
114 result[QStringLiteral("code")] = DataModel::ProjectModel::instance().controlScriptCode();
115 return CommandResponse::makeSuccess(id, result);
116}
117
118/**
119 * @brief Replaces the control-script source through the project model.

Callers

nothing calls this directly

Calls 1

controlScriptCodeMethod · 0.80

Tested by

no test coverage detected