UHD  003.001.002
dboard_base.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_BASE_HPP
19 #define INCLUDED_UHD_USRP_DBOARD_BASE_HPP
20 
21 #include <uhd/config.hpp>
22 #include <uhd/wax.hpp>
23 #include <uhd/utils/pimpl.hpp>
24 #include <boost/utility.hpp>
25 #include <boost/shared_ptr.hpp>
26 #include <uhd/usrp/dboard_id.hpp>
28 
29 namespace uhd{ namespace usrp{
30 
35 class UHD_API dboard_base : boost::noncopyable{
36 public:
37  typedef boost::shared_ptr<dboard_base> sptr;
43  typedef void * ctor_args_t;
44 
45  //structors
46  dboard_base(ctor_args_t);
47  virtual ~dboard_base(void);
48 
49  //interface
50  virtual void rx_get(const wax::obj &key, wax::obj &val) = 0;
51  virtual void rx_set(const wax::obj &key, const wax::obj &val) = 0;
52  virtual void tx_get(const wax::obj &key, wax::obj &val) = 0;
53  virtual void tx_set(const wax::obj &key, const wax::obj &val) = 0;
54 
55 protected:
56  std::string get_subdev_name(void);
57  dboard_iface::sptr get_iface(void);
58  dboard_id_t get_rx_id(void);
59  dboard_id_t get_tx_id(void);
60 
61 private:
62  UHD_PIMPL_DECL(impl) _impl;
63 };
64 
70 public:
75 
76  virtual ~xcvr_dboard_base(void);
77 };
78 
84 public:
89 
90  virtual ~rx_dboard_base(void);
91 
92  //override here so the derived classes cannot
93  void tx_get(const wax::obj &key, wax::obj &val);
94  void tx_set(const wax::obj &key, const wax::obj &val);
95 };
96 
102 public:
107 
108  virtual ~tx_dboard_base(void);
109 
110  //override here so the derived classes cannot
111  void rx_get(const wax::obj &key, wax::obj &val);
112  void rx_set(const wax::obj &key, const wax::obj &val);
113 };
114 
115 }} //namespace
116 
117 #endif /* INCLUDED_UHD_USRP_DBOARD_BASE_HPP */
Definition: dboard_id.hpp:28
#define UHD_API
Definition: config.hpp:76
Definition: convert.hpp:28
Definition: dboard_base.hpp:83
Definition: dboard_base.hpp:101
Definition: dboard_base.hpp:69
Definition: wax.hpp:64
boost::shared_ptr< dboard_base > sptr
Definition: dboard_base.hpp:37
void * ctor_args_t
Definition: dboard_base.hpp:43
#define UHD_PIMPL_DECL(_name)
Definition: pimpl.hpp:42
boost::shared_ptr< dboard_iface > sptr
Definition: dboard_iface.hpp:60
Definition: dboard_base.hpp:35