irioCoreCpp Library Module  2.1.0
irio::bfp::Register Class Reference

Class holding information about one Register. More...

#include <register.h>

Inheritance diagram for irio::bfp::Register:

Public Member Functions

 Register (const std::string &_name, const FpgaTypes &_fpgaType, const ElemTypes &_elemType, const std::uint32_t &_address, const size_t &_numElem=1)
 Creates a Register object with its relevant information. More...
 
bool isControl () const
 Returns if the register is a control. More...
 
bool isIndicator () const
 Returns if the register is an indicator. More...
 
bool isArray () const
 Returns if the register is an array. More...
 
- Public Member Functions inherited from irio::bfp::Resource
 Resource (const std::string &_name, const FpgaTypes &_fpgaType, const ElemTypes &_elemType, const std::uint32_t &_address, const size_t &_numElem=1)
 Stores information about the resource. More...
 
std::uint32_t getAddress () const
 Gets the address of the resource. More...
 
ElemTypes getElemType () const
 Gets the element type of the resource. More...
 
FpgaTypes getFpgaType () const
 Gets the FPGA type of the resource. More...
 
const std::string & getName () const
 Gets the name of the resource. More...
 
size_t getNumElem () const
 Gets the number of elements of the resource. More...
 

Static Public Member Functions

static Register processRegister (const pugi::xml_node &registerNode, const std::uint32_t &baseAddress)
 Creates a Register object from an XML node. More...
 

Private Attributes

bool m_isControl = false
 Indicates whether the register is a control or an indicator.
 
bool m_isArray = false
 Indicates whether the register is an array or not.
 

Detailed Description

Class holding information about one Register.

Definition at line 16 of file register.h.

Constructor & Destructor Documentation

◆ Register()

irio::bfp::Register::Register ( const std::string &  _name,
const FpgaTypes _fpgaType,
const ElemTypes _elemType,
const std::uint32_t &  _address,
const size_t &  _numElem = 1 
)

Creates a Register object with its relevant information.

Parameters
_nameName of the register
_fpgaTypeFPGA register type
_elemTypeType of the element of the register
_addressAddress of the register
_numElemNumber of elements of the register (Default:1)

Member Function Documentation

◆ isArray()

bool irio::bfp::Register::isArray ( ) const

Returns if the register is an array.

Returns
true if it is an array

◆ isControl()

bool irio::bfp::Register::isControl ( ) const

Returns if the register is a control.

Returns
true if it is a control

◆ isIndicator()

bool irio::bfp::Register::isIndicator ( ) const

Returns if the register is an indicator.

Returns
true if it is an indicator

◆ processRegister()

static Register irio::bfp::Register::processRegister ( const pugi::xml_node &  registerNode,
const std::uint32_t &  baseAddress 
)
static

Creates a Register object from an XML node.

Parameters
registerNodeXML node with the info of the Register
baseAddressBase address of the device. Needed for calculating the actual address of the Register
Returns
Register constructed with the information in the XML

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