USRP Hardware Driver and USRP Manual Version: 4.1.0.3
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#pragma once
8
9#include <uhd/config.hpp>
10#include <uhd/property_tree.hpp>
15#include <memory>
16#include <string>
17#include <vector>
18
19namespace uhd { namespace usrp {
20
27{
28public:
29 typedef std::shared_ptr<dboard_manager> sptr;
30
31 // dboard constructor (each dboard should have a ::make with this signature)
33
44 static void register_dboard(const dboard_id_t& dboard_id,
45 dboard_ctor_t db_subdev_ctor,
46 const std::string& name,
47 const std::vector<std::string>& subdev_names = std::vector<std::string>(1, "0"),
48 dboard_ctor_t db_container_ctor = NULL);
49
61 static void register_dboard(const dboard_id_t& rx_dboard_id,
62 const dboard_id_t& tx_dboard_id,
63 dboard_ctor_t db_subdev_ctor,
64 const std::string& name,
65 const std::vector<std::string>& subdev_names = std::vector<std::string>(1, "0"),
66 dboard_ctor_t db_container_ctor = NULL);
67
80 static void register_dboard_restricted(const dboard_id_t& dboard_id,
81 dboard_ctor_t db_subdev_ctor,
82 const std::string& name,
83 const std::vector<std::string>& subdev_names = std::vector<std::string>(1, "0"),
84 dboard_ctor_t db_container_ctor = NULL);
85
99 static void register_dboard_restricted(const dboard_id_t& rx_dboard_id,
100 const dboard_id_t& tx_dboard_id,
101 dboard_ctor_t db_subdev_ctor,
102 const std::string& name,
103 const std::vector<std::string>& subdev_names = std::vector<std::string>(1, "0"),
104 dboard_ctor_t db_container_ctor = NULL);
105
116 static sptr make(dboard_id_t rx_dboard_id,
117 dboard_id_t tx_dboard_id,
118 dboard_id_t gdboard_id,
119 dboard_iface::sptr iface,
120 property_tree::sptr subtree,
121 bool defer_db_init = false);
122
133 static sptr make(dboard_eeprom_t rx_eeprom,
134 dboard_eeprom_t tx_eeprom,
135 dboard_eeprom_t gdb_eeprom,
136 dboard_iface::sptr iface,
137 property_tree::sptr subtree,
138 bool defer_db_init = false);
139
140 virtual ~dboard_manager() {}
141
145 virtual void initialize_dboards() = 0;
146
151 virtual const std::vector<std::string>& get_rx_frontends() const = 0;
152
157 virtual const std::vector<std::string>& get_tx_frontends() const = 0;
158};
159
160}} // namespace uhd::usrp
std::shared_ptr< property_tree > sptr
Definition: property_tree.hpp:216
void * ctor_args_t
Definition: dboard_base.hpp:33
std::shared_ptr< dboard_base > sptr
Definition: dboard_base.hpp:27
Definition: dboard_id.hpp:18
std::shared_ptr< dboard_iface > sptr
Definition: dboard_iface.hpp:55
Definition: dboard_manager.hpp:27
static void register_dboard_restricted(const dboard_id_t &dboard_id, dboard_ctor_t db_subdev_ctor, const std::string &name, const std::vector< std::string > &subdev_names=std::vector< std::string >(1, "0"), dboard_ctor_t db_container_ctor=NULL)
std::shared_ptr< dboard_manager > sptr
Definition: dboard_manager.hpp:29
static sptr make(dboard_id_t rx_dboard_id, dboard_id_t tx_dboard_id, dboard_id_t gdboard_id, dboard_iface::sptr iface, property_tree::sptr subtree, bool defer_db_init=false)
virtual ~dboard_manager()
Definition: dboard_manager.hpp:140
virtual const std::vector< std::string > & get_tx_frontends() const =0
static void register_dboard(const dboard_id_t &dboard_id, dboard_ctor_t db_subdev_ctor, const std::string &name, const std::vector< std::string > &subdev_names=std::vector< std::string >(1, "0"), dboard_ctor_t db_container_ctor=NULL)
static void register_dboard(const dboard_id_t &rx_dboard_id, const dboard_id_t &tx_dboard_id, dboard_ctor_t db_subdev_ctor, const std::string &name, const std::vector< std::string > &subdev_names=std::vector< std::string >(1, "0"), dboard_ctor_t db_container_ctor=NULL)
static void register_dboard_restricted(const dboard_id_t &rx_dboard_id, const dboard_id_t &tx_dboard_id, dboard_ctor_t db_subdev_ctor, const std::string &name, const std::vector< std::string > &subdev_names=std::vector< std::string >(1, "0"), dboard_ctor_t db_container_ctor=NULL)
virtual void initialize_dboards()=0
virtual const std::vector< std::string > & get_rx_frontends() const =0
static sptr make(dboard_eeprom_t rx_eeprom, dboard_eeprom_t tx_eeprom, dboard_eeprom_t gdb_eeprom, dboard_iface::sptr iface, property_tree::sptr subtree, bool defer_db_init=false)
#define UHD_API
Definition: config.h:70
Definition: build_info.hpp:12
boost::noncopyable noncopyable
Definition: noncopyable.hpp:45
Definition: dboard_eeprom.hpp:18