datastream is only for 10g for eiger atm, its mentioned in comments. accordingly handled in receiver. This is better solution, in case it was disabled in 10g, and not possible to set enable in 1g mode, which is given to the receiver

This commit is contained in:
2022-02-07 17:10:31 +01:00
parent 75f98b27a3
commit f9a88b0f79
7 changed files with 28 additions and 18 deletions

View File

@ -1466,6 +1466,21 @@ void Implementation::setTenGigaEnable(const bool b) {
generalData->SetTenGigaEnable(b);
SetupFifoStructure();
// datastream can be disabled/enabled only for Eiger 10GbE
if (detType == EIGER) {
if (!b) {
detectorDataStream[LEFT] = 1;
detectorDataStream[RIGHT] = 1;
} else {
detectorDataStream[LEFT] = detectorDataStream10GbE[LEFT];
detectorDataStream[RIGHT] = detectorDataStream10GbE[RIGHT];
}
LOG(logINFO) << "Detector datastream updated [Left: "
<< sls::ToString(detectorDataStream[LEFT])
<< ", Right: "
<< sls::ToString(detectorDataStream[RIGHT]) << "]";
}
}
LOG(logINFO) << "Ten Giga: " << (tengigaEnable ? "enabled" : "disabled");
LOG(logINFO) << "Packets per Frame: " << (generalData->packetsPerFrame);
@ -1532,9 +1547,9 @@ bool Implementation::getDetectorDataStream(const portPosition port) const {
void Implementation::setDetectorDataStream(const portPosition port,
const bool enable) {
int index = (port == LEFT ? 0 : 1);
detectorDataStream[index] = enable;
LOG(logINFO) << "Detector datastream (" << sls::ToString(port)
<< " Port): " << sls::ToString(detectorDataStream[index]);
detectorDataStream10GbE[index] = enable;
LOG(logINFO) << "Detector 10GbE datastream (" << sls::ToString(port)
<< " Port): " << sls::ToString(detectorDataStream10GbE[index]);
}
int Implementation::getReadNRows() const { return readNRows; }

View File

@ -356,6 +356,7 @@ class Implementation : private virtual slsDetectorDefs {
bool quadEnable{false};
bool activated{true};
std::array<bool, 2> detectorDataStream = {{true, true}};
std::array<bool, 2> detectorDataStream10GbE = {{true, true}};
int readNRows{0};
int thresholdEnergyeV{-1};
std::array<int, 3> thresholdAllEnergyeV = {{-1, -1, -1}};