irioCoreCpp Library Module  2.1.0
register.h
1 #pragma once
2 
3 #include <string>
4 
5 #include "resource.h"
6 #include <pugixml.hpp>
7 
8 namespace irio {
9 namespace bfp {
10 
16 class Register: public Resource {
17  public:
27  Register(const std::string &_name, const FpgaTypes &_fpgaType,
28  const ElemTypes &_elemType, const std::uint32_t &_address,
29  const size_t &_numElem = 1);
30 
31  Register() = default;
32 
40  static Register processRegister(const pugi::xml_node &registerNode,
41  const std::uint32_t &baseAddress);
42 
47  bool isControl() const;
48 
53  bool isIndicator() const;
54 
59  bool isArray() const;
60 
61  private:
63  bool m_isControl = false;
65  bool m_isArray = false;
66 };
67 } // namespace bfp
68 } // namespace irio
Class holding information about one Register.
Definition: register.h:16
bool isIndicator() const
Returns if the register is an indicator.
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.
bool m_isControl
Indicates whether the register is a control or an indicator.
Definition: register.h:63
bool m_isArray
Indicates whether the register is an array or not.
Definition: register.h:65
bool isArray() const
Returns if the register is an array.
static Register processRegister(const pugi::xml_node &registerNode, const std::uint32_t &baseAddress)
Creates a Register object from an XML node.
bool isControl() const
Returns if the register is a control.
Class holding information about one resource (Register or DMA)
Definition: resource.h:16
ElemTypes
Supported types for the elements of the different Resources in the Bitfile.
Definition: elemtypes.h:13
FpgaTypes
Type of Resource possible in the Bitfile.
Definition: fpgatypes.h:11