libdrmconf
0.12.0
A library to program DMR radios.
|
Implements a serial connection to a radio via USB. More...
#include <usbserial.hh>
Classes | |
class | Descriptor |
Specialization of radio interface info for serial ports. More... | |
Public Member Functions | |
virtual | ~USBSerial () |
Destructor. | |
bool | isOpen () const |
If true , the device has been found and is open. | |
void | close () |
Closes the interface to the device. | |
Public Member Functions inherited from RadioInterface | |
virtual | ~RadioInterface () |
Destructor. | |
virtual RadioInfo | identifier (const ErrorStack &err=ErrorStack())=0 |
Returns a device identifier. | |
virtual bool | write_start (uint32_t bank, uint32_t addr, const ErrorStack &err=ErrorStack())=0 |
Starts the write process into the specified bank and at the given address. More... | |
virtual bool | write (uint32_t bank, uint32_t addr, uint8_t *data, int nbytes, const ErrorStack &err=ErrorStack())=0 |
Writes a chunk of data at the address addr . More... | |
virtual bool | write_finish (const ErrorStack &err=ErrorStack())=0 |
This function ends a series of write operations. More... | |
virtual bool | read_start (uint32_t bank, uint32_t addr, const ErrorStack &err=ErrorStack())=0 |
Starts the read process from the specified bank and at the given address. More... | |
virtual bool | read (uint32_t bank, uint32_t addr, uint8_t *data, int nbytes, const ErrorStack &err=ErrorStack())=0 |
Reads a chunk of data from the block-address bno (block number). More... | |
virtual bool | read_finish (const ErrorStack &err=ErrorStack())=0 |
This function ends a series of read operations. More... | |
virtual bool | reboot (const ErrorStack &err=ErrorStack()) |
Some radios need to be rebooted after being read or programmed. More... | |
Static Public Member Functions | |
static QList< USBDeviceDescriptor > | detect (uint16_t vid, uint16_t pid, bool isSave=true) |
Searches for all USB serial ports with the specified VID/PID. | |
static QList< USBDeviceDescriptor > | detect () |
Searches for all USB serial ports. | |
Protected Slots | |
void | onError (QSerialPort::SerialPortError error_t) |
Callback for serial interface errors. | |
void | onClose () |
Callback when closing interface. | |
void | signalingChanged () |
Signaling callback. | |
Protected Member Functions | |
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 IDs. More... | |
QString | formatPinoutSignals () |
Serializes the pinout singals. | |
Protected Member Functions inherited from RadioInterface | |
RadioInterface () | |
Hidden constructor. | |
Implements a serial connection to a radio via USB.
The correct serial port is selected by the given VID and PID to the constructor.
|
explicitprotected |
Constructs an opens new serial interface to the devices identified by the given vendor and product IDs.
descriptor | Specifies the device to open. |
rate | Specifies the transferrate in baud. |
err | The error stack, messages are put onto. |
parent | Specifies the parent object. |