MCPcopy Create free account
hub / github.com/analogdevicesinc/scopy / getDevice

Method getDevice

core/src/scopymainwindow_api.cpp:90–100  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

88}
89
90Device *ScopyMainWindow_API::getDevice(int idx)
91{
92 Q_ASSERT(m_w->dm != nullptr);
93 Device *dev = nullptr;
94 QList mapKeys = m_w->dm->map.keys();
95 std::sort(mapKeys.begin(), mapKeys.end(), sortByUUID);
96 if(!mapKeys.isEmpty() && idx < mapKeys.size()) {
97 dev = m_w->dm->map[mapKeys[idx]];
98 }
99 return dev;
100}
101
102bool ScopyMainWindow_API::removeDevice(QString uri, QString cat)
103{

Callers 7

connectDeviceMethod · 0.45
disconnectDeviceMethod · 0.45
switchToolMethod · 0.45
getToolsMethod · 0.45
getToolsForPluginMethod · 0.45
getToolBtnStateMethod · 0.45
runToolMethod · 0.45

Calls 1

keysMethod · 0.80

Tested by

no test coverage detected