MCPcopy Create free account
hub / github.com/KDE/labplot / availablePorts

Method availablePorts

src/backend/datasources/LiveDataSource.cpp:97–113  ·  view source on GitHub ↗

! * \brief Returns a list with the names of the available ports */

Source from the content-addressed store, hash-verified

95 * \brief Returns a list with the names of the available ports
96 */
97QStringList LiveDataSource::availablePorts() {
98 QStringList ports;
99 // qDebug() << "available ports count:" << QSerialPortInfo::availablePorts().size();
100
101#ifdef HAVE_QTSERIALPORT
102 for (const QSerialPortInfo& sp : QSerialPortInfo::availablePorts()) {
103 ports.append(sp.portName());
104
105 DEBUG(" port " << STDSTRING(sp.portName()) << ": " << STDSTRING(sp.systemLocation()) << STDSTRING(sp.description()) << ' '
106 << STDSTRING(sp.manufacturer()) << ' ' << STDSTRING(sp.serialNumber()));
107 }
108 // For Testing:
109 // ports.append("/dev/pts/26");
110#endif
111
112 return ports;
113}
114
115/*!
116 * \brief Returns a list with the supported baud rates

Callers

nothing calls this directly

Calls 2

appendMethod · 0.80
descriptionMethod · 0.80

Tested by

no test coverage detected