#include <AndroidSerialPortInfo.h>
Classes | |
| struct | Data |
| What is known of a port. More... | |
Public Member Functions | |
| QSerialPortInfo ()=default | |
| A null port info, which describes no port. | |
| QSerialPortInfo (const QString &name) | |
| The listed port of this port name or stable name. Null if there is none. | |
| QSerialPortInfo (const QSerialPort &port) | |
| The listed port that this port was named after. | |
| QSerialPortInfo (const Data &data) | |
| QString | portName () const |
| QString | stableName () const |
| bool | hasHardwareFlowControl () 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 () |
| static QString | portNameToSystemLocation (const QString &portName) |
| static QString | portNameFromSystemLocation (const QString &systemLocation) |
| static bool | isUsbLocation (const QString &systemLocation) |
| static QList< QSerialPortInfo > | posixPorts (const QString &devDir, const QString &sysTtyDir, const QList< QSerialPortInfo > &usbPorts={}) |
| static QList< QSerialPortInfo > | availablePorts (const QString &devDir, const QString &sysTtyDir) |
| What availablePorts() lists on a device that has its serial device nodes in these directories. | |
A serial port of the Android device, described as Qt Serial Port's class of this name describes one elsewhere. The ports are the USB serial ports that Java lists and, if the app says so (AndroidSerialAccess), the serial device nodes.
Definition at line 13 of file AndroidSerialPortInfo.h.
|
default |
A null port info, which describes no port.
Referenced by QGCSerialPortInfo::availablePorts(), QGCSerialPortInfo::isSystemPort(), posixPorts(), QGCSerialPortInfo::QGCSerialPortInfo(), QGCSerialPortInfo::QGCSerialPortInfo(), QSerialPortInfo(), and QSerialPortInfo().
|
explicit |
The listed port of this port name or stable name. Null if there is none.
Definition at line 23 of file AndroidSerialPortInfo.cc.
References availablePorts(), and QSerialPortInfo().
|
explicit |
The listed port that this port was named after.
Definition at line 35 of file AndroidSerialPortInfo.cc.
References portName(), and QSerialPortInfo().
|
explicit |
Definition at line 39 of file AndroidSerialPortInfo.cc.
|
static |
Definition at line 48 of file AndroidSerialPortInfo.cc.
References availablePorts().
Referenced by QGCSerialPortInfo::availablePorts(), availablePorts(), and QSerialPortInfo().
|
static |
What availablePorts() lists on a device that has its serial device nodes in these directories.
Definition at line 53 of file AndroidSerialPortInfo.cc.
References AndroidSerial::availablePorts(), posixPorts(), and AndroidSerialAccess::usePosixSerial().
|
inline |
Definition at line 54 of file AndroidSerialPortInfo.h.
Referenced by QGCSerialPortInfo::getBoardInfo(), QGCSerialPortInfo::isBlackCube(), and QGCSerialPortInfo::isBootloader().
|
inline |
Whether the port can be set to hardware flow control. The driver of a USB device may have none, as that of a CDC-ACM device, and its port then refuses the setting. Qt Serial Port has no such answer.
Definition at line 50 of file AndroidSerialPortInfo.h.
|
inline |
Definition at line 66 of file AndroidSerialPortInfo.h.
|
inline |
Definition at line 64 of file AndroidSerialPortInfo.h.
|
inline |
Definition at line 68 of file AndroidSerialPortInfo.h.
Referenced by QGCSerialPortInfo::getBoardInfo().
|
static |
Whether a system location names a port of a USB device, which Java opens: the name that Android gives the device, or the one that survives a replug. Any other location is a device node.
Definition at line 77 of file AndroidSerialPortInfo.cc.
References systemLocation().
Referenced by AndroidSerialAccess::hasUsbPermission(), AndroidSerialAccess::isUsbPermissionDenied(), and AndroidSerialAccess::requestUsbPermission().
|
inline |
Definition at line 56 of file AndroidSerialPortInfo.h.
Referenced by QGCSerialPortInfo::getBoardInfo().
|
inline |
Definition at line 40 of file AndroidSerialPortInfo.h.
Referenced by portNameToSystemLocation(), and QSerialPortInfo().
|
static |
Definition at line 72 of file AndroidSerialPortInfo.cc.
References systemLocation().
Referenced by AndroidSerial::availablePorts(), and QSerialPort::portName().
|
static |
The system location that a port name stands for: the path of a device node, or the name itself if it is a path or the stable name of a USB port.
Definition at line 63 of file AndroidSerialPortInfo.cc.
References portName().
Referenced by AndroidSerialAccess::hasUsbPermission(), AndroidSerialAccess::isUsbPermissionDenied(), AndroidSerialAccess::requestUsbPermission(), and QSerialPort::setPortName().
|
static |
The serial device nodes in devDir that QGC may read and write: the device's own UARTs and the USB serial adapters that the kernel drives. sysTtyDir is the kernel's /sys/class/tty, which names the ports that have a driver, tells a UART without hardware and describes the adapters. The node of an adapter that usbPorts has a port of is left out, so that no device is listed twice.
Definition at line 88 of file PosixSerialPorts.cc.
References QSerialPortInfo::Data::portName, QSerialPortInfo(), QSerialPortInfo::Data::systemLocation, and systemLocation().
Referenced by availablePorts(), and AndroidSerialAccess::hasPosixSerialPorts().
|
inline |
Definition at line 62 of file AndroidSerialPortInfo.h.
Referenced by QGCSerialPortInfo::getBoardInfo().
|
inline |
Definition at line 58 of file AndroidSerialPortInfo.h.
|
inline |
A name that still opens the port after its USB device is unplugged and plugged back in, which gives it another portName(). Pass it to QSerialPort::setPortName(). Empty if the port has no such name: until the user lets QGC open the device, and for a device node, whose portName() does not change. Qt Serial Port has no such name.
Definition at line 46 of file AndroidSerialPortInfo.h.
|
static |
Definition at line 43 of file AndroidSerialPortInfo.cc.
Referenced by SerialPortManager::supportedBaudRates().
|
inline |
Definition at line 52 of file AndroidSerialPortInfo.h.
Referenced by isUsbLocation(), portNameFromSystemLocation(), posixPorts(), and QSerialPort::setPort().
|
inline |
Definition at line 60 of file AndroidSerialPortInfo.h.
Referenced by QGCSerialPortInfo::getBoardInfo().