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

normalized Device More...

#include <Device.hpp>

Public Types

using this_t = Device< STRREF >
 
using Peripheral = ::nodamushi::svd::normalized::Peripheral< STRREF >
 
using Register = ::nodamushi::svd::normalized::Register< STRREF >
 
using Cluster = ::nodamushi::svd::normalized::Cluster< STRREF >
 
using Field = ::nodamushi::svd::normalized::Field< STRREF >
 
using Cpu = ::nodamushi::svd::normalized::Cpu< STRREF >
 

Public Member Functions

template<typename STR >
node_ptr< void > find (const ::nodamushi::svd::path< STR > &p)
 find path element More...
 
node_ptr< void > find (string_ref p)
 find path element More...
 
template<typename STR >
node_ptr< Peripheralfind_peripheral (const ::nodamushi::svd::path< STR > &p)
 find peripheral More...
 
node_ptr< Peripheralfind_peripheral (string_ref p)
 find peripheral More...
 
template<typename STR >
node_ptr< Clusterfind_cluster (const ::nodamushi::svd::path< STR > &p)
 find peripheral More...
 
node_ptr< Clusterfind_cluster (string_ref p)
 find peripheral More...
 
template<typename STR >
node_ptr< Registerfind_register (const ::nodamushi::svd::path< STR > &p)
 find register More...
 
node_ptr< Registerfind_register (string_ref p)
 find register More...
 
template<typename STR >
node_ptr< Fieldfind_field (const ::nodamushi::svd::path< STR > &p)
 find field More...
 
node_ptr< Fieldfind_field (string_ref p)
 find field More...
 
template<typename NORMALIZED >
 Device (const NORMALIZED &n)
 Don't use this constructor.this constructor is for normalizer class. More...
 
void update_parent (node_ptr< Device > &this_ptr)
 
uint64_t get_address () const
 allways return 0 More...
 
uint32_t get_size () const
 return size More...
 
uint64_t get_resetValue () const
 return resetValue More...
 
uint64_t get_resetMask () const
 return resetMask More...
 
Access get_access () const
 return access More...
 
Protection get_protection () const
 return protection More...
 
constexpr const void * get_parent () const noexcept
 allways return nullptr More...
 
constexpr const void * get_parent2 () const noexcept
 allways return nullptr More...
 

Public Attributes

STRREF vendor
 <vendor> More...
 
STRREF vendorID
 <vendorID> More...
 
STRREF name
 <name> More...
 
STRREF series
 <series> More...
 
STRREF version
 <version> More...
 
STRREF description
 <description> More...
 
STRREF licenseText
 <licenseText> More...
 
STRREF headerSystemFilename
 <headerSystemFilename> More...
 
STRREF headerDefinitionsPrefix
 <headerDefinitionsPrefix> More...
 
uint32_t addressUnitBits
 <addressUnitBits> More...
 
uint32_t width
 <width> More...
 
uint32_t size
 <size> More...
 
Access access
 <access> More...
 
Protection protection
 <protection> More...
 
uint64_t resetValue
 <resetValue> More...
 
uint64_t resetMask
 <resetMask> More...
 
Cpu cpu
 <cpu> More...
 
list< Peripheralperipherals
 peripheral list Peripheral class does not prohibit copying, but basically it should be treated with a reference. More...
 

Detailed Description

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

normalized Device

Root class. Use nodamushi::svd::normalized() function to create this intance.
namespace svd = nodamushi::svd;
svd::Device<> deviece(svd_reader);
//
// normalize device.
// the result pointer is wrapped by shared_ptr.
//
norm::node_ptr<Device<>> ptr = svd::normalize(device);
std::cout << ptr->peripheral[0].name << std::endl;
Parameters
STRREFstring type.
In C++14, the default text type is 'std::string'. In C++17, the default text type is 'std::string_view'. std::string_view refers to the string of svd::Device.
See also
http://www.keil.com/pack/doc/CMSIS/SVD/html/elem_device.html
nodamushi::svd::Device
nodamushi::svd::normalized::normalize()

Definition at line 46 of file Device.hpp.

Member Typedef Documentation

◆ Cluster

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

Definition at line 51 of file Device.hpp.

◆ Cpu

template<typename STRREF>
using nodamushi::svd::normalized::Device< STRREF >::Cpu = ::nodamushi::svd::normalized::Cpu<STRREF>

Definition at line 53 of file Device.hpp.

◆ Field

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

Definition at line 52 of file Device.hpp.

◆ Peripheral

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

Definition at line 49 of file Device.hpp.

◆ Register

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

Definition at line 50 of file Device.hpp.

◆ this_t

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

Definition at line 48 of file Device.hpp.

Constructor & Destructor Documentation

◆ Device()

template<typename STRREF>
template<typename NORMALIZED >
nodamushi::svd::normalized::Device< STRREF >::Device ( const NORMALIZED &  n)
inline

Don't use this constructor.this constructor is for normalizer class.

Parameters
npre normalized data

Definition at line 240 of file Device.hpp.

Member Function Documentation

◆ find() [1/2]

template<typename STRREF>
template<typename STR >
node_ptr<void> nodamushi::svd::normalized::Device< STRREF >::find ( const ::nodamushi::svd::path< STR > &  p)
inline

find path element

Parameters
ppath
Returns
element pointer Note: register path is NOT contains peripheral.prependToName and appendToName

Definition at line 108 of file Device.hpp.

◆ find() [2/2]

template<typename STRREF>
node_ptr<void> nodamushi::svd::normalized::Device< STRREF >::find ( string_ref  p)
inline

find path element

Parameters
ppath
Returns
element pointer Note: register path is NOT contains peripheral.prependToName and appendToName

Definition at line 125 of file Device.hpp.

◆ find_cluster() [1/2]

template<typename STRREF>
template<typename STR >
node_ptr<Cluster> nodamushi::svd::normalized::Device< STRREF >::find_cluster ( const ::nodamushi::svd::path< STR > &  p)
inline

find peripheral

Parameters
ppath
Returns
element pointer

Definition at line 162 of file Device.hpp.

◆ find_cluster() [2/2]

template<typename STRREF>
node_ptr<Cluster> nodamushi::svd::normalized::Device< STRREF >::find_cluster ( string_ref  p)
inline

find peripheral

Parameters
ppath
Returns
element pointer

Definition at line 176 of file Device.hpp.

◆ find_field() [1/2]

template<typename STRREF>
template<typename STR >
node_ptr<Field> nodamushi::svd::normalized::Device< STRREF >::find_field ( const ::nodamushi::svd::path< STR > &  p)
inline

find field

Parameters
ppath
Returns
element pointer

Definition at line 214 of file Device.hpp.

◆ find_field() [2/2]

template<typename STRREF>
node_ptr<Field> nodamushi::svd::normalized::Device< STRREF >::find_field ( string_ref  p)
inline

find field

Parameters
ppath
Returns
element pointer

Definition at line 228 of file Device.hpp.

◆ find_peripheral() [1/2]

template<typename STRREF>
template<typename STR >
node_ptr<Peripheral> nodamushi::svd::normalized::Device< STRREF >::find_peripheral ( const ::nodamushi::svd::path< STR > &  p)
inline

find peripheral

Parameters
ppath
Returns
element pointer

Definition at line 137 of file Device.hpp.

◆ find_peripheral() [2/2]

template<typename STRREF>
node_ptr<Peripheral> nodamushi::svd::normalized::Device< STRREF >::find_peripheral ( string_ref  p)
inline

find peripheral

Parameters
ppath
Returns
element pointer

Definition at line 150 of file Device.hpp.

◆ find_register() [1/2]

template<typename STRREF>
template<typename STR >
node_ptr<Register> nodamushi::svd::normalized::Device< STRREF >::find_register ( const ::nodamushi::svd::path< STR > &  p)
inline

find register

Parameters
ppath
Returns
element pointer

Definition at line 188 of file Device.hpp.

◆ find_register() [2/2]

template<typename STRREF>
node_ptr<Register> nodamushi::svd::normalized::Device< STRREF >::find_register ( string_ref  p)
inline

find register

Parameters
ppath
Returns
element pointer

Definition at line 202 of file Device.hpp.

◆ get_access()

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

return access

Definition at line 282 of file Device.hpp.

◆ get_address()

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

allways return 0

Definition at line 274 of file Device.hpp.

◆ get_parent()

template<typename STRREF>
constexpr const void* nodamushi::svd::normalized::Device< STRREF >::get_parent ( ) const
inlinenoexcept

allways return nullptr

Definition at line 286 of file Device.hpp.

◆ get_parent2()

template<typename STRREF>
constexpr const void* nodamushi::svd::normalized::Device< STRREF >::get_parent2 ( ) const
inlinenoexcept

allways return nullptr

Definition at line 288 of file Device.hpp.

◆ get_protection()

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

return protection

Definition at line 284 of file Device.hpp.

◆ get_resetMask()

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

return resetMask

Definition at line 280 of file Device.hpp.

◆ get_resetValue()

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

return resetValue

Definition at line 278 of file Device.hpp.

◆ get_size()

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

return size

Definition at line 276 of file Device.hpp.

◆ update_parent()

template<typename STRREF>
void nodamushi::svd::normalized::Device< STRREF >::update_parent ( node_ptr< Device< STRREF > > &  this_ptr)
inline

set this object pointer.

Definition at line 267 of file Device.hpp.

Member Data Documentation

◆ access

template<typename STRREF>
Access nodamushi::svd::normalized::Device< STRREF >::access

<access>

Definition at line 80 of file Device.hpp.

◆ addressUnitBits

template<typename STRREF>
uint32_t nodamushi::svd::normalized::Device< STRREF >::addressUnitBits

<addressUnitBits>

Definition at line 74 of file Device.hpp.

◆ cpu

template<typename STRREF>
Cpu nodamushi::svd::normalized::Device< STRREF >::cpu

<cpu>

Definition at line 88 of file Device.hpp.

◆ description

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

<description>

Definition at line 66 of file Device.hpp.

◆ headerDefinitionsPrefix

template<typename STRREF>
STRREF nodamushi::svd::normalized::Device< STRREF >::headerDefinitionsPrefix

<headerDefinitionsPrefix>

Definition at line 72 of file Device.hpp.

◆ headerSystemFilename

template<typename STRREF>
STRREF nodamushi::svd::normalized::Device< STRREF >::headerSystemFilename

<headerSystemFilename>

Definition at line 70 of file Device.hpp.

◆ licenseText

template<typename STRREF>
STRREF nodamushi::svd::normalized::Device< STRREF >::licenseText

<licenseText>

Definition at line 68 of file Device.hpp.

◆ name

template<typename STRREF>
STRREF nodamushi::svd::normalized::Device< STRREF >::name

<name>

Definition at line 60 of file Device.hpp.

◆ peripherals

template<typename STRREF>
list<Peripheral> nodamushi::svd::normalized::Device< STRREF >::peripherals

peripheral list Peripheral class does not prohibit copying, but basically it should be treated with a reference.

auto& p = device->peripherals[0];

Definition at line 98 of file Device.hpp.

◆ protection

template<typename STRREF>
Protection nodamushi::svd::normalized::Device< STRREF >::protection

<protection>

Definition at line 82 of file Device.hpp.

◆ resetMask

template<typename STRREF>
uint64_t nodamushi::svd::normalized::Device< STRREF >::resetMask

<resetMask>

Definition at line 86 of file Device.hpp.

◆ resetValue

template<typename STRREF>
uint64_t nodamushi::svd::normalized::Device< STRREF >::resetValue

<resetValue>

Definition at line 84 of file Device.hpp.

◆ series

template<typename STRREF>
STRREF nodamushi::svd::normalized::Device< STRREF >::series

<series>

Definition at line 62 of file Device.hpp.

◆ size

template<typename STRREF>
uint32_t nodamushi::svd::normalized::Device< STRREF >::size

<size>

Definition at line 78 of file Device.hpp.

◆ vendor

template<typename STRREF>
STRREF nodamushi::svd::normalized::Device< STRREF >::vendor

<vendor>

Definition at line 56 of file Device.hpp.

◆ vendorID

template<typename STRREF>
STRREF nodamushi::svd::normalized::Device< STRREF >::vendorID

<vendorID>

Definition at line 58 of file Device.hpp.

◆ version

template<typename STRREF>
STRREF nodamushi::svd::normalized::Device< STRREF >::version

<version>

Definition at line 64 of file Device.hpp.

◆ width

template<typename STRREF>
uint32_t nodamushi::svd::normalized::Device< STRREF >::width

<width>

Definition at line 76 of file Device.hpp.


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