Ejemplo n.º 1
0
SoapySDR::ArgInfoList SoapyLMS7::getStreamArgsInfo(const int direction, const size_t channel) const
{
    SoapySDR::ArgInfoList argInfos;

    //buffer length
    {
        SoapySDR::ArgInfo info;
        info.key = "bufferLength";
        info.name = "Buffer Length";
        info.description = "The buffer transfer size over the link.";
        info.units = "samples";
        info.type = SoapySDR::ArgInfo::INT;
        argInfos.push_back(info);
    }

    //link format
    {
        SoapySDR::ArgInfo info;
        info.key = "linkFormat";
        info.name = "Link Format";
        info.description = "The format of the samples over the link.";
        info.type = SoapySDR::ArgInfo::STRING;
        info.options.push_back(SOAPY_SDR_CS16);
        info.options.push_back(SOAPY_SDR_CS12);
        info.optionNames.push_back("Complex int16");
        info.optionNames.push_back("Complex int12");
        argInfos.push_back(info);
    }

    return argInfos;
}
Ejemplo n.º 2
0
SoapySDR::ArgInfoList SoapyAudio::getStreamArgsInfo(const int direction, const size_t channel) const {
    SoapySDR::ArgInfoList streamArgs;

    SoapySDR::ArgInfo chanArg;
    chanArg.key = "chan";
    chanArg.value = "mono_l";
    chanArg.name = "Channel Setup";
    chanArg.description = "Input channel configuration.";
    chanArg.type = SoapySDR::ArgInfo::STRING;
    
    std::vector<std::string> chanOpts;
    std::vector<std::string> chanOptNames;
    
    chanOpts.push_back("mono_l");
    chanOptNames.push_back("Mono Left");
    chanOpts.push_back("mono_r");
    chanOptNames.push_back("Mono Right");
    chanOpts.push_back("stereo_iq");
    chanOptNames.push_back("Complex L/R = I/Q");
    chanOpts.push_back("stereo_qi");
    chanOptNames.push_back("Complex L/R = Q/I");

    chanArg.options = chanOpts;
    chanArg.optionNames = chanOptNames;

    streamArgs.push_back(chanArg);

    return streamArgs;
}
Ejemplo n.º 3
0
SoapySDR::ArgInfoList SoapySDR::Device::getFrequencyArgsInfo(const int dir, const size_t chan) const
{
    SoapySDR::ArgInfoList args;

    const std::vector<std::string> comps = this->listFrequencies(dir, chan);

    if (comps.size() < 2) return args; //no tuning options with single components

    //support offset tuning
    {
        SoapySDR::ArgInfo info;
        info.key = "OFFSET";
        info.name = "LO Offset";
        info.value = "0.0";
        info.units = "Hz";
        info.type = SoapySDR::ArgInfo::FLOAT;
        info.description = "Tune the LO with an offset and compensate with the baseband CORDIC.";
        SoapySDR::RangeList ranges = this->getFrequencyRange(dir, chan, comps.at(1));
        if (not ranges.empty()) info.range = ranges.front();
        args.push_back(info);
    }

    //every tunable component becomes an option
    for (size_t comp_i = 1; comp_i < comps.size(); comp_i++)
    {
        SoapySDR::ArgInfo info;
        info.key = comps[comp_i];
        info.value = "DEFAULT";
        info.units = "Hz";
        info.type = SoapySDR::ArgInfo::FLOAT;
        info.description = "Specify a specific value for this component or IGNORE to skip tuning it.";
        info.options.push_back("DEFAULT");
        info.optionNames.push_back("Default");
        info.options.push_back("IGNORE");
        info.optionNames.push_back("Ingore");
        SoapySDR::RangeList ranges = this->getFrequencyRange(dir, chan, comps.at(comp_i));
        if (not ranges.empty()) info.range = ranges.front();
        args.push_back(info);
    }

    return args;
}
Ejemplo n.º 4
0
SoapySDR::ArgInfoList SoapySDRPlay::getSettingInfo(void) const {
    SoapySDR::ArgInfoList setArgs;

    // TODO: Settings
    SoapySDR::ArgInfo IFArg;
    IFArg.key="use_low_if";
    IFArg.value="true";
    IFArg.name = "Low IF (when available)";
    IFArg.description = "Use low IF when available: 0.5MHz SR with 200 and 300khz BW, 1MHz SR with 600kHz BW, 2048kHz SR with 1536kHz BW";
    IFArg.type=SoapySDR::ArgInfo::BOOL;
    setArgs.push_back(IFArg);

    SoapySDR::ArgInfo AIFArg;
    AIFArg.key="actual_IF";
    AIFArg.value=ifMode;
    AIFArg.name = "Actual IF";
    AIFArg.description = "Currently used IF frequency in kHz";
    AIFArg.type=SoapySDR::ArgInfo::INT;
    setArgs.push_back(AIFArg);

    return setArgs;
}