39 return std::string(
"RF");
48 return std::string(
"RF");
57 return std::string(
"RF");
66 return std::string(
"RF");
77 for (
unsigned int ichan = 0; ichan <
m_nbRx; ichan++) {
81 for (
unsigned int ichan = 0; ichan <
m_nbTx; ichan++) {
90 channelSettings.back().m_streamSettingsArgs =
m_device->getStreamArgsInfo(direction, ichan);
91 channelSettings.back().m_antennas =
m_device->listAntennas(direction, ichan);
92 channelSettings.back().m_hasDCAutoCorrection =
m_device->hasDCOffsetMode(direction, ichan);
93 channelSettings.back().m_hasDCOffsetValue =
m_device->hasDCOffset(direction, ichan);
94 channelSettings.back().m_hasIQBalanceValue =
m_device->hasIQBalance(direction, ichan);
95 channelSettings.back().m_hasFrequencyCorrectionValue =
m_device->hasFrequencyCorrection(direction, ichan);
99 channelSettings.back().m_hasAGC =
m_device->hasGainMode(direction, ichan);
100 channelSettings.back().m_gainRange =
m_device->getGainRange(direction, ichan);
101 std::vector<std::string> gainsList =
m_device->listGains(direction, ichan);
103 for (
const auto &it : gainsList)
105 channelSettings.back().m_gainSettings.push_back(
GainSetting());
106 channelSettings.back().m_gainSettings.back().m_name = it;
107 channelSettings.back().m_gainSettings.back().m_range =
m_device->getGainRange(direction, ichan, it);
112 std::vector<std::string> freqsList =
m_device->listFrequencies(direction, ichan);
114 for (
const auto &it : freqsList)
117 channelSettings.back().m_frequencySettings.back().m_name = it;
118 channelSettings.back().m_frequencySettings.back().m_ranges =
m_device->getFrequencyRange(direction, ichan, it);
121 channelSettings.back().m_frequencySettingsArgs =
m_device->getFrequencyArgsInfo(direction, ichan);
124 channelSettings.back().m_ratesRanges =
m_device->getSampleRateRange(direction, ichan);
127 channelSettings.back().m_bandwidthsRanges =
m_device->getBandwidthRange(direction, ichan);
137 qDebug() <<
"DeviceSoapySDRParams::printParams: Rx channel " << ichan;
146 qDebug() <<
"DeviceSoapySDRParams::printParams: Tx channel " << ichan;
155 qDebug() <<
"DeviceSoapySDRParams::printParams:" 160 <<
" m_hasAGC: " << channelSetting.
m_hasAGC;
162 qDebug() <<
"DeviceSoapySDRParams::printParams: m_gainRange: " <<
rangeToString(channelSetting.
m_gainRange).c_str();
164 qDebug() <<
"DeviceSoapySDRParams::printParams: individual gains...";
168 qDebug() <<
"DeviceSoapySDRParams::printParams: m_name: " << gainIt.m_name.c_str();
169 qDebug() <<
"DeviceSoapySDRParams::printParams: m_range: " <<
rangeToString(gainIt.m_range).c_str();
172 qDebug() <<
"DeviceSoapySDRParams::printParams: tunable elements...";
176 qDebug() <<
"DeviceSoapySDRParams::printParams: m_name: " << freqIt.m_name.c_str();
177 qDebug() <<
"DeviceSoapySDRParams::printParams: m_range (kHz): " <<
rangeListToString(freqIt.m_ranges, 1e3).c_str();
187 std::stringstream ss;
190 std::string name = argInfo.name;
191 if (argInfo.name.empty()) name = argInfo.key;
192 ss << indent <<
" * " << name;
195 std::string desc = argInfo.description;
196 const std::string replace(
"\n"+indent+
" ");
198 for (std::size_t pos = 0; (pos=desc.find(
"\n", pos)) != std::string::npos; pos+=replace.size()) {
199 desc.replace(pos, 1, replace);
202 if (not desc.empty()) {
203 ss <<
" - " << desc << std::endl << indent <<
" ";
207 ss <<
" [key=" << argInfo.key;
209 if (not argInfo.units.empty()) {
210 ss <<
", units=" << argInfo.units;
213 if (not argInfo.value.empty()) {
214 ss <<
", default=" << argInfo.value;
218 switch (argInfo.type)
223 case SoapySDR::ArgInfo::INT:
226 case SoapySDR::ArgInfo::FLOAT:
227 ss <<
", type=float";
229 case SoapySDR::ArgInfo::STRING:
230 ss <<
", type=string";
235 if (argInfo.range.minimum() < argInfo.range.maximum()) {
239 if (not argInfo.options.empty()) {
250 std::stringstream ss;
252 for (std::size_t
i = 0;
i < argInfos.size();
i++) {
261 std::stringstream ss;
262 ss <<
"[" << range.minimum() <<
", " << range.maximum();
264 if (range.step() != 0.0) {
265 ss <<
", " << range.step();
274 std::stringstream ss;
276 for (std::size_t
i = 0;
i < range.size();
i++)
278 if (not ss.str().empty()) {
282 if (range[
i].minimum() == range[
i].maximum())
284 ss << (range[
i].minimum()/scale);
288 ss <<
"[" << (range[
i].minimum()/scale) <<
", " << (range[
i].maximum()/scale);
290 if (range[
i].step() != 0.0) {
291 ss <<
", " << (range[
i].step()/scale);
SoapySDR::Device * m_device
std::vector< ChannelSettings > m_RxChannelsSettings
std::string argInfoToString(const SoapySDR::ArgInfo &argInfo, const std::string indent=" ")
uint32_t m_nbRx
number of Rx channels
std::string getTxChannelMainTunableElementName(uint32_t index)
SoapySDR::ArgInfoList m_deviceSettingsArgs
list (vector) of device settings arguments
SoapySDR::ArgInfoList m_frequencySettingsArgs
common tuning parameters
std::string getRxChannelMainTunableElementName(uint32_t index)
bool m_hasFrequencyCorrectionValue
Frequency correction value flag.
bool m_hasDCOffsetValue
DC offset value flag.
uint32_t m_nbTx
number of Tx channels
bool m_hasDCAutoCorrection
DC offset auto correction flag.
std::vector< ChannelSettings > m_TxChannelsSettings
std::vector< FrequencySetting > m_frequencySettings
tunable elements settings
void fillChannelParams(std::vector< ChannelSettings > &channelSettings, int direction, unsigned int ichan)
std::vector< std::string > m_antennas
Antenna ports names.
SoapySDR::RangeList m_ratesRanges
list of ranges of sample rates
std::string rangeListToString(const SoapySDR::RangeList &range, const double scale)
void printChannelParams(const ChannelSettings &channelSetting)
SoapySDR::RangeList m_bandwidthsRanges
list of ranges of bandwidths
std::string argInfoListToString(const SoapySDR::ArgInfoList &argInfos)
std::string rangeToString(const SoapySDR::Range &range)
std::string vectorToString(const std::vector< Type > &options)
std::vector< GainSetting > m_gainSettings
gain elements settings
SoapySDR::ArgInfoList m_streamSettingsArgs
common stream parameters
DeviceSoapySDRParams(SoapySDR::Device *device)
bool m_hasIQBalanceValue
IQ correction value flag.
SoapySDR::Range m_gainRange
Global gain range.