Public Member Functions | |
virtual | ~QEleConverter () |
destructor | |
void | SetExternalBias (float bias) |
set external bias voltage (in Volts) | |
float | GetExternalBias () const |
get external bias voltage (in Volts) | |
int | GetBinaryBias (float realBias) const |
convert bias from volts to bits | |
float | GetRealBias (unsigned int binaryBias) const |
convert bias from bits to volts | |
int | GetBinaryGain (float realGain) const |
convert gain to bitwise format | |
float | GetRealGain (unsigned int binaryGain) const |
convert gain from bits to pure number | |
int | GetBinaryResistance (float realResistance) const |
convert load resistance to bitwise format | |
float | GetRealResistance (unsigned int binaryResistance) const |
convert load resistance from bits to GOhm | |
float | GetRealCutFrequency (unsigned int binaryCutFreq) const |
convert bessel cut frequency from bits to Hz | |
float | GetRealOffset (const unsigned int dacLow, const unsigned int dacHi, const bool polarity, const bool sBit) const |
get offset voltage | |
Static Public Member Functions | |
static QEleConverter & | GetInstance () |
singleton getter | |
Private Attributes | |
float | fExternalBias |
overall bias voltage. Thermistor bias voltage is obtained as an attenuation of this value | |
std::map< unsigned int, float > | fBinaryBiasMap |
std::map< unsigned int, float > | fBinaryGainMap |
std::map< unsigned int, float > | fBinaryResistanceMap |
std::map< unsigned int, float > | fBinaryCutFreq |
std::map< float, unsigned int > | fRealBiasMap |
std::map< float, unsigned int > | fRealGainMap |
std::map< float, unsigned int > | fRealResistanceMap |
int QEleConverter::GetBinaryBias | ( | float | realBias | ) | const |
convert bias from volts to bits
realBias | bias voltage in Volts |
References fExternalBias.
Referenced by MLCSlowController::GetInitParameters(), and QGEChannelFrame::ReadChannel().
float QEleConverter::GetRealBias | ( | unsigned int | binaryBias | ) | const |
convert bias from bits to volts
References fExternalBias.
Referenced by MLCSlowController::GetInitParameters(), QEleChannelConfig::GetRealBias(), MWPSlowController::Init(), and QGEChannelFrame::ShowChannel().
int QEleConverter::GetBinaryGain | ( | float | realGain | ) | const |
convert gain to bitwise format
Referenced by MLCSlowController::GetInitParameters(), and QGEChannelFrame::ReadChannel().
float QEleConverter::GetRealGain | ( | unsigned int | binaryGain | ) | const |
convert gain from bits to pure number
Referenced by MLCSlowController::GetInitParameters(), QEleChannelConfig::GetRealGain(), MWPSlowController::Init(), and QGEChannelFrame::ShowChannel().
int QEleConverter::GetBinaryResistance | ( | float | realResistance | ) | const |
convert load resistance to bitwise format
realResistance | load resistance in GOhm (allowed 10.86 or 54) |
Referenced by MLCSlowController::GetInitParameters().
float QEleConverter::GetRealResistance | ( | unsigned int | binaryResistance | ) | const |
convert load resistance from bits to GOhm
Referenced by MLCSlowController::GetInitParameters(), QEleChannelConfig::GetRealLoadResistance(), and MWPSlowController::Init().
float QEleConverter::GetRealCutFrequency | ( | unsigned int | binaryCutFreq | ) | const |
convert bessel cut frequency from bits to Hz
float QEleConverter::GetRealOffset | ( | const unsigned int | dacLow, | |
const unsigned int | dacHi, | |||
const bool | polarity, | |||
const bool | sBit | |||
) | const |
get offset voltage
dacLow | dac low bits (0..4095) | |
dacHi | dac hi bits (0..3) | |
polarity | offset polarity (false = neg, true=pos) | |
sBit | special bit |
Referenced by QEleChannelConfig::GetRealOffset().