nidas v1.2.3
|
Support for the D2A device on a Diamond DMMAT card. More...
#include <DSC_AnalogOut.h>
Public Member Functions | |
DSC_AnalogOut () | |
~DSC_AnalogOut () | |
void | setDeviceName (const std::string &val) |
const std::string & | getDeviceName () const |
const std::string & | getName () const |
int | getFd () const |
void | open () |
Open the D2A. | |
void | close () |
Close the D2A. | |
int | getNumOutputs () const |
Return number of VOUT pins on this device. | |
float | getMinVoltage (int i) const |
Return the minimum setable voltage of an output. | |
float | getMaxVoltage (int i) const |
Return the maximum setable voltage of an output. | |
void | setVoltage (int which, float val) |
Set a voltage on an output. | |
void | setVoltages (const std::vector< int > &which, const std::vector< float > &val) |
Set one or more outputs. | |
void | clearVoltages () |
Private Attributes | |
std::string | _devName |
int | _fd |
The file descriptor of this device. | |
int | _noutputs |
How many VOUT pins are on this device? | |
struct DMMAT_D2A_Conversion | _conv |
Linear parameters for converting a voltage to an integer count, which is sent to the device. | |
Support for the D2A device on a Diamond DMMAT card.
DSC_AnalogOut::DSC_AnalogOut | ( | ) |
void DSC_AnalogOut::clearVoltages | ( | ) |
References _devName, _fd, _noutputs, DMMAT_D2A_SET, and nidas::core::getSample().
Referenced by nidas::dynld::DSC_A2DSensor::~DSC_A2DSensor().
void DSC_AnalogOut::close | ( | ) |
Close the D2A.
nidas::util::IOException |
Referenced by close(), nidas::dynld::DSC_A2DSensor::~DSC_A2DSensor(), and ~DSC_AnalogOut().
|
inline |
References _devName.
Return the maximum setable voltage of an output.
References _conv, _noutputs, and nidas::core::getSample().
Return the minimum setable voltage of an output.
References _conv, _noutputs, and nidas::core::getSample().
|
inline |
References _devName.
Referenced by setVoltages().
|
inline |
Return number of VOUT pins on this device.
Value will be 0 if the device has not been opened, or -1 if the open failed.
References _noutputs.
Referenced by nidas::dynld::raf::CVIProcessor::attachLVInput().
void DSC_AnalogOut::open | ( | ) |
Open the D2A.
nidas::util::IOException |
References _conv, _devName, _fd, _noutputs, DMMAT_D2A_GET_CONVERSION, DMMAT_D2A_GET_NOUTPUTS, and open().
Referenced by nidas::dynld::raf::CVIProcessor::attachLVInput(), and open().
References _devName, and nidas::core::getSample().
Referenced by nidas::dynld::raf::CVIProcessor::attachLVInput().
Set a voltage on an output.
which | Which VOUT pin, numbered from 0. |
val | Desired voltage value. If val is outside the known limit of the D2A, the request will be changed to the corresponding limit value. Throws nidas::util::InvalidParameterException if "which" is out of range. |
References nidas::core::getSample(), and setVoltages().
void DSC_AnalogOut::setVoltages | ( | const std::vector< int > & | which, |
const std::vector< float > & | val ) |
Set one or more outputs.
which | Vector of VOUT pin numbers, numbered from 0. |
val | Desired voltage values. If a val is outside the known limit of the D2A, the request will be changed to the corresponding limit value. Throws nidas::util::InvalidParameterException if "which" is out of range. |
References _conv, _devName, _fd, _noutputs, DMMAT_D2A_SET, getName(), and nidas::core::getSample().
Referenced by setVoltage().
|
private |
Linear parameters for converting a voltage to an integer count, which is sent to the device.
Referenced by getMaxVoltage(), getMinVoltage(), open(), and setVoltages().
|
private |
Referenced by clearVoltages(), getDeviceName(), getName(), open(), setDeviceName(), and setVoltages().
|
private |
The file descriptor of this device.
Referenced by clearVoltages(), close(), getFd(), open(), setVoltages(), and ~DSC_AnalogOut().
|
private |
How many VOUT pins are on this device?
Referenced by clearVoltages(), getMaxVoltage(), getMinVoltage(), getNumOutputs(), open(), and setVoltages().