USRP Hardware Driver and USRP Manual  Version: 3.15.0.HEAD-0-gaea0e2de
UHD and USRP Manual
dboard_manager.hpp
Go to the documentation of this file.
1 //
2 // Copyright 2010,2017 Ettus Research, A National Instruments Company
3 //
4 // SPDX-License-Identifier: GPL-3.0-or-later
5 //
6 
7 #ifndef INCLUDED_UHD_USRP_DBOARD_MANAGER_HPP
8 #define INCLUDED_UHD_USRP_DBOARD_MANAGER_HPP
9 
10 #include <uhd/config.hpp>
11 #include <uhd/property_tree.hpp>
12 #include <uhd/usrp/dboard_base.hpp>
14 #include <uhd/usrp/dboard_id.hpp>
15 #include <boost/shared_ptr.hpp>
17 #include <string>
18 #include <vector>
19 
20 namespace uhd { namespace usrp {
21 
28 {
29 public:
30  typedef boost::shared_ptr<dboard_manager> sptr;
31 
32  // dboard constructor (each dboard should have a ::make with this signature)
33  typedef dboard_base::sptr (*dboard_ctor_t)(dboard_base::ctor_args_t);
34 
45  static void register_dboard(const dboard_id_t& dboard_id,
46  dboard_ctor_t db_subdev_ctor,
47  const std::string& name,
48  const std::vector<std::string>& subdev_names = std::vector<std::string>(1, "0"),
49  dboard_ctor_t db_container_ctor = NULL);
50 
62  static void register_dboard(const dboard_id_t& rx_dboard_id,
63  const dboard_id_t& tx_dboard_id,
64  dboard_ctor_t db_subdev_ctor,
65  const std::string& name,
66  const std::vector<std::string>& subdev_names = std::vector<std::string>(1, "0"),
67  dboard_ctor_t db_container_ctor = NULL);
68 
81  static void register_dboard_restricted(const dboard_id_t& dboard_id,
82  dboard_ctor_t db_subdev_ctor,
83  const std::string& name,
84  const std::vector<std::string>& subdev_names = std::vector<std::string>(1, "0"),
85  dboard_ctor_t db_container_ctor = NULL);
86 
100  static void register_dboard_restricted(const dboard_id_t& rx_dboard_id,
101  const dboard_id_t& tx_dboard_id,
102  dboard_ctor_t db_subdev_ctor,
103  const std::string& name,
104  const std::vector<std::string>& subdev_names = std::vector<std::string>(1, "0"),
105  dboard_ctor_t db_container_ctor = NULL);
106 
117  static sptr make(dboard_id_t rx_dboard_id,
118  dboard_id_t tx_dboard_id,
119  dboard_id_t gdboard_id,
120  dboard_iface::sptr iface,
121  property_tree::sptr subtree,
122  bool defer_db_init = false);
123 
134  static sptr make(dboard_eeprom_t rx_eeprom,
135  dboard_eeprom_t tx_eeprom,
136  dboard_eeprom_t gdb_eeprom,
137  dboard_iface::sptr iface,
138  property_tree::sptr subtree,
139  bool defer_db_init = false);
140 
141  virtual ~dboard_manager() {}
142 
146  virtual void initialize_dboards() = 0;
147 
152  virtual const std::vector<std::string>& get_rx_frontends() const = 0;
153 
158  virtual const std::vector<std::string>& get_tx_frontends() const = 0;
159 };
160 
161 }} // namespace uhd::usrp
162 
163 #endif /* INCLUDED_UHD_USRP_DBOARD_MANAGER_HPP */
boost::shared_ptr< dboard_manager > sptr
Definition: dboard_manager.hpp:30
Definition: dboard_id.hpp:18
boost::noncopyable noncopyable
Definition: noncopyable.hpp:46
boost::shared_ptr< property_tree > sptr
Definition: property_tree.hpp:217
Definition: dboard_manager.hpp:27
Definition: build_info.hpp:13
Definition: dboard_eeprom.hpp:18
boost::shared_ptr< dboard_base > sptr
Definition: dboard_base.hpp:28
void * ctor_args_t
Definition: dboard_base.hpp:34
virtual ~dboard_manager()
Definition: dboard_manager.hpp:141
#define UHD_API
Definition: config.h:68
boost::shared_ptr< dboard_iface > sptr
Definition: dboard_iface.hpp:56