QGC's version of Qt QSerialPortInfo. It provides additional information about board types that QGC cares about. More...
#include <QGCSerialPortInfo.h>
Public Types | |
| enum | BoardType_t { BoardTypePixhawk = 0 , BoardTypeSiKRadio , BoardTypeOpenPilot , BoardTypeRTKGPS , BoardTypeUnknown } |
Public Member Functions | |
| QGCSerialPortInfo () | |
| QGCSerialPortInfo (const QSerialPort &port) | |
| ~QGCSerialPortInfo () | |
| bool | getBoardInfo (BoardType_t &boardType, QString &name) const |
| bool | canFlash () const |
| bool | isBootloader () const |
| bool | isBlackCube () const |
| Public Member Functions inherited from QSerialPortInfo | |
| 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 bool | isSystemPort (const QSerialPortInfo &port) |
| static QList< QGCSerialPortInfo > | availablePorts () |
| Override of QSerialPortInfo::availablePorts. | |
| Static Public Member Functions inherited from QSerialPortInfo | |
| 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. | |
Friends | |
| class | QGCSerialPortInfoTest |
| class | JsonResourceAuditTest |
QGC's version of Qt QSerialPortInfo. It provides additional information about board types that QGC cares about.
Definition at line 11 of file QGCSerialPortInfo.h.
| Enumerator | |
|---|---|
| BoardTypePixhawk | |
| BoardTypeSiKRadio | |
| BoardTypeOpenPilot | |
| BoardTypeRTKGPS | |
| BoardTypeUnknown | |
Definition at line 20 of file QGCSerialPortInfo.h.
| QGCSerialPortInfo::QGCSerialPortInfo | ( | ) |
Definition at line 20 of file QGCSerialPortInfo.cc.
References QGCSerialPortInfo(), and QSerialPortInfo::QSerialPortInfo().
Referenced by availablePorts(), and QGCSerialPortInfo().
|
explicit |
Definition at line 26 of file QGCSerialPortInfo.cc.
References QSerialPortInfo::QSerialPortInfo().
| QGCSerialPortInfo::~QGCSerialPortInfo | ( | ) |
Definition at line 32 of file QGCSerialPortInfo.cc.
|
static |
Override of QSerialPortInfo::availablePorts.
Definition at line 261 of file QGCSerialPortInfo.cc.
References availablePorts(), QSerialPortInfo::availablePorts(), isSystemPort(), QGCSerialPortInfo(), and QSerialPortInfo::QSerialPortInfo().
Referenced by FirmwareUpgradeController::availableBoardsName(), and availablePorts().
| bool QGCSerialPortInfo::canFlash | ( | ) | const |
Definition at line 318 of file QGCSerialPortInfo.cc.
References BoardTypePixhawk, BoardTypeSiKRadio, and getBoardInfo().
| bool QGCSerialPortInfo::getBoardInfo | ( | QGCSerialPortInfo::BoardType_t & | boardType, |
| QString & | name ) const |
Definition at line 190 of file QGCSerialPortInfo.cc.
References BoardTypeUnknown, QSerialPortInfo::description(), QSerialPortInfo::isNull(), QSerialPortInfo::manufacturer(), QSerialPortInfo::productIdentifier(), and QSerialPortInfo::vendorIdentifier().
Referenced by canFlash(), and isBootloader().
| bool QGCSerialPortInfo::isBlackCube | ( | ) | const |
Definition at line 289 of file QGCSerialPortInfo.cc.
References QSerialPortInfo::description().
| bool QGCSerialPortInfo::isBootloader | ( | ) | const |
Definition at line 278 of file QGCSerialPortInfo.cc.
References BoardTypePixhawk, QSerialPortInfo::description(), and getBoardInfo().
|
static |
Known operating system peripherals that are NEVER a peripheral that we should connect to.
Definition at line 294 of file QGCSerialPortInfo.cc.
References QSerialPortInfo::QSerialPortInfo().
Referenced by availablePorts().
|
friend |
Definition at line 14 of file QGCSerialPortInfo.h.
References JsonResourceAuditTest.
Referenced by JsonResourceAuditTest.
|
friend |
Definition at line 13 of file QGCSerialPortInfo.h.
References QGCSerialPortInfoTest.
Referenced by QGCSerialPortInfoTest.