48 const std::string& block_name,
49 const size_t block_ctr = 0);
85 bool match(
const std::string& block_str);
90 std::string
get()
const
123 bool set(
const std::string& new_name);
128 bool set(
const size_t device_no,
129 const std::string& block_name,
130 const size_t block_ctr = 0);
135 _device_no = device_no;
165 return not(*
this == block_id);
191 return get() == block_id_str;
197 std::string comp = std::string(block_id_str);
198 return *
this == comp;
202 operator std::string()
const
223 std::string _block_name;
Definition: block_id.hpp:40
bool set(const std::string &new_name)
Set from string such as "0/FFT#1", "FFT#0", ...
void set_block_count(size_t count)
Set the block count.
Definition: block_id.hpp:142
static bool is_valid_blockname(const std::string &block_name)
Check if a given string is valid as a block name.
bool operator==(const char *block_id_str) const
Check if a string matches the entire block ID (not like match())
Definition: block_id.hpp:195
static bool is_valid_block_id(const std::string &block_id)
Check if a given string is valid as a block ID.
std::string get() const
Short for to_string()
Definition: block_id.hpp:90
bool match(const std::string &block_str)
Check if block_str matches this block.
block_id_t(const std::string &block_str)
uhd::fs_path get_tree_root() const
Returns the property tree root for this block (e.g. "/mboards/0/xbar/FFT#1/")
size_t get_block_count() const
Return block count.
Definition: block_id.hpp:108
bool operator!=(const block_id_t &block_id) const
Definition: block_id.hpp:163
bool operator>(const block_id_t &block_id) const
Definition: block_id.hpp:178
size_t get_device_no() const
Return device number.
Definition: block_id.hpp:102
block_id_t operator++()
Increment the block count ("FFT#1" -> "FFT_2")
Definition: block_id.hpp:208
std::string get_local() const
Like get(), but only returns the local part ("FFT#1")
bool operator==(const block_id_t &block_id) const
Definition: block_id.hpp:156
std::string to_string() const
Return a string like this: "0/FFT#1" (includes all components, if set)
bool operator==(const std::string &block_id_str) const
Check if a string matches the entire block ID (not like match())
Definition: block_id.hpp:189
block_id_t(const size_t device_no, const std::string &block_name, const size_t block_ctr=0)
block_id_t operator++(int)
Increment the block count ("FFT#1" -> "FFT_2")
Definition: block_id.hpp:215
std::string get_block_name() const
Return block name.
Definition: block_id.hpp:114
bool operator<(const block_id_t &block_id) const
Definition: block_id.hpp:168
bool set_block_name(const std::string &block_name)
Set the block name. Will return false if invalid block string.
block_id_t operator=(const std::string &new_name)
Assignment: Works like set(std::string)
Definition: block_id.hpp:150
bool set(const size_t device_no, const std::string &block_name, const size_t block_ctr=0)
Sets from individual components, like calling set_device_no(), set_block_name()
void set_device_no(size_t device_no)
Set the device number.
Definition: block_id.hpp:133
#define UHD_API
Definition: config.h:87
std::ostream & operator<<(std::ostream &out, block_id_t block_id)
Shortcut for << block_id.to_string()
Definition: block_id.hpp:228
Definition: build_info.hpp:12
Definition: property_tree.hpp:205