6 #include "radiointerface.hh"
7 #include "errorstack.hh"
35 QSerialPort::BaudRate rate=QSerialPort::Baud115200,
49 static QList<USBDeviceDescriptor>
detect(uint16_t vid, uint16_t pid,
bool isSave=
true);
51 static QList<USBDeviceDescriptor>
detect();
55 void onError(QSerialPort::SerialPortError error_t);
Implements a stack of error messages to provide a pretty formatted error traceback.
Definition: errorstack.hh:41
Abstract radio interface.
Definition: radiointerface.hh:21
Base class for all radio interface descriptors representing a unique interface to a connected radio.
Definition: usbdevice.hh:197
const QVariant & device() const
Returns the device information identifying the interface uniquely.
Definition: usbdevice.cc:290
bool isSave() const
Returns true if it is save to send commands to this device without user approval.
Definition: usbdevice.cc:112
Specialization of radio interface info for serial ports.
Definition: usbserial.hh:21
Descriptor(uint16_t vid, uint16_t pid, const QString &device, bool isSave=false)
Constructor from VID, PID and device path.
Definition: usbserial.cc:10
Implements a serial connection to a radio via USB.
Definition: usbserial.hh:16
virtual ~USBSerial()
Destructor.
Definition: usbserial.cc:82
USBSerial(const USBDeviceDescriptor &descriptor, QSerialPort::BaudRate rate=QSerialPort::Baud115200, const ErrorStack &err=ErrorStack(), QObject *parent=nullptr)
Constructs an opens new serial interface to the devices identified by the given vendor and product ID...
Definition: usbserial.cc:19
bool isOpen() const
If true, the device has been found and is open.
Definition: usbserial.cc:88
void signalingChanged()
Signaling callback.
Definition: usbserial.cc:109
void close()
Closes the interface to the device.
Definition: usbserial.cc:93
static QList< USBDeviceDescriptor > detect()
Searches for all USB serial ports.
Definition: usbserial.cc:133
void onError(QSerialPort::SerialPortError error_t)
Callback for serial interface errors.
Definition: usbserial.cc:99
void onClose()
Callback when closing interface.
Definition: usbserial.cc:104
QString formatPinoutSignals()
Serializes the pinout singals.
Definition: usbserial.cc:150