Loading...
Searching...
No Matches
Device.hpp
Go to the documentation of this file.
#pragma once
#include <SoapySDR/Config.hpp>
#include <SoapySDR/Types.hpp>
#include <SoapySDR/Constants.h>
#include <SoapySDR/Errors.h>
#include <vector>
#include <string>
#include <complex>
#include <cstddef> //size_t
namespace SoapySDR
{
class Stream;
class SOAPY_SDR_API Device
{
public:
virtual ~Device(void);
static KwargsList enumerate(const Kwargs &args = Kwargs());
static KwargsList enumerate(const std::string &args);
static Device *make(const Kwargs &args = Kwargs());
static Device *make(const std::string &args);
static void unmake(Device *device);
/*******************************************************************
* Parallel support
******************************************************************/
static std::vector<Device *> make(const KwargsList &argsList);
static std::vector<Device *> make(const std::vector<std::string> &argsList);
static void unmake(const std::vector<Device *> &devices);
/*******************************************************************
* Identification API
******************************************************************/
virtual std::string getDriverKey(void) const;
virtual std::string getHardwareKey(void) const;
virtual Kwargs getHardwareInfo(void) const;
/*******************************************************************
* Channels API
******************************************************************/
virtual void setFrontendMapping(const int direction, const std::string &mapping);
virtual std::string getFrontendMapping(const int direction) const;
virtual size_t getNumChannels(const int direction) const;
virtual Kwargs getChannelInfo(const int direction, const size_t channel) const;
virtual bool getFullDuplex(const int direction, const size_t channel) const;
/*******************************************************************
* Stream API
******************************************************************/
virtual std::vector<std::string> getStreamFormats(const int direction, const size_t channel) const;
virtual std::string getNativeStreamFormat(const int direction, const size_t channel, double &fullScale) const;
virtual ArgInfoList getStreamArgsInfo(const int direction, const size_t channel) const;
virtual Stream *setupStream(
const int direction,
const std::string &format,
const std::vector<size_t> &channels = std::vector<size_t>(),
const Kwargs &args = Kwargs());
virtual void closeStream(Stream *stream);
virtual size_t getStreamMTU(Stream *stream) const;
virtual int activateStream(
Stream *stream,
const int flags = 0,
const long long timeNs = 0,
const size_t numElems = 0);
virtual int deactivateStream(
Stream *stream,
const int flags = 0,
const long long timeNs = 0);
virtual int readStream(
Stream *stream,
void * const *buffs,
const size_t numElems,
int &flags,
long long &timeNs,
const long timeoutUs = 100000);
virtual int writeStream(
Stream *stream,
const void * const *buffs,
const size_t numElems,
int &flags,
const long long timeNs = 0,
const long timeoutUs = 100000);
virtual int readStreamStatus(
Stream *stream,
size_t &chanMask,
int &flags,
long long &timeNs,
const long timeoutUs = 100000);
/*******************************************************************
* Direct buffer access API
******************************************************************/
virtual size_t getNumDirectAccessBuffers(Stream *stream);
virtual int getDirectAccessBufferAddrs(Stream *stream, const size_t handle, void **buffs);
virtual int acquireReadBuffer(
Stream *stream,
size_t &handle,
const void **buffs,
int &flags,
long long &timeNs,
const long timeoutUs = 100000);
virtual void releaseReadBuffer(
Stream *stream,
const size_t handle);
virtual int acquireWriteBuffer(
Stream *stream,
size_t &handle,
void **buffs,
const long timeoutUs = 100000);
virtual void releaseWriteBuffer(
Stream *stream,
const size_t handle,
const size_t numElems,
int &flags,
const long long timeNs = 0);
/*******************************************************************
* Antenna API
******************************************************************/
virtual std::vector<std::string> listAntennas(const int direction, const size_t channel) const;
virtual void setAntenna(const int direction, const size_t channel, const std::string &name);
virtual std::string getAntenna(const int direction, const size_t channel) const;
/*******************************************************************
* Frontend corrections API
******************************************************************/
virtual bool hasDCOffsetMode(const int direction, const size_t channel) const;
virtual void setDCOffsetMode(const int direction, const size_t channel, const bool automatic);
virtual bool getDCOffsetMode(const int direction, const size_t channel) const;
virtual bool hasDCOffset(const int direction, const size_t channel) const;
virtual void setDCOffset(const int direction, const size_t channel, const std::complex<double> &offset);
virtual std::complex<double> getDCOffset(const int direction, const size_t channel) const;
virtual bool hasIQBalance(const int direction, const size_t channel) const;
virtual void setIQBalance(const int direction, const size_t channel, const std::complex<double> &balance);
virtual std::complex<double> getIQBalance(const int direction, const size_t channel) const;
virtual bool hasIQBalanceMode(const int direction, const size_t channel) const;
virtual void setIQBalanceMode(const int direction, const size_t channel, const bool automatic);
virtual bool getIQBalanceMode(const int direction, const size_t channel) const;
virtual bool hasFrequencyCorrection(const int direction, const size_t channel) const;
virtual void setFrequencyCorrection(const int direction, const size_t channel, const double value);
virtual double getFrequencyCorrection(const int direction, const size_t channel) const;
/*******************************************************************
* Gain API
******************************************************************/
virtual std::vector<std::string> listGains(const int direction, const size_t channel) const;
virtual bool hasGainMode(const int direction, const size_t channel) const;
virtual void setGainMode(const int direction, const size_t channel, const bool automatic);
virtual bool getGainMode(const int direction, const size_t channel) const;
virtual void setGain(const int direction, const size_t channel, const double value);
virtual void setGain(const int direction, const size_t channel, const std::string &name, const double value);
virtual double getGain(const int direction, const size_t channel) const;
virtual double getGain(const int direction, const size_t channel, const std::string &name) const;
virtual Range getGainRange(const int direction, const size_t channel) const;
virtual Range getGainRange(const int direction, const size_t channel, const std::string &name) const;
/*******************************************************************
* Frequency API
******************************************************************/
virtual void setFrequency(const int direction, const size_t channel, const double frequency, const Kwargs &args = Kwargs());
virtual void setFrequency(const int direction, const size_t channel, const std::string &name, const double frequency, const Kwargs &args = Kwargs());
virtual double getFrequency(const int direction, const size_t channel) const;
virtual double getFrequency(const int direction, const size_t channel, const std::string &name) const;
virtual std::vector<std::string> listFrequencies(const int direction, const size_t channel) const;
virtual RangeList getFrequencyRange(const int direction, const size_t channel) const;
virtual RangeList getFrequencyRange(const int direction, const size_t channel, const std::string &name) const;
virtual ArgInfoList getFrequencyArgsInfo(const int direction, const size_t channel) const;
/*******************************************************************
* Sample Rate API
******************************************************************/
virtual void setSampleRate(const int direction, const size_t channel, const double rate);
virtual double getSampleRate(const int direction, const size_t channel) const;
virtual std::vector<double> listSampleRates(const int direction, const size_t channel) const;
virtual RangeList getSampleRateRange(const int direction, const size_t channel) const;
/*******************************************************************
* Bandwidth API
******************************************************************/
virtual void setBandwidth(const int direction, const size_t channel, const double bw);
virtual double getBandwidth(const int direction, const size_t channel) const;
virtual std::vector<double> listBandwidths(const int direction, const size_t channel) const;
virtual RangeList getBandwidthRange(const int direction, const size_t channel) const;
/*******************************************************************
* Clocking API
******************************************************************/
virtual void setMasterClockRate(const double rate);
virtual double getMasterClockRate(void) const;
virtual RangeList getMasterClockRates(void) const;
virtual void setReferenceClockRate(const double rate);
virtual double getReferenceClockRate(void) const;
virtual RangeList getReferenceClockRates(void) const;
virtual std::vector<std::string> listClockSources(void) const;
virtual void setClockSource(const std::string &source);
virtual std::string getClockSource(void) const;
/*******************************************************************
* Time API
******************************************************************/
virtual std::vector<std::string> listTimeSources(void) const;
virtual void setTimeSource(const std::string &source);
virtual std::string getTimeSource(void) const;
virtual bool hasHardwareTime(const std::string &what = "") const;
virtual long long getHardwareTime(const std::string &what = "") const;
virtual void setHardwareTime(const long long timeNs, const std::string &what = "");
virtual void setCommandTime(const long long timeNs, const std::string &what = "");
/*******************************************************************
* Sensor API
******************************************************************/
virtual std::vector<std::string> listSensors(void) const;
virtual ArgInfo getSensorInfo(const std::string &key) const;
virtual std::string readSensor(const std::string &key) const;
template <typename Type>
Type readSensor(const std::string &key) const;
virtual std::vector<std::string> listSensors(const int direction, const size_t channel) const;
virtual ArgInfo getSensorInfo(const int direction, const size_t channel, const std::string &key) const;
virtual std::string readSensor(const int direction, const size_t channel, const std::string &key) const;
template <typename Type>
Type readSensor(const int direction, const size_t channel, const std::string &key) const;
/*******************************************************************
* Register API
******************************************************************/
virtual std::vector<std::string> listRegisterInterfaces(void) const;
virtual void writeRegister(const std::string &name, const unsigned addr, const unsigned value);
virtual unsigned readRegister(const std::string &name, const unsigned addr) const;
virtual void writeRegister(const unsigned addr, const unsigned value);
virtual unsigned readRegister(const unsigned addr) const;
virtual void writeRegisters(const std::string &name, const unsigned addr, const std::vector<unsigned> &value);
virtual std::vector<unsigned> readRegisters(const std::string &name, const unsigned addr, const size_t length) const;
/*******************************************************************
* Settings API
******************************************************************/
virtual ArgInfoList getSettingInfo(void) const;
virtual void writeSetting(const std::string &key, const std::string &value);
template <typename Type>
void writeSetting(const std::string &key, const Type &value);
virtual std::string readSetting(const std::string &key) const;
template <typename Type>
Type readSetting(const std::string &key);
virtual ArgInfoList getSettingInfo(const int direction, const size_t channel) const;
virtual void writeSetting(const int direction, const size_t channel, const std::string &key, const std::string &value);
template <typename Type>
void writeSetting(const int direction, const size_t channel, const std::string &key, const Type &value);
virtual std::string readSetting(const int direction, const size_t channel, const std::string &key) const;
template <typename Type>
Type readSetting(const int direction, const size_t channel, const std::string &key);
/*******************************************************************
* GPIO API
******************************************************************/
virtual std::vector<std::string> listGPIOBanks(void) const;
virtual void writeGPIO(const std::string &bank, const unsigned value);
virtual void writeGPIO(const std::string &bank, const unsigned value, const unsigned mask);
virtual unsigned readGPIO(const std::string &bank) const;
virtual void writeGPIODir(const std::string &bank, const unsigned dir);
virtual void writeGPIODir(const std::string &bank, const unsigned dir, const unsigned mask);
virtual unsigned readGPIODir(const std::string &bank) const;
/*******************************************************************
* I2C API
******************************************************************/
virtual void writeI2C(const int addr, const std::string &data);
virtual std::string readI2C(const int addr, const size_t numBytes);
/*******************************************************************
* SPI API
******************************************************************/
virtual unsigned transactSPI(const int addr, const unsigned data, const size_t numBits);
/*******************************************************************
* UART API
******************************************************************/
virtual std::vector<std::string> listUARTs(void) const;
virtual void writeUART(const std::string &which, const std::string &data);
virtual std::string readUART(const std::string &which, const long timeoutUs = 100000) const;
/*******************************************************************
* Native Access API
******************************************************************/
virtual void* getNativeDeviceHandle(void) const;
};
}
template <typename Type>
Type SoapySDR::Device::readSensor(const std::string &key) const
{
return SoapySDR::StringToSetting<Type>(this->readSensor(key));
}
template <typename Type>
Type SoapySDR::Device::readSensor(const int direction, const size_t channel, const std::string &key) const
{
return SoapySDR::StringToSetting<Type>(this->readSensor(direction, channel, key));
}
template <typename Type>
void SoapySDR::Device::writeSetting(const std::string &key, const Type &value)
{
this->writeSetting(key, SoapySDR::SettingToString(value));
}
template <typename Type>
Type SoapySDR::Device::readSetting(const std::string &key)
{
return SoapySDR::StringToSetting<Type>(this->readSetting(key));
}
template <typename Type>
void SoapySDR::Device::writeSetting(const int direction, const size_t channel, const std::string &key, const Type &value)
{
this->writeSetting(direction, channel, key, SoapySDR::SettingToString(value));
}
template <typename Type>
Type SoapySDR::Device::readSetting(const int direction, const size_t channel, const std::string &key)
{
return SoapySDR::StringToSetting<Type>(this->readSetting(direction, channel, key));
}
SOAPY_SDR_API
#define SOAPY_SDR_API
Definition Config.h:41
Config.hpp
Constants.h
Errors.h
Types.hpp
SoapySDR::ArgInfo
Definition Types.hpp:98
SoapySDR::Device
Definition Device.hpp:33
SoapySDR::Device::getStreamFormats
virtual std::vector< std::string > getStreamFormats(const int direction, const size_t channel) const
SoapySDR::Device::hasHardwareTime
virtual bool hasHardwareTime(const std::string &what="") const
SoapySDR::Device::setReferenceClockRate
virtual void setReferenceClockRate(const double rate)
SoapySDR::Device::readGPIODir
virtual unsigned readGPIODir(const std::string &bank) const
SoapySDR::Device::listTimeSources
virtual std::vector< std::string > listTimeSources(void) const
SoapySDR::Device::readSensor
virtual std::string readSensor(const std::string &key) const
SoapySDR::Device::getHardwareInfo
virtual Kwargs getHardwareInfo(void) const
SoapySDR::Device::setFrequency
virtual void setFrequency(const int direction, const size_t channel, const double frequency, const Kwargs &args=Kwargs())
SoapySDR::Device::getFrequency
virtual double getFrequency(const int direction, const size_t channel) const
SoapySDR::Device::getGainRange
virtual Range getGainRange(const int direction, const size_t channel) const
SoapySDR::Device::getSensorInfo
virtual ArgInfo getSensorInfo(const int direction, const size_t channel, const std::string &key) const
SoapySDR::Device::setBandwidth
virtual void setBandwidth(const int direction, const size_t channel, const double bw)
SoapySDR::Device::writeI2C
virtual void writeI2C(const int addr, const std::string &data)
SoapySDR::Device::hasDCOffset
virtual bool hasDCOffset(const int direction, const size_t channel) const
SoapySDR::Device::setHardwareTime
virtual void setHardwareTime(const long long timeNs, const std::string &what="")
SoapySDR::Device::getHardwareTime
virtual long long getHardwareTime(const std::string &what="") const
SoapySDR::Device::hasFrequencyCorrection
virtual bool hasFrequencyCorrection(const int direction, const size_t channel) const
SoapySDR::Device::getFrequencyRange
virtual RangeList getFrequencyRange(const int direction, const size_t channel) const
SoapySDR::Device::getFrontendMapping
virtual std::string getFrontendMapping(const int direction) const
SoapySDR::Device::getClockSource
virtual std::string getClockSource(void) const
SoapySDR::Device::getReferenceClockRates
virtual RangeList getReferenceClockRates(void) const
SoapySDR::Device::releaseWriteBuffer
virtual void releaseWriteBuffer(Stream *stream, const size_t handle, const size_t numElems, int &flags, const long long timeNs=0)
SoapySDR::Device::getMasterClockRate
virtual double getMasterClockRate(void) const
SoapySDR::Device::setAntenna
virtual void setAntenna(const int direction, const size_t channel, const std::string &name)
SoapySDR::Device::setFrequencyCorrection
virtual void setFrequencyCorrection(const int direction, const size_t channel, const double value)
SoapySDR::Device::getGainRange
virtual Range getGainRange(const int direction, const size_t channel, const std::string &name) const
SoapySDR::Device::readRegisters
virtual std::vector< unsigned > readRegisters(const std::string &name, const unsigned addr, const size_t length) const
SoapySDR::Device::setDCOffset
virtual void setDCOffset(const int direction, const size_t channel, const std::complex< double > &offset)
SoapySDR::Device::setGain
virtual void setGain(const int direction, const size_t channel, const std::string &name, const double value)
SoapySDR::Device::listUARTs
virtual std::vector< std::string > listUARTs(void) const
SoapySDR::Device::closeStream
virtual void closeStream(Stream *stream)
SoapySDR::Device::setIQBalance
virtual void setIQBalance(const int direction, const size_t channel, const std::complex< double > &balance)
SoapySDR::Device::getHardwareKey
virtual std::string getHardwareKey(void) const
SoapySDR::Device::writeGPIO
virtual void writeGPIO(const std::string &bank, const unsigned value, const unsigned mask)
SoapySDR::Device::getBandwidthRange
virtual RangeList getBandwidthRange(const int direction, const size_t channel) const
SoapySDR::Device::readSensor
virtual std::string readSensor(const int direction, const size_t channel, const std::string &key) const
SoapySDR::Device::listAntennas
virtual std::vector< std::string > listAntennas(const int direction, const size_t channel) const
SoapySDR::Device::getAntenna
virtual std::string getAntenna(const int direction, const size_t channel) const
SoapySDR::Device::setTimeSource
virtual void setTimeSource(const std::string &source)
SoapySDR::Device::writeGPIODir
virtual void writeGPIODir(const std::string &bank, const unsigned dir, const unsigned mask)
SoapySDR::Device::getSampleRateRange
virtual RangeList getSampleRateRange(const int direction, const size_t channel) const
SoapySDR::Device::writeUART
virtual void writeUART(const std::string &which, const std::string &data)
SoapySDR::Device::enumerate
static KwargsList enumerate(const Kwargs &args=Kwargs())
SoapySDR::Device::transactSPI
virtual unsigned transactSPI(const int addr, const unsigned data, const size_t numBits)
SoapySDR::Device::getDCOffsetMode
virtual bool getDCOffsetMode(const int direction, const size_t channel) const
SoapySDR::Device::listFrequencies
virtual std::vector< std::string > listFrequencies(const int direction, const size_t channel) const
SoapySDR::Device::make
static std::vector< Device * > make(const std::vector< std::string > &argsList)
SoapySDR::Device::hasGainMode
virtual bool hasGainMode(const int direction, const size_t channel) const
SoapySDR::Device::readStreamStatus
virtual int readStreamStatus(Stream *stream, size_t &chanMask, int &flags, long long &timeNs, const long timeoutUs=100000)
SoapySDR::Device::unmake
static void unmake(Device *device)
SoapySDR::Device::writeGPIODir
virtual void writeGPIODir(const std::string &bank, const unsigned dir)
SoapySDR::Device::listBandwidths
virtual std::vector< double > listBandwidths(const int direction, const size_t channel) const
SoapySDR::Device::setFrequency
virtual void setFrequency(const int direction, const size_t channel, const std::string &name, const double frequency, const Kwargs &args=Kwargs())
SoapySDR::Device::getDirectAccessBufferAddrs
virtual int getDirectAccessBufferAddrs(Stream *stream, const size_t handle, void **buffs)
SoapySDR::Device::setupStream
virtual Stream * setupStream(const int direction, const std::string &format, const std::vector< size_t > &channels=std::vector< size_t >(), const Kwargs &args=Kwargs())
SoapySDR::Device::listSensors
virtual std::vector< std::string > listSensors(void) const
SoapySDR::Device::writeRegister
virtual void writeRegister(const unsigned addr, const unsigned value)
SoapySDR::Device::deactivateStream
virtual int deactivateStream(Stream *stream, const int flags=0, const long long timeNs=0)
SoapySDR::Device::getFrequencyArgsInfo
virtual ArgInfoList getFrequencyArgsInfo(const int direction, const size_t channel) const
SoapySDR::Device::getNativeDeviceHandle
virtual void * getNativeDeviceHandle(void) const
SoapySDR::Device::writeRegisters
virtual void writeRegisters(const std::string &name, const unsigned addr, const std::vector< unsigned > &value)
SoapySDR::Device::listRegisterInterfaces
virtual std::vector< std::string > listRegisterInterfaces(void) const
SoapySDR::Device::setSampleRate
virtual void setSampleRate(const int direction, const size_t channel, const double rate)
SoapySDR::Device::readUART
virtual std::string readUART(const std::string &which, const long timeoutUs=100000) const
SoapySDR::Device::getReferenceClockRate
virtual double getReferenceClockRate(void) const
SoapySDR::Device::listClockSources
virtual std::vector< std::string > listClockSources(void) const
SoapySDR::Device::readSetting
virtual std::string readSetting(const std::string &key) const
SoapySDR::Device::getStreamArgsInfo
virtual ArgInfoList getStreamArgsInfo(const int direction, const size_t channel) const
SoapySDR::Device::listGPIOBanks
virtual std::vector< std::string > listGPIOBanks(void) const
SoapySDR::Device::make
static Device * make(const Kwargs &args=Kwargs())
SoapySDR::Device::readStream
virtual int readStream(Stream *stream, void *const *buffs, const size_t numElems, int &flags, long long &timeNs, const long timeoutUs=100000)
SoapySDR::Device::getSettingInfo
virtual ArgInfoList getSettingInfo(const int direction, const size_t channel) const
SoapySDR::Device::listGains
virtual std::vector< std::string > listGains(const int direction, const size_t channel) const
SoapySDR::Device::writeSetting
virtual void writeSetting(const std::string &key, const std::string &value)
SoapySDR::Device::hasIQBalance
virtual bool hasIQBalance(const int direction, const size_t channel) const
SoapySDR::Device::enumerate
static KwargsList enumerate(const std::string &args)
SoapySDR::Device::writeSetting
virtual void writeSetting(const int direction, const size_t channel, const std::string &key, const std::string &value)
SoapySDR::Device::~Device
virtual ~Device(void)
virtual destructor for inheritance
SoapySDR::Device::getFrequencyCorrection
virtual double getFrequencyCorrection(const int direction, const size_t channel) const
SoapySDR::Device::getSampleRate
virtual double getSampleRate(const int direction, const size_t channel) const
SoapySDR::Device::listSensors
virtual std::vector< std::string > listSensors(const int direction, const size_t channel) const
SoapySDR::Device::hasIQBalanceMode
virtual bool hasIQBalanceMode(const int direction, const size_t channel) const
SoapySDR::Device::getDriverKey
virtual std::string getDriverKey(void) const
SoapySDR::Device::getFullDuplex
virtual bool getFullDuplex(const int direction, const size_t channel) const
SoapySDR::Device::setFrontendMapping
virtual void setFrontendMapping(const int direction, const std::string &mapping)
SoapySDR::Device::readI2C
virtual std::string readI2C(const int addr, const size_t numBytes)
SoapySDR::Device::acquireReadBuffer
virtual int acquireReadBuffer(Stream *stream, size_t &handle, const void **buffs, int &flags, long long &timeNs, const long timeoutUs=100000)
SoapySDR::Device::setCommandTime
virtual void setCommandTime(const long long timeNs, const std::string &what="")
SoapySDR::Device::listSampleRates
virtual std::vector< double > listSampleRates(const int direction, const size_t channel) const
SoapySDR::Device::releaseReadBuffer
virtual void releaseReadBuffer(Stream *stream, const size_t handle)
SoapySDR::Device::getSensorInfo
virtual ArgInfo getSensorInfo(const std::string &key) const
SoapySDR::Device::writeGPIO
virtual void writeGPIO(const std::string &bank, const unsigned value)
SoapySDR::Device::hasDCOffsetMode
virtual bool hasDCOffsetMode(const int direction, const size_t channel) const
SoapySDR::Device::unmake
static void unmake(const std::vector< Device * > &devices)
SoapySDR::Device::readRegister
virtual unsigned readRegister(const std::string &name, const unsigned addr) const
SoapySDR::Device::getNumDirectAccessBuffers
virtual size_t getNumDirectAccessBuffers(Stream *stream)
SoapySDR::Device::setGainMode
virtual void setGainMode(const int direction, const size_t channel, const bool automatic)
SoapySDR::Device::readGPIO
virtual unsigned readGPIO(const std::string &bank) const
SoapySDR::Device::getBandwidth
virtual double getBandwidth(const int direction, const size_t channel) const
SoapySDR::Device::getTimeSource
virtual std::string getTimeSource(void) const
SoapySDR::Device::setMasterClockRate
virtual void setMasterClockRate(const double rate)
SoapySDR::Device::getIQBalance
virtual std::complex< double > getIQBalance(const int direction, const size_t channel) const
SoapySDR::Device::getDCOffset
virtual std::complex< double > getDCOffset(const int direction, const size_t channel) const
SoapySDR::Device::setIQBalanceMode
virtual void setIQBalanceMode(const int direction, const size_t channel, const bool automatic)
SoapySDR::Device::getGainMode
virtual bool getGainMode(const int direction, const size_t channel) const
SoapySDR::Device::setGain
virtual void setGain(const int direction, const size_t channel, const double value)
SoapySDR::Device::getNativeStreamFormat
virtual std::string getNativeStreamFormat(const int direction, const size_t channel, double &fullScale) const
SoapySDR::Device::getNumChannels
virtual size_t getNumChannels(const int direction) const
SoapySDR::Device::getStreamMTU
virtual size_t getStreamMTU(Stream *stream) const
SoapySDR::Device::setDCOffsetMode
virtual void setDCOffsetMode(const int direction, const size_t channel, const bool automatic)
SoapySDR::Device::getMasterClockRates
virtual RangeList getMasterClockRates(void) const
SoapySDR::Device::getIQBalanceMode
virtual bool getIQBalanceMode(const int direction, const size_t channel) const
SoapySDR::Device::make
static std::vector< Device * > make(const KwargsList &argsList)
SoapySDR::Device::getGain
virtual double getGain(const int direction, const size_t channel, const std::string &name) const
SoapySDR::Device::getSettingInfo
virtual ArgInfoList getSettingInfo(void) const
SoapySDR::Device::getGain
virtual double getGain(const int direction, const size_t channel) const
SoapySDR::Device::getFrequencyRange
virtual RangeList getFrequencyRange(const int direction, const size_t channel, const std::string &name) const
SoapySDR::Device::readRegister
virtual unsigned readRegister(const unsigned addr) const
SoapySDR::Device::acquireWriteBuffer
virtual int acquireWriteBuffer(Stream *stream, size_t &handle, void **buffs, const long timeoutUs=100000)
SoapySDR::Device::writeRegister
virtual void writeRegister(const std::string &name, const unsigned addr, const unsigned value)
SoapySDR::Device::activateStream
virtual int activateStream(Stream *stream, const int flags=0, const long long timeNs=0, const size_t numElems=0)
SoapySDR::Device::getChannelInfo
virtual Kwargs getChannelInfo(const int direction, const size_t channel) const
SoapySDR::Device::getFrequency
virtual double getFrequency(const int direction, const size_t channel, const std::string &name) const
SoapySDR::Device::readSetting
virtual std::string readSetting(const int direction, const size_t channel, const std::string &key) const
SoapySDR::Device::setClockSource
virtual void setClockSource(const std::string &source)
SoapySDR::Device::writeStream
virtual int writeStream(Stream *stream, const void *const *buffs, const size_t numElems, int &flags, const long long timeNs=0, const long timeoutUs=100000)
SoapySDR::Device::make
static Device * make(const std::string &args)
SoapySDR::Range
Definition Types.hpp:65
SoapySDR
Definition ConverterPrimitives.hpp:15
SoapySDR::RangeList
std::vector< Range > RangeList
Definition Types.hpp:92
SoapySDR::ArgInfoList
std::vector< ArgInfo > ArgInfoList
Definition Types.hpp:149
SoapySDR::StringToSetting
Type StringToSetting(const std::string &s)
Definition Types.hpp:240
SoapySDR::Kwargs
std::map< std::string, std::string > Kwargs
Typedef for a dictionary of key-value string arguments.
Definition Types.hpp:24
SoapySDR::KwargsList
std::vector< Kwargs > KwargsList
Typedef for a list of key-word dictionaries.
Definition Types.hpp:39
SoapySDR::SettingToString
std::string SettingToString(const Type &s)
Definition Types.hpp:246