USRP Hardware Driver and USRP Manual  Version: 003.010.003.HEAD-0-gef157678
UHD and USRP Manual
uhd::soft_regmap_db_t Class Reference

#include <uhd/utils/soft_register.hpp>

Inheritance diagram for uhd::soft_regmap_db_t:
uhd::soft_regmap_accessor_t

Public Types

typedef boost::shared_ptr< soft_regmap_db_tsptr
 
- Public Types inherited from uhd::soft_regmap_accessor_t
typedef boost::shared_ptr< soft_regmap_accessor_tsptr
 

Public Member Functions

 soft_regmap_db_t ()
 
 soft_regmap_db_t (const std::string &name)
 
const std::string & get_name () const
 
void add (soft_regmap_t &regmap)
 
void add (soft_regmap_db_t &db)
 
soft_register_baselookup (const std::string &path) const
 
virtual std::vector< std::string > enumerate () const
 
- Public Member Functions inherited from uhd::soft_regmap_accessor_t
virtual ~soft_regmap_accessor_t ()
 

Detailed Description

A regmap database is a collection of regmaps or other regmap databases this allows for efficient encapsulation for multiple registers in a hierarchical fashion. A regmap_db does not manage storage for regmaps. It is simply a wrapper.

Member Typedef Documentation

◆ sptr

typedef boost::shared_ptr<soft_regmap_db_t> uhd::soft_regmap_db_t::sptr

Constructor & Destructor Documentation

◆ soft_regmap_db_t() [1/2]

uhd::soft_regmap_db_t::soft_regmap_db_t ( )
inline

Use the default constructor if this is the top-level DB

◆ soft_regmap_db_t() [2/2]

uhd::soft_regmap_db_t::soft_regmap_db_t ( const std::string &  name)
inline

Use this constructor if this is a nested DB

Member Function Documentation

◆ add() [1/2]

void uhd::soft_regmap_db_t::add ( soft_regmap_t regmap)
inline

Add a regmap to this map with an identifier "name" and visibility

◆ add() [2/2]

void uhd::soft_regmap_db_t::add ( soft_regmap_db_t db)
inline

Add a level of regmap_db to this map with an identifier "name" and visibility

◆ enumerate()

virtual std::vector<std::string> uhd::soft_regmap_db_t::enumerate ( ) const
inlinevirtual

Enumerate the paths of all registers that this DB can access

Implements uhd::soft_regmap_accessor_t.

◆ get_name()

const std::string& uhd::soft_regmap_db_t::get_name ( ) const
inlinevirtual

Get the name of this register map

Implements uhd::soft_regmap_accessor_t.

◆ lookup()

soft_register_base& uhd::soft_regmap_db_t::lookup ( const std::string &  path) const
inlinevirtual

Lookup a register by path. A path is defined as a string of "/" separated tokens that scope a register. The leaf (last token) is the name of the register The token immediately before the leaf is the name of the register map If a nested regmap_db is used, the token before the regmap is the db name. For every nested db, the path has an additional token. For example: radio0/spi_regmap/spi_control_reg

Implements uhd::soft_regmap_accessor_t.


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