#include <uhd/rfnoc/property.hpp>
An encapsulation class for a block property.
Public Types | |
| using | value_type = data_t |
| We want to be good C++ citizens. More... | |
Public Types inherited from uhd::rfnoc::property_base_t | |
| enum | access_t { NONE , RO = 0x1 , RW = 0x3 , RWLOCKED = 0x5 } |
Public Member Functions | |
| property_t (const std::string &id, data_t &&value, const res_source_info &source_info) | |
| property_t (const std::string &id, const data_t &value, const res_source_info &source_info) | |
| property_t (const std::string &id, const res_source_info &source_info) | |
| property_t (const property_t< data_t > &prop)=default | |
| bool | is_dirty () const override |
| Returns the dirty state of this property. More... | |
| bool | is_valid () const override |
| Query this property's valid flag. More... | |
| bool | equal (property_base_t *rhs) const override |
| Return true if rhs has the same type and value. More... | |
| std::unique_ptr< property_base_t > | clone (res_source_info new_src_info) override |
| Create a copy of this property. More... | |
| void | set_from_str (const std::string &new_val_str) override |
| void | set (const data_t &value) |
| Set the value of this property. More... | |
| void | force_dirty () override |
| const data_t & | get () const |
| Get the value of this property. More... | |
| operator const data_t & () const | |
| bool | operator== (const data_t &rhs) |
| property_t< data_t > & | operator= (const data_t &value) |
Public Member Functions inherited from uhd::rfnoc::property_base_t | |
| property_base_t (const std::string &id, const res_source_info &source_info) | |
| virtual | ~property_base_t () |
| const std::string & | get_id () const |
| Gets the ID (name) of this property. More... | |
| const res_source_info & | get_src_info () const |
| Return the source info for this property. More... | |
| bool | read_access_granted () const |
| Returns true if this property can be read. More... | |
| bool | write_access_granted () const |
| Returns true if this property can be written to. More... | |
| access_t | get_access_mode () const |
| Return the current access mode. More... | |
| using uhd::rfnoc::property_t< data_t >::value_type = data_t |
We want to be good C++ citizens.
| uhd::rfnoc::property_t< data_t >::property_t | ( | const std::string & | id, |
| data_t && | value, | ||
| const res_source_info & | source_info | ||
| ) |
| uhd::rfnoc::property_t< data_t >::property_t | ( | const std::string & | id, |
| const data_t & | value, | ||
| const res_source_info & | source_info | ||
| ) |
| uhd::rfnoc::property_t< data_t >::property_t | ( | const std::string & | id, |
| const res_source_info & | source_info | ||
| ) |
|
default |
|
inlineoverridevirtual |
Create a copy of this property.
The copy must have the same type, value, and ID. However, it is often desirable to have a new source information, so that can be overridden.
The cleanliness state of original is not preserved. The new property will have the same cleanliness state as any other new property.
Reimplemented from uhd::rfnoc::property_base_t.
|
inlineoverridevirtual |
Return true if rhs has the same type and value.
Implements uhd::rfnoc::property_base_t.
|
inlineoverridevirtual |
Implements uhd::rfnoc::property_base_t.
|
inline |
Get the value of this property.
| uhd::access_error | if either the property is flagged as invalid, or if no read access was granted. |
|
inlineoverridevirtual |
Returns the dirty state of this property.
If true, this means the value was recently changed, but it wasn't marked clean yet.
Implements uhd::rfnoc::property_base_t.
|
inlineoverridevirtual |
Query this property's valid flag.
If it's false, that means this property has a default value that should NOT be used.
Implements uhd::rfnoc::property_base_t.
|
inline |
|
inline |
|
inline |
|
inline |
Set the value of this property.
| uhd::access_error | if the current access mode is not RW or RWLOCKED |
| uhd::resolve_error | if the property is RWLOCKED but the new value doesn't match |
|
inlineoverridevirtual |
Set this property's value using a string
This requires the underlying property type to be convertible from a string.
| uhd::runtime_error | if the underlying type has no conversion from a string |
Implements uhd::rfnoc::property_base_t.