libdrmconf 0.12.1
A library to program DMR radios.
Loading...
Searching...
No Matches
gd73_interface.hh
1#ifndef GD73INTERFACE_HH
2#define GD73INTERFACE_HH
3
4#include "c7000device.hh"
5#include "radiointerface.hh"
6
10{
11 Q_OBJECT
12
13public:
16 GD73Interface(const USBDeviceDescriptor &descriptor,
17 const ErrorStack &err=ErrorStack(), QObject *parent=nullptr);
18
19 bool isOpen() const;
20
22
23 bool write_start(uint32_t bank, uint32_t addr, const ErrorStack &err=ErrorStack());
24 bool write(uint32_t bank, uint32_t addr, uint8_t *data, int nbytes, const ErrorStack &err=ErrorStack());
25 bool write_finish(const ErrorStack &err=ErrorStack());
26
27 bool read_start(uint32_t bank, uint32_t addr, const ErrorStack &err=ErrorStack());
28 bool read(uint32_t bank, uint32_t addr, uint8_t *data, int nbytes, const ErrorStack &err=ErrorStack());
29 bool read_finish(const ErrorStack &err=ErrorStack());
30
31 void close();
32
33protected:
35 QString _identifier;
37 uint16_t _lastSequence;
38};
39
40#endif // GD73INTERFACE_HH
Base class for all C7000 based radios.
Definition c7000device.hh:13
Implements a stack of error messages to provide a pretty formatted error traceback.
Definition errorstack.hh:41
Implements the communication interface to the GD-73.
Definition gd73_interface.hh:10
QString _identifier
Name of the radio.
Definition gd73_interface.hh:35
GD73Interface(const USBDeviceDescriptor &descriptor, const ErrorStack &err=ErrorStack(), QObject *parent=nullptr)
Constructs a new interface to GD73A/E radios.
Definition gd73_interface.cc:7
uint16_t _lastSequence
Last received/send sequence number.
Definition gd73_interface.hh:37
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.
Definition gd73_interface.cc:41
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.
Definition gd73_interface.cc:75
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.
Definition gd73_interface.cc:47
bool write_finish(const ErrorStack &err=ErrorStack())
This function ends a series of write operations.
Definition gd73_interface.cc:69
void close()
Closes the connection to the device.
Definition gd73_interface.cc:36
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).
Definition gd73_interface.cc:83
RadioInfo identifier(const ErrorStack &err=ErrorStack())
Returns a device identifier.
Definition gd73_interface.cc:30
bool isOpen() const
Return true if a connection to the device has been established.
Definition gd73_interface.cc:25
bool read_finish(const ErrorStack &err=ErrorStack())
This function ends a series of read operations.
Definition gd73_interface.cc:121
Provides some information about a radio model.
Definition radioinfo.hh:16
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