From 3b47904f24169904bf65b29091d85ddfc2a7edb4 Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Thu, 14 Jan 2010 19:02:55 -0800 Subject: Switched dboard ctor arguments with a tuple. Sub-classes only need to pass the single argument, makes implementation cleaner. Added a dboard registry and api for the manager. This way, one could externally register custom dboard from the api. --- lib/usrp/dboard/base.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'lib/usrp/dboard/base.cpp') diff --git a/lib/usrp/dboard/base.cpp b/lib/usrp/dboard/base.cpp index c3fc332c9..4fbe4df8c 100644 --- a/lib/usrp/dboard/base.cpp +++ b/lib/usrp/dboard/base.cpp @@ -9,8 +9,8 @@ using namespace usrp_uhd::usrp::dboard; /*********************************************************************** * xcvr dboard base class **********************************************************************/ -xcvr_base::xcvr_base(size_t subdev_index, interface::sptr dboard_interface) - : _subdev_index(subdev_index), _dboard_interface(dboard_interface){ +xcvr_base::xcvr_base(ctor_args_t const& args) + : _subdev_index(args.get<0>()), _dboard_interface(args.get<1>()){ /* NOP */ } @@ -29,8 +29,8 @@ interface::sptr xcvr_base::get_interface(void){ /*********************************************************************** * rx dboard base class **********************************************************************/ -rx_base::rx_base(size_t subdev_index, interface::sptr dboard_interface) -: xcvr_base(subdev_index, dboard_interface){ +rx_base::rx_base(ctor_args_t const& args) +: xcvr_base(args){ /* NOP */ } @@ -49,8 +49,8 @@ void rx_base::tx_set(const wax::type &, const wax::type &){ /*********************************************************************** * tx dboard base class **********************************************************************/ -tx_base::tx_base(size_t subdev_index, interface::sptr dboard_interface) -: xcvr_base(subdev_index, dboard_interface){ +tx_base::tx_base(ctor_args_t const& args) +: xcvr_base(args){ /* NOP */ } -- cgit v1.2.3