![]() |
Scarab
v2.4.7
Project 8 C++ Utility Library
|
Collection of parameters used for converting between analog and digital data. More...
#include <digital.hh>
Public Attributes | |
unsigned | bit_depth |
unsigned | levels |
unsigned | data_type_size |
double | v_range |
double | v_offset |
double | inv_levels |
double | inv_v_range |
double | dac_gain |
bool | bits_right_aligned |
Collection of parameters used for converting between analog and digital data.
Typically this struct is filled in with one of the get_calib_params functions.
Notes on parameters that are typically specified by the user:
bit_depth | The number of bits used by the digitized data (<= to the size of the data type) |
data_type_size | The size of the digitized data type in bytes |
v_range | The voltage range covered by the digitization |
v_offset | The voltage offset for the measurement. The specific meaning of this depends on whether you're recording your data as variations about some middle point, or as positive variations above a pedestal. In the former case, it's assumed (by how the a2d function is setup) that you'll be using a signed datatype for the digitized data. In the latter case, it's assumed that you'll be using an unsigned datatype. |
bits_right_aligned | Whether the bits within the data type are right aligned or left-aligned |
dac_gain | Some digitizers libraries provide the DAC gain that should be used for reconstructing analog values. |
Definition at line 43 of file digital.hh.
unsigned bit_depth |
Definition at line 45 of file digital.hh.
bool bits_right_aligned |
Definition at line 53 of file digital.hh.
double dac_gain |
Definition at line 52 of file digital.hh.
unsigned data_type_size |
Definition at line 47 of file digital.hh.
double inv_levels |
Definition at line 50 of file digital.hh.
double inv_v_range |
Definition at line 51 of file digital.hh.
unsigned levels |
Definition at line 46 of file digital.hh.
double v_offset |
Definition at line 49 of file digital.hh.
double v_range |
Definition at line 48 of file digital.hh.