USRP Hardware Driver and Device Manual  Version: 4.11.0.HEAD-0-1c0dfa23
UHD and USRP Manual
uhd::rfnoc::property_base_t Class Referenceabstract

#include <uhd/rfnoc/property.hpp>

Inheritance diagram for uhd::rfnoc::property_base_t:
uhd::rfnoc::property_t< double > uhd::rfnoc::property_t< int > uhd::rfnoc::dirtifier_t uhd::rfnoc::property_t< data_t >

Detailed Description

Base class for properties

Public Types

enum  access_t { NONE , RO = 0x1 , RW = 0x3 , RWLOCKED = 0x5 }
 

Public Member Functions

 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_infoget_src_info () const
 Return the source info for this property. More...
 
virtual bool is_dirty () const =0
 Query this property's dirty flag. More...
 
virtual bool is_valid () const =0
 Query this property's valid flag. 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...
 
virtual bool equal (property_base_t *rhs) const =0
 Return true if rhs has the same type and value. More...
 
virtual std::unique_ptr< property_base_tclone (res_source_info)
 Create a copy of this property. More...
 
virtual void force_dirty ()=0
 
virtual void set_from_str (const std::string &new_val_str)=0
 

Friends

class prop_accessor_t
 

Member Enumeration Documentation

◆ access_t

Enumerator
NONE 

Neither reading nor writing to this property is permitted.

RO 

Read-Only.

RW 

Read-Write.

RWLOCKED 

Write is locked. This lets you call set(), but only if the value is unchanged.

Constructor & Destructor Documentation

◆ property_base_t()

uhd::rfnoc::property_base_t::property_base_t ( const std::string &  id,
const res_source_info source_info 
)
inline

◆ ~property_base_t()

virtual uhd::rfnoc::property_base_t::~property_base_t ( )
inlinevirtual

Member Function Documentation

◆ clone()

virtual std::unique_ptr<property_base_t> uhd::rfnoc::property_base_t::clone ( res_source_info  )
inlinevirtual

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 in uhd::rfnoc::property_t< data_t >, uhd::rfnoc::property_t< double >, and uhd::rfnoc::property_t< int >.

◆ equal()

virtual bool uhd::rfnoc::property_base_t::equal ( property_base_t rhs) const
pure virtual

◆ force_dirty()

virtual void uhd::rfnoc::property_base_t::force_dirty ( )
pure virtual

◆ get_access_mode()

access_t uhd::rfnoc::property_base_t::get_access_mode ( ) const
inline

Return the current access mode.

◆ get_id()

const std::string& uhd::rfnoc::property_base_t::get_id ( ) const
inline

Gets the ID (name) of this property.

◆ get_src_info()

const res_source_info& uhd::rfnoc::property_base_t::get_src_info ( ) const
inline

Return the source info for this property.

◆ is_dirty()

virtual bool uhd::rfnoc::property_base_t::is_dirty ( ) const
pure virtual

Query this property's dirty flag.

If it's true, that means this property was recently changed, but changes have not propagated yet and still need resolving.

Implemented in uhd::rfnoc::property_t< data_t >, uhd::rfnoc::property_t< double >, uhd::rfnoc::property_t< int >, and uhd::rfnoc::dirtifier_t.

◆ is_valid()

virtual bool uhd::rfnoc::property_base_t::is_valid ( ) const
pure virtual

Query this property's valid flag.

If it's false, that means this property has a default value that should NOT be forwarded.

Implemented in uhd::rfnoc::property_t< data_t >, uhd::rfnoc::property_t< double >, uhd::rfnoc::property_t< int >, and uhd::rfnoc::dirtifier_t.

◆ read_access_granted()

bool uhd::rfnoc::property_base_t::read_access_granted ( ) const
inline

Returns true if this property can be read.

◆ set_from_str()

virtual void uhd::rfnoc::property_base_t::set_from_str ( const std::string &  new_val_str)
pure virtual

Set this property's value using a string

This requires the underlying property type to be convertible from a string.

Exceptions
uhd::runtime_errorif the underlying type has no conversion from a string

Implemented in uhd::rfnoc::property_t< data_t >, uhd::rfnoc::property_t< double >, uhd::rfnoc::property_t< int >, and uhd::rfnoc::dirtifier_t.

◆ write_access_granted()

bool uhd::rfnoc::property_base_t::write_access_granted ( ) const
inline

Returns true if this property can be written to.

Friends And Related Function Documentation

◆ prop_accessor_t

friend class prop_accessor_t
friend

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