7 #ifndef INCLUDED_UHD_TYPES_BLOCK_ID_HPP 8 #define INCLUDED_UHD_TYPES_BLOCK_ID_HPP 12 #include <boost/shared_ptr.hpp> 48 const std::string& block_name,
49 const size_t block_ctr = 0);
52 std::string to_string()
const;
63 static bool is_valid_blockname(
const std::string& block_name);
76 static bool is_valid_block_id(
const std::string& block_id);
84 bool match(
const std::string& block_str);
89 std::string
get()
const 95 std::string get_local()
const;
122 bool set(
const std::string& new_name);
127 bool set(
const size_t device_no,
128 const std::string& block_name,
129 const size_t block_ctr = 0);
134 _device_no = device_no;
138 bool set_block_name(
const std::string& block_name);
164 return not(*
this == block_id);
190 return get() == block_id_str;
196 std::string comp = std::string(block_id_str);
197 return *
this == comp;
201 operator std::string()
const 222 std::string _block_name;
void set_block_count(size_t count)
Set the block count.
Definition: block_id.hpp:141
bool operator<(const block_id_t &block_id) const
Definition: block_id.hpp:167
size_t get_device_no() const
Return device number.
Definition: block_id.hpp:101
std::string to_string() const
Return a string like this: "0/FFT_1" (includes all components, if set)
bool operator==(const char *block_id_str) const
Check if a string matches the entire block ID (not like match())
Definition: block_id.hpp:194
Definition: property_tree.hpp:199
block_id_t operator++()
Increment the block count ("FFT_1" -> "FFT_2")
Definition: block_id.hpp:207
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:188
bool operator>(const block_id_t &block_id) const
Definition: block_id.hpp:177
bool operator==(const block_id_t &block_id) const
Definition: block_id.hpp:155
Definition: block_id.hpp:39
Definition: build_info.hpp:13
std::ostream & operator<<(std::ostream &out, block_id_t block_id)
Shortcut for << block_id.to_string()
Definition: block_id.hpp:227
bool operator!=(const block_id_t &block_id) const
Definition: block_id.hpp:162
size_t get_block_count() const
Return block count.
Definition: block_id.hpp:107
void set_device_no(size_t device_no)
Set the device number.
Definition: block_id.hpp:132
#define UHD_RFNOC_API
Definition: config.hpp:117
block_id_t operator=(const std::string &new_name)
Assignment: Works like set(std::string)
Definition: block_id.hpp:149
block_id_t operator++(int)
Increment the block count ("FFT_1" -> "FFT_2")
Definition: block_id.hpp:214
std::string get_block_name() const
Return block name.
Definition: block_id.hpp:113