root / usrp / host / lib / inband / usrp_usb_interface.h @ c3f962a1
History | View | Annotate | Download (2.1 kB)
| 1 | b644e266 | eb | /* -*- c++ -*- */
|
|---|---|---|---|
| 2 | b644e266 | eb | /*
|
| 3 | 72c625f7 | jcorgan | * Copyright 2007,2008 Free Software Foundation, Inc. |
| 4 | b644e266 | eb | * |
| 5 | b644e266 | eb | * This file is part of GNU Radio |
| 6 | b644e266 | eb | * |
| 7 | b644e266 | eb | * GNU Radio is free software; you can redistribute it and/or modify |
| 8 | b644e266 | eb | * it under the terms of the GNU General Public License as published by |
| 9 | b644e266 | eb | * the Free Software Foundation; either version 3, or (at your option) |
| 10 | b644e266 | eb | * any later version. |
| 11 | b644e266 | eb | * |
| 12 | b644e266 | eb | * GNU Radio is distributed in the hope that it will be useful, |
| 13 | b644e266 | eb | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 | b644e266 | eb | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 15 | b644e266 | eb | * GNU General Public License for more details. |
| 16 | b644e266 | eb | * |
| 17 | b644e266 | eb | * You should have received a copy of the GNU General Public License along |
| 18 | b644e266 | eb | * with this program; if not, write to the Free Software Foundation, Inc., |
| 19 | b644e266 | eb | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
| 20 | b644e266 | eb | */ |
| 21 | b644e266 | eb | #ifndef INCLUDED_USRP_USB_INTERFACE_H
|
| 22 | b644e266 | eb | #define INCLUDED_USRP_USB_INTERFACE_H
|
| 23 | b644e266 | eb | |
| 24 | 66dca696 | jcorgan | #include <mblock/mblock.h> |
| 25 | b644e266 | eb | #include <vector> |
| 26 | b644e266 | eb | #include "usrp_standard.h" |
| 27 | b644e266 | eb | |
| 28 | b644e266 | eb | /*!
|
| 29 | b644e266 | eb | * \brief Implements the low level usb interface to the USRP |
| 30 | b644e266 | eb | */ |
| 31 | b644e266 | eb | class usrp_usb_interface : public mb_mblock |
| 32 | b644e266 | eb | {
|
| 33 | b644e266 | eb | public:
|
| 34 | b644e266 | eb | |
| 35 | 72c625f7 | jcorgan | usrp_standard_tx_sptr d_utx; |
| 36 | 72c625f7 | jcorgan | usrp_standard_rx_sptr d_urx; |
| 37 | c3f5183d | gnychis | |
| 38 | c3f5183d | gnychis | boost::shared_ptr<usrp_basic> d_ub_tx; |
| 39 | c3f5183d | gnychis | boost::shared_ptr<usrp_basic> d_ub_rx; |
| 40 | b644e266 | eb | |
| 41 | b644e266 | eb | mb_port_sptr d_cs; |
| 42 | b644e266 | eb | mb_port_sptr d_rx_cs; |
| 43 | b644e266 | eb | mb_port_sptr d_tx_cs; |
| 44 | b644e266 | eb | |
| 45 | b644e266 | eb | long d_ntx_chan;
|
| 46 | b644e266 | eb | long d_nrx_chan;
|
| 47 | b644e266 | eb | |
| 48 | b644e266 | eb | bool d_fake_usrp;
|
| 49 | b644e266 | eb | |
| 50 | 9d1423b9 | eb | bool d_rx_reading;
|
| 51 | 9d1423b9 | eb | |
| 52 | b644e266 | eb | long d_interp_tx;
|
| 53 | 4e7d048a | eb | long d_decim_rx;
|
| 54 | b644e266 | eb | |
| 55 | c3f5183d | gnychis | double d_rf_freq;
|
| 56 | b644e266 | eb | |
| 57 | b644e266 | eb | std::string d_rbf; |
| 58 | b644e266 | eb | |
| 59 | b644e266 | eb | public:
|
| 60 | b644e266 | eb | usrp_usb_interface(mb_runtime *rt, const std::string &instance_name, pmt_t user_arg);
|
| 61 | b644e266 | eb | ~usrp_usb_interface(); |
| 62 | b644e266 | eb | void initial_transition();
|
| 63 | b644e266 | eb | void handle_message(mb_message_sptr msg);
|
| 64 | c3f5183d | gnychis | usrp_subdev_spec pick_rx_subdevice(); |
| 65 | c3f5183d | gnychis | usrp_subdev_spec pick_tx_subdevice(); |
| 66 | c3f5183d | gnychis | usrp_subdev_spec pick_subdev(boost::shared_ptr<usrp_basic> d_usrp_basic, std::vector<int> candidates);
|
| 67 | b644e266 | eb | |
| 68 | b644e266 | eb | private:
|
| 69 | b644e266 | eb | void handle_cmd_open(pmt_t data);
|
| 70 | b644e266 | eb | void handle_cmd_close(pmt_t data);
|
| 71 | b644e266 | eb | void handle_cmd_write(pmt_t data);
|
| 72 | b644e266 | eb | void handle_cmd_start_reading(pmt_t data);
|
| 73 | b644e266 | eb | void handle_cmd_stop_reading(pmt_t data);
|
| 74 | b644e266 | eb | |
| 75 | b644e266 | eb | }; |
| 76 | b644e266 | eb | |
| 77 | b644e266 | eb | |
| 78 | b644e266 | eb | #endif /* INCLUDED_USRP_USB_INTERFACE_H */ |