irioCoreCpp Library Module  2.1.0
irio::TerminalsAnalog Class Reference

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

#include <terminalsAnalog.h>

Inheritance diagram for irio::TerminalsAnalog:

Public Member Functions

 TerminalsAnalog (ParserManager *parserManager, const NiFpga_Session &session, const Platform &platform)
 Manages finding the related analog terminals in the parsed bitfile and reading their values from the FPGA if required. More...
 
std::int32_t getAI (const std::uint32_t n) const
 Returns the value of an AI terminal. More...
 
std::int32_t getAO (const std::uint32_t n) const
 Returns the value of an AO terminal. More...
 
std::int32_t getAOEnable (const std::uint32_t n) const
 Returns the value of an AOEnable terminal. More...
 
size_t getNumAI () const
 Returns number of AI terminals found. More...
 
size_t getNumAO () const
 Returns number of AO terminals found. More...
 
void setAO (const std::uint32_t n, const std::int32_t value) const
 Writes to a specific AO terminal a value. More...
 
void setAOEnable (const std::uint32_t n, const bool value) const
 Enables or disables a specific AO terminal. More...
 
ModulesType getModuleConnected () const
 Returns the module connected to the device. More...
 
double getCVADC () const
 Module's conversion value to Volts of analog inputs for the coupling selected. More...
 
double getCVDAC () const
 Module's conversion value from Volts for analog inputs for the coupling selected. More...
 
double getMaxValAO () const
 Module's maximum value to be written in an analog output for the coupling selected. More...
 
double getMinValAO () const
 Module's minimum value to be written in an analog output for the coupling selected. More...
 
CouplingMode getAICouplingMode () const
 Module's configured coupling mode. More...
 
void setAICouplingMode (const CouplingMode &mode) const
 Sets a new coupling mode, changing the conversion constants accordingly. 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 analog functionality of the RIO device.

Definition at line 13 of file terminalsAnalog.h.

Constructor & Destructor Documentation

◆ TerminalsAnalog()

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

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

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

◆ getAI()

std::int32_t irio::TerminalsAnalog::getAI ( const std::uint32_t  n) const

Returns the value of an AI terminal.

Exceptions
irio::errors::NiFpgaErrorError occurred in an FPGA operation
irio::errors::ResourceNotFoundErrorResource specified not found
Parameters
nNumber of the AI terminal to read
Returns
Value read from the AI terminal

◆ getAICouplingMode()

CouplingMode irio::TerminalsAnalog::getAICouplingMode ( ) const

Module's configured coupling mode.

Returns
Actual coupling mode

◆ getAO()

std::int32_t irio::TerminalsAnalog::getAO ( const std::uint32_t  n) const

Returns the value of an AO terminal.

Exceptions
irio::errors::NiFpgaErrorError occurred in an FPGA operation
irio::errors::ResourceNotFoundErrorResource specified not found
Parameters
nNumber of the AO terminal to read
Returns
Value read from the AO terminal

◆ getAOEnable()

std::int32_t irio::TerminalsAnalog::getAOEnable ( const std::uint32_t  n) const

Returns the value of an AOEnable terminal.

Exceptions
irio::errors::NiFpgaErrorError occurred in an FPGA operation
irio::errors::ResourceNotFoundErrorResource specified not found
Parameters
nNumber of the AOEnable terminal to read
Returns
Value read from the AOEnable terminal

◆ getCVADC()

double irio::TerminalsAnalog::getCVADC ( ) const

Module's conversion value to Volts of analog inputs for the coupling selected.

Returns
Constant for Conversion to Volts of analog inputs

◆ getCVDAC()

double irio::TerminalsAnalog::getCVDAC ( ) const

Module's conversion value from Volts for analog inputs for the coupling selected.

Returns
Constant for conversion from Volts for analog outputs

◆ getMaxValAO()

double irio::TerminalsAnalog::getMaxValAO ( ) const

Module's maximum value to be written in an analog output for the coupling selected.

Returns
Maximum value to be written in an analog output

◆ getMinValAO()

double irio::TerminalsAnalog::getMinValAO ( ) const

Module's minimum value to be written in an analog output for the coupling selected.

Returns
minimum value to be written in an analog output

◆ getModuleConnected()

ModulesType irio::TerminalsAnalog::getModuleConnected ( ) const

Returns the module connected to the device.

It will return a value even if there is no module connected, in this case it will be a value indicating there is no module

Returns
Module connected

◆ getNumAI()

size_t irio::TerminalsAnalog::getNumAI ( ) const

Returns number of AI terminals found.

Returns
Number of AI terminals found

◆ getNumAO()

size_t irio::TerminalsAnalog::getNumAO ( ) const

Returns number of AO terminals found.

Returns
Number of AO terminals found

◆ setAICouplingMode()

void irio::TerminalsAnalog::setAICouplingMode ( const CouplingMode mode) const

Sets a new coupling mode, changing the conversion constants accordingly.

Exceptions
irio::errors::UnsupportedAICouplingForModuleThe mode is not supported by the module
Parameters
modeNew mode to configure

◆ setAO()

void irio::TerminalsAnalog::setAO ( const std::uint32_t  n,
const std::int32_t  value 
) const

Writes to a specific AO terminal a value.

Exceptions
irio::errors::NiFpgaErrorError occurred in an FPGA operation
irio::errors::ResourceNotFoundErrorResource specified not found
Parameters
nNumber of the AO terminal to write
valueValue to write to the terminal

◆ setAOEnable()

void irio::TerminalsAnalog::setAOEnable ( const std::uint32_t  n,
const bool  value 
) const

Enables or disables a specific AO terminal.

Exceptions
irio::errors::NiFpgaErrorError occurred in an FPGA operation
irio::errors::ResourceNotFoundErrorResource specified not found
Parameters
nNumber of the AOEnable terminal to enable/disable
valuetrue for enabling the equivalent AO terminal, false to disable

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