USRP Hardware Driver and USRP Manual  Version: 4.7.0.0
UHD and USRP Manual
uhd::soft_regmap_t Class Reference

#include <uhd/utils/soft_register.hpp>

Inheritance diagram for uhd::soft_regmap_t:
uhd::soft_regmap_accessor_t

Public Member Functions

 soft_regmap_t (const std::string &name)
 
 ~soft_regmap_t () override
 
UHD_INLINE const std::string & get_name () const override
 
void initialize (wb_iface &iface, bool sync=false)
 
void flush ()
 
void refresh ()
 
soft_register_baselookup (const std::string &name) const override
 
std::vector< std::string > enumerate () const override
 
- Public Member Functions inherited from uhd::soft_regmap_accessor_t
virtual ~soft_regmap_accessor_t ()
 

Protected Types

enum  visibility_t { PUBLIC, PRIVATE }
 

Protected Member Functions

UHD_INLINE void add_to_map (soft_register_base &reg, const std::string &name, const visibility_t visible=PRIVATE)
 

Additional Inherited Members

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

Detailed Description

A regmap is a collection of registers that share the same bus (control iface). A regmap must have an identifier. A regmap must manage storage for each register. The recommended way to use a regmap is to define individual registers within the scope of the regmap and instantiate them in the ragmap. Soft register object that holds offset, soft-copy and the control iface. Methods give convenient field-level access to soft-copy and the ability to do read-modify-write operations.

Member Enumeration Documentation

◆ visibility_t

Enumerator
PUBLIC 
PRIVATE 

Constructor & Destructor Documentation

◆ soft_regmap_t()

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

◆ ~soft_regmap_t()

uhd::soft_regmap_t::~soft_regmap_t ( )
inlineoverride

Member Function Documentation

◆ add_to_map()

UHD_INLINE void uhd::soft_regmap_t::add_to_map ( soft_register_base reg,
const std::string &  name,
const visibility_t  visible = PRIVATE 
)
inlineprotected

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

◆ enumerate()

std::vector<std::string> uhd::soft_regmap_t::enumerate ( ) const
inlineoverridevirtual

Enumerate all the registers in this map. Return fully qualified paths.

Implements uhd::soft_regmap_accessor_t.

◆ flush()

void uhd::soft_regmap_t::flush ( )
inline

Flush all registers to hardware. The order of writing is the same as the order in which registers were added to the map.

◆ get_name()

UHD_INLINE const std::string& uhd::soft_regmap_t::get_name ( ) const
inlineoverridevirtual

Get the name of this register map

Implements uhd::soft_regmap_accessor_t.

◆ initialize()

void uhd::soft_regmap_t::initialize ( wb_iface iface,
bool  sync = false 
)
inline

Initialize all registers in this register map using a bus. Optionally synchronize the register with hardware. The order of initialization is the same as the order in which registers were added to the map.

◆ lookup()

soft_register_base& uhd::soft_regmap_t::lookup ( const std::string &  name) const
inlineoverridevirtual

Lookup a register object by name. If a register with "name" is not found, runtime_error is thrown

Implements uhd::soft_regmap_accessor_t.

◆ refresh()

void uhd::soft_regmap_t::refresh ( )
inline

Refresh all register soft-copies from hardware. The order of reading is the same as the order in which registers were added to the map.


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