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

Class holding information about one resource (Register or DMA) More...

#include <resource.h>

Inheritance diagram for irio::bfp::Resource:

Public Member Functions

 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...
 

Private Attributes

std::string name = ""
 Name of the resource.
 
FpgaTypes fpgaType = FpgaTypes::FpgaType_Control
 FPGA type of the resource.
 
ElemTypes elemType = ElemTypes::Bool
 Element type of the resource.
 
std::uint32_t address = 0
 Address of the resource (including the base address)
 
size_t numElem = 0
 Number of elements of the resource.
 

Detailed Description

Class holding information about one resource (Register or DMA)

Definition at line 16 of file resource.h.

Constructor & Destructor Documentation

◆ Resource()

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.

Parameters
_nameResource name
_fpgaTypeFPGA type (Control, Indicator, ArrayControl, ArrayIndicator, DMATtH, DMAHtT)
_elemTypeElement type
_addressAddress used to refer to the Resource. If Register then a device address, if DMA, its number
_numElemNumber of elements of the Resource

Member Function Documentation

◆ getAddress()

std::uint32_t irio::bfp::Resource::getAddress ( ) const

Gets the address of the resource.

Returns
The address of the resource.

◆ getElemType()

ElemTypes irio::bfp::Resource::getElemType ( ) const

Gets the element type of the resource.

Returns
The element type of the resource.

◆ getFpgaType()

FpgaTypes irio::bfp::Resource::getFpgaType ( ) const

Gets the FPGA type of the resource.

Returns
The FPGA type of the resource.

◆ getName()

const std::string& irio::bfp::Resource::getName ( ) const

Gets the name of the resource.

Returns
The name of the resource.

◆ getNumElem()

size_t irio::bfp::Resource::getNumElem ( ) const

Gets the number of elements of the resource.

Returns
The number of elements of the resource.

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