[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] r9118 - in usrp2/branches/developers/eb/merge-wip: hos
From: |
eb |
Subject: |
[Commit-gnuradio] r9118 - in usrp2/branches/developers/eb/merge-wip: host/apps host-ng/apps host-ng/include/usrp2 host-ng/lib |
Date: |
Fri, 1 Aug 2008 00:25:51 -0600 (MDT) |
Author: eb
Date: 2008-08-01 00:25:50 -0600 (Fri, 01 Aug 2008)
New Revision: 9118
Added:
usrp2/branches/developers/eb/merge-wip/host-ng/apps/find_usrps.cc
usrp2/branches/developers/eb/merge-wip/host-ng/apps/gen_2tone.py
usrp2/branches/developers/eb/merge-wip/host-ng/apps/gen_const.cc
usrp2/branches/developers/eb/merge-wip/host-ng/apps/gen_sine.py
usrp2/branches/developers/eb/merge-wip/host-ng/apps/rx_samples.cc
usrp2/branches/developers/eb/merge-wip/host-ng/apps/streaming_fft.py
usrp2/branches/developers/eb/merge-wip/host-ng/apps/tx_samples.cc
usrp2/branches/developers/eb/merge-wip/host-ng/apps/u2_burn_mac_addr.cc
Removed:
usrp2/branches/developers/eb/merge-wip/host/apps/find_usrps.cc
usrp2/branches/developers/eb/merge-wip/host/apps/gen_2tone.py
usrp2/branches/developers/eb/merge-wip/host/apps/gen_const.cc
usrp2/branches/developers/eb/merge-wip/host/apps/gen_sine.py
usrp2/branches/developers/eb/merge-wip/host/apps/rx_samples.cc
usrp2/branches/developers/eb/merge-wip/host/apps/stdin_int32_fft.py
usrp2/branches/developers/eb/merge-wip/host/apps/streaming_fft.py
usrp2/branches/developers/eb/merge-wip/host/apps/tx_samples.cc
usrp2/branches/developers/eb/merge-wip/host/apps/u2_burn_mac_addr.cc
Modified:
usrp2/branches/developers/eb/merge-wip/host-ng/apps/
usrp2/branches/developers/eb/merge-wip/host-ng/apps/Makefile.am
usrp2/branches/developers/eb/merge-wip/host-ng/apps/test2_usrp2.cc
usrp2/branches/developers/eb/merge-wip/host-ng/include/usrp2/usrp2.h
usrp2/branches/developers/eb/merge-wip/host-ng/lib/usrp2.cc
usrp2/branches/developers/eb/merge-wip/host-ng/lib/usrp2_impl.cc
usrp2/branches/developers/eb/merge-wip/host-ng/lib/usrp2_impl.h
Log:
work-in-progress porting old apps to new framework; tx_*
Deleted: usrp2/branches/developers/eb/merge-wip/host/apps/find_usrps.cc
Deleted: usrp2/branches/developers/eb/merge-wip/host/apps/gen_2tone.py
Deleted: usrp2/branches/developers/eb/merge-wip/host/apps/gen_const.cc
Deleted: usrp2/branches/developers/eb/merge-wip/host/apps/gen_sine.py
Deleted: usrp2/branches/developers/eb/merge-wip/host/apps/rx_samples.cc
Deleted: usrp2/branches/developers/eb/merge-wip/host/apps/stdin_int32_fft.py
Deleted: usrp2/branches/developers/eb/merge-wip/host/apps/streaming_fft.py
Deleted: usrp2/branches/developers/eb/merge-wip/host/apps/tx_samples.cc
Deleted: usrp2/branches/developers/eb/merge-wip/host/apps/u2_burn_mac_addr.cc
Property changes on: usrp2/branches/developers/eb/merge-wip/host-ng/apps
___________________________________________________________________
Name: svn:ignore
- Makefile
Makefile.in
.libs
.deps
test_eth
test_usrp2
test2_usrp2
cerr
*.sh
+ Makefile
Makefile.in
.libs
.deps
test_eth
test_usrp2
test2_usrp2
gen_const
find_usrps
cerr
*.sh
Modified: usrp2/branches/developers/eb/merge-wip/host-ng/apps/Makefile.am
===================================================================
--- usrp2/branches/developers/eb/merge-wip/host-ng/apps/Makefile.am
2008-08-01 04:56:02 UTC (rev 9117)
+++ usrp2/branches/developers/eb/merge-wip/host-ng/apps/Makefile.am
2008-08-01 06:25:50 UTC (rev 9118)
@@ -17,16 +17,19 @@
include $(top_srcdir)/Makefile.common
-#AM_CXXFLAGS = -Wall -Werror (handle this with: $ ./configure CXXFLAGS="-Wall
-Werror -O2 -g")
AM_CPPFLAGS = $(STD_DEFINES_AND_INCLUDES) $(CPPUNIT_INCLUDES) $(GRUEL_CFLAGS)
LDADD = \
../lib/libusrp2ng.la \
-lgruel
+bin_PROGRAMS = \
+ find_usrps
+
noinst_PROGRAMS = \
+ gen_const \
test2_usrp2
-test2_usrp2_SOURCES = \
- test2_usrp2.cc
-
+find_usrps = find_usrps.cc
+test2_usrp2_SOURCES = test2_usrp2.cc
+gen_const_SOURCES = gen_const.cc
\ No newline at end of file
Copied: usrp2/branches/developers/eb/merge-wip/host-ng/apps/find_usrps.cc (from
rev 9112, usrp2/branches/developers/eb/merge-wip/host/apps/find_usrps.cc)
===================================================================
--- usrp2/branches/developers/eb/merge-wip/host-ng/apps/find_usrps.cc
(rev 0)
+++ usrp2/branches/developers/eb/merge-wip/host-ng/apps/find_usrps.cc
2008-08-01 06:25:50 UTC (rev 9118)
@@ -0,0 +1,70 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2007,2008 Free Software Foundation, Inc.
+ *
+ * This program 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.
+ *
+ * This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <usrp2/usrp2.h>
+#include <iostream>
+#include <getopt.h>
+
+static void
+usage(const char *progname)
+{
+ fprintf(stderr, "usage: %s [-e ethN]\n",
+ progname);
+}
+
+int
+main(int argc, char **argv)
+{
+ int ch;
+ const char *interface = "eth0";
+
+ while ((ch = getopt(argc, argv, "he:")) != EOF){
+ switch (ch){
+ case 'e':
+ interface = optarg;
+ break;
+
+ case 'h':
+ default:
+ usage(argv[0]);
+ exit(1);
+ }
+ }
+
+ if (argc - optind != 0){
+ usage(argv[0]);
+ exit(1);
+ }
+
+ usrp2::props_vector_t r = usrp2::find(interface);
+
+ for (size_t i = 0; i < r.size(); i++){
+ std::cout << r[i] << std::endl;
+ }
+
+ if (r.size() == 0){
+ std::cerr << "No USRP2 found.\n";
+ return 1;
+ }
+
+ return 0;
+}
Copied: usrp2/branches/developers/eb/merge-wip/host-ng/apps/gen_2tone.py (from
rev 9112, usrp2/branches/developers/eb/merge-wip/host/apps/gen_2tone.py)
===================================================================
--- usrp2/branches/developers/eb/merge-wip/host-ng/apps/gen_2tone.py
(rev 0)
+++ usrp2/branches/developers/eb/merge-wip/host-ng/apps/gen_2tone.py
2008-08-01 06:25:50 UTC (rev 9118)
@@ -0,0 +1,75 @@
+#!/usr/bin/env python
+#
+# Copyright 2007 Free Software Foundation, Inc.
+#
+# This program 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.
+#
+# This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
+#
+
+from gnuradio import gr, eng_notation
+from gnuradio.eng_option import eng_option
+from optparse import OptionParser
+import sys
+
+master_clock = 100e6
+
+class my_top_block(gr.top_block):
+
+ def __init__(self):
+ gr.top_block.__init__(self)
+
+ parser = OptionParser(option_class=eng_option)
+ parser.add_option("-f", "--freq1", type="eng_float", default=1e6,
+ help="set waveform frequency to FREQ
[default=%default]")
+ parser.add_option("-g", "--freq2", type="eng_float", default=1e6,
+ help="set waveform frequency to FREQ
[default=%default]")
+ parser.add_option ("-a", "--amplitude1", type="eng_float",
default=16e3,
+ help="set waveform amplitude to AMPLITUDE
[default=%default]", metavar="AMPL")
+ parser.add_option ("-b", "--amplitude2", type="eng_float",
default=16e3,
+ help="set waveform amplitude to AMPLITUDE
[default=%default]", metavar="AMPL")
+
+ parser.add_option("-i", "--interp", type="int", default=32,
+ help="assume fgpa interpolation rate is INTERP
[default=%default]")
+
+ (options, args) = parser.parse_args ()
+ if len(args) != 0:
+ parser.print_help()
+ raise SystemExit, 1
+
+
+ src0 = gr.sig_source_c(master_clock/options.interp,
+ gr.GR_SIN_WAVE,
+ options.freq1,
+ options.amplitude1)
+ src1 = gr.sig_source_c(master_clock/options.interp,
+ gr.GR_SIN_WAVE,
+ options.freq2,
+ options.amplitude2)
+
+ adder = gr.add_cc()
+
+
+ c2s = gr.complex_to_interleaved_short()
+
+ stdout_sink = gr.file_descriptor_sink(gr.sizeof_short, 1)
+
+ self.connect(src0, (adder,0))
+ self.connect(src1, (adder,1))
+ self.connect(adder, c2s, stdout_sink)
+
+
+if __name__ == '__main__':
+ try:
+ my_top_block().run()
+ except KeyboardInterrupt:
+ pass
Copied: usrp2/branches/developers/eb/merge-wip/host-ng/apps/gen_const.cc (from
rev 9112, usrp2/branches/developers/eb/merge-wip/host/apps/gen_const.cc)
===================================================================
--- usrp2/branches/developers/eb/merge-wip/host-ng/apps/gen_const.cc
(rev 0)
+++ usrp2/branches/developers/eb/merge-wip/host-ng/apps/gen_const.cc
2008-08-01 06:25:50 UTC (rev 9118)
@@ -0,0 +1,27 @@
+#include <stdio.h>
+#include <stdint.h>
+#include <stdlib.h>
+#include <unistd.h>
+
+int
+main(int argc, char **argv)
+{
+ if (argc != 3){
+ fprintf(stderr, "usage: %s i-val q-val\n", argv[0]);
+ return 1;
+ }
+
+ int i_val = strtol(argv[1], 0, 0);
+ int q_val = strtol(argv[2], 0, 0);
+
+ static const int NSAMPLES = 16384;
+
+ uint32_t sample[NSAMPLES];
+ sample[0] = ((i_val & 0xffff) << 16) | (q_val & 0xffff);
+ for (int i = 1; i < NSAMPLES; i++)
+ sample[i] = sample[0];
+
+ while(1){
+ write(1, sample, sizeof(sample));
+ }
+}
Copied: usrp2/branches/developers/eb/merge-wip/host-ng/apps/gen_sine.py (from
rev 9112, usrp2/branches/developers/eb/merge-wip/host/apps/gen_sine.py)
===================================================================
--- usrp2/branches/developers/eb/merge-wip/host-ng/apps/gen_sine.py
(rev 0)
+++ usrp2/branches/developers/eb/merge-wip/host-ng/apps/gen_sine.py
2008-08-01 06:25:50 UTC (rev 9118)
@@ -0,0 +1,63 @@
+#!/usr/bin/env python
+#
+# Copyright 2007 Free Software Foundation, Inc.
+#
+# This program 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.
+#
+# This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
+#
+
+from gnuradio import gr, eng_notation
+from gnuradio.eng_option import eng_option
+from optparse import OptionParser
+import sys
+
+master_clock = 100e6
+
+class my_top_block(gr.top_block):
+
+ def __init__(self):
+ gr.top_block.__init__(self)
+
+ parser = OptionParser(option_class=eng_option)
+ parser.add_option("-f", "--freq", type="eng_float", default=1e6,
+ help="set waveform frequency to FREQ
[default=%default]")
+ parser.add_option ("-a", "--amplitude", type="eng_float", default=16e3,
+ help="set waveform amplitude to AMPLITUDE
[default=%default]", metavar="AMPL")
+
+ parser.add_option("-i", "--interp", type="int", default=32,
+ help="assume fgpa interpolation rate is INTERP
[default=%default]")
+
+ (options, args) = parser.parse_args ()
+ if len(args) != 0:
+ parser.print_help()
+ raise SystemExit, 1
+
+
+ src0 = gr.sig_source_c(master_clock/options.interp,
+ gr.GR_SIN_WAVE,
+ options.freq,
+ options.amplitude)
+
+
+ c2s = gr.complex_to_interleaved_short()
+
+ stdout_sink = gr.file_descriptor_sink(gr.sizeof_short, 1)
+
+ self.connect(src0, c2s, stdout_sink)
+
+
+if __name__ == '__main__':
+ try:
+ my_top_block().run()
+ except KeyboardInterrupt:
+ pass
Copied: usrp2/branches/developers/eb/merge-wip/host-ng/apps/rx_samples.cc (from
rev 9112, usrp2/branches/developers/eb/merge-wip/host/apps/rx_samples.cc)
===================================================================
--- usrp2/branches/developers/eb/merge-wip/host-ng/apps/rx_samples.cc
(rev 0)
+++ usrp2/branches/developers/eb/merge-wip/host-ng/apps/rx_samples.cc
2008-08-01 06:25:50 UTC (rev 9118)
@@ -0,0 +1,382 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2007 Free Software Foundation, Inc.
+ *
+ * This program 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.
+ *
+ * This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+#include "usrp2_basic.h"
+#include <iostream>
+#include <complex>
+#include <getopt.h>
+#include <string.h>
+#include "strtod_si.h"
+#include <signal.h>
+#include <stdexcept>
+#include "gri_if_stats.h"
+#include <gr_realtime.h>
+
+
+typedef std::complex<float> fcomplex;
+
+static volatile bool signaled = false;
+
+static void
+sig_handler(int sig)
+{
+ signaled = true;
+}
+
+static void
+install_sig_handler(int signum,
+ void (*new_handler)(int))
+{
+ struct sigaction new_action;
+ memset (&new_action, 0, sizeof (new_action));
+
+ new_action.sa_handler = new_handler;
+ sigemptyset (&new_action.sa_mask);
+ new_action.sa_flags = 0;
+
+ if (sigaction (signum, &new_action, 0) < 0){
+ perror ("sigaction (install new)");
+ throw std::runtime_error ("sigaction");
+ }
+}
+
+
+/*
+ * Vectorize me!
+ */
+void
+convert_samples_to_complex(size_t nsamples,
+ uint32_t *i_samples,
+ fcomplex *c_samples)
+{
+ uint32_t *p = i_samples;
+ for (size_t i = 0; i < nsamples; i++){
+ int16_t si = ((int16_t) (p[i] >> 16));
+ int16_t sq = ((int16_t) (p[i] & 0xffff));
+ c_samples[i] = fcomplex((float) si, (float) sq);
+ }
+}
+
+
+static void
+usage(const char *progname)
+{
+ const char *p = strrchr(progname, '/'); // drop leading directory path
+ if (p)
+ p++;
+
+ if (strncmp(p, "lt-", 3) == 0) // drop lt- libtool prefix
+ p += 3;
+
+ fprintf(stderr, "Usage: %s [options]\n\n", p);
+ fprintf(stderr, "Options:\n");
+ fprintf(stderr, " -h show this message and exit\n");
+ fprintf(stderr, " -e ETH_INTERFACE specify ethernet interface
[default=eth0]\n");
+ fprintf(stderr, " -m MAC_ADDR mac address of USRP2 HH:HH
[default=first one found]\n");
+ fprintf(stderr, " -o OUTPUT_FILE set output filename
[default=NONE]\n");
+ fprintf(stderr, " -f FREQ set frequency to FREQ
[default=0]\n");
+ fprintf(stderr, " -d DECIM set decimation rate to DECIM
[default=32]\n");
+ fprintf(stderr, " -N NSAMPLES total number of samples to receive
[default=2.5e6]\n");
+ fprintf(stderr, " -F SAMPLES_PER_FRAME number of samples in each frame
[default=371]\n");
+ fprintf(stderr, " -S SCALE fpga scaling factor for I & Q
[default=1024]\n");
+ fprintf(stderr, " -M DONT_LOCK|LOCK_TO_SMA|LOCK_TO_MIMO specify MIMO
clock source\n");
+ fprintf(stderr, " -P provide clock to MIMO connector\n");
+}
+
+struct pkt_info {
+ int d_nsamples;
+ int d_timestamp;
+ unsigned int d_seqno;
+
+ pkt_info(int nsamples, int timestamp, int seqno)
+ : d_nsamples(nsamples),
+ d_timestamp(timestamp),
+ d_seqno(seqno) {}
+};
+
+int
+main(int argc, char **argv)
+{
+
+ // options and their defaults
+ const char *interface = "eth0";
+ const char *mac_addr_str = 0;
+ const char *output_filename = 0;
+ double freq = 0;
+ int32_t decim = 32;
+ int32_t nsamples = static_cast<int32_t>(2.5e6);
+ int32_t samples_per_frame = 371;
+ int32_t scale = 1024;
+ int mimo_config = MC_WE_DONT_LOCK;
+ bool provide_clock = false;
+
+ int ch;
+ double tmp;
+ u2_mac_addr_t mac_addr;
+
+ setvbuf(stdout, 0, _IOFBF, 64 * 1024); // make stdout fully buffered
+
+ while ((ch = getopt(argc, argv, "he:m:o:f:d:N:F:S:M:P")) != EOF){
+ switch (ch){
+
+ case 'e':
+ interface = optarg;
+ break;
+
+ case 'm':
+ mac_addr_str = optarg;
+ if (!usrp2_basic::parse_mac_addr(optarg, &mac_addr)){
+ std::cerr << "invalid mac addr: " << optarg << std::endl;
+ usage(argv[0]);
+ exit(1);
+ }
+ break;
+
+ case 'o':
+ output_filename = optarg;
+ break;
+
+ case 'f':
+ if (!strtod_si(optarg, &freq)){
+ std::cerr << "invalid number: " << optarg << std::endl;
+ usage(argv[0]);
+ exit(1);
+ }
+ break;
+
+ case 'N':
+ if (!strtod_si(optarg, &tmp)){
+ std::cerr << "invalid number: " << optarg << std::endl;
+ usage(argv[0]);
+ exit(1);
+ }
+ nsamples = static_cast<int32_t>(tmp);
+ break;
+
+ case 'F':
+ samples_per_frame = strtol(optarg, 0, 0);
+ break;
+
+ case 'd':
+ decim = strtol(optarg, 0, 0);
+ break;
+
+ case 'S':
+ if (!strtod_si(optarg, &tmp)){
+ std::cerr << "invalid number: " << optarg << std::endl;
+ usage(argv[0]);
+ exit(1);
+ }
+ scale = static_cast<int32_t>(tmp);
+ break;
+
+ case 'M':
+ if (strcmp(optarg, "DONT_LOCK") == 0)
+ mimo_config = MC_WE_DONT_LOCK;
+ else if (strcmp(optarg, "LOCK_TO_SMA") == 0)
+ mimo_config = MC_WE_LOCK_TO_SMA;
+ else if (strcmp(optarg, "LOCK_TO_MIMO") == 0)
+ mimo_config = MC_WE_LOCK_TO_MIMO;
+ else {
+ usage(argv[0]);
+ exit(1);
+ }
+ break;
+
+ case 'P':
+ provide_clock = true;
+ break;
+
+ case 'h':
+ default:
+ usage(argv[0]);
+ exit(1);
+ }
+ }
+
+ if (argc - optind != 0){
+ usage(argv[0]);
+ exit(1);
+ }
+
+ FILE *of = 0;
+ if (output_filename)
+ of = fopen(output_filename, "wb");
+
+ usrp2_basic *u2 = new usrp2_basic();
+
+ if (!u2->open(interface)){
+ std::cerr << "couldn't open " << interface << std::endl;
+ return 0;
+ }
+
+
+ install_sig_handler(SIGINT, sig_handler);
+ if (1){
+ install_sig_handler(SIGALRM, sig_handler);
+ alarm(5);
+ }
+
+
+ std::vector<op_id_reply_t> r = u2->find_usrps();
+
+ for (size_t i = 0; i < r.size(); i++){
+ std::cout << r[i] << std::endl;
+ }
+
+ if (r.size() == 0){
+ std::cerr << "No USRP2 found.\n";
+ return 1;
+ }
+
+ u2_mac_addr_t which = r[0].addr; // pick the first one
+
+
+ gr_rt_status_t rt = gr_enable_realtime_scheduling();
+ if (rt != RT_OK)
+ std::cerr << "failed to enable realtime scheduling\n";
+
+ if (provide_clock)
+ mimo_config |= MC_PROVIDE_CLK_TO_MIMO;
+
+ u2->config_mimo(which, mimo_confg);
+
+
+ gri_if_stats start, stop;
+ gri_get_if_stats(interface, &start);
+
+ if (!u2->start_rx(which, freq, decim, nsamples, samples_per_frame, scale,
scale)){
+ std::cerr << "start_rx failed\n";
+ return 1;
+ }
+
+
+ std::vector<pkt_info> history;
+ history.reserve(64*1024); // preallocate 64K entries
+
+
+ long total_samples_recvd = 0;
+
+ while (!signaled && total_samples_recvd < nsamples){
+ u2_eth_samples_t pkt;
+ // fcomplex c_samples[U2_MAX_SAMPLES];
+
+ // read samples
+ int n = u2->read_samples(which, &pkt);
+ if (n <= 0)
+ break;
+
+ total_samples_recvd += n;
+
+ history.push_back(pkt_info(n, u2p_timestamp(&pkt.hdrs.fixed),
pkt.hdrs.thdr.seqno));
+
+ // convert_samples_to_complex(n, pkt.samples, c_samples);
+ // size_t r = fwrite(c_samples, sizeof(fcomplex), n, of);
+
+ if (of){
+ fwrite(pkt.samples, sizeof(uint32_t), n, of);
+ fflush(of);
+ }
+ }
+
+
+ gri_get_if_stats(interface, &stop);
+
+ if (!u2->stop_rx(which)){
+ std::cerr << "stop_rx failed\n";
+ return 1;
+ }
+
+
+ long expected_rx_packets =
+ (nsamples + samples_per_frame - 1)/samples_per_frame;
+
+ long expected_rx_bytes =
+ expected_rx_packets * sizeof(u2_eth_packet_t) + nsamples * 4;
+
+
+ long total_pkts_recvd = 0;
+ total_samples_recvd = 0;
+
+ int nbad_seqno = 0;
+
+ for (unsigned i = 0; i < history.size(); i++){
+ total_pkts_recvd++;
+ total_samples_recvd += history[i].d_nsamples;
+
+ bool bad_seqno = history[i].d_seqno != (i & 0xff);
+ if (bad_seqno)
+ nbad_seqno++;
+
+ printf("%3d %8d %8ld %8ld %3d %s\n",
+ history[i].d_nsamples,
+ history[i].d_timestamp,
+ total_pkts_recvd, total_samples_recvd,
+ history[i].d_seqno,
+ bad_seqno ? "BAD SEQNO" : ""
+ );
+ }
+
+ if (nbad_seqno == 0)
+ printf("\nAll sequence numbers are correct\n");
+ else
+ printf("\n%d sequence numbers were INCORRECT\n", nbad_seqno);
+
+
+ printf("\nUser space statistics:\n");
+ printf(" rx_samples: %8ld", total_samples_recvd);
+ printf(" expected %8d %s\n",
+ nsamples,
+ nsamples - total_samples_recvd == 0 ? "OK" : "NOT OK");
+
+ printf(" rx_packets: %8ld", total_pkts_recvd);
+ printf(" expected %8ld %s\n",
+ expected_rx_packets,
+ expected_rx_packets - total_pkts_recvd == 0 ? "OK" : "NOT OK");
+
+
+ fflush(stdout);
+
+ printf("\nKernel interface statistics:\n");
+
+ long long delta;
+ delta = stop.rx_bytes - start.rx_bytes;
+ printf(" rx_bytes: %8Ld", delta);
+ printf(" expected %8ld %s\n",
+ expected_rx_bytes,
+ expected_rx_bytes - delta == 0 ? "OK" : "NOT OK");
+
+ delta = stop.rx_packets - start.rx_packets;
+ printf(" rx_packets: %8Ld", delta);
+ printf(" expected %8ld %s\n",
+ expected_rx_packets,
+ expected_rx_packets - delta == 0 ? "OK" : "NOT OK");
+
+ printf(" rx_errs: %8Ld\n", stop.rx_errs - start.rx_errs);
+ printf(" rx_drop: %8Ld\n", stop.rx_drop - start.rx_drop);
+ printf(" tx_bytes: %8Ld\n", stop.tx_bytes - start.tx_bytes);
+ printf(" tx_packets: %8Ld\n", stop.tx_packets - start.tx_packets);
+ printf(" tx_errs: %8Ld\n", stop.tx_errs - start.tx_errs);
+ printf(" tx_drop: %8Ld\n", stop.tx_drop - start.tx_drop);
+
+
+ return 0;
+}
Copied: usrp2/branches/developers/eb/merge-wip/host-ng/apps/streaming_fft.py
(from rev 9112,
usrp2/branches/developers/eb/merge-wip/host/apps/streaming_fft.py)
===================================================================
--- usrp2/branches/developers/eb/merge-wip/host-ng/apps/streaming_fft.py
(rev 0)
+++ usrp2/branches/developers/eb/merge-wip/host-ng/apps/streaming_fft.py
2008-08-01 06:25:50 UTC (rev 9118)
@@ -0,0 +1,75 @@
+#!/usr/bin/env python
+#
+# Copyright 2008 Free Software Foundation, Inc.
+#
+# This file is part of GNU Radio
+#
+# GNU Radio 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, or (at your option)
+# any later version.
+#
+# GNU Radio 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 this program; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+
+import os
+import os.path
+import sys
+from gnuradio.eng_option import eng_option
+from optparse import OptionParser
+
+def main():
+ parser = OptionParser(option_class=eng_option)
+ parser.add_option("-d", "--decim", type="int", default=16,
+ help="set fgpa decimation rate to DECIM
[default=%default]")
+ parser.add_option("-f", "--freq", type="eng_float", default=0.0,
+ help="set frequency to FREQ", metavar="FREQ")
+ parser.add_option("-g", "--gain", type="string", default=None,
+ help="set gain to GAIN [default=%default]")
+ parser.add_option("-W", "--waterfall", action="store_true", default=False,
+ help="Enable waterfall display")
+ parser.add_option("-S", "--oscilloscope", action="store_true",
default=False,
+ help="Enable oscilloscope display")
+ parser.add_option("-F", "--samples-per-frame", type="int", default=250,
+ help="[default=%default]")
+ parser.add_option("-e", "--eth", default="eth0",
+ help="specify ethernet interface [default=%default]")
+
+ (options, args) = parser.parse_args()
+ if len(args) != 0:
+ parser.print_help()
+ sys.exit(1)
+
+
+ path = os.path.dirname(sys.argv[0])
+ if path == '':
+ path = '.'
+
+
+ display_type = ''
+ if options.waterfall:
+ display_type = '-W'
+ if options.oscilloscope:
+ display_type = '-S'
+
+ gain_clause = ''
+ if options.gain:
+ gain_clause = '-g ' + options.gain
+
+ cmd = "sudo %s/rx_streaming_samples -e %s -f %g -d %d -F %d %s -o
/proc/self/fd/1 | %s/stdin_int32_fft.py %s -f %g -d %d" % (
+ path, options.eth, options.freq, options.decim,
options.samples_per_frame, gain_clause,
+ path, display_type, options.freq, options.decim)
+
+ print cmd
+ os.system(cmd)
+
+
+if __name__ == '__main__':
+ main()
Modified: usrp2/branches/developers/eb/merge-wip/host-ng/apps/test2_usrp2.cc
===================================================================
--- usrp2/branches/developers/eb/merge-wip/host-ng/apps/test2_usrp2.cc
2008-08-01 04:56:02 UTC (rev 9117)
+++ usrp2/branches/developers/eb/merge-wip/host-ng/apps/test2_usrp2.cc
2008-08-01 06:25:50 UTC (rev 9118)
@@ -21,9 +21,7 @@
#endif
#include <usrp2/usrp2.h>
-#include <usrp2/tune_result.h>
#include <usrp2/strtod_si.h>
-#include <usrp2/rx_sample_handler.h>
#include <usrp2/copiers.h>
#include <gruel/realtime.h>
#include <sys/time.h>
Copied: usrp2/branches/developers/eb/merge-wip/host-ng/apps/tx_samples.cc (from
rev 9112, usrp2/branches/developers/eb/merge-wip/host/apps/tx_samples.cc)
===================================================================
--- usrp2/branches/developers/eb/merge-wip/host-ng/apps/tx_samples.cc
(rev 0)
+++ usrp2/branches/developers/eb/merge-wip/host-ng/apps/tx_samples.cc
2008-08-01 06:25:50 UTC (rev 9118)
@@ -0,0 +1,238 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2007 Free Software Foundation, Inc.
+ *
+ * This program 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.
+ *
+ * This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+#include "usrp2_basic.h"
+#include <iostream>
+#include <complex>
+#include <getopt.h>
+#include <gr_realtime.h>
+#include "strtod_si.h"
+
+#define T_NOW (-1)
+
+typedef std::complex<float> fcomplex;
+
+
+static const char *
+prettify_progname(const char *progname) // that's probably
almost a word ;)
+{
+ const char *p = strrchr(progname, '/'); // drop leading directory path
+ if (p)
+ p++;
+
+ if (strncmp(p, "lt-", 3) == 0) // drop lt- libtool prefix
+ p += 3;
+
+ return p;
+}
+
+static void
+usage(const char *progname)
+{
+ fprintf(stderr, "Usage: %s [options]\n\n", prettify_progname(progname));
+ fprintf(stderr, "Options:\n");
+ fprintf(stderr, " -h show this message and exit\n");
+ fprintf(stderr, " -e ETH_INTERFACE specify ethernet interface
[default=eth0]\n");
+ fprintf(stderr, " -m MAC_ADDR mac address of USRP2 HH:HH
[default=first one found]\n");
+ fprintf(stderr, " -I INPUT_FILE set input filename
[default=stdin]\n");
+ fprintf(stderr, " -r repeat. When EOF of input file is
reached, seek to beginning\n");
+ fprintf(stderr, " -f FREQ set frequency to FREQ
[default=0]\n");
+ fprintf(stderr, " -i INTERP set interpolation rate to INTERP
[default=32]\n");
+ fprintf(stderr, " -g gain set tx gain\n");
+ fprintf(stderr, " -F SAMPLES_PER_FRAME number of samples in each frame
[default=371]\n");
+ fprintf(stderr, " -S SCALE fpga scaling factor for I & Q
[default=256]\n");
+}
+
+#define GAIN_NOT_SET (-1000)
+
+int
+main(int argc, char **argv)
+{
+ const char *interface = "eth0";
+ const char *input_filename = 0;
+ bool repeat = false;
+ const char *mac_addr_str = 0;
+ double freq = 0;
+ int32_t interp = 32;
+ int32_t samples_per_frame = U2_MAX_SAMPLES;
+ int32_t scale = 256;
+ double gain = GAIN_NOT_SET;
+
+ int ch;
+ double tmp;
+ u2_mac_addr_t mac_addr;
+
+ while ((ch = getopt(argc, argv, "he:m:I:rf:i:F:S:g:")) != EOF){
+ switch (ch){
+
+ case 'e':
+ interface = optarg;
+ break;
+
+ case 'm':
+ mac_addr_str = optarg;
+ if (!usrp2_basic::parse_mac_addr(optarg, &mac_addr)){
+ std::cerr << "invalid mac addr: " << optarg << std::endl;
+ usage(argv[0]);
+ return 1;
+ }
+ break;
+
+ case 'I':
+ input_filename = optarg;
+ break;
+
+ case 'r':
+ repeat = true;
+ break;
+
+ case 'f':
+ if (!strtod_si(optarg, &freq)){
+ std::cerr << "invalid number: " << optarg << std::endl;
+ usage(argv[0]);
+ return 1;
+ }
+ break;
+
+ case 'F':
+ samples_per_frame = strtol(optarg, 0, 0);
+ break;
+
+ case 'i':
+ interp = strtol(optarg, 0, 0);
+ break;
+
+ case 'S':
+ if (!strtod_si(optarg, &tmp)){
+ std::cerr << "invalid number: " << optarg << std::endl;
+ usage(argv[0]);
+ return 1;
+ }
+ scale = static_cast<int32_t>(tmp);
+ break;
+
+ case 'h':
+ default:
+ usage(argv[0]);
+ return 1;
+ }
+ }
+
+
+ if (argc - optind != 0){
+ usage(argv[0]);
+ return 1;
+ }
+
+ FILE *fp = 0;
+ if (input_filename == 0)
+ fp = stdin;
+ else {
+ fp = fopen(input_filename, "rb");
+ if (fp == 0){
+ perror(input_filename);
+ return 1;
+ }
+ }
+
+ if (samples_per_frame < 9 || samples_per_frame > U2_MAX_SAMPLES){
+ std::cerr << prettify_progname(argv[0])
+ << ": samples_per_frame is out of range. "
+ << "Must be in [9, " << U2_MAX_SAMPLES << "].\n";
+ usage(argv[0]);
+ return 1;
+ }
+
+ gr_rt_status_t rt = gr_enable_realtime_scheduling();
+ if (rt != RT_OK)
+ std::cerr << "failed to enable realtime scheduling\n";
+
+ usrp2_basic *u2 = new usrp2_basic();
+
+ if (!u2->open(interface)){
+ std::cerr << "couldn't open " << interface << std::endl;
+ return 1;
+ }
+
+ std::vector<op_id_reply_t> r = u2->find_usrps();
+
+ for (size_t i = 0; i < r.size(); i++){
+ std::cout << r[i] << std::endl;
+ }
+
+ if (r.size() == 0){
+ std::cerr << "No USRP2 found.\n";
+ return 1;
+ }
+
+ u2_mac_addr_t which = r[0].addr; // pick the first one
+
+
+ usrp2_tune_result tune_result;
+
+ if (gain != GAIN_NOT_SET){
+ if (!u2->set_tx_gain(which, gain)){
+ std::cerr << "set_tx_gain failed\n";
+ return 1;
+ }
+ }
+
+ if (!u2->set_tx_freq(which, freq, &tune_result)){
+ std::cerr << "set_tx_freq failed\n";
+ return 1;
+ }
+
+ if (!u2->set_tx_interp(which, interp)){
+ std::cerr << "set_tx_interp failed\n";
+ return 1;
+ }
+
+ if (!u2->set_tx_scale_iq(which, scale, scale)){
+ std::cerr << "set_tx_scale_iq failed\n";
+ return 1;
+ }
+
+
+ u2_eth_samples_t pkt;
+ u2p_set_word0(&pkt.hdrs.fixed, U2P_TX_IMMEDIATE | U2P_TX_START_OF_BURST, 0);
+ u2p_set_timestamp(&pkt.hdrs.fixed, T_NOW);
+
+ while (1){
+
+ int r = fread(&pkt.samples, sizeof(uint32_t), samples_per_frame, fp);
+
+ // fprintf(stderr, "fread -> %d\n", r);
+
+ if (r == 0){
+ if (!repeat)
+ break;
+ if (fseek(fp, 0, SEEK_SET) == -1)
+ break;
+ }
+
+ // FIXME if r < 9, pad to 9 for minimum packet size constraint
+
+ if (!u2->write_samples(which, &pkt, r))
+ break;
+ }
+
+ return 0;
+}
Copied: usrp2/branches/developers/eb/merge-wip/host-ng/apps/u2_burn_mac_addr.cc
(from rev 9112,
usrp2/branches/developers/eb/merge-wip/host/apps/u2_burn_mac_addr.cc)
===================================================================
--- usrp2/branches/developers/eb/merge-wip/host-ng/apps/u2_burn_mac_addr.cc
(rev 0)
+++ usrp2/branches/developers/eb/merge-wip/host-ng/apps/u2_burn_mac_addr.cc
2008-08-01 06:25:50 UTC (rev 9118)
@@ -0,0 +1,114 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2007 Free Software Foundation, Inc.
+ *
+ * This program 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.
+ *
+ * This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+#include "usrp2_basic.h"
+#include <iostream>
+#include <getopt.h>
+#include <string.h>
+#include <time.h>
+
+
+static void
+usage(const char *progname)
+{
+ fprintf(stderr, "usage: %s [-e ethN] [-m old_mac_addr] new_mac_addr\n",
+ progname);
+ fprintf(stderr, " old_mac_addr defaults to 00:50:c2:85:3f:ff\n");
+ fprintf(stderr, " new_mac_address must be HH:HH or HH:HH:HH:HH:HH:HH\n");
+}
+
+int
+main(int argc, char **argv)
+{
+ int ch;
+ const char *interface = "eth0";
+ char *old_mac_addr_str = "00:50:c2:85:3f:ff";
+ char *new_mac_addr_str = 0;
+ u2_mac_addr_t old_mac_addr;
+ u2_mac_addr_t new_mac_addr;
+
+ while ((ch = getopt(argc, argv, "he:m:")) != EOF){
+ switch (ch){
+ case 'e':
+ interface = optarg;
+ break;
+
+ case 'm':
+ old_mac_addr_str = optarg;
+ break;
+
+ case 'h':
+ default:
+ usage(argv[0]);
+ exit(1);
+ }
+ }
+
+ if (argc - optind != 1){
+ usage(argv[0]);
+ exit(1);
+ }
+
+ new_mac_addr_str = argv[optind];
+
+ if (!usrp2_basic::parse_mac_addr(old_mac_addr_str, &old_mac_addr)){
+ fprintf(stderr, "invalid mac address: %s\n", old_mac_addr_str);
+ exit(1);
+ }
+ if (!usrp2_basic::parse_mac_addr(new_mac_addr_str, &new_mac_addr)){
+ fprintf(stderr, "invalid mac address: %s\n", new_mac_addr_str);
+ exit(1);
+ }
+
+
+ usrp2_basic *u2 = new usrp2_basic();
+
+ if (!u2->open(interface)){
+ std::cerr << "couldn't open " << interface << std::endl;
+ return 0;
+ }
+
+ if (!u2->find_usrp_by_mac(old_mac_addr, 0)){
+ std::cerr << "No USRP2 with address "
+ << old_mac_addr << " found.\n";
+ return 1;
+ }
+
+ if (!u2->burn_mac_addr(old_mac_addr, new_mac_addr)){
+ std::cerr << "Failed to burn mac address\n";
+ return 1;
+ }
+
+ // wait 250 ms
+ struct timespec ts;
+ ts.tv_sec = 0;
+ ts.tv_nsec = 250000000;
+ nanosleep(&ts, 0);
+
+ // Now see if we can find it using it's new address
+ if (!u2->find_usrp_by_mac(new_mac_addr, 0)){
+ std::cerr << "Failed to find USRP2 using new address "
+ << new_mac_addr << ".\n";
+ return 1;
+ }
+
+ return 0;
+}
Modified: usrp2/branches/developers/eb/merge-wip/host-ng/include/usrp2/usrp2.h
===================================================================
--- usrp2/branches/developers/eb/merge-wip/host-ng/include/usrp2/usrp2.h
2008-08-01 04:56:02 UTC (rev 9117)
+++ usrp2/branches/developers/eb/merge-wip/host-ng/include/usrp2/usrp2.h
2008-08-01 06:25:50 UTC (rev 9118)
@@ -22,8 +22,13 @@
#include <boost/shared_ptr.hpp>
#include <boost/utility.hpp>
#include <vector>
+#include <complex>
+#include <iosfwd>
#include <usrp2/rx_sample_handler.h>
+#include <usrp2/tune_result.h>
+#include <usrp2/rx_sample_handler.h>
+
namespace usrp2 {
/*!
@@ -182,10 +187,73 @@
*/
// bool set_tx_format(...);
- // bool tx_samples(...)
+ /*!
+ * \brief transmit complex<float> samples to USRP2
+ *
+ * \param channel specifies the channel to send them to
+ * \param samples are the samples to transmit
+ * \param nsamples is the number of samples to transmit
+ * \param metadata provides the timestamp and flags
+ */
+ bool tx_complex_float(unsigned int channel,
+ const std::complex<float> *samples,
+ size_t nsamples,
+ const tx_metadata *metadata);
+ /*!
+ * \brief transmit complex<int16_t> samples to USRP2
+ *
+ * \param channel specifies the channel to send them to
+ * \param samples are the samples to transmit
+ * \param nsamples is the number of samples to transmit
+ * \param metadata provides the timestamp and flags
+ */
+ bool tx_complex_int16(unsigned int channel,
+ const std::complex<int16_t> *samples,
+ size_t nsamples,
+ const tx_metadata *metadata);
+ /*!
+ * \brief transmit raw uint32_t data items to USRP2
+ *
+ * The caller is responsible for ensuring that the items are
+ * formatted appropriately for the USRP2 and its configuration.
+ * This method is used primarily by the system itself. Users
+ * should call tx_complex_float or tx_complex_16 instead.
+ *
+ * \param channel specifies the channel to send them to
+ * \param items are the data items to transmit
+ * \param nitems is the number of items to transmit
+ * \param metadata provides the timestamp and flags
+ */
+ bool tx_raw(unsigned int channel,
+ const uint32_t *items,
+ size_t nitems,
+ const tx_metadata *metadata);
+ // ----------------------------------------------------------------
+
+ /*!
+ * \brief MIMO configuration
+ *
+ * \param flags from usrp2_mimo_config.h
+ *
+ * <pre>
+ * one of these:
+ *
+ * MC_WE_DONT_LOCK
+ * MC_WE_LOCK_TO_SMA
+ * MC_WE_LOCK_TO_MIMO
+ *
+ * and optionally this:
+ *
+ * MC_PROVIDE_CLK_TO_MIMO
+ * </pre>
+ */
+ bool config_mimo(int flags);
+
+
+
class impl; // implementation details
private:
@@ -198,4 +266,7 @@
};
+std::ostream& operator<<(std::ostream &os, const usrp2::props &x);
+
+
#endif /* INCLUDED_USRP2_H */
Modified: usrp2/branches/developers/eb/merge-wip/host-ng/lib/usrp2.cc
===================================================================
--- usrp2/branches/developers/eb/merge-wip/host-ng/lib/usrp2.cc 2008-08-01
04:56:02 UTC (rev 9117)
+++ usrp2/branches/developers/eb/merge-wip/host-ng/lib/usrp2.cc 2008-08-01
06:25:50 UTC (rev 9118)
@@ -127,7 +127,43 @@
return d_impl->set_tx_scale_iq(scale_i, scale_q);
}
+ bool
+ usrp2::tx_complex_float(unsigned int channel,
+ const std::complex<float> *samples,
+ size_t nsamples,
+ const tx_metadata *metadata)
+ {
+ return d_impl->tx_complex_float(channel, samples, nsamples, metadata);
+ }
+ bool
+ usrp2::tx_complex_int16(unsigned int channel,
+ const std::complex<int16_t> *samples,
+ size_t nsamples,
+ const tx_metadata *metadata)
+ {
+ return d_impl->tx_complex_int16(channel, samples, nsamples, metadata);
+ }
+ bool
+ usrp2::tx_raw(unsigned int channel,
+ const uint32_t *items,
+ size_t nitems,
+ const tx_metadata *metadata)
+ {
+ return d_impl->tx_raw(channel, items, nitems, metadata);
+ }
} // namespace usrp2
+
+
+std::ostream& operator<<(std::ostream &os, const usrp2::props &x)
+{
+ os << x.addr;
+
+ char buf[128];
+ snprintf(buf, sizeof(buf)," hw_rev = 0x%04x", x.hw_rev);
+
+ os << buf;
+ return os;
+}
Modified: usrp2/branches/developers/eb/merge-wip/host-ng/lib/usrp2_impl.cc
===================================================================
--- usrp2/branches/developers/eb/merge-wip/host-ng/lib/usrp2_impl.cc
2008-08-01 04:56:02 UTC (rev 9117)
+++ usrp2/branches/developers/eb/merge-wip/host-ng/lib/usrp2_impl.cc
2008-08-01 06:25:50 UTC (rev 9118)
@@ -742,4 +742,33 @@
return success;
}
+
+
+ bool
+ usrp2::impl::tx_complex_float(unsigned int channel,
+ const std::complex<float> *samples,
+ size_t nsamples,
+ const tx_metadata *metadata)
+ {
+ throw std::runtime_error("not implemented");
+ }
+
+ bool
+ usrp2::impl::tx_complex_int16(unsigned int channel,
+ const std::complex<int16_t> *samples,
+ size_t nsamples,
+ const tx_metadata *metadata)
+ {
+ throw std::runtime_error("not implemented");
+ }
+
+ bool
+ usrp2::impl::tx_raw(unsigned int channel,
+ const uint32_t *items,
+ size_t nitems,
+ const tx_metadata *metadata)
+ {
+ throw std::runtime_error("not implemented");
+ }
+
} // namespace usrp2
Modified: usrp2/branches/developers/eb/merge-wip/host-ng/lib/usrp2_impl.h
===================================================================
--- usrp2/branches/developers/eb/merge-wip/host-ng/lib/usrp2_impl.h
2008-08-01 04:56:02 UTC (rev 9117)
+++ usrp2/branches/developers/eb/merge-wip/host-ng/lib/usrp2_impl.h
2008-08-01 06:25:50 UTC (rev 9118)
@@ -109,6 +109,20 @@
bool set_tx_interp(int interpolation_factor);
bool set_tx_scale_iq(int scale_i, int scale_q);
+ bool tx_complex_float(unsigned int channel,
+ const std::complex<float> *samples,
+ size_t nsamples,
+ const tx_metadata *metadata);
+
+ bool tx_complex_int16(unsigned int channel,
+ const std::complex<int16_t> *samples,
+ size_t nsamples,
+ const tx_metadata *metadata);
+
+ bool tx_raw(unsigned int channel,
+ const uint32_t *items,
+ size_t nitems,
+ const tx_metadata *metadata);
};
} // namespace usrp2
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Commit-gnuradio] r9118 - in usrp2/branches/developers/eb/merge-wip: host/apps host-ng/apps host-ng/include/usrp2 host-ng/lib,
eb <=