UHD  003.004.002-27-stable
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines
include/uhd/usrp/dboard_manager.hpp
Go to the documentation of this file.
00001 //
00002 // Copyright 2010 Ettus Research LLC
00003 //
00004 // This program is free software: you can redistribute it and/or modify
00005 // it under the terms of the GNU General Public License as published by
00006 // the Free Software Foundation, either version 3 of the License, or
00007 // (at your option) any later version.
00008 //
00009 // This program is distributed in the hope that it will be useful,
00010 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00011 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012 // GNU General Public License for more details.
00013 //
00014 // You should have received a copy of the GNU General Public License
00015 // along with this program.  If not, see <http://www.gnu.org/licenses/>.
00016 //
00017 
00018 #ifndef INCLUDED_UHD_USRP_DBOARD_MANAGER_HPP
00019 #define INCLUDED_UHD_USRP_DBOARD_MANAGER_HPP
00020 
00021 #include <uhd/config.hpp>
00022 #include <uhd/property_tree.hpp>
00023 #include <uhd/usrp/dboard_base.hpp>
00024 #include <uhd/usrp/dboard_id.hpp>
00025 #include <boost/utility.hpp>
00026 #include <boost/shared_ptr.hpp>
00027 #include <string>
00028 #include <vector>
00029 
00030 namespace uhd{ namespace usrp{
00031 
00037 class UHD_API dboard_manager : boost::noncopyable{
00038 public:
00039     typedef boost::shared_ptr<dboard_manager> sptr;
00040 
00041     //dboard constructor (each dboard should have a ::make with this signature)
00042     typedef dboard_base::sptr(*dboard_ctor_t)(dboard_base::ctor_args_t);
00043 
00052     static void register_dboard(
00053         const dboard_id_t &dboard_id,
00054         dboard_ctor_t dboard_ctor,
00055         const std::string &name,
00056         const std::vector<std::string> &subdev_names = std::vector<std::string>(1, "0")
00057     );
00058 
00068     static void register_dboard(
00069         const dboard_id_t &rx_dboard_id,
00070         const dboard_id_t &tx_dboard_id,
00071         dboard_ctor_t dboard_ctor,
00072         const std::string &name,
00073         const std::vector<std::string> &subdev_names = std::vector<std::string>(1, "0")
00074     );
00075 
00085     static sptr make(
00086         dboard_id_t rx_dboard_id,
00087         dboard_id_t tx_dboard_id,
00088         dboard_id_t gdboard_id,
00089         dboard_iface::sptr iface,
00090         property_tree::sptr subtree
00091     );
00092 };
00093 
00094 }} //namespace
00095 
00096 #endif /* INCLUDED_UHD_USRP_DBOARD_MANAGER_HPP */