From 6db9ac785ca5f62e58cf792f0525b37b16a87bdf Mon Sep 17 00:00:00 2001 From: Ashish Chaudhari Date: Fri, 19 Feb 2016 17:42:44 -0800 Subject: dboards: Added ability to register a per-dboard container class - The typical dboard classes are actually "subdev" classes i.e. there is one instance per dboard subdev (front-end). This makes it hard to implement shared functionality between multiple front-ends. - This changes adds the ability to create a container class which is created per group of subdevs and each subdev gets a pointer to the container class for cross linkage. --- host/lib/usrp/dboard_ctor_args.hpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'host/lib/usrp/dboard_ctor_args.hpp') diff --git a/host/lib/usrp/dboard_ctor_args.hpp b/host/lib/usrp/dboard_ctor_args.hpp index 99c071ff8..c8e4006d1 100644 --- a/host/lib/usrp/dboard_ctor_args.hpp +++ b/host/lib/usrp/dboard_ctor_args.hpp @@ -26,11 +26,17 @@ namespace uhd{ namespace usrp{ - struct dboard_ctor_args_t{ + class dboard_ctor_args_t { + public: std::string sd_name; dboard_iface::sptr db_iface; dboard_id_t rx_id, tx_id; property_tree::sptr rx_subtree, tx_subtree; + dboard_base::sptr rx_container, tx_container; + + static const dboard_ctor_args_t& cast(dboard_base::ctor_args_t args) { + return *static_cast(args); + } }; }} //namespace -- cgit v1.2.3