Loading...
Searching...
No Matches
uhd::rfnoc::block_id_t Class Reference

`#include <uhd/rfnoc/block_id.hpp>`

## Public Member Functions

| block_id_t ()
| block_id_t (const std::string &block_str)
| block_id_t (const size_t device_no, const std::string &block_name, const size_t block_ctr=0)
std::string | to_string () const
| Return a string like this: "0/FFT#1" (includes all components, if set).
bool | match (const std::string &block_str)
| Check if block_str matches this block.
std::string | get () const
| Short for to_string().
std::string | get_local () const
| Like get(), but only returns the local part ("FFT#1").
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_device_no () const
| Return device number.
size_t | get_block_count () const
| Return block count.
std::string | get_block_name () const
| Return block name.
bool | set (const std::string &new_name)
| Set from string such as "0/FFT#1", "FFT#0", ...
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.
bool | set_block_name (const std::string &block_name)
| Set the block name. Will return false if invalid block string.
void | set_block_count (size_t count)
| Set the block count.
block_id_t | operator= (const std::string &new_name)
| Assignment: Works like set(std::string).
bool | operator== (const block_id_t &block_id) const
bool | operator!= (const block_id_t &block_id) const
bool | operator< (const block_id_t &block_id) const
bool | operator> (const block_id_t &block_id) const
bool | operator== (const std::string &block_id_str) const
| Check if a string matches the entire block ID (not like match()).
bool | operator== (const char *block_id_str) const
| Check if a string matches the entire block ID (not like match()).
block_id_t | operator++ ()
| Increment the block count ("FFT#1" -> "FFT_2").
block_id_t | operator++ (int)
| Increment the block count ("FFT#1" -> "FFT_2").

## Static Public Member Functions

static bool | is_valid_blockname (const std::string &block_name)
| Check if a given string is valid as a block name.
static bool | is_valid_block_id (const std::string &block_id)
| Check if a given string is valid as a block ID.

## Detailed Description

Identifies an RFNoC block.

An RFNoC block ID is a string such as: 0/FFT#1

The rules for formatting such a string are:

DEVICE/BLOCKNAME#COUNTER

DEVICE: Identifies the device (usually the motherboard index) BLOCKNAME: A name given to this block COUNTER: If is are more than one block with a BLOCKNAME, this counts up.

So, 0/FFT#1 means we're addressing the second block called FFT on the first device.

This class can represent these block IDs.

## Constructor & Destructor Documentation

## block_id_t() [1/3]

uhd::rfnoc::block_id_t::block_id_t | ( |  | ) |

## block_id_t() [2/3]

uhd::rfnoc::block_id_t::block_id_t | ( | const std::string & | block_str | ) |

## block_id_t() [3/3]

uhd::rfnoc::block_id_t::block_id_t | ( | const size_t | device_no,
|  | const std::string & | block_name,
|  | const size_t | block_ctr = 0 )

Parameters

  device_no | Device number
  block_name | Block name
  block_ctr | Which block of this type is this on this device?

## Member Function Documentation

## get()

std::string uhd::rfnoc::block_id_t::get | ( |  | ) | const

inline

Short for to_string().

## get_block_count()

size_t uhd::rfnoc::block_id_t::get_block_count | ( |  | ) | const

inline

Return block count.

## get_block_name()

std::string uhd::rfnoc::block_id_t::get_block_name | ( |  | ) | const

inline

Return block name.

## get_device_no()

size_t uhd::rfnoc::block_id_t::get_device_no | ( |  | ) | const

inline

Return device number.

## get_local()

std::string uhd::rfnoc::block_id_t::get_local | ( |  | ) | const

Like get(), but only returns the local part ("FFT#1").

## get_tree_root()

uhd::fs_path uhd::rfnoc::block_id_t::get_tree_root | ( |  | ) | const

Returns the property tree root for this block (e.g. "/mboards/0/xbar/FFT#1/").

## is_valid_block_id()

bool uhd::rfnoc::block_id_t::is_valid_block_id | ( | const std::string & | block_id | ) |

static

Check if a given string is valid as a block ID.

## is_valid_blockname()

bool uhd::rfnoc::block_id_t::is_valid_blockname | ( | const std::string & | block_name | ) |

static

Check if a given string is valid as a block name.

## match()

bool uhd::rfnoc::block_id_t::match | ( | const std::string & | block_str | ) |

Check if block_str matches this block.

## operator!=()

bool uhd::rfnoc::block_id_t::operator!= | ( | const block_id_t & | block_id | ) | const

inline

## operator++() [1/2]

block_id_t uhd::rfnoc::block_id_t::operator++ | ( |  | ) |

inline

Increment the block count ("FFT#1" -> "FFT_2").

## operator++() [2/2]

block_id_t uhd::rfnoc::block_id_t::operator++ | ( | int |  | ) |

inline

Increment the block count ("FFT#1" -> "FFT_2").

## operator<()

bool uhd::rfnoc::block_id_t::operator< | ( | const block_id_t & | block_id | ) | const

inline

## operator=()

block_id_t uhd::rfnoc::block_id_t::operator= | ( | const std::string & | new_name | ) |

inline

Assignment: Works like set(std::string).

## operator==() [1/3]

bool uhd::rfnoc::block_id_t::operator== | ( | const block_id_t & | block_id | ) | const

inline

## operator==() [2/3]

bool uhd::rfnoc::block_id_t::operator== | ( | const char * | block_id_str | ) | const

inline

Check if a string matches the entire block ID (not like match()).

## operator==() [3/3]

bool uhd::rfnoc::block_id_t::operator== | ( | const std::string & | block_id_str | ) | const

inline

Check if a string matches the entire block ID (not like match()).

## operator>()

bool uhd::rfnoc::block_id_t::operator> | ( | const block_id_t & | block_id | ) | const

inline

## set() [1/2]

bool uhd::rfnoc::block_id_t::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().

## set() [2/2]

bool uhd::rfnoc::block_id_t::set | ( | const std::string & | new_name | ) |

Set from string such as "0/FFT#1", "FFT#0", ...

## set_block_count()

void uhd::rfnoc::block_id_t::set_block_count | ( | size_t | count | ) |

inline

Set the block count.

## set_block_name()

bool uhd::rfnoc::block_id_t::set_block_name | ( | const std::string & | block_name | ) |

Set the block name. Will return false if invalid block string.

## set_device_no()

void uhd::rfnoc::block_id_t::set_device_no | ( | size_t | device_no | ) |

inline

Set the device number.

## to_string()

std::string uhd::rfnoc::block_id_t::to_string | ( |  | ) | const

Return a string like this: "0/FFT#1" (includes all components, if set).

The documentation for this class was generated from the following file:

- block_id.hpp