/* Copyright (C) 2015 Matthias P. Braendli, matthias.braendli@mpb.li http://opendigitalradio.org */ /* This file is part of ODR-DPD. ODR-DPD is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. ODR-DPD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with ODR-DPD. If not, see . */ #pragma once #include typedef std::complex complexf; class OutputUHD { public: OutputUHD(double txgain, double rxgain, double samplerate); size_t Transmit(const complexf *samples, size_t sizeIn, double transmit_time); ssize_t Receive(complexf *samples, size_t sizeIn, double *first_sample_time); void SetTxGain(double gain); void SetRxGain(double gain); private: double m_txgain; double m_rxgain; double m_samplerate; uhd::usrp::multi_usrp::sptr m_usrp; uhd::tx_metadata_t md; uhd::tx_streamer::sptr myTxStream; uhd::rx_streamer::sptr myRxStream; };