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

Method processCommand

app/src/API/CommandHandler.cpp:154–164  ·  view source on GitHub ↗

* @brief Process a single command request; remote-origin device-write commands must clear the * user consent gate first, matching the raw byte paths. */

Source from the content-addressed store, hash-verified

152 * user consent gate first, matching the raw byte paths.
153 */
154API::CommandResponse API::CommandHandler::processCommand(const CommandRequest& request,
155 const CommandOrigin origin)
156{
157 const bool remote = (origin == CommandOrigin::Remote);
158 if (remote && !Server::instance().authorizeRemoteCommand(request.command)) {
159 return CommandResponse::makeError(
160 request.id, ErrorCode::ExecutionError, QStringLiteral("Device write denied by user"));
161 }
162
163 return CommandRegistry::instance().execute(request.command, request.id, request.params);
164}
165
166//--------------------------------------------------------------------------------------------------
167// Batch processing

Callers 2

dispatchApiCallFunction · 0.80
dispatchMethod · 0.80

Calls 2

executeMethod · 0.80

Tested by

no test coverage detected