diff options
author | Josh Blum <josh@joshknows.com> | 2010-01-15 15:45:33 -0800 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2010-01-15 15:45:33 -0800 |
commit | 92c76e574773e99d1bfb5c3a833217b8644779f4 (patch) | |
tree | 12c80f9acf1c9ac489eddaedb13861e0ab9674b0 /lib/usrp/dboard/base.cpp | |
parent | 3b47904f24169904bf65b29091d85ddfc2a7edb4 (diff) | |
download | uhd-92c76e574773e99d1bfb5c3a833217b8644779f4.tar.gz uhd-92c76e574773e99d1bfb5c3a833217b8644779f4.tar.bz2 uhd-92c76e574773e99d1bfb5c3a833217b8644779f4.zip |
Dboard base class that is no longer also the xcvr.
The xcvr base inherits from this (as does rx and tx base).
Added m4 macro to check for compiler flags.
The configure checks flags and headers.
Merged the register subdev static methods into one method
that associates a dboard id with a dboard constructor.
The manager code is responsible for checking this association
and creating the correct subdev instances.
Diffstat (limited to 'lib/usrp/dboard/base.cpp')
-rw-r--r-- | lib/usrp/dboard/base.cpp | 27 |
1 files changed, 18 insertions, 9 deletions
diff --git a/lib/usrp/dboard/base.cpp b/lib/usrp/dboard/base.cpp index 4fbe4df8c..d8a6e66c2 100644 --- a/lib/usrp/dboard/base.cpp +++ b/lib/usrp/dboard/base.cpp @@ -7,30 +7,40 @@ using namespace usrp_uhd::usrp::dboard; /*********************************************************************** - * xcvr dboard base class + * base dboard base class **********************************************************************/ -xcvr_base::xcvr_base(ctor_args_t const& args) +base::base(ctor_args_t const& args) : _subdev_index(args.get<0>()), _dboard_interface(args.get<1>()){ /* NOP */ } -xcvr_base::~xcvr_base(void){ +base::~base(void){ /* NOP */ } -size_t xcvr_base::get_subdev_index(void){ +size_t base::get_subdev_index(void){ return _subdev_index; } -interface::sptr xcvr_base::get_interface(void){ +interface::sptr base::get_interface(void){ return _dboard_interface; } /*********************************************************************** + * xcvr dboard base class + **********************************************************************/ +xcvr_base::xcvr_base(ctor_args_t const& args) : base(args){ + /* NOP */ +} + +xcvr_base::~xcvr_base(void){ + /* NOP */ +} + +/*********************************************************************** * rx dboard base class **********************************************************************/ -rx_base::rx_base(ctor_args_t const& args) -: xcvr_base(args){ +rx_base::rx_base(ctor_args_t const& args) : base(args){ /* NOP */ } @@ -49,8 +59,7 @@ void rx_base::tx_set(const wax::type &, const wax::type &){ /*********************************************************************** * tx dboard base class **********************************************************************/ -tx_base::tx_base(ctor_args_t const& args) -: xcvr_base(args){ +tx_base::tx_base(ctor_args_t const& args) : base(args){ /* NOP */ } |