4 #ifndef RADIOINFERFACE_HH
5 #define RADIOINFERFACE_HH
8 #include "usbdevice.hh"
9 #include "radioinfo.hh"
10 #include "errorstack.hh"
Implements a stack of error messages to provide a pretty formatted error traceback.
Definition: errorstack.hh:41
Provides some information about a radio model.
Definition: radioinfo.hh:16
Abstract radio interface.
Definition: radiointerface.hh:21
virtual RadioInfo identifier(const ErrorStack &err=ErrorStack())=0
Returns a device identifier.
virtual ~RadioInterface()
Destructor.
Definition: radiointerface.cc:16
virtual bool reboot(const ErrorStack &err=ErrorStack())
Some radios need to be rebooted after being read or programmed.
Definition: radiointerface.cc:27
virtual void close()=0
Closes the connection to the device.
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.
RadioInterface()
Hidden constructor.
Definition: radiointerface.cc:11
virtual bool write_finish(const ErrorStack &err=ErrorStack())=0
This function ends a series of write operations.
Definition: radiointerface.cc:21
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.
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).
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.
virtual bool isOpen() const =0
Return true if a connection to the device has been established.
virtual bool read_finish(const ErrorStack &err=ErrorStack())=0
This function ends a series of read operations.