mirror of
https://github.com/EttusResearch/uhd.git
synced 2026-10-25 17:36:10 +00:00
rfnoc_graph: Add get_chdr_width() API call
This allows querying the CHDR width for a given device in an RFNoC graph. The mb_index parameter is mostly for future proofing, given that the CHDR width must be constant between devices.
This commit is contained in:
parent
dcb582d2b3
commit
e25b16a303
@ -10,6 +10,7 @@
|
||||
#include <uhd/rfnoc/block_id.hpp>
|
||||
#include <uhd/rfnoc/graph_edge.hpp>
|
||||
#include <uhd/rfnoc/noc_block_base.hpp>
|
||||
#include <uhd/rfnoc/rfnoc_types.hpp>
|
||||
#include <uhd/stream.hpp>
|
||||
#include <uhd/transport/adapter_id.hpp>
|
||||
#include <uhd/types/device_addr.hpp>
|
||||
@ -428,6 +429,9 @@ public:
|
||||
|
||||
//! Return a reference to the property tree
|
||||
virtual uhd::property_tree::sptr get_tree(void) const = 0;
|
||||
|
||||
//! Return the CHDR width for a given device
|
||||
virtual chdr_w_t get_chdr_width(const size_t mb_index = 0) const = 0;
|
||||
}; // class rfnoc_graph
|
||||
|
||||
}}; // namespace uhd::rfnoc
|
||||
|
||||
@ -591,6 +591,12 @@ public:
|
||||
return _graph->to_dot();
|
||||
}
|
||||
|
||||
chdr_w_t get_chdr_width(const size_t mb_index) const
|
||||
{
|
||||
UHD_ASSERT_THROW(mb_index < _num_mboards);
|
||||
return _device->get_mb_iface(mb_index).get_chdr_w();
|
||||
}
|
||||
|
||||
private:
|
||||
/**************************************************************************
|
||||
* Device Setup
|
||||
|
||||
Loading…
Reference in New Issue
Block a user