|
libdrmconf 0.14.1
A library to program DMR radios.
|
Implements the interface to Anytone GD32 revisions of D578UV radios. More...
#include <anytone_interface.hh>


Public Member Functions | |
| AnytoneGD32Interface (const USBDeviceDescriptor &descriptor, const ErrorStack &err=ErrorStack(), QObject *parent=nullptr) | |
| Constructs a new interface to Anytone radios. | |
| RadioInfo | identifier (const ErrorStack &err=ErrorStack()) |
| Returns an identifier of the radio. | |
| Public Member Functions inherited from AnytoneInterface | |
| AnytoneInterface (const USBDeviceDescriptor &descriptor, const ErrorStack &err=ErrorStack(), QObject *parent=nullptr) | |
| Constructs a new interface to Anytone radios. | |
| virtual | ~AnytoneInterface () |
| Destructor. | |
| void | close () |
| Closes the interface to the device. | |
| bool | getInfo (RadioVariant &info) |
| Reads the radio info from the device and returns it. | |
| bool | read_start (uint32_t bank, uint32_t addr, const ErrorStack &err=ErrorStack()) |
| Starts the read process from the specified bank and at the given address. | |
| bool | read (uint32_t bank, uint32_t addr, uint8_t *data, int nbytes, const ErrorStack &err=ErrorStack()) |
Reads a chunk of data from the block-address bno (block number). | |
| bool | read_finish (const ErrorStack &err=ErrorStack()) |
This function ends a series of read operations. | |
| bool | write_start (uint32_t bank, uint32_t addr, const ErrorStack &err=ErrorStack()) |
| Starts the write process into the specified bank and at the given address. | |
| bool | write (uint32_t bank, uint32_t addr, uint8_t *data, int nbytes, const ErrorStack &err=ErrorStack()) |
Writes a chunk of data at the address addr. | |
| bool | write_finish (const ErrorStack &err=ErrorStack()) |
This function ends a series of write operations. | |
| bool | reboot (const ErrorStack &err=ErrorStack()) |
| Some radios need to be rebooted after being read or programmed. | |
| Public Member Functions inherited from USBSerial | |
| virtual | ~USBSerial () |
| Destructor. | |
| bool | isOpen () const override |
If true, the device has been found and is open. | |
| void | close () override |
| Closes the interface to the device. | |
| Public Member Functions inherited from RadioInterface | |
| virtual | ~RadioInterface () |
| Destructor. | |
| virtual bool | setDateTime (const QDateTime &datetime, const ErrorStack &err=ErrorStack()) |
| Some radios allow to set date and time of the internal clock during codeplug upload. | |
Static Public Member Functions | |
| static USBDeviceInfo | interfaceInfo () |
| Returns some information about this interface. | |
| static QList< USBDeviceDescriptor > | detect (bool saveOnly=true) |
| Tries to find all interfaces connected AnyTone radios. | |
| 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. | |
Additional Inherited Members | |
| Protected Types inherited from AnytoneInterface | |
| enum | State { STATE_INITIALIZED , STATE_OPEN , STATE_PROGRAM , STATE_CLOSED , STATE_ERROR } |
| Possible states of the radio interface. More... | |
| 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. | |
| Protected Member Functions inherited from AnytoneInterface | |
| bool | enter_program_mode (const ErrorStack &err=ErrorStack()) |
| Send command message to radio to ender program state. | |
| bool | request_identifier (RadioVariant &info, const ErrorStack &err=ErrorStack()) |
| Sends a request to radio to identify itself. | |
| bool | leave_program_mode (const ErrorStack &err=ErrorStack()) |
| Sends a command message to radio to leave program state and reboot. | |
| bool | send_receive (const char *cmd, int clen, char *resp, int rlen, const ErrorStack &err=ErrorStack()) |
| Internal used method to send messages to and receive responses from radio. | |
| 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. | |
| QString | formatPinoutSignals () |
| Serializes the pinout signals. | |
| Protected Member Functions inherited from RadioInterface | |
| RadioInterface () | |
| Hidden constructor. | |
| Protected Attributes inherited from AnytoneInterface | |
| State | _state |
| Holds the state of the interface. | |
| RadioVariant | _info |
| Holds the radio info. | |
Implements the interface to Anytone GD32 revisions of D578UV radios.
This interface is identical to the previous ones, except it uses a different VID/PID combo. That is VID 0x2e3c and PID 0x5740 are used.
|
explicit |
Constructs a new interface to Anytone radios.
If a matching device was found, isOpen returns true.
|
virtual |
Returns an identifier of the radio.
Implements RadioInterface.