irioCoreCpp Library Module  2.1.0
irio::TerminalsSignalGeneration Class Reference

Class managing all terminals related to the signal generation functionality of the RIO device. More...

#include <terminalsSignalGeneration.h>

Inheritance diagram for irio::TerminalsSignalGeneration:

Public Member Functions

 TerminalsSignalGeneration (ParserManager *parserManager, const NiFpga_Session &session, const Platform &platform)
 Manages finding the related signal generation terminals in the parsed bitfile and reading their values from the FPGA if required. More...
 
std::uint8_t getSGNo () const
 Returns the number of signal generators in the FPGA implementation. More...
 
std::uint32_t getSGFref (const std::uint32_t n) const
 Returns the reference clock for a specified signal generator. More...
 
std::vector< std::uint32_t > getVectorSGFrefs () const
 Returns a vector with the reference clocks for all the signal generators in the system. More...
 
std::uint8_t getSGSignalType (const std::uint32_t n) const
 Returns the signal type generated for a specific signal generator. More...
 
std::uint32_t getSGAmp (const std::uint32_t n) const
 Returns the amplitude of the signal for a specific signal generator. More...
 
std::uint32_t getSGFreq (const std::uint32_t n) const
 Returns the frequency of the signal for a specific signal generator. More...
 
std::uint32_t getSGPhase (const std::uint32_t n) const
 Returns the phase of the signal for a specific signal generator. More...
 
std::uint32_t getSGUpdateRate (const std::uint32_t n) const
 Returns the update rate of a specific signal generator. More...
 
void setSGSignalType (const std::uint32_t n, const std::uint8_t value) const
 Configures the signal type for a specific signal generator. More...
 
void setSGAmp (const std::uint32_t n, const std::uint32_t value) const
 Configures the amplitude for a specific signal generator. More...
 
void setSGFreqDecimation (const std::uint32_t n, const std::uint32_t value) const
 Configures the decimation to apply to a specific signal generator. More...
 
void setSGPhase (const std::uint32_t n, const std::uint32_t value) const
 Configures the phase for a specific signal generator. More...
 
void setSGUpdateRateDecimation (const std::uint32_t n, const std::uint32_t value) const
 Configures the update rate decimation for a specific signal generator. 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 all terminals related to the signal generation functionality of the RIO device.

Definition at line 14 of file terminalsSignalGeneration.h.

Constructor & Destructor Documentation

◆ TerminalsSignalGeneration()

irio::TerminalsSignalGeneration::TerminalsSignalGeneration ( ParserManager parserManager,
const NiFpga_Session &  session,
const Platform platform 
)

Manages finding the related signal generation terminals in the parsed bitfile and reading their values from the FPGA if required.

Exceptions
irio::errors::NiFpgaErrorError occurred in an FPGA operation
Parameters
parserManagerPointer to class managing parsing the bitfile and finding its resources
sessionNiFpga_Session to be used in NiFpga related functions
platformPlatform that is using the terminals. Used to know the maximum number of terminals that can be found.

Member Function Documentation

◆ getSGAmp()

std::uint32_t irio::TerminalsSignalGeneration::getSGAmp ( const std::uint32_t  n) const

Returns the amplitude of the signal for a specific signal generator.

Exceptions
irio::errors::NiFpgaErrorError occurred in an FPGA operation
irio::errors::ResourceNotFoundErrorResource specified not found
Parameters
nNumber of the signal generator
Returns
Amplitude of the signal for the specified signal generator

◆ getSGFref()

std::uint32_t irio::TerminalsSignalGeneration::getSGFref ( const std::uint32_t  n) const

Returns the reference clock for a specified signal generator.

Exceptions
irio::errors::ResourceNotFoundErrorThe specified signal generator does not exists
Parameters
nNumber of the signal generator
Returns
Reference clock for sampling rate for the specified signal generator

◆ getSGFreq()

std::uint32_t irio::TerminalsSignalGeneration::getSGFreq ( const std::uint32_t  n) const

Returns the frequency of the signal for a specific signal generator.

Exceptions
irio::errors::NiFpgaErrorError occurred in an FPGA operation
irio::errors::ResourceNotFoundErrorResource specified not found
Parameters
nNumber of the signal generator
Returns
Frequency of the signal for the specified signal generator

◆ getSGNo()

std::uint8_t irio::TerminalsSignalGeneration::getSGNo ( ) const

Returns the number of signal generators in the FPGA implementation.

Returns
Number of signal generators implemented

◆ getSGPhase()

std::uint32_t irio::TerminalsSignalGeneration::getSGPhase ( const std::uint32_t  n) const

Returns the phase of the signal for a specific signal generator.

Exceptions
irio::errors::NiFpgaErrorError occurred in an FPGA operation
irio::errors::ResourceNotFoundErrorResource specified not found
Parameters
nNumber of the signal generator
Returns
Phase of the signal for the specified signal generator

◆ getSGSignalType()

std::uint8_t irio::TerminalsSignalGeneration::getSGSignalType ( const std::uint32_t  n) const

Returns the signal type generated for a specific signal generator.

Exceptions
irio::errors::NiFpgaErrorError occurred in an FPGA operation
irio::errors::ResourceNotFoundErrorResource specified not found
Parameters
nNumber of the signal generator
Returns
Type of the signal for the specified signal generator

◆ getSGUpdateRate()

std::uint32_t irio::TerminalsSignalGeneration::getSGUpdateRate ( const std::uint32_t  n) const

Returns the update rate of a specific signal generator.

Exceptions
irio::errors::NiFpgaErrorError occurred in an FPGA operation
irio::errors::ResourceNotFoundErrorResource specified not found
Parameters
nNumber of the signal generator
Returns
Update rate of the specified signal generator

◆ getVectorSGFrefs()

std::vector<std::uint32_t> irio::TerminalsSignalGeneration::getVectorSGFrefs ( ) const

Returns a vector with the reference clocks for all the signal generators in the system.

Returns
Vector with reference clocks in ascending order of terminal number

◆ setSGAmp()

void irio::TerminalsSignalGeneration::setSGAmp ( const std::uint32_t  n,
const std::uint32_t  value 
) const

Configures the amplitude for a specific signal generator.

Exceptions
irio::errors::NiFpgaErrorError occurred in an FPGA operation
irio::errors::ResourceNotFoundErrorResource specified not found
Parameters
nNumber of the signal generator
valueAmplitude to configure

◆ setSGFreqDecimation()

void irio::TerminalsSignalGeneration::setSGFreqDecimation ( const std::uint32_t  n,
const std::uint32_t  value 
) const

Configures the decimation to apply to a specific signal generator.

Exceptions
irio::errors::NiFpgaErrorError occurred in an FPGA operation
irio::errors::ResourceNotFoundErrorResource specified not found
Parameters
nNumber of the signal generator
valueDecimation to configure

◆ setSGPhase()

void irio::TerminalsSignalGeneration::setSGPhase ( const std::uint32_t  n,
const std::uint32_t  value 
) const

Configures the phase for a specific signal generator.

Exceptions
irio::errors::NiFpgaErrorError occurred in an FPGA operation
irio::errors::ResourceNotFoundErrorResource specified not found
Parameters
nNumber of the signal generator
valuePhase to configure

◆ setSGSignalType()

void irio::TerminalsSignalGeneration::setSGSignalType ( const std::uint32_t  n,
const std::uint8_t  value 
) const

Configures the signal type for a specific signal generator.

Exceptions
irio::errors::NiFpgaErrorError occurred in an FPGA operation
irio::errors::ResourceNotFoundErrorResource specified not found
Parameters
nNumber of the signal generator
valueSignal type to configure

◆ setSGUpdateRateDecimation()

void irio::TerminalsSignalGeneration::setSGUpdateRateDecimation ( const std::uint32_t  n,
const std::uint32_t  value 
) const

Configures the update rate decimation for a specific signal generator.

The update rate configured can be calculated as Fref/value

Exceptions
irio::errors::NiFpgaErrorError occurred in an FPGA operation
irio::errors::ResourceNotFoundErrorResource specified not found
Parameters
nNumber of the signal generator
valueDecimation to configure

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