17 #ifndef INCLUDED_UHD_TYPES_BLOCK_ID_HPP 18 #define INCLUDED_UHD_TYPES_BLOCK_ID_HPP 21 #include <boost/cstdint.hpp> 22 #include <boost/shared_ptr.hpp> 57 block_id_t(
const size_t device_no,
const std::string &block_name,
const size_t block_ctr=0);
60 std::string to_string()
const;
71 static bool is_valid_blockname(
const std::string &block_name);
84 static bool is_valid_block_id(
const std::string &block_id);
92 bool match(
const std::string &block_str);
97 std::string
get()
const {
return to_string(); };
100 std::string get_local()
const;
118 bool set(
const std::string &new_name);
123 bool set(
const size_t device_no,
const std::string &block_name,
const size_t block_ctr=0);
129 bool set_block_name(
const std::string &block_name);
149 return not (*
this == block_id);
170 return get() == block_id_str;
175 std::string comp = std::string(block_id_str);
176 return *
this == comp;
180 operator std::string()
const {
198 std::string _block_name;
void set_block_count(size_t count)
Set the block count.
Definition: block_id.hpp:132
size_t get_device_no() const
Return device number.
Definition: block_id.hpp:106
std::string to_string() const
Return a string like this: "0/FFT_1" (includes all components, if set)
Definition: property_tree.hpp:204
UHD_INLINE bool operator>(fp_compare_delta< float_t > lhs, fp_compare_delta< float_t > rhs)
Definition: fp_compare_delta.ipp:91
UHD_INLINE bool operator!=(fp_compare_delta< float_t > lhs, fp_compare_delta< float_t > rhs)
Definition: fp_compare_delta.ipp:75
block_id_t operator++()
Increment the block count ("FFT_1" -> "FFT_2")
Definition: block_id.hpp:185
Definition: block_id.hpp:49
Definition: build_info.hpp:25
std::ostream & operator<<(std::ostream &out, block_id_t block_id)
Shortcut for << block_id.to_string()
Definition: block_id.hpp:203
size_t get_block_count() const
Return block count.
Definition: block_id.hpp:109
void set_device_no(size_t device_no)
Set the device number.
Definition: block_id.hpp:126
#define UHD_RFNOC_API
Definition: config.hpp:103
UHD_API bool operator<(const time_spec_t &, const time_spec_t &)
Implement less_than_comparable interface.
block_id_t operator++(int)
Increment the block count ("FFT_1" -> "FFT_2")
Definition: block_id.hpp:191
UHD_API bool operator==(const time_spec_t &, const time_spec_t &)
Implement equality_comparable interface.
std::string get_block_name() const
Return block name.
Definition: block_id.hpp:112