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

Method setPipePath

app/src/API/Handlers/ProcessHandler.cpp:188–202  ·  view source on GitHub ↗

* @brief Set the named pipe / FIFO path for NamedPipe mode. */

Source from the content-addressed store, hash-verified

186 * @brief Set the named pipe / FIFO path for NamedPipe mode.
187 */
188API::CommandResponse API::Handlers::ProcessHandler::setPipePath(const QString& id,
189 const QJsonObject& params)
190{
191 if (!params.contains(QStringLiteral("pipePath"))) {
192 return CommandResponse::makeError(
193 id, ErrorCode::MissingParam, QStringLiteral("Missing required parameter: pipePath"));
194 }
195
196 const QString path = params.value(QStringLiteral("pipePath")).toString();
197 IO::ConnectionManager::instance().process()->setPipePath(path);
198
199 QJsonObject result;
200 result[QStringLiteral("pipePath")] = path;
201 return CommandResponse::makeSuccess(id, result);
202}
203
204//--------------------------------------------------------------------------------------------------
205// Getters

Callers

nothing calls this directly

Calls 3

containsMethod · 0.45
valueMethod · 0.45
processMethod · 0.45

Tested by

no test coverage detected