|
QGroundControl
Ground Control Station for MAVLink Drones
|
Provides information about existing serial ports. More...
#include <qserialportinfo.h>
Inheritance diagram for QSerialPortInfo:Public Member Functions | |
| QSerialPortInfo () | |
| QSerialPortInfo (const QSerialPort &port) | |
| QSerialPortInfo (const QString &name) | |
| QSerialPortInfo (const QSerialPortInfo &other) | |
| QSerialPortInfo (const QSerialPortInfoPrivate &dd) | |
| ~QSerialPortInfo () | |
| QSerialPortInfo & | operator= (const QSerialPortInfo &other) |
| void | swap (QSerialPortInfo &other) |
| QString | portName () const |
| QString | systemLocation () const |
| QString | description () const |
| QString | manufacturer () const |
| QString | serialNumber () const |
| quint16 | vendorIdentifier () const |
| quint16 | productIdentifier () const |
| bool | hasVendorIdentifier () const |
| bool | hasProductIdentifier () const |
| bool | isNull () const |
Static Public Member Functions | |
| static QList< qint32 > | standardBaudRates () |
| static QList< QSerialPortInfo > | availablePorts () |
Friends | |
| QList< QSerialPortInfo > | availablePortsByFiltersOfDevices (bool &ok) |
Provides information about existing serial ports.
\inmodule QtSerialPort
Use the static \l availablePorts() function to generate a list of QSerialPortInfo objects. Each QSerialPortInfo object in the list represents a single serial port and can be queried for the \l {portName}{port name}, \l {systemLocation}{system location}, \l description, \l manufacturer, and some other hardware parameters. The QSerialPortInfo class can also be used as an input parameter for the \l {QSerialPort::}{setPort()} method of the QSerialPort class.
Definition at line 17 of file qserialportinfo.h.
| QSerialPortInfo::QSerialPortInfo | ( | ) |
Constructs an empty QSerialPortInfo object.
Definition at line 52 of file qserialportinfo.cpp.
Referenced by operator=().
|
explicit |
Constructs a QSerialPortInfo object from serial port.
Definition at line 67 of file qserialportinfo.cpp.
|
explicit |
Constructs a QSerialPortInfo object from serial port name.
This constructor finds the relevant serial port among the available ones according to the port name name, and constructs the serial port info instance for that port.
Definition at line 79 of file qserialportinfo.cpp.
References availablePorts().
| QSerialPortInfo::QSerialPortInfo | ( | const QSerialPortInfo & | other | ) |
Constructs a copy of other.
Definition at line 59 of file qserialportinfo.cpp.
| QSerialPortInfo::QSerialPortInfo | ( | const QSerialPortInfoPrivate & | dd | ) |
Definition at line 90 of file qserialportinfo.cpp.
| QSerialPortInfo::~QSerialPortInfo | ( | ) |
Destroys the QSerialPortInfo object. References to the values in the object become invalid.
Definition at line 99 of file qserialportinfo.cpp.
|
static |
Returns a list of available serial ports on the system.
Definition at line 38 of file qserialportinfo_android.cpp.
References availablePortsByFiltersOfDevices.
Referenced by QGCSerialPortInfo::availablePorts(), and QSerialPortInfo().
| QString QSerialPortInfo::description | ( | ) | const |
Returns the description string of the serial port, if available; otherwise returns an empty string.
Definition at line 149 of file qserialportinfo.cpp.
Referenced by FirmwareUpgradeController::boardDescription(), QGCSerialPortInfo::getBoardInfo(), QGCSerialPortInfo::isBlackCube(), and QGCSerialPortInfo::isBootloader().
| bool QSerialPortInfo::hasProductIdentifier | ( | ) | const |
Returns true if there is a valid 16-bit product number present; otherwise returns false.
Definition at line 225 of file qserialportinfo.cpp.
| bool QSerialPortInfo::hasVendorIdentifier | ( | ) | const |
Returns true if there is a valid 16-bit vendor number present; otherwise returns false.
Definition at line 213 of file qserialportinfo.cpp.
|
inline |
Returns whether this QSerialPortInfo object holds a serial port definition.
Definition at line 53 of file qserialportinfo.h.
Referenced by QGCSerialPortInfo::getBoardInfo().
| QString QSerialPortInfo::manufacturer | ( | ) | const |
Returns the manufacturer string of the serial port, if available; otherwise returns an empty string.
Definition at line 161 of file qserialportinfo.cpp.
Referenced by QGCSerialPortInfo::getBoardInfo().
| QSerialPortInfo & QSerialPortInfo::operator= | ( | const QSerialPortInfo & | other | ) |
Sets the QSerialPortInfo object to be equal to other.
Definition at line 115 of file qserialportinfo.cpp.
References QSerialPortInfo(), and swap().
| QString QSerialPortInfo::portName | ( | ) | const |
Returns the name of the serial port.
Definition at line 126 of file qserialportinfo.cpp.
Referenced by FirmwareUpgradeController::boardPort().
| quint16 QSerialPortInfo::productIdentifier | ( | ) | const |
Returns the 16-bit product number for the serial port, if available; otherwise returns zero.
Definition at line 201 of file qserialportinfo.cpp.
Referenced by QGCSerialPortInfo::getBoardInfo().
| QString QSerialPortInfo::serialNumber | ( | ) | const |
Returns the serial number string of the serial port, if available; otherwise returns an empty string.
Definition at line 177 of file qserialportinfo.cpp.
|
static |
Returns a list of available standard baud rates supported by the target platform.
Definition at line 244 of file qserialportinfo.cpp.
References QSerialPortPrivate::standardBaudRates().
| void QSerialPortInfo::swap | ( | QSerialPortInfo & | other | ) |
Swaps QSerialPortInfo other with this QSerialPortInfo. This operation is very fast and never fails.
Definition at line 107 of file qserialportinfo.cpp.
Referenced by operator=().
| QString QSerialPortInfo::systemLocation | ( | ) | const |
Returns the system location of the serial port.
Definition at line 137 of file qserialportinfo.cpp.
Referenced by QGCSerialPortInfo::isSystemPort(), and QSerialPort::setPort().
| quint16 QSerialPortInfo::vendorIdentifier | ( | ) | const |
Returns the 16-bit vendor number for the serial port, if available; otherwise returns zero.
Definition at line 189 of file qserialportinfo.cpp.
Referenced by QGCSerialPortInfo::getBoardInfo().
|
friend |
Definition at line 19 of file qserialportinfo_android.cpp.
Referenced by availablePorts().