#include "scarab_api.hh"
#include <cmath>
#include <type_traits>
Go to the source code of this file.
|
template<typename type > |
using | enable_if_signed = typename std::enable_if< std::is_signed< type >::value >::type * |
|
template<typename type > |
using | enable_if_unsigned = typename std::enable_if< std::is_unsigned< type >::value >::type * |
|
|
void | get_calib_params (unsigned n_bits, unsigned data_type_size, double v_offset, double v_range, bool bits_r_aligned, dig_calib_params *params) |
| Calculate the digitizer calibration parameters with basic parameters: number of bits, Voffset, and Vrange. More...
|
|
void | get_calib_params2 (unsigned n_bits, unsigned data_type_size, double v_offset, double v_range, double dac_gain, bool bits_r_aligned, dig_calib_params *params) |
| Calculate the digitizer calibration parameters when given the DAC gain (e.g. from a digitizer's own calibration) More...
|
|
template<typename dig_type , typename an_type > |
an_type | d2a (dig_type dig, const struct dig_calib_params *params) |
| Convert a signed or unsigned digital value to an analog value. More...
|
|
template<typename an_type , typename dig_type , enable_if_unsigned< dig_type > = nullptr> |
dig_type | a2d (an_type analog, const struct dig_calib_params *params) |
| Convert an analog value to an unsigned digital value. More...
|
|