|
libdrmconf
0.12.0
A library to program DMR radios.
|
Implements the communication interface to radios using the Auctus A6 chip. More...
#include <auctus_a6_interface.hh>


Public Types | |
| enum | State { CLOSED , IDLE , READ_THROUGH , WRITE_THROUGH , ERROR } |
| Possible states of the interface. More... | |
Public Member Functions | |
| State | state () const |
| Returns the interface state. | |
Public Member Functions inherited from USBSerial | |
| 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... | |
Protected Member Functions | |
| AuctusA6Interface (const USBDeviceDescriptor &descriptor, const ErrorStack &err=ErrorStack(), QObject *parent=nullptr) | |
| Hidden constructor. | |
| bool | send_receive (uint16_t command, const uint8_t *params, uint8_t plen, uint8_t *response, uint8_t &rlen, const ErrorStack &err=ErrorStack()) |
| Internal used method to send messages to and receive responses from radio. | |
| bool | send (uint16_t command, const uint8_t *params, uint8_t plen, const ErrorStack &err=ErrorStack()) |
| Internal used method to send a command. | |
| bool | receive (uint16_t &command, uint8_t *response, uint8_t &rlen, const ErrorStack &err=ErrorStack()) |
| Internal used method to receive a response. | |
| bool | read (uint8_t *data, qint64 n, unsigned int timeout_ms, const ErrorStack &err=ErrorStack()) |
Reads exactly n bytes or timeouts. | |
Protected Member Functions inherited from USBSerial | |
| 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. | |
Protected Attributes | |
| State | _state |
| Holds the state of the interface. | |
Additional Inherited Members | |
Static Public Member Functions inherited from USBSerial | |
| 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 inherited from USBSerial | |
| void | onError (QSerialPort::SerialPortError error_t) |
| Callback for serial interface errors. | |
| void | onClose () |
| Callback when closing interface. | |
| void | signalingChanged () |
| Signaling callback. | |
Implements the communication interface to radios using the Auctus A6 chip.
This includes devices like Cotre A1 or the Baofeng DR-1801. This class only implements the basic communication protocol. Specifics, like particular commands are implemented in derived interface classes.
Possible states of the interface.