irioCoreCpp Library Module  2.1.0
resource.h
1 #pragma once
2 
3 #include <string>
4 
5 #include "fpgatypes.h"
6 #include "elemtypes.h"
7 
8 namespace irio {
9 namespace bfp {
10 
16 class Resource {
17  public:
27  Resource(const std::string &_name, const FpgaTypes &_fpgaType,
28  const ElemTypes &_elemType, const std::uint32_t &_address,
29  const size_t &_numElem = 1);
30 
31  Resource() = default;
32 
38  std::uint32_t getAddress() const;
39 
46 
53 
59  const std::string &getName() const;
60 
66  size_t getNumElem() const;
67 
68  private:
70  std::string name = "";
76  std::uint32_t address = 0;
78  size_t numElem = 0;
79 };
80 } // namespace bfp
81 } // namespace irio
Class holding information about one resource (Register or DMA)
Definition: resource.h:16
size_t numElem
Number of elements of the resource.
Definition: resource.h:78
size_t getNumElem() const
Gets the number of elements of the resource.
const std::string & getName() const
Gets the name of the resource.
FpgaTypes getFpgaType() const
Gets the FPGA type of the 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.
ElemTypes elemType
Element type of the resource.
Definition: resource.h:74
std::uint32_t address
Address of the resource (including the base address)
Definition: resource.h:76
std::string name
Name of the resource.
Definition: resource.h:70
FpgaTypes fpgaType
FPGA type of the resource.
Definition: resource.h:72
std::uint32_t getAddress() const
Gets the address of the resource.
ElemTypes getElemType() const
Gets the element type of the resource.
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
@ FpgaType_Control
FpgaType_Control.