Loading...
Searching...
No Matches
dboard_manager.hpp
Go to the documentation of this file.
//
// Copyright 2010,2017 Ettus Research, A National Instruments Company
//
// SPDX-License-Identifier: GPL-3.0-or-later
//
#pragma once
#include <uhd/config.hpp>
#include <uhd/property_tree.hpp>
#include <uhd/usrp/dboard_base.hpp>
#include <uhd/usrp/dboard_eeprom.hpp>
#include <uhd/usrp/dboard_id.hpp>
#include <uhd/utils/noncopyable.hpp>
#include <memory>
#include <string>
#include <vector>
namespace uhd { namespace usrp {
class UHD_API dboard_manager : uhd::noncopyable
{
public:
typedef std::shared_ptr<dboard_manager> sptr;
// dboard constructor (each dboard should have a ::make with this signature)
typedef dboard_base::sptr (*dboard_ctor_t)(dboard_base::ctor_args_t);
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& 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);
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);
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);
virtual ~dboard_manager() {}
virtual void initialize_dboards() = 0;
virtual const std::vector<std::string>& get_rx_frontends() const = 0;
virtual const std::vector<std::string>& get_tx_frontends() const = 0;
};
}} // namespace uhd::usrp
uhd::property_tree::sptr
std::shared_ptr< property_tree > sptr
Definition property_tree.hpp:224
uhd::usrp::dboard_base::ctor_args_t
void * ctor_args_t
Definition dboard_base.hpp:32
uhd::usrp::dboard_base::sptr
std::shared_ptr< dboard_base > sptr
Definition dboard_base.hpp:26
uhd::usrp::dboard_id_t
Definition dboard_id.hpp:18
uhd::usrp::dboard_iface::sptr
std::shared_ptr< dboard_iface > sptr
Definition dboard_iface.hpp:56
uhd::usrp::dboard_manager
Definition dboard_manager.hpp:27
uhd::usrp::dboard_manager::register_dboard_restricted
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)
uhd::usrp::dboard_manager::sptr
std::shared_ptr< dboard_manager > sptr
Definition dboard_manager.hpp:29
uhd::usrp::dboard_manager::make
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)
uhd::usrp::dboard_manager::~dboard_manager
virtual ~dboard_manager()
Definition dboard_manager.hpp:140
uhd::usrp::dboard_manager::get_tx_frontends
virtual const std::vector< std::string > & get_tx_frontends() const =0
uhd::usrp::dboard_manager::register_dboard
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)
uhd::usrp::dboard_manager::register_dboard
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)
uhd::usrp::dboard_manager::dboard_ctor_t
dboard_base::sptr(* dboard_ctor_t)(dboard_base::ctor_args_t)
Definition dboard_manager.hpp:32
uhd::usrp::dboard_manager::register_dboard_restricted
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)
uhd::usrp::dboard_manager::initialize_dboards
virtual void initialize_dboards()=0
uhd::usrp::dboard_manager::get_rx_frontends
virtual const std::vector< std::string > & get_rx_frontends() const =0
uhd::usrp::dboard_manager::make
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)
UHD_API
#define UHD_API
Definition config.h:87
config.hpp
dboard_base.hpp
dboard_eeprom.hpp
dboard_id.hpp
uhd::usrp
Definition container.hpp:15
uhd
Definition build_info.hpp:12
uhd::noncopyable
boost::noncopyable noncopyable
Definition noncopyable.hpp:45
noncopyable.hpp
property_tree.hpp
uhd::usrp::dboard_eeprom_t
Definition dboard_eeprom.hpp:18