mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-14 22:07:12 +02:00
added black background for reciever to see gray font better
This commit is contained in:
@ -133,7 +133,7 @@ void UDPStandardImplementation::setFileFormat(const fileFormat f){
|
||||
|
||||
int UDPStandardImplementation::setShortFrameEnable(const int i) {
|
||||
if (myDetectorType != GOTTHARD) {
|
||||
cprintf(RED, "Error: Can not set short frame for this detector\n");
|
||||
bprintf(RED, "Error: Can not set short frame for this detector\n");
|
||||
return FAIL;
|
||||
}
|
||||
|
||||
@ -203,9 +203,9 @@ int UDPStandardImplementation::setDataStreamEnable(const bool enable) {
|
||||
}
|
||||
if (DataStreamer::GetErrorMask() || error) {
|
||||
if (DataStreamer::GetErrorMask())
|
||||
cprintf(BG_RED,"Error: Could not create data callback threads\n");
|
||||
bprintf(BG_RED,"Error: Could not create data callback threads\n");
|
||||
else
|
||||
cprintf(BG_RED,"Error: Could not create zmq sockets\n");
|
||||
bprintf(BG_RED,"Error: Could not create zmq sockets\n");
|
||||
for (vector<DataStreamer*>::const_iterator it = dataStreamer.begin(); it != dataStreamer.end(); ++it)
|
||||
delete(*it);
|
||||
dataStreamer.clear();
|
||||
@ -319,7 +319,7 @@ int UDPStandardImplementation::setFifoDepth(const uint32_t i) {
|
||||
if (SetupFifoStructure() == FAIL)
|
||||
return FAIL;
|
||||
}
|
||||
FILE_LOG (logINFO) << "Fifo Depth: " << i << endl;
|
||||
FILE_LOG (logINFO) << "Fifo Depth: " << i;
|
||||
return OK;
|
||||
}
|
||||
|
||||
@ -428,7 +428,7 @@ void UDPStandardImplementation::resetAcquisitionCount() {
|
||||
|
||||
|
||||
int UDPStandardImplementation::startReceiver(char *c) {
|
||||
cout << endl << endl;
|
||||
bprintf(GRAY,"\n");
|
||||
FILE_LOG(logINFO) << "Starting Receiver";
|
||||
|
||||
ResetParametersforNewMeasurement();
|
||||
@ -445,7 +445,7 @@ int UDPStandardImplementation::startReceiver(char *c) {
|
||||
startAcquisitionCallBack(filePath, fileName, fileIndex,
|
||||
(generalData->imageSize) * numberofJobs + (generalData->fifoBufferHeaderSize), pStartAcquisition);
|
||||
if (rawDataReadyCallBack != NULL) {
|
||||
cout << "Data Write has been defined externally" << endl;
|
||||
FILE_LOG(logINFO) << "Data Write has been defined externally";
|
||||
}
|
||||
}
|
||||
|
||||
@ -457,9 +457,9 @@ int UDPStandardImplementation::startReceiver(char *c) {
|
||||
return FAIL;
|
||||
}
|
||||
} else
|
||||
cout << "File Write Disabled" << endl;
|
||||
FILE_LOG(logINFO) << "File Write Disabled";
|
||||
|
||||
cout << "Ready ..." << endl;
|
||||
FILE_LOG(logINFO) << "Ready ...";
|
||||
|
||||
//status
|
||||
pthread_mutex_lock(&statusMutex);
|
||||
@ -517,19 +517,19 @@ void UDPStandardImplementation::stopReceiver(){
|
||||
|
||||
uint64_t missingpackets = numberOfFrames*generalData->packetsPerFrame-listener[i]->GetPacketsCaught();
|
||||
if (missingpackets) {
|
||||
cprintf(RED, "\n[Port %d]\n",udpPortNum[i]);
|
||||
cprintf(RED, "Missing Packets\t\t: %lld\n",(long long int)missingpackets);
|
||||
cprintf(RED, "Complete Frames\t\t: %lld\n",(long long int)dataProcessor[i]->GetNumFramesCaught());
|
||||
cprintf(RED, "Last Frame Caught\t: %lld\n",(long long int)listener[i]->GetLastFrameIndexCaught());
|
||||
bprintf(RED, "\n[Port %d]\n",udpPortNum[i]);
|
||||
bprintf(RED, "Missing Packets\t\t: %lld\n",(long long int)missingpackets);
|
||||
bprintf(RED, "Complete Frames\t\t: %lld\n",(long long int)dataProcessor[i]->GetNumFramesCaught());
|
||||
bprintf(RED, "Last Frame Caught\t: %lld\n",(long long int)listener[i]->GetLastFrameIndexCaught());
|
||||
}else{
|
||||
cprintf(GREEN, "\n[Port %d]\n",udpPortNum[i]);
|
||||
cprintf(GREEN, "Missing Packets\t\t: %lld\n",(long long int)missingpackets);
|
||||
cprintf(GREEN, "Complete Frames\t\t: %lld\n",(long long int)dataProcessor[i]->GetNumFramesCaught());
|
||||
cprintf(GREEN, "Last Frame Caught\t: %lld\n",(long long int)listener[i]->GetLastFrameIndexCaught());
|
||||
bprintf(GREEN, "\n[Port %d]\n",udpPortNum[i]);
|
||||
bprintf(GREEN, "Missing Packets\t\t: %lld\n",(long long int)missingpackets);
|
||||
bprintf(GREEN, "Complete Frames\t\t: %lld\n",(long long int)dataProcessor[i]->GetNumFramesCaught());
|
||||
bprintf(GREEN, "Last Frame Caught\t: %lld\n",(long long int)listener[i]->GetLastFrameIndexCaught());
|
||||
}
|
||||
}
|
||||
if(!activated)
|
||||
cprintf(RED,"Note: Deactivated Receiver\n");
|
||||
bprintf(RED,"Note: Deactivated Receiver\n");
|
||||
//callback
|
||||
if (acquisitionFinishedCallBack)
|
||||
acquisitionFinishedCallBack((tot/numThreads), pAcquisitionFinished);
|
||||
@ -563,7 +563,7 @@ void UDPStandardImplementation::startReadout(){
|
||||
//wait as long as there is change from prev totalP,
|
||||
while(prev != totalP){
|
||||
#ifdef VERY_VERBOSE
|
||||
cprintf(MAGENTA,"waiting for all packets prevP:%d totalP:%d\n",
|
||||
bprintf(MAGENTA,"waiting for all packets prevP:%d totalP:%d\n",
|
||||
prev,totalP);
|
||||
|
||||
#endif
|
||||
@ -576,7 +576,7 @@ void UDPStandardImplementation::startReadout(){
|
||||
for (vector<Listener*>::const_iterator it = listener.begin(); it != listener.end(); ++it)
|
||||
totalP += (*it)->GetPacketsCaught();
|
||||
#ifdef VERY_VERBOSE
|
||||
cprintf(MAGENTA,"\tupdated: totalP:%d\n",totalP);
|
||||
bprintf(MAGENTA,"\tupdated: totalP:%d\n",totalP);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@ -703,7 +703,7 @@ int UDPStandardImplementation::SetupFifoStructure() {
|
||||
//must be > 0 and < max jobs
|
||||
numberofJobs = ((i < 1) ? 1 : ((i > MAX_JOBS_PER_THREAD) ? MAX_JOBS_PER_THREAD : i));
|
||||
}
|
||||
FILE_LOG (logINFO) << "Number of Jobs Per Thread:" << numberofJobs << endl;
|
||||
FILE_LOG (logINFO) << "Number of Jobs Per Thread:" << numberofJobs;
|
||||
|
||||
uint32_t oldfifodepth = fifoDepth;
|
||||
//reduce fifo depth if numberofJobsPerBuffer > 1 (to save memory)
|
||||
@ -731,7 +731,7 @@ int UDPStandardImplementation::SetupFifoStructure() {
|
||||
(generalData->imageSize) * numberofJobs + (generalData->fifoBufferHeaderSize),
|
||||
fifoDepth, success));
|
||||
if (!success) {
|
||||
cprintf(BG_RED,"Error: Could not allocate memory for fifo structure of index %d\n", i);
|
||||
bprintf(BG_RED,"Error: Could not allocate memory for fifo structure of index %d\n", i);
|
||||
for (vector<Fifo*>::const_iterator it = fifo.begin(); it != fifo.end(); ++it)
|
||||
delete(*it);
|
||||
fifo.clear();
|
||||
|
Reference in New Issue
Block a user