NSVD Reader  0.0.1
nodamushi::svd::normalized::Register< STRREF > Struct Template Reference

#include <node_container.hpp>

Public Types

using Field = ::nodamushi::svd::normalized::Field< STRREF >
 
using Cluster = ::nodamushi::svd::normalized::Cluster< STRREF >
 
using Peripheral = ::nodamushi::svd::normalized::Peripheral< STRREF >
 
using this_t = Register< STRREF >
 
using p_ptr = parent_ptr< Peripheral >
 
using p2_ptr = parent_ptr< Cluster >
 

Public Member Functions

std::string get_name_with_appendix () const noexcept
 get name with peripheral.prependToName and peripheral.appendToName More...
 
node_ptr< Peripheralget_parent () noexcept
 get parent cluster pointer More...
 
node_ptr< Peripheral const > get_parent () const noexcept
 
node_ptr< Clusterget_parent2 () noexcept
 get parent cluster pointer More...
 
node_ptr< Cluster const > get_parent2 () const noexcept
 parent cluster pointer or nullptr. More...
 
node_ptr< Peripheral const > get_peripheral () const noexcept
 find the Peripheral to which this register belongs. More...
 
node_ptr< Peripheralget_peripheral () noexcept
 find the Peripheral to which this register belongs. More...
 
uint64_t get_address () const
 calculate an absolute address More...
 
uint64_t get_address_offset () const
 a relative address from the baseAddress of the peripheral More...
 
::nodamushi::svd::path get_path () const
 get path More...
 
DataType get_dataType () const
 resolve the dataType. The default type is determined by the size.(size=8 : uint8_t,size=32: uint32_t) More...
 
uint32_t get_size () const
 resolve the value of size and return it. More...
 
uint64_t get_resetValue () const
 resolve the value of resetValue and return it. More...
 
uint64_t get_resetMask () const
 resolve the value of resetMask and return it. More...
 
Access get_access () const
 resolve the value of access and return it. More...
 
Protection get_protection () const
 resolve the value of protection and return it. More...
 
ModifiedWriteValues get_modifiedWriteValues () const
 resolve the value of modifiedWriteValues and return it. More...
 
ReadAction get_readAction () const
 
template<typename STR >
node_ptr< void > find (const ::nodamushi::svd::path< STR > &p, size_t pindex=0)
 find path element More...
 
template<typename STR >
node_ptr< Fieldfind_field (::nodamushi::svd::path< STR > &p, size_t pindex=0)
 find field element More...
 
template<typename T >
 Register (const T &n)
 
void update_parent (p_ptr &new_parent, node_ptr< this_t > &me)
 
void update_parent (p2_ptr &new_parent, node_ptr< this_t > &me)
 

Public Attributes

path< STRREF > derivedFrom
 derivedFrom attribute More...
 
std::string name
 <name> of this register without peripheral.prependToName and peripheral.appendToName More...
 
std::string displayName
 <displayName> More...
 
dim_info dim
 dimemsion information object. More...
 
STRREF description
 <description> More...
 
STRREF alternateGroup
 <alternateGroup> More...
 
STRREF alternateRegister
 <alternateRegister> More...
 
uint64_t addressOffset
 <addressOffset> More...
 
nullable< uint32_t > size
 <size> More...
 
nullable< Accessaccess
 <access> More...
 
nullable< Protectionprotection
 <protection> More...
 
nullable< uint64_t > resetValue
 <resetValue> More...
 
nullable< uint64_t > resetMask
 <resetMask> More...
 
nullable< DataTypedataType
 <dataType> More...
 
ModifiedWriteValues modifiedWriteValues
 <modifiedWriteValues> More...
 
ReadAction readAction
 <readAction> More...
 
WriteConstraint writeConstraint
 <writeConstraint> More...
 
list< Fieldfields
 <field> elements list. This list is sorted by lsb of field. Field class does not prohibit copying, but basically it should be treated with a reference. More...
 

Detailed Description

template<typename STRREF>
struct nodamushi::svd::normalized::Register< STRREF >

Definition at line 51 of file node_container.hpp.

Member Typedef Documentation

◆ Cluster

template<typename STRREF>
using nodamushi::svd::normalized::Register< STRREF >::Cluster = ::nodamushi::svd::normalized::Cluster<STRREF>

Definition at line 32 of file Register.hpp.

◆ Field

template<typename STRREF>
using nodamushi::svd::normalized::Register< STRREF >::Field = ::nodamushi::svd::normalized::Field<STRREF>

Definition at line 31 of file Register.hpp.

◆ p2_ptr

template<typename STRREF>
using nodamushi::svd::normalized::Register< STRREF >::p2_ptr = parent_ptr<Cluster>

Definition at line 36 of file Register.hpp.

◆ p_ptr

template<typename STRREF>
using nodamushi::svd::normalized::Register< STRREF >::p_ptr = parent_ptr<Peripheral>

Definition at line 35 of file Register.hpp.

◆ Peripheral

template<typename STRREF>
using nodamushi::svd::normalized::Register< STRREF >::Peripheral = ::nodamushi::svd::normalized::Peripheral<STRREF>

Definition at line 33 of file Register.hpp.

◆ this_t

template<typename STRREF>
using nodamushi::svd::normalized::Register< STRREF >::this_t = Register<STRREF>

Definition at line 34 of file Register.hpp.

Constructor & Destructor Documentation

◆ Register()

template<typename STRREF>
template<typename T >
nodamushi::svd::normalized::Register< STRREF >::Register ( const T &  n)
inline

Definition at line 258 of file Register.hpp.

Member Function Documentation

◆ find()

template<typename STRREF>
template<typename STR >
node_ptr<void> nodamushi::svd::normalized::Register< STRREF >::find ( const ::nodamushi::svd::path< STR > &  p,
size_t  pindex = 0 
)
inline

find path element

Parameters
ppath
pindexthe first index of serach path. default is 0.
Returns
element pointer

Definition at line 225 of file Register.hpp.

◆ find_field()

template<typename STRREF>
template<typename STR >
node_ptr<Field> nodamushi::svd::normalized::Register< STRREF >::find_field ( ::nodamushi::svd::path< STR > &  p,
size_t  pindex = 0 
)
inline

find field element

Parameters
ppath
pindexthe first index of serach path. default is 0.
Returns
element pointer

Definition at line 244 of file Register.hpp.

◆ get_access()

template<typename STRREF>
Access nodamushi::svd::normalized::Register< STRREF >::get_access ( ) const
inline

resolve the value of access and return it.

Definition at line 206 of file Register.hpp.

◆ get_address()

template<typename STRREF>
uint64_t nodamushi::svd::normalized::Register< STRREF >::get_address ( ) const
inline

calculate an absolute address

Definition at line 177 of file Register.hpp.

◆ get_address_offset()

template<typename STRREF>
uint64_t nodamushi::svd::normalized::Register< STRREF >::get_address_offset ( ) const
inline

a relative address from the baseAddress of the peripheral

Definition at line 179 of file Register.hpp.

◆ get_dataType()

template<typename STRREF>
DataType nodamushi::svd::normalized::Register< STRREF >::get_dataType ( ) const
inline

resolve the dataType. The default type is determined by the size.(size=8 : uint8_t,size=32: uint32_t)

Definition at line 190 of file Register.hpp.

◆ get_modifiedWriteValues()

template<typename STRREF>
ModifiedWriteValues nodamushi::svd::normalized::Register< STRREF >::get_modifiedWriteValues ( ) const
inline

resolve the value of modifiedWriteValues and return it.

Definition at line 214 of file Register.hpp.

◆ get_name_with_appendix()

template<typename STRREF>
std::string nodamushi::svd::normalized::Register< STRREF >::get_name_with_appendix ( ) const
inlinenoexcept

get name with peripheral.prependToName and peripheral.appendToName

Definition at line 120 of file Register.hpp.

◆ get_parent() [1/2]

template<typename STRREF>
node_ptr<Peripheral> nodamushi::svd::normalized::Register< STRREF >::get_parent ( )
inlinenoexcept

get parent cluster pointer

Returns
parent peripheral pointer or nullptr.
See also
get_parent2()

Definition at line 160 of file Register.hpp.

◆ get_parent() [2/2]

template<typename STRREF>
node_ptr<Peripheral const> nodamushi::svd::normalized::Register< STRREF >::get_parent ( ) const
inlinenoexcept
Returns
parent peripheral pointer or nullptr.

Definition at line 162 of file Register.hpp.

◆ get_parent2() [1/2]

template<typename STRREF>
node_ptr<Cluster> nodamushi::svd::normalized::Register< STRREF >::get_parent2 ( )
inlinenoexcept

get parent cluster pointer

Returns
parent cluster pointer or nullptr.
See also
get_parent()

Definition at line 169 of file Register.hpp.

◆ get_parent2() [2/2]

template<typename STRREF>
node_ptr<Cluster const> nodamushi::svd::normalized::Register< STRREF >::get_parent2 ( ) const
inlinenoexcept

parent cluster pointer or nullptr.

Definition at line 171 of file Register.hpp.

◆ get_path()

template<typename STRREF>
::nodamushi::svd::path nodamushi::svd::normalized::Register< STRREF >::get_path ( ) const
inline

get path

Definition at line 180 of file Register.hpp.

◆ get_peripheral() [1/2]

template<typename STRREF>
node_ptr<Peripheral const> nodamushi::svd::normalized::Register< STRREF >::get_peripheral ( ) const
inlinenoexcept

find the Peripheral to which this register belongs.

Definition at line 173 of file Register.hpp.

◆ get_peripheral() [2/2]

template<typename STRREF>
node_ptr<Peripheral> nodamushi::svd::normalized::Register< STRREF >::get_peripheral ( )
inlinenoexcept

find the Peripheral to which this register belongs.

Definition at line 175 of file Register.hpp.

◆ get_protection()

template<typename STRREF>
Protection nodamushi::svd::normalized::Register< STRREF >::get_protection ( ) const
inline

resolve the value of protection and return it.

Definition at line 210 of file Register.hpp.

◆ get_readAction()

template<typename STRREF>
ReadAction nodamushi::svd::normalized::Register< STRREF >::get_readAction ( ) const
inline

Definition at line 215 of file Register.hpp.

◆ get_resetMask()

template<typename STRREF>
uint64_t nodamushi::svd::normalized::Register< STRREF >::get_resetMask ( ) const
inline

resolve the value of resetMask and return it.

Definition at line 202 of file Register.hpp.

◆ get_resetValue()

template<typename STRREF>
uint64_t nodamushi::svd::normalized::Register< STRREF >::get_resetValue ( ) const
inline

resolve the value of resetValue and return it.

Definition at line 198 of file Register.hpp.

◆ get_size()

template<typename STRREF>
uint32_t nodamushi::svd::normalized::Register< STRREF >::get_size ( ) const
inline

resolve the value of size and return it.

Definition at line 194 of file Register.hpp.

◆ update_parent() [1/2]

template<typename STRREF>
void nodamushi::svd::normalized::Register< STRREF >::update_parent ( p_ptr new_parent,
node_ptr< this_t > &  me 
)
inline

Definition at line 299 of file Register.hpp.

◆ update_parent() [2/2]

template<typename STRREF>
void nodamushi::svd::normalized::Register< STRREF >::update_parent ( p2_ptr new_parent,
node_ptr< this_t > &  me 
)
inline

Definition at line 305 of file Register.hpp.

Member Data Documentation

◆ access

template<typename STRREF>
nullable<Access> nodamushi::svd::normalized::Register< STRREF >::access

<access>

See also
get_access()

Definition at line 79 of file Register.hpp.

◆ addressOffset

template<typename STRREF>
uint64_t nodamushi::svd::normalized::Register< STRREF >::addressOffset

<addressOffset>

If you nead an absolute address, call the get_address() method. If you nead a relative address from the baseAddress of peripheral,call the get_address_offset() method.
See also
get_address()
get_address_offset()

Definition at line 69 of file Register.hpp.

◆ alternateGroup

template<typename STRREF>
STRREF nodamushi::svd::normalized::Register< STRREF >::alternateGroup

<alternateGroup>

Definition at line 57 of file Register.hpp.

◆ alternateRegister

template<typename STRREF>
STRREF nodamushi::svd::normalized::Register< STRREF >::alternateRegister

<alternateRegister>

Definition at line 59 of file Register.hpp.

◆ dataType

template<typename STRREF>
nullable<DataType> nodamushi::svd::normalized::Register< STRREF >::dataType

<dataType>

See also
get_dataType()

Definition at line 99 of file Register.hpp.

◆ derivedFrom

template<typename STRREF>
path<STRREF> nodamushi::svd::normalized::Register< STRREF >::derivedFrom

derivedFrom attribute

Definition at line 44 of file Register.hpp.

◆ description

template<typename STRREF>
STRREF nodamushi::svd::normalized::Register< STRREF >::description

<description>

Definition at line 55 of file Register.hpp.

◆ dim

template<typename STRREF>
dim_info nodamushi::svd::normalized::Register< STRREF >::dim

dimemsion information object.

Definition at line 53 of file Register.hpp.

◆ displayName

template<typename STRREF>
std::string nodamushi::svd::normalized::Register< STRREF >::displayName

<displayName>

Definition at line 51 of file Register.hpp.

◆ fields

template<typename STRREF>
list<Field> nodamushi::svd::normalized::Register< STRREF >::fields

<field> elements list. This list is sorted by lsb of field. Field class does not prohibit copying, but basically it should be treated with a reference.

auto& f = reg.fields[x];

Definition at line 114 of file Register.hpp.

◆ modifiedWriteValues

template<typename STRREF>
ModifiedWriteValues nodamushi::svd::normalized::Register< STRREF >::modifiedWriteValues

<modifiedWriteValues>

Definition at line 101 of file Register.hpp.

◆ name

template<typename STRREF>
std::string nodamushi::svd::normalized::Register< STRREF >::name

<name> of this register without peripheral.prependToName and peripheral.appendToName

See also
get_name_with_appendix()

Definition at line 49 of file Register.hpp.

◆ protection

template<typename STRREF>
nullable<Protection> nodamushi::svd::normalized::Register< STRREF >::protection

<protection>

See also
get_protection()

Definition at line 84 of file Register.hpp.

◆ readAction

template<typename STRREF>
ReadAction nodamushi::svd::normalized::Register< STRREF >::readAction

<readAction>

Definition at line 103 of file Register.hpp.

◆ resetMask

template<typename STRREF>
nullable<uint64_t> nodamushi::svd::normalized::Register< STRREF >::resetMask

<resetMask>

See also
get_resetMask()

Definition at line 94 of file Register.hpp.

◆ resetValue

template<typename STRREF>
nullable<uint64_t> nodamushi::svd::normalized::Register< STRREF >::resetValue

<resetValue>

See also
get_resetValue()

Definition at line 89 of file Register.hpp.

◆ size

template<typename STRREF>
nullable<uint32_t> nodamushi::svd::normalized::Register< STRREF >::size

<size>

See also
get_size()

Definition at line 74 of file Register.hpp.

◆ writeConstraint

template<typename STRREF>
WriteConstraint nodamushi::svd::normalized::Register< STRREF >::writeConstraint

<writeConstraint>

Definition at line 105 of file Register.hpp.


The documentation for this struct was generated from the following files: