mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-17 23:37:14 +02:00
gotthard2: vetostream (detector: only 3gbe, 10gbe via numudpinterfaces)
This commit is contained in:
@ -1548,16 +1548,35 @@ void Detector::setVeto(bool enable, Positions pos) {
|
||||
}
|
||||
|
||||
Result<defs::EthernetInterface> Detector::getVetoStream(Positions pos) const {
|
||||
// return pimpl->Parallel(&Module::getVetoStream, pos);
|
||||
Result<defs::EthernetInterface> res(1);
|
||||
res[0] = in_;
|
||||
// 3gbe
|
||||
auto r3 = pimpl->Parallel(&Module::getVetoStream, pos);
|
||||
// 10gbe (debugging interface) opens 2nd udp interface in receiver
|
||||
auto r10 = getNumberofUDPInterfaces();
|
||||
|
||||
Result<defs::EthernetInterface> res(r3.size());
|
||||
for (unsigned int i = 0; i < res.size(); ++i) {
|
||||
res[i] = (r3[i] ? defs::EthernetInterface::I3GBE
|
||||
: defs::EthernetInterface::NONE);
|
||||
if (r10[i] == 2) {
|
||||
res[i] = res[i] | defs::EthernetInterface::I10GBE;
|
||||
}
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
void Detector::setVetoStream(defs::EthernetInterface interface, Positions pos) {
|
||||
// pimpl->Parallel(&Module::setVetoStream, pos, enable);
|
||||
in_ = interface;
|
||||
}
|
||||
// 3gbe
|
||||
bool i3gbe = (interface & defs::EthernetInterface::I3GBE);
|
||||
pimpl->Parallel(&Module::setVetoStream, pos, i3gbe);
|
||||
|
||||
// 10gbe (debugging interface) opens 2nd udp interface in receiver
|
||||
int old_numinterfaces = getNumberofUDPInterfaces(pos).tsquash(
|
||||
"retrieved inconsistent number of udp interfaces");
|
||||
int numinterfaces = (interface & defs::EthernetInterface::I10GBE) ? 2 : 1;
|
||||
if (numinterfaces != old_numinterfaces) {
|
||||
setNumberofUDPInterfaces(numinterfaces, pos);
|
||||
}
|
||||
}
|
||||
|
||||
Result<int> Detector::getADCConfiguration(const int chipIndex,
|
||||
const int adcIndex,
|
||||
|
@ -1870,6 +1870,14 @@ void Module::setVeto(bool enable) {
|
||||
sendToDetector(F_SET_VETO, static_cast<int>(enable), nullptr);
|
||||
}
|
||||
|
||||
bool Module::getVetoStream() const {
|
||||
return (sendToDetector<int>(F_GET_VETO_STREAM));
|
||||
}
|
||||
|
||||
void Module::setVetoStream(const bool value) {
|
||||
sendToDetector(F_SET_VETO_STREAM, static_cast<int>(value), nullptr);
|
||||
}
|
||||
|
||||
int Module::getADCConfiguration(const int chipIndex, const int adcIndex) const {
|
||||
int args[]{chipIndex, adcIndex};
|
||||
return sendToDetector<int>(F_GET_ADC_CONFIGURATION, args);
|
||||
|
@ -406,6 +406,8 @@ class Module : public virtual slsDetectorDefs {
|
||||
void setTimingSource(slsDetectorDefs::timingSourceType value);
|
||||
bool getVeto() const;
|
||||
void setVeto(bool enable);
|
||||
bool getVetoStream() const;
|
||||
void setVetoStream(const bool value);
|
||||
int getADCConfiguration(const int chipIndex, const int adcIndex) const;
|
||||
void setADCConfiguration(const int chipIndex, const int adcIndex,
|
||||
int value);
|
||||
|
Reference in New Issue
Block a user