mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-23 23:10:02 +02:00
receiver suimmary print out more clear when it is deactivated and exception when trying to disable data stream in 10g mode
This commit is contained in:
parent
9168bc3ec9
commit
0ed7d1e9b1
@ -8312,6 +8312,12 @@ int set_datastream(int file_des) {
|
||||
ret = FAIL;
|
||||
sprintf(mess, "Could not %s. Invalid enable %d. \n", msg, enable);
|
||||
LOG(logERROR, (mess));
|
||||
} else if (enableTenGigabitEthernet(GET_FLAG) == 0) {
|
||||
ret = FAIL;
|
||||
sprintf(mess,
|
||||
"Could not %s. Disabling is only enabled in 10g mode.\n",
|
||||
enable);
|
||||
LOG(logERROR, (mess));
|
||||
} else {
|
||||
ret = setDataStream(port, enable);
|
||||
if (ret == FAIL) {
|
||||
|
@ -640,25 +640,25 @@ void Implementation::stopReceiver() {
|
||||
std::to_string(std::abs(mp[i])) + std::string(" (Extra)");
|
||||
}
|
||||
|
||||
std::string summary;
|
||||
if (!activated) {
|
||||
summary = "\n\tDeactivated Receiver";
|
||||
} else if (!detectorDataStream[i]) {
|
||||
summary = (i == 0 ? "\n\tDeactivated Left Port"
|
||||
: "\n\tDeactivated Right Port");
|
||||
} else {
|
||||
std::ostringstream os;
|
||||
os << "\n\tMissing Packets\t\t: " << mpMessage
|
||||
<< "\n\tComplete Frames\t\t: " << nf
|
||||
<< "\n\tLast Frame Caught\t: "
|
||||
<< listener[i]->GetLastFrameIndexCaught();
|
||||
summary = os.str();
|
||||
}
|
||||
|
||||
TLogLevel lev = ((mp[i]) > 0) ? logINFORED : logINFOGREEN;
|
||||
LOG(lev) <<
|
||||
// udp port number could be the second if selected interface is
|
||||
// 2 for jungfrau
|
||||
"Summary of Port " << udpPortNum[i]
|
||||
<< "\n\tMissing Packets\t\t: " << mpMessage
|
||||
<< "\n\tComplete Frames\t\t: " << nf
|
||||
<< "\n\tLast Frame Caught\t: "
|
||||
<< listener[i]->GetLastFrameIndexCaught();
|
||||
}
|
||||
if (!activated) {
|
||||
LOG(logINFORED) << "Deactivated Receiver";
|
||||
}
|
||||
if (!detectorDataStream[0]) {
|
||||
LOG(logINFORED) << "Deactivated Left Port";
|
||||
}
|
||||
if (!detectorDataStream[1]) {
|
||||
LOG(logINFORED) << "Deactivated Right Port";
|
||||
LOG(lev) << "Summary of Port " << udpPortNum[i] << summary;
|
||||
}
|
||||
|
||||
// callback
|
||||
if (acquisitionFinishedCallBack) {
|
||||
try {
|
||||
|
Loading…
x
Reference in New Issue
Block a user