$search
#include <sub20_ADC.h>
Classes | |
struct | OneSub20Config |
struct | Sub20_ADC_Config |
Public Member Functions | |
void | GetMeasurements (std::list< OneSub20_ADC_Meas > &, double, int *) |
Reads one measurement from all ADC Channels defined in ucADCSingleChan and uiADCDiffrChan. | |
Sub20_ADC (std::string, double, double) | |
Constructor initializes Sub20 device. | |
~Sub20_ADC () | |
Destructor closing all open connections. | |
Private Member Functions | |
double | adc_To_Volts (int, char, int, double) |
Convert raw ADC to Volts. | |
void | get_ADC_MuxCode (std::string, int *, int *, int *) |
Sets the Mux Codes for the ADC Signals. | |
void | initADC_MUX_MAP () |
Map enum to String. | |
Private Attributes | |
bool | bSubDeviceConfigured |
bool | bSubDeviceOpen |
std::string | strSerial |
std::list< OneSub20Config > | Sub20Device_list |
sub_handle | subhndl |
Definition at line 69 of file sub20_ADC.h.
Sub20_ADC::Sub20_ADC | ( | std::string | ADC_MUXCONFIG, | |
double | dRate_Hz, | |||
double | dVRef | |||
) |
Constructor initializes Sub20 device.
Detects connected Sub20 devices. Initializes the Sub20 device and configures its ADC with the specified VOltage Ref and ADC Channel Mux Codes.
bVRef | - The Voltage Reference setting - Vcc (false) or internal 2.5V (true) |
Definition at line 46 of file sub20_ADC.cpp.
Sub20_ADC::~Sub20_ADC | ( | ) |
Destructor closing all open connections.
Disables the Sub20 device. Disposes any dynamic structure in the heap.
Definition at line 126 of file sub20_ADC.cpp.
double Sub20_ADC::adc_To_Volts | ( | int | rawData, | |
char | convType, | |||
int | muxCode, | |||
double | dVRef | |||
) | [private] |
Convert raw ADC to Volts.
Definition at line 228 of file sub20_ADC.cpp.
void Sub20_ADC::get_ADC_MuxCode | ( | std::string | ADC_MUXCONFIG, | |
int * | adc_mux, | |||
int * | adc_type, | |||
int * | channels | |||
) | [private] |
Sets the Mux Codes for the ADC Signals.
Definition at line 176 of file sub20_ADC.cpp.
void Sub20_ADC::GetMeasurements | ( | std::list< OneSub20_ADC_Meas > & | list_meas, | |
double | dVRef, | |||
int * | channels | |||
) |
Reads one measurement from all ADC Channels defined in ucADCSingleChan and uiADCDiffrChan.
Iterates through all connected Sub20 devices and sends a measurement request to the respective ADCs.
&list_meas | points onto the std::list containing the connected devices | |
voltRef | - The setting for the voltage reference for the ADC channels | |
&channels | - number of channels connected |
Definition at line 255 of file sub20_ADC.cpp.
void Sub20_ADC::initADC_MUX_MAP | ( | ) | [private] |
Map enum to String.
Definition at line 143 of file sub20_ADC.cpp.
bool Sub20_ADC::bSubDeviceConfigured [private] |
Definition at line 121 of file sub20_ADC.h.
bool Sub20_ADC::bSubDeviceOpen [private] |
Definition at line 120 of file sub20_ADC.h.
std::string Sub20_ADC::strSerial [private] |
Definition at line 122 of file sub20_ADC.h.
std::list<OneSub20Config> Sub20_ADC::Sub20Device_list [private] |
Definition at line 114 of file sub20_ADC.h.
sub_handle Sub20_ADC::subhndl [private] |
Definition at line 119 of file sub20_ADC.h.