streamConfig _txConfig = { .bandwidthHz = MHZ(0.200), .samplingRateHz = sampleRate, .loFrequencyHz = localOscillatorFrequency, .rfPortName = "A", .gains = {gains.tx1Db, gains.tx2Db}, .gainControlMode = "manual", }; void initTransmitPath(streamConfig& config, int id) { bool cyclic = true; PLOGI << "Acquiring AD9361 TX streaming devices"; getAD9361StreamingDevice(_ctx, TX, &_tx, id); PLOGI << "Configuring AD9361 TX for streaming"; configureAD9361StreamingChannel(_ctx, &config, TX, 0, id); PLOGI << "Initializing AD9361 IIO streaming channels"; getAD9361StreamingChannel(_ctx, TX, _tx, 0, &_tx0_i); getAD9361StreamingChannel(_ctx, TX, _tx, 1, &_tx0_q); iio_channel_enable(_tx0_i); iio_channel_enable(_tx0_q); _txbuf = iio_device_create_buffer(_tx, _bufferSize, cyclic); if (!_txbuf) { PLOGE << "Could not create TX buffer: " << strerror(errno); processStop(); } } void setLoFrequency(enum iodev direction, int64_t f) { struct iio_channel *chn = NULL; getLOChannel(_ctx, direction, &chn, _id); writeLLIntValToChannel(chn, "frequency", f); }