g2: dbitpipeline

This commit is contained in:
2021-08-11 18:01:28 +02:00
parent 7a76064223
commit 9a777b13bb
16 changed files with 258 additions and 211 deletions

View File

@ -804,6 +804,7 @@ class CmdProxy {
{"parallel", &CmdProxy::parallel},
{"filterresistor", &CmdProxy::filterresistor},
{"currentsource", &CmdProxy::CurrentSource},
{"dbitpipeline", &CmdProxy::dbitpipeline},
/** temperature */
{"templist", &CmdProxy::templist},
@ -986,7 +987,6 @@ class CmdProxy {
{"dsamples", &CmdProxy::dsamples},
{"romode", &CmdProxy::romode},
{"dbitclk", &CmdProxy::dbitclk},
{"dbitpipeline", &CmdProxy::dbitpipeline},
{"v_a", &CmdProxy::v_a},
{"v_b", &CmdProxy::v_b},
{"v_c", &CmdProxy::v_c},
@ -1356,6 +1356,12 @@ class CmdProxy {
"for increasing resistance.\n\t[Gotthard2] Options: [0|1|2|3]. Default "
"is 0.\n\t[Jungfrau] Options: [0|1]. Default is 1.");
INTEGER_COMMAND_VEC_ID(dbitpipeline, getDBITPipeline, setDBITPipeline,
StringTo<int>,
"[n_value]\n\t[Ctb][Gotthard2] Pipeline of the "
"clock for latching digital bits.\n\t[Gotthard2] "
"Options: 0-7\n\t[CTB] Options: 0-255");
/** temperature */
GET_COMMAND_NOID(
templist, getTemperatureList,
@ -1994,10 +2000,6 @@ class CmdProxy {
dbitclk, getDBITClock, setDBITClock, StringTo<int>,
"[n_clk in MHz]\n\t[Ctb] Clock for latching the digital bits in MHz.");
INTEGER_COMMAND_VEC_ID(
dbitpipeline, getDBITPipeline, setDBITPipeline, StringTo<int>,
"[n_value]\n\t[Ctb] Pipeline of the clock for latching digital bits.");
INTEGER_IND_COMMAND(v_a, getVoltage, setVoltage, StringTo<int>,
defs::V_POWER_A,
"[n_value]\n\t[Ctb] Voltage supply a in mV.");

View File

@ -715,6 +715,15 @@ Detector::getCurrentSource(Positions pos) const {
void Detector::setCurrentSource(defs::currentSrcParameters par, Positions pos) {
pimpl->Parallel(&Module::setCurrentSource, pos, par);
}
Result<int> Detector::getDBITPipeline(Positions pos) const {
return pimpl->Parallel(&Module::getDBITPipeline, pos);
}
void Detector::setDBITPipeline(int value, Positions pos) {
pimpl->Parallel(&Module::setDBITPipeline, pos, value);
}
// Acquisition
void Detector::acquire() { pimpl->acquire(); }
@ -1806,15 +1815,11 @@ Result<int> Detector::getSYNCClock(Positions pos) const {
}
Result<int> Detector::getADCPipeline(Positions pos) const {
return pimpl->Parallel(&Module::getPipeline, pos, defs::ADC_CLOCK);
return pimpl->Parallel(&Module::getADCPipeline, pos);
}
void Detector::setADCPipeline(int value, Positions pos) {
pimpl->Parallel(&Module::setPipeline, pos, defs::ADC_CLOCK, value);
}
Result<int> Detector::getDBITPipeline(Positions pos) const {
return pimpl->Parallel(&Module::getPipeline, pos, defs::DBIT_CLOCK);
pimpl->Parallel(&Module::setADCPipeline, pos, value);
}
Result<int> Detector::getVoltage(defs::dacIndex index, Positions pos) const {
@ -1894,10 +1899,6 @@ void Detector::setDBITClock(int value_in_MHz, Positions pos) {
value_in_MHz);
}
void Detector::setDBITPipeline(int value, Positions pos) {
pimpl->Parallel(&Module::setPipeline, pos, defs::DBIT_CLOCK, value);
}
Result<int> Detector::getMeasuredVoltage(defs::dacIndex index,
Positions pos) const {
switch (index) {

View File

@ -720,6 +720,14 @@ void Module::setCurrentSource(defs::currentSrcParameters par) {
sendToDetector(F_SET_CURRENT_SOURCE, par, nullptr);
}
int Module::getDBITPipeline() const {
return sendToDetector<int>(F_GET_DBIT_PIPELINE);
}
void Module::setDBITPipeline(int value) {
sendToDetector(F_SET_DBIT_PIPELINE, value, nullptr);
}
// Acquisition
void Module::startReceiver() {
@ -2107,13 +2115,12 @@ void Module::setNumberOfAnalogSamples(int value) {
}
}
int Module::getPipeline(int clkIndex) const {
return sendToDetector<int>(F_GET_PIPELINE, clkIndex);
int Module::getADCPipeline() const {
return sendToDetector<int>(F_GET_ADC_PIPELINE);
}
void Module::setPipeline(int clkIndex, int value) {
int args[]{clkIndex, value};
sendToDetector(F_SET_PIPELINE, args, nullptr);
void Module::setADCPipeline(int value) {
sendToDetector(F_SET_ADC_PIPELINE, value, nullptr);
}
uint32_t Module::getADCEnableMask() const {

View File

@ -174,6 +174,9 @@ class Module : public virtual slsDetectorDefs {
void setFilterResistor(int value);
defs::currentSrcParameters getCurrentSource() const;
void setCurrentSource(defs::currentSrcParameters par);
int getDBITPipeline() const;
void setDBITPipeline(int value);
/**************************************************
* *
* Acquisition *
@ -454,8 +457,8 @@ class Module : public virtual slsDetectorDefs {
* ************************************************/
int getNumberOfAnalogSamples() const;
void setNumberOfAnalogSamples(int value);
int getPipeline(int clkIndex) const;
void setPipeline(int clkIndex, int value);
int getADCPipeline() const;
void setADCPipeline(int value);
uint32_t getADCEnableMask() const;
void setADCEnableMask(uint32_t mask);
uint32_t getTenGigaADCEnableMask() const;