irioCoreCpp Library Module  2.1.0
irio::TerminalsDMADAQ Class Reference

Class managing the terminals used for DMA DAQ operations. More...

#include <terminalsDMADAQ.h>

Inheritance diagram for irio::TerminalsDMADAQ:

Public Member Functions

 TerminalsDMADAQ (std::shared_ptr< TerminalsDMADAQImpl > impl)
 Manages finding DMA DAQ resources. More...
 
std::uint16_t getLengthBlock (const std::uint32_t &n) const
 Returns the block length of a specific DMA group. More...
 
std::uint16_t getSamplingRateDecimation (const std::uint32_t &n) const
 Returns the decimation of a specific DMA group. More...
 
void setSamplingRateDecimation (const std::uint32_t &n, const std::uint16_t &decimation) const
 Configures the sampling rate for a specific DMA group. More...
 
- Public Member Functions inherited from irio::TerminalsDMACommon
 TerminalsDMACommon (std::shared_ptr< TerminalsDMACommonImpl > impl)
 Manages finding DMA resources common to all terminals that use them, DAQ/IMAQ. More...
 
std::uint16_t getNCh (const std::uint32_t n) const
 Returns number of channels in specific DMA. More...
 
bool getDMAOverflow (const std::uint16_t n) const
 Returns the FPGA DMA Overflow register of a specific DMA. More...
 
std::uint16_t getAllDMAOverflows () const
 Returns the FPGA DMA Overflow register. More...
 
FrameType getFrameType (const std::uint32_t n) const
 Return the type of frame used in a specific DMA. More...
 
std::vector< FrameType > getAllFrameType () const
 Returns a vector of the frame types used by each DMA in the FPGA. More...
 
std::uint8_t getSampleSize (const std::uint32_t n) const
 Returns the sample size of each data for a specific DMA. More...
 
std::vector< std::uint8_t > getAllSampleSizes () const
 Returns a vector of sample sizes used by each DMA in the FPGA. More...
 
void startDMA (const std::uint32_t n) const
 Configure a specified DMA, start it and clean its contents. More...
 
void startAllDMAs () const
 Configures and starts all DMAs in the FPGA. More...
 
void stopDMA (const std::uint32_t n) const
 Stops the specified DMA group. More...
 
void stopAllDMAs () const
 Stops all DMAs in the FPGA. More...
 
void cleanDMA (const std::uint32_t n) const
 Cleans the contents of a specified DMA group. More...
 
void cleanAllDMAs () const
 Cleans the contents of all DMAs in the FPGA. More...
 
bool isDMAEnable (const std::uint32_t n) const
 Returns if a DMA group is enabled or not. More...
 
void enableDMA (const std::uint32_t n) const
 Enables a DMA group. More...
 
void disableDMA (const std::uint32_t n) const
 Disables a DMA group. More...
 
void enaDisDMA (const std::uint32_t n, bool enaDis) const
 Enables or disables a DMA group. More...
 
size_t readDataNonBlocking (const std::uint32_t n, const size_t elementsToRead, std::uint64_t *data) const
 Tries to read an specified number of elements from a DMA group. More...
 
size_t readDataBlocking (const std::uint32_t n, const size_t elementsToRead, std::uint64_t *data, const std::uint32_t timeout=0) const
 Waits to read an specified number of elements from a DMA group. More...
 
size_t readData (const std::uint32_t n, const size_t elementsToRead, std::uint64_t *data, const bool blockRead, const std::uint32_t timeout=0) const
 Reads an specified number of elements from a DMA group. More...
 
size_t countDMAs () const
 Returns the number of DMAs found. More...
 
- Public Member Functions inherited from irio::TerminalsBase
 TerminalsBase (std::shared_ptr< TerminalsBaseImpl > impl)
 Base class used for terminals. More...
 

Additional Inherited Members

- Protected Attributes inherited from irio::TerminalsBase
std::shared_ptr< TerminalsBaseImpl > m_impl
 Smart pointer with the terminal implementation.
 

Detailed Description

Class managing the terminals used for DMA DAQ operations.

Definition at line 16 of file terminalsDMADAQ.h.

Constructor & Destructor Documentation

◆ TerminalsDMADAQ()

irio::TerminalsDMADAQ::TerminalsDMADAQ ( std::shared_ptr< TerminalsDMADAQImpl >  impl)
explicit

Manages finding DMA DAQ resources.

Exceptions
irio::errors::NiFpgaErrorError reading resources from the FPGA
Parameters
implShared pointer to the class that implements the functionality

Member Function Documentation

◆ getLengthBlock()

std::uint16_t irio::TerminalsDMADAQ::getLengthBlock ( const std::uint32_t &  n) const

Returns the block length of a specific DMA group.

Exceptions
irio::errors::ResourceNotFoundErrorResource specified not found
Parameters
nNumber of DMA group
Returns
Length of the block used in the specified DMA group

◆ getSamplingRateDecimation()

std::uint16_t irio::TerminalsDMADAQ::getSamplingRateDecimation ( const std::uint32_t &  n) const

Returns the decimation of a specific DMA group.

The sampling rate configured can be calculated as Fref/decimation

Exceptions
irio::errors::ResourceNotFoundErrorResource specified not found
irio::errors::NiFpgaErrorError occurred in an FPGA operation
Parameters
nNumber of DMA group
Returns
Decimation used in the specified DMA group

◆ setSamplingRateDecimation()

void irio::TerminalsDMADAQ::setSamplingRateDecimation ( const std::uint32_t &  n,
const std::uint16_t &  decimation 
) const

Configures the sampling rate for a specific DMA group.

The sampling rate is configured by a decimation factor. The sampling rate configured is calculated as Fref/decimation

Exceptions
irio::errors::ResourceNotFoundErrorResource specified not found
irio::errors::NiFpgaErrorError occurred in an FPGA operation
Parameters
nNumber of DMA group
decimationDecimation to apply to the Fref

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