aboutsummaryrefslogtreecommitdiffstats
path: root/OutputUHD.hpp
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2015-10-30 11:39:35 +0100
committerMatthias P. Braendli <matthias.braendli@mpb.li>2015-10-30 11:39:35 +0100
commit3ade194073d5d20ace17986c148800bf2a3554ef (patch)
treea5c37632cfbda20e244534e118fe7017a7d4be45 /OutputUHD.hpp
parent546fd6b8ba18f457832e8c10af083cdb1d9e7d5c (diff)
downloadodr-dpd-3ade194073d5d20ace17986c148800bf2a3554ef.tar.gz
odr-dpd-3ade194073d5d20ace17986c148800bf2a3554ef.tar.bz2
odr-dpd-3ade194073d5d20ace17986c148800bf2a3554ef.zip
Add first version
Diffstat (limited to 'OutputUHD.hpp')
-rw-r--r--OutputUHD.hpp47
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_
+