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

Method getConfiguration

app/src/API/Handlers/HIDHandler.cpp:131–143  ·  view source on GitHub ↗

* @brief Get complete HID driver configuration and connected-device info. */

Source from the content-addressed store, hash-verified

129 * @brief Get complete HID driver configuration and connected-device info.
130 */
131API::CommandResponse API::Handlers::HIDHandler::getConfiguration(const QString& id,
132 const QJsonObject& params)
133{
134 Q_UNUSED(params)
135
136 auto* hid = IO::ConnectionManager::instance().hid();
137
138 QJsonObject result;
139 result[QStringLiteral("deviceIndex")] = hid->deviceIndex();
140 result[QStringLiteral("usagePage")] = hid->usagePage();
141 result[QStringLiteral("usage")] = hid->usage();
142 return CommandResponse::makeSuccess(id, result);
143}

Callers

nothing calls this directly

Calls 4

hidMethod · 0.80
usagePageMethod · 0.80
usageMethod · 0.80
deviceIndexMethod · 0.45

Tested by

no test coverage detected