Changeset 9118
- Timestamp:
- 08/01/08 00:25:50
- Files:
-
- usrp2/branches/developers/eb/merge-wip/host-ng/apps (modified) (1 prop)
- usrp2/branches/developers/eb/merge-wip/host-ng/apps/Makefile.am (modified) (2 diffs)
- usrp2/branches/developers/eb/merge-wip/host-ng/apps/find_usrps.cc (moved) (moved from usrp2/branches/developers/eb/merge-wip/host/apps/find_usrps.cc) (3 diffs)
- usrp2/branches/developers/eb/merge-wip/host-ng/apps/gen_2tone.py (moved) (moved from usrp2/branches/developers/eb/merge-wip/host/apps/gen_2tone.py)
- usrp2/branches/developers/eb/merge-wip/host-ng/apps/gen_const.cc (moved) (moved from usrp2/branches/developers/eb/merge-wip/host/apps/gen_const.cc)
- usrp2/branches/developers/eb/merge-wip/host-ng/apps/gen_sine.py (moved) (moved from usrp2/branches/developers/eb/merge-wip/host/apps/gen_sine.py)
- usrp2/branches/developers/eb/merge-wip/host-ng/apps/rx_samples.cc (moved) (moved from usrp2/branches/developers/eb/merge-wip/host/apps/rx_samples.cc)
- usrp2/branches/developers/eb/merge-wip/host-ng/apps/streaming_fft.py (moved) (moved from usrp2/branches/developers/eb/merge-wip/host/apps/streaming_fft.py)
- usrp2/branches/developers/eb/merge-wip/host-ng/apps/test2_usrp2.cc (modified) (1 diff)
- usrp2/branches/developers/eb/merge-wip/host-ng/apps/tx_samples.cc (moved) (moved from usrp2/branches/developers/eb/merge-wip/host/apps/tx_samples.cc)
- usrp2/branches/developers/eb/merge-wip/host-ng/apps/u2_burn_mac_addr.cc (moved) (moved from usrp2/branches/developers/eb/merge-wip/host/apps/u2_burn_mac_addr.cc)
- usrp2/branches/developers/eb/merge-wip/host-ng/include/usrp2/usrp2.h (modified) (3 diffs)
- usrp2/branches/developers/eb/merge-wip/host-ng/lib/usrp2.cc (modified) (1 diff)
- usrp2/branches/developers/eb/merge-wip/host-ng/lib/usrp2_impl.cc (modified) (1 diff)
- usrp2/branches/developers/eb/merge-wip/host-ng/lib/usrp2_impl.h (modified) (1 diff)
- usrp2/branches/developers/eb/merge-wip/host/apps/stdin_int32_fft.py (deleted)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
usrp2/branches/developers/eb/merge-wip/host-ng/apps
- Property svn:ignore changed from Makefile Makefile.in .libs .deps test_eth test_usrp2 test2_usrp2 cerr *.sh to Makefile Makefile.in .libs .deps test_eth test_usrp2 test2_usrp2 gen_const find_usrps cerr *.sh
usrp2/branches/developers/eb/merge-wip/host-ng/apps/Makefile.am
r9115 r9118 18 18 include $(top_srcdir)/Makefile.common 19 19 20 #AM_CXXFLAGS = -Wall -Werror (handle this with: $ ./configure CXXFLAGS="-Wall -Werror -O2 -g")21 20 AM_CPPFLAGS = $(STD_DEFINES_AND_INCLUDES) $(CPPUNIT_INCLUDES) $(GRUEL_CFLAGS) 22 21 … … 25 24 -lgruel 26 25 26 bin_PROGRAMS = \ 27 find_usrps 28 27 29 noinst_PROGRAMS = \ 30 gen_const \ 28 31 test2_usrp2 29 32 30 test2_usrp2_SOURCES = \ 31 test2_usrp2.cc32 33 find_usrps = find_usrps.cc 34 test2_usrp2_SOURCES = test2_usrp2.cc 35 gen_const_SOURCES = gen_const.cc usrp2/branches/developers/eb/merge-wip/host-ng/apps/find_usrps.cc
r9112 r9118 1 1 /* -*- c++ -*- */ 2 2 /* 3 * Copyright 2007 Free Software Foundation, Inc.3 * Copyright 2007,2008 Free Software Foundation, Inc. 4 4 * 5 5 * This program is free software: you can redistribute it and/or modify … … 18 18 19 19 #ifdef HAVE_CONFIG_H 20 #include "config.h"20 #include <config.h> 21 21 #endif 22 #include "usrp2_basic.h" 22 23 #include <usrp2/usrp2.h> 23 24 #include <iostream> 24 25 #include <getopt.h> … … 55 56 } 56 57 57 #if 0 58 usrp2_basic *u2 = new usrp2_basic(); 59 60 if (!u2->open(interface)){ 61 std::cerr << "couldn't open " << interface << std::endl; 62 return 0; 63 } 64 65 std::vector<op_id_reply_t> r = u2->find_usrps(); 66 #endif 67 68 std::vector<op_id_reply_t> r = usrp2_basic::find_usrps(interface); 58 usrp2::props_vector_t r = usrp2::find(interface); 69 59 70 60 for (size_t i = 0; i < r.size(); i++){ usrp2/branches/developers/eb/merge-wip/host-ng/apps/test2_usrp2.cc
r9115 r9118 22 22 23 23 #include <usrp2/usrp2.h> 24 #include <usrp2/tune_result.h>25 24 #include <usrp2/strtod_si.h> 26 #include <usrp2/rx_sample_handler.h>27 25 #include <usrp2/copiers.h> 28 26 #include <gruel/realtime.h> usrp2/branches/developers/eb/merge-wip/host-ng/include/usrp2/usrp2.h
r9115 r9118 23 23 #include <boost/utility.hpp> 24 24 #include <vector> 25 #include <complex> 26 #include <iosfwd> 25 27 #include <usrp2/rx_sample_handler.h> 28 #include <usrp2/tune_result.h> 29 #include <usrp2/rx_sample_handler.h> 30 26 31 27 32 namespace usrp2 { … … 183 188 // bool set_tx_format(...); 184 189 185 // bool tx_samples(...) 190 /*! 191 * \brief transmit complex<float> samples to USRP2 192 * 193 * \param channel specifies the channel to send them to 194 * \param samples are the samples to transmit 195 * \param nsamples is the number of samples to transmit 196 * \param metadata provides the timestamp and flags 197 */ 198 bool tx_complex_float(unsigned int channel, 199 const std::complex<float> *samples, 200 size_t nsamples, 201 const tx_metadata *metadata); 202 203 /*! 204 * \brief transmit complex<int16_t> samples to USRP2 205 * 206 * \param channel specifies the channel to send them to 207 * \param samples are the samples to transmit 208 * \param nsamples is the number of samples to transmit 209 * \param metadata provides the timestamp and flags 210 */ 211 bool tx_complex_int16(unsigned int channel, 212 const std::complex<int16_t> *samples, 213 size_t nsamples, 214 const tx_metadata *metadata); 215 216 /*! 217 * \brief transmit raw uint32_t data items to USRP2 218 * 219 * The caller is responsible for ensuring that the items are 220 * formatted appropriately for the USRP2 and its configuration. 221 * This method is used primarily by the system itself. Users 222 * should call tx_complex_float or tx_complex_16 instead. 223 * 224 * \param channel specifies the channel to send them to 225 * \param items are the data items to transmit 226 * \param nitems is the number of items to transmit 227 * \param metadata provides the timestamp and flags 228 */ 229 bool tx_raw(unsigned int channel, 230 const uint32_t *items, 231 size_t nitems, 232 const tx_metadata *metadata); 233 234 // ---------------------------------------------------------------- 235 236 /*! 237 * \brief MIMO configuration 238 * 239 * \param flags from usrp2_mimo_config.h 240 * 241 * <pre> 242 * one of these: 243 * 244 * MC_WE_DONT_LOCK 245 * MC_WE_LOCK_TO_SMA 246 * MC_WE_LOCK_TO_MIMO 247 * 248 * and optionally this: 249 * 250 * MC_PROVIDE_CLK_TO_MIMO 251 * </pre> 252 */ 253 bool config_mimo(int flags); 186 254 187 255 … … 199 267 }; 200 268 269 std::ostream& operator<<(std::ostream &os, const usrp2::props &x); 270 271 201 272 #endif /* INCLUDED_USRP2_H */ usrp2/branches/developers/eb/merge-wip/host-ng/lib/usrp2.cc
r9115 r9118 128 128 } 129 129 130 bool 131 usrp2::tx_complex_float(unsigned int channel, 132 const std::complex<float> *samples, 133 size_t nsamples, 134 const tx_metadata *metadata) 135 { 136 return d_impl->tx_complex_float(channel, samples, nsamples, metadata); 137 } 138 139 bool 140 usrp2::tx_complex_int16(unsigned int channel, 141 const std::complex<int16_t> *samples, 142 size_t nsamples, 143 const tx_metadata *metadata) 144 { 145 return d_impl->tx_complex_int16(channel, samples, nsamples, metadata); 146 } 147 148 bool 149 usrp2::tx_raw(unsigned int channel, 150 const uint32_t *items, 151 size_t nitems, 152 const tx_metadata *metadata) 153 { 154 return d_impl->tx_raw(channel, items, nitems, metadata); 155 } 156 157 } // namespace usrp2 130 158 131 159 160 std::ostream& operator<<(std::ostream &os, const usrp2::props &x) 161 { 162 os << x.addr; 132 163 133 } // namespace usrp2 164 char buf[128]; 165 snprintf(buf, sizeof(buf)," hw_rev = 0x%04x", x.hw_rev); 166 167 os << buf; 168 return os; 169 } usrp2/branches/developers/eb/merge-wip/host-ng/lib/usrp2_impl.cc
r9116 r9118 743 743 } 744 744 745 746 747 bool 748 usrp2::impl::tx_complex_float(unsigned int channel, 749 const std::complex<float> *samples, 750 size_t nsamples, 751 const tx_metadata *metadata) 752 { 753 throw std::runtime_error("not implemented"); 754 } 755 756 bool 757 usrp2::impl::tx_complex_int16(unsigned int channel, 758 const std::complex<int16_t> *samples, 759 size_t nsamples, 760 const tx_metadata *metadata) 761 { 762 throw std::runtime_error("not implemented"); 763 } 764 765 bool 766 usrp2::impl::tx_raw(unsigned int channel, 767 const uint32_t *items, 768 size_t nitems, 769 const tx_metadata *metadata) 770 { 771 throw std::runtime_error("not implemented"); 772 } 773 745 774 } // namespace usrp2 usrp2/branches/developers/eb/merge-wip/host-ng/lib/usrp2_impl.h
r9115 r9118 110 110 bool set_tx_scale_iq(int scale_i, int scale_q); 111 111 112 bool tx_complex_float(unsigned int channel, 113 const std::complex<float> *samples, 114 size_t nsamples, 115 const tx_metadata *metadata); 116 117 bool tx_complex_int16(unsigned int channel, 118 const std::complex<int16_t> *samples, 119 size_t nsamples, 120 const tx_metadata *metadata); 121 122 bool tx_raw(unsigned int channel, 123 const uint32_t *items, 124 size_t nitems, 125 const tx_metadata *metadata); 112 126 }; 113 127
