mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-20 16:48:01 +02:00
Defaultdacs (#214)
This commit is contained in:
@ -826,6 +826,7 @@ class CmdProxy {
|
||||
{"dac", &CmdProxy::Dac},
|
||||
{"daclist", &CmdProxy::daclist},
|
||||
{"dacvalues", &CmdProxy::DacValues},
|
||||
{"defaultdacs", &CmdProxy::defaultdacs},
|
||||
|
||||
/* on chip dacs */
|
||||
{"vchip_comp_fe", &CmdProxy::vchip_comp_fe},
|
||||
@ -1211,7 +1212,8 @@ class CmdProxy {
|
||||
"\n\t[Moench] - [g1_hg | g1_lg | g2_hc_hg | g2_hc_lg | "
|
||||
"g2_lc_hg | g2_lc_lg | g4_hg | g4_lg]"
|
||||
"\n\t[Eiger] Use threshold or thresholdnotb. \n\t[Eiger] "
|
||||
"settings loaded from file found in settingspath.");
|
||||
"settings loaded from file found in settingspath. \n\t[Gotthard] Also "
|
||||
"loads default dacs on to the detector.");
|
||||
|
||||
EXECUTE_SET_COMMAND_1ARG(
|
||||
trimbits, loadTrimbits,
|
||||
@ -1378,6 +1380,10 @@ class CmdProxy {
|
||||
daclist, getDacList,
|
||||
"\n\tGets the list of commands for every dac for this detector.");
|
||||
|
||||
EXECUTE_SET_COMMAND(defaultdacs, setDefaultDacs,
|
||||
"\n\t[Eiger][Jungfrau][Gotthard][Moench][Gotthard2]["
|
||||
"Mythen3]Sets default dacs on to the detector.");
|
||||
|
||||
/* on chip dacs */
|
||||
INTEGER_USER_IND_COMMAND(
|
||||
vchip_comp_fe, getOnChipDAC, setOnChipDAC, StringTo<int>,
|
||||
|
@ -542,6 +542,10 @@ std::vector<defs::dacIndex> Detector::getDacList() const {
|
||||
return retval;
|
||||
}
|
||||
|
||||
void Detector::setDefaultDacs(Positions pos) {
|
||||
pimpl->Parallel(&Module::setDefaultDacs, pos);
|
||||
}
|
||||
|
||||
Result<int> Detector::getDAC(defs::dacIndex index, bool mV,
|
||||
Positions pos) const {
|
||||
return pimpl->Parallel(&Module::getDAC, pos, index, mV);
|
||||
|
@ -1,6 +1,6 @@
|
||||
#include "Module.h"
|
||||
#include "sls/ClientSocket.h"
|
||||
#include "SharedMemory.h"
|
||||
#include "sls/ClientSocket.h"
|
||||
#include "sls/ToString.h"
|
||||
#include "sls/container_utils.h"
|
||||
#include "sls/file_utils.h"
|
||||
@ -335,6 +335,8 @@ int Module::getDAC(dacIndex index, bool mV) const {
|
||||
return sendToDetector<int>(F_SET_DAC, args);
|
||||
}
|
||||
|
||||
void Module::setDefaultDacs() { sendToDetector(F_SET_DEFAULT_DACS); }
|
||||
|
||||
void Module::setDAC(int val, dacIndex index, bool mV) {
|
||||
int args[]{static_cast<int>(index), static_cast<int>(mV), val};
|
||||
sendToDetector<int>(F_SET_DAC, args);
|
||||
|
@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
#include "sls/ClientSocket.h"
|
||||
#include "SharedMemory.h"
|
||||
#include "sls/ClientSocket.h"
|
||||
#include "sls/StaticVector.h"
|
||||
#include "sls/logger.h"
|
||||
#include "sls/network_utils.h"
|
||||
@ -136,6 +136,8 @@ class Module : public virtual slsDetectorDefs {
|
||||
int getMaxClockPhaseShift(int clkIndex) const;
|
||||
int getClockFrequency(int clkIndex) const;
|
||||
void setClockFrequency(int clkIndex, int value);
|
||||
/** [Eiger][Jungfrau][Moench][Gotthard][Gotthard2][Mythen3] */
|
||||
void setDefaultDacs();
|
||||
int getDAC(dacIndex index, bool mV) const;
|
||||
void setDAC(int val, dacIndex index, bool mV);
|
||||
bool getPowerChip() const;
|
||||
|
Reference in New Issue
Block a user