diff options
Diffstat (limited to 'OutputUHD.hpp')
-rw-r--r-- | OutputUHD.hpp | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/OutputUHD.hpp b/OutputUHD.hpp new file mode 100644 index 0000000..007e51f --- /dev/null +++ b/OutputUHD.hpp @@ -0,0 +1,47 @@ +/* + 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 <http://www.gnu.org/licenses/>. + */ + +#ifndef __OUTPUT_UHD_H_ +#define __OUTPUT_UHD_H_ + +#include <uhd/usrp/multi_usrp.hpp> + +typedef std::complex<float> complexf; + + +class OutputUHD { + public: + void Init(double txgain); + + size_t Transmit(std::vector<complexf> samples, size_t sizeIn, double *first_sample_time); + + private: + double m_samplerate; + double m_txgain; + uhd::usrp::multi_usrp::sptr m_usrp; + uhd::tx_metadata_t md; + uhd::tx_streamer::sptr myTxStream; +}; + +#endif // __OUTPUT_UHD_H_ + |