USRP Hardware Driver and USRP Manual  Version: 003.010.003.HEAD-0-gef157678
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)
 
virtual ~soft_regmap_t ()
 
virtual UHD_INLINE const std::string & get_name () const
 
void initialize (wb_iface &iface, bool sync=false)
 
void flush ()
 
void refresh ()
 
virtual soft_register_baselookup (const std::string &name) const
 
virtual std::vector< std::string > enumerate () const
 
- 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 boost::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()

virtual uhd::soft_regmap_t::~soft_regmap_t ( )
inlinevirtual

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()

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

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()

virtual UHD_INLINE const std::string& uhd::soft_regmap_t::get_name ( ) const
inlinevirtual

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()

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

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: