USRP Hardware Driver and USRP Manual  Version: 003.009.004-0-g2b5a88bb
UHD and USRP Manual
dboard_manager.hpp
Go to the documentation of this file.
1 //
2 // Copyright 2010 Ettus Research LLC
3 //
4 // This program is free software: you can redistribute it and/or modify
5 // it under the terms of the GNU General Public License as published by
6 // the Free Software Foundation, either version 3 of the License, or
7 // (at your option) any later version.
8 //
9 // This program is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU General Public License for more details.
13 //
14 // You should have received a copy of the GNU General Public License
15 // along with this program. If not, see <http://www.gnu.org/licenses/>.
16 //
17 
18 #ifndef INCLUDED_UHD_USRP_DBOARD_MANAGER_HPP
19 #define INCLUDED_UHD_USRP_DBOARD_MANAGER_HPP
20 
21 #include <uhd/config.hpp>
22 #include <uhd/property_tree.hpp>
23 #include <uhd/usrp/dboard_base.hpp>
24 #include <uhd/usrp/dboard_id.hpp>
25 #include <boost/utility.hpp>
26 #include <boost/shared_ptr.hpp>
27 #include <string>
28 #include <vector>
29 
30 namespace uhd{ namespace usrp{
31 
37 class UHD_API dboard_manager : boost::noncopyable{
38 public:
39  typedef boost::shared_ptr<dboard_manager> sptr;
40 
41  //dboard constructor (each dboard should have a ::make with this signature)
42  typedef dboard_base::sptr(*dboard_ctor_t)(dboard_base::ctor_args_t);
43 
52  static void register_dboard(
53  const dboard_id_t &dboard_id,
54  dboard_ctor_t dboard_ctor,
55  const std::string &name,
56  const std::vector<std::string> &subdev_names = std::vector<std::string>(1, "0")
57  );
58 
68  static void register_dboard(
69  const dboard_id_t &rx_dboard_id,
70  const dboard_id_t &tx_dboard_id,
71  dboard_ctor_t dboard_ctor,
72  const std::string &name,
73  const std::vector<std::string> &subdev_names = std::vector<std::string>(1, "0")
74  );
75 
85  static sptr make(
86  dboard_id_t rx_dboard_id,
87  dboard_id_t tx_dboard_id,
88  dboard_id_t gdboard_id,
89  dboard_iface::sptr iface,
90  property_tree::sptr subtree
91  );
92 };
93 
94 }} //namespace
95 
96 #endif /* INCLUDED_UHD_USRP_DBOARD_MANAGER_HPP */
boost::shared_ptr< dboard_manager > sptr
Definition: dboard_manager.hpp:39
Definition: dboard_id.hpp:28
boost::shared_ptr< property_tree > sptr
Definition: property_tree.hpp:130
Definition: dboard_manager.hpp:37
Definition: convert.hpp:28
boost::shared_ptr< dboard_base > sptr
Definition: dboard_base.hpp:37
void * ctor_args_t
Definition: dboard_base.hpp:43
#define UHD_API
Definition: config.h:66
boost::shared_ptr< dboard_iface > sptr
Definition: dboard_iface.hpp:61