mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-05-01 10:20:04 +02:00
changes without ostringstream done
This commit is contained in:
parent
91b7a87557
commit
3b4b2d707f
@ -831,8 +831,6 @@ private:
|
|||||||
/** Progress (currentFrameNumber) Mutex */
|
/** Progress (currentFrameNumber) Mutex */
|
||||||
pthread_mutex_t progressMutex;
|
pthread_mutex_t progressMutex;
|
||||||
|
|
||||||
char streambuf[MAX_NUMBER_OF_WRITER_THREADS][MAX_STR_LENGTH];
|
|
||||||
char cstreambuf[MAX_STR_LENGTH];
|
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
#elif VERYVERBOSE
|
#elif VERYVERBOSE
|
||||||
#define FILELOG_MAX_LEVEL logDEBUG4
|
#define FILELOG_MAX_LEVEL logDEBUG4
|
||||||
#elif VERBOSE
|
#elif VERBOSE
|
||||||
#define FILELOG_MAX_LEVEL logDEBUG
|
#define FILELOG_MAX_LEVEL logDEBUG1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef FILELOG_MAX_LEVEL
|
#ifndef FILELOG_MAX_LEVEL
|
||||||
@ -31,11 +31,14 @@ class Logger {
|
|||||||
public:
|
public:
|
||||||
Logger(){};
|
Logger(){};
|
||||||
|
|
||||||
enum TLogLevel {logERROR, logWARNING, logINFO, logDEBUG, logDEBUG1, logDEBUG2, logDEBUG3, logDEBUG4, logDEBUG5};
|
enum TLogLevel {logERROR, logWARNING, logINFO, logDEBUG1, logDEBUG2, logDEBUG3, logDEBUG4, logDEBUG5};
|
||||||
|
|
||||||
|
|
||||||
static void FILE_LOG(TLogLevel level, char* msg)
|
static void FILE_LOG(TLogLevel level, char const* msg)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
if(level > FILELOG_MAX_LEVEL) return;
|
||||||
|
|
||||||
char buffer[11];
|
char buffer[11];
|
||||||
const int buffer_len = sizeof(buffer);
|
const int buffer_len = sizeof(buffer);
|
||||||
time_t t;
|
time_t t;
|
||||||
@ -70,10 +73,10 @@ public:
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
switch(level){
|
switch(level){
|
||||||
case logERROR: cprintf(RED BOLD, "- %s ERROR: %s", result, msg); break;
|
case logERROR: cprintf(RED BOLD, "- %s ERROR: %s \n", result, msg); break;
|
||||||
case logWARNING: cprintf(YELLOW BOLD,"- %s WARNING: %s", result, msg); break;
|
case logWARNING: cprintf(YELLOW BOLD,"- %s WARNING: %s \n", result, msg); break;
|
||||||
case logINFO: cprintf(GRAY, "- %s INFO: %s", result, msg); break;
|
case logINFO: cprintf(GRAY, "- %s INFO: %s \n", result, msg); break;
|
||||||
default: break;
|
default: cprintf(GRAY, "- %s DEBUG: %s \n", result, msg); break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -206,9 +206,7 @@ int UDPBaseImplementation::getActivate() const{ return activated;}
|
|||||||
|
|
||||||
/**initial parameters***/
|
/**initial parameters***/
|
||||||
void UDPBaseImplementation::configure(map<string, string> config_map){
|
void UDPBaseImplementation::configure(map<string, string> config_map){
|
||||||
ostringstream os;
|
FILE_LOG(logERROR, " must be overridden by child classes");
|
||||||
os << " must be overridden by child classes";
|
|
||||||
string message(os.str()); FILE_LOG(logERROR, message);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void UDPBaseImplementation::setFlippedData(int axis, int enable){
|
void UDPBaseImplementation::setFlippedData(int axis, int enable){
|
||||||
@ -216,9 +214,9 @@ void UDPBaseImplementation::setFlippedData(int axis, int enable){
|
|||||||
if(axis<0 || axis>1) return;
|
if(axis<0 || axis>1) return;
|
||||||
flippedData[axis] = enable==0?0:1;
|
flippedData[axis] = enable==0?0:1;
|
||||||
|
|
||||||
ostringstream os;
|
char cstreambuf[MAX_STR_LENGTH]; memset(cstreambuf, 0, MAX_STR_LENGTH);
|
||||||
os << "Flipped Data: " << flippedData[0] << " , " << flippedData[1];
|
sprintf(cstreambuf, "Flipped Data: %d , %d ", flippedData[0], flippedData[1]);
|
||||||
string message(os.str()); FILE_LOG(logINFO, message);
|
FILE_LOG(logINFO, cstreambuf);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -228,14 +226,13 @@ void UDPBaseImplementation::setFileName(const char c[]){
|
|||||||
if(strlen(c))
|
if(strlen(c))
|
||||||
strcpy(fileName, c);
|
strcpy(fileName, c);
|
||||||
|
|
||||||
ostringstream os;
|
char cstreambuf[MAX_STR_LENGTH]; memset(cstreambuf, 0, MAX_STR_LENGTH);
|
||||||
os << "File name:" << fileName;
|
sprintf(cstreambuf, "File name: %s ", fileName);
|
||||||
string message(os.str()); FILE_LOG(logINFO, message);
|
FILE_LOG(logINFO, cstreambuf);
|
||||||
}
|
}
|
||||||
|
|
||||||
void UDPBaseImplementation::setFilePath(const char c[]){
|
void UDPBaseImplementation::setFilePath(const char c[]){
|
||||||
|
|
||||||
|
|
||||||
if(strlen(c)){
|
if(strlen(c)){
|
||||||
//check if filepath exists
|
//check if filepath exists
|
||||||
struct stat st;
|
struct stat st;
|
||||||
@ -243,69 +240,67 @@ void UDPBaseImplementation::setFilePath(const char c[]){
|
|||||||
strcpy(filePath,c);
|
strcpy(filePath,c);
|
||||||
else{
|
else{
|
||||||
strcpy(filePath,"");
|
strcpy(filePath,"");
|
||||||
ostringstream os;
|
|
||||||
os << "FilePath does not exist:" << filePath;
|
char cstreambuf[MAX_STR_LENGTH]; memset(cstreambuf, 0, MAX_STR_LENGTH);
|
||||||
string message(os.str()); FILE_LOG(logWARNING, message);
|
sprintf(cstreambuf, "FilePath does not exist: %s ", filePath);
|
||||||
|
FILE_LOG(logWARNING, cstreambuf);
|
||||||
}
|
}
|
||||||
strcpy(filePath, c);
|
strcpy(filePath, c);
|
||||||
}
|
}
|
||||||
/*FILE_LOG(logDEBUG) << "Info: File path:" << filePath;*/
|
/*{
|
||||||
|
char cstreambuf[MAX_STR_LENGTH]; memset(cstreambuf, 0, MAX_STR_LENGTH);
|
||||||
|
sprintf(cstreambuf, "File path:: %s ", filePath);
|
||||||
|
FILE_LOG(logDEBUG, cstreambuf);
|
||||||
|
}*/
|
||||||
}
|
}
|
||||||
|
|
||||||
void UDPBaseImplementation::setFileIndex(const uint64_t i){
|
void UDPBaseImplementation::setFileIndex(const uint64_t i){
|
||||||
|
|
||||||
|
|
||||||
fileIndex = i;
|
fileIndex = i;
|
||||||
ostringstream os;
|
char cstreambuf[MAX_STR_LENGTH]; memset(cstreambuf, 0, MAX_STR_LENGTH);
|
||||||
os << "File Index:" << fileIndex;
|
sprintf(cstreambuf, "File Index: %lu ", fileIndex);
|
||||||
string message(os.str()); FILE_LOG(logINFO, message);
|
FILE_LOG(logINFO, cstreambuf);
|
||||||
}
|
}
|
||||||
|
|
||||||
//FIXME: needed?
|
//FIXME: needed?
|
||||||
void UDPBaseImplementation::setScanTag(const int i){
|
void UDPBaseImplementation::setScanTag(const int i){
|
||||||
|
|
||||||
|
|
||||||
scanTag = i;
|
scanTag = i;
|
||||||
ostringstream os;
|
char cstreambuf[MAX_STR_LENGTH]; memset(cstreambuf, 0, MAX_STR_LENGTH);
|
||||||
os << "Scan Tag:" << scanTag;
|
sprintf(cstreambuf, "Scan Tag: %d ", scanTag);
|
||||||
string message(os.str()); FILE_LOG(logINFO, message);
|
FILE_LOG(logINFO, cstreambuf);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void UDPBaseImplementation::setFrameIndexEnable(const bool b){
|
void UDPBaseImplementation::setFrameIndexEnable(const bool b){
|
||||||
|
|
||||||
|
|
||||||
frameIndexEnable = b;
|
frameIndexEnable = b;
|
||||||
ostringstream os;
|
char cstreambuf[MAX_STR_LENGTH]; memset(cstreambuf, 0, MAX_STR_LENGTH);
|
||||||
os << "Frame Index Enable: " << stringEnable(frameIndexEnable);
|
sprintf(cstreambuf, "Frame Index Enable: %s ", stringEnable(frameIndexEnable).c_str());
|
||||||
string message(os.str()); FILE_LOG(logINFO, message);
|
FILE_LOG(logINFO, cstreambuf);
|
||||||
}
|
}
|
||||||
|
|
||||||
void UDPBaseImplementation::setFileWriteEnable(const bool b){
|
void UDPBaseImplementation::setFileWriteEnable(const bool b){
|
||||||
|
|
||||||
|
|
||||||
fileWriteEnable = b;
|
fileWriteEnable = b;
|
||||||
ostringstream os;
|
char cstreambuf[MAX_STR_LENGTH]; memset(cstreambuf, 0, MAX_STR_LENGTH);
|
||||||
os << "File Write Enable: " << stringEnable(fileWriteEnable);
|
sprintf(cstreambuf, "File Write Enable: %s ", stringEnable(fileWriteEnable).c_str());
|
||||||
string message(os.str()); FILE_LOG(logINFO, message);
|
FILE_LOG(logINFO, cstreambuf);
|
||||||
}
|
}
|
||||||
|
|
||||||
void UDPBaseImplementation::setOverwriteEnable(const bool b){
|
void UDPBaseImplementation::setOverwriteEnable(const bool b){
|
||||||
|
|
||||||
|
|
||||||
overwriteEnable = b;
|
overwriteEnable = b;
|
||||||
ostringstream os;
|
char cstreambuf[MAX_STR_LENGTH]; memset(cstreambuf, 0, MAX_STR_LENGTH);
|
||||||
os << "Overwrite Enable: " << stringEnable(overwriteEnable);
|
sprintf(cstreambuf, "Overwrite Enable: %s ", stringEnable(overwriteEnable).c_str());
|
||||||
string message(os.str()); FILE_LOG(logINFO, message);
|
FILE_LOG(logINFO, cstreambuf);
|
||||||
}
|
}
|
||||||
|
|
||||||
int UDPBaseImplementation::setDataCompressionEnable(const bool b){
|
int UDPBaseImplementation::setDataCompressionEnable(const bool b){
|
||||||
|
|
||||||
|
|
||||||
dataCompressionEnable = b;
|
dataCompressionEnable = b;
|
||||||
ostringstream os;
|
char cstreambuf[MAX_STR_LENGTH]; memset(cstreambuf, 0, MAX_STR_LENGTH);
|
||||||
os << "Data Compression : " << stringEnable(dataCompressionEnable);
|
sprintf(cstreambuf, "Data Compression: %s ", stringEnable(dataCompressionEnable).c_str());
|
||||||
string message(os.str()); FILE_LOG(logINFO, message);
|
FILE_LOG(logINFO, cstreambuf);
|
||||||
|
|
||||||
//overridden methods might return FAIL
|
//overridden methods might return FAIL
|
||||||
return OK;
|
return OK;
|
||||||
@ -315,49 +310,44 @@ int UDPBaseImplementation::setDataCompressionEnable(const bool b){
|
|||||||
/***connection parameters***/
|
/***connection parameters***/
|
||||||
void UDPBaseImplementation::setUDPPortNumber(const uint32_t i){
|
void UDPBaseImplementation::setUDPPortNumber(const uint32_t i){
|
||||||
|
|
||||||
|
|
||||||
udpPortNum[0] = i;
|
udpPortNum[0] = i;
|
||||||
ostringstream os;
|
char cstreambuf[MAX_STR_LENGTH]; memset(cstreambuf, 0, MAX_STR_LENGTH);
|
||||||
os << "UDP Port Number[0]:" << udpPortNum[0];
|
sprintf(cstreambuf, "UDP Port Number[0]: %u ", udpPortNum[0]);
|
||||||
string message(os.str()); FILE_LOG(logINFO, message);
|
FILE_LOG(logINFO, cstreambuf);
|
||||||
}
|
}
|
||||||
|
|
||||||
void UDPBaseImplementation::setUDPPortNumber2(const uint32_t i){
|
void UDPBaseImplementation::setUDPPortNumber2(const uint32_t i){
|
||||||
|
|
||||||
|
|
||||||
udpPortNum[1] = i;
|
udpPortNum[1] = i;
|
||||||
ostringstream os;
|
char cstreambuf[MAX_STR_LENGTH]; memset(cstreambuf, 0, MAX_STR_LENGTH);
|
||||||
os << "UDP Port Number[1]:" << udpPortNum[1];
|
sprintf(cstreambuf, "UDP Port Number[1]: %u ", udpPortNum[1]);
|
||||||
string message(os.str()); FILE_LOG(logINFO, message);
|
FILE_LOG(logINFO, cstreambuf);
|
||||||
}
|
}
|
||||||
|
|
||||||
void UDPBaseImplementation::setEthernetInterface(const char* c){
|
void UDPBaseImplementation::setEthernetInterface(const char* c){
|
||||||
|
|
||||||
|
|
||||||
strcpy(eth, c);
|
strcpy(eth, c);
|
||||||
ostringstream os;
|
char cstreambuf[MAX_STR_LENGTH]; memset(cstreambuf, 0, MAX_STR_LENGTH);
|
||||||
os << "Ethernet Interface: " << eth;
|
sprintf(cstreambuf, "Ethernet Interface: %s ", eth);
|
||||||
string message(os.str()); FILE_LOG(logINFO, message);
|
FILE_LOG(logINFO, cstreambuf);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/***acquisition parameters***/
|
/***acquisition parameters***/
|
||||||
void UDPBaseImplementation::setShortFrameEnable(const int i){
|
void UDPBaseImplementation::setShortFrameEnable(const int i){
|
||||||
|
|
||||||
|
|
||||||
shortFrameEnable = i;
|
shortFrameEnable = i;
|
||||||
ostringstream os;
|
char cstreambuf[MAX_STR_LENGTH]; memset(cstreambuf, 0, MAX_STR_LENGTH);
|
||||||
os << "Short Frame Enable: " << stringEnable(shortFrameEnable);
|
sprintf(cstreambuf, "Short Frame Enable: %d ", shortFrameEnable);
|
||||||
string message(os.str()); FILE_LOG(logINFO, message);
|
FILE_LOG(logINFO, cstreambuf);
|
||||||
}
|
}
|
||||||
|
|
||||||
int UDPBaseImplementation::setFrameToGuiFrequency(const uint32_t freq){
|
int UDPBaseImplementation::setFrameToGuiFrequency(const uint32_t freq){
|
||||||
|
|
||||||
|
|
||||||
frameToGuiFrequency = freq;
|
frameToGuiFrequency = freq;
|
||||||
ostringstream os;
|
char cstreambuf[MAX_STR_LENGTH]; memset(cstreambuf, 0, MAX_STR_LENGTH);
|
||||||
os << "Frame To Gui Frequency:" << frameToGuiFrequency;
|
sprintf(cstreambuf, "Frame To Gui Frequency: %u ", frameToGuiFrequency);
|
||||||
string message(os.str()); FILE_LOG(logINFO, message);
|
FILE_LOG(logINFO, cstreambuf);
|
||||||
|
|
||||||
//overrridden child classes might return FAIL
|
//overrridden child classes might return FAIL
|
||||||
return OK;
|
return OK;
|
||||||
@ -365,21 +355,19 @@ int UDPBaseImplementation::setFrameToGuiFrequency(const uint32_t freq){
|
|||||||
|
|
||||||
void UDPBaseImplementation::setFrameToGuiTimer(const uint32_t time_in_ms){
|
void UDPBaseImplementation::setFrameToGuiTimer(const uint32_t time_in_ms){
|
||||||
|
|
||||||
|
|
||||||
frameToGuiTimerinMS = time_in_ms;
|
frameToGuiTimerinMS = time_in_ms;
|
||||||
ostringstream os;
|
char cstreambuf[MAX_STR_LENGTH]; memset(cstreambuf, 0, MAX_STR_LENGTH);
|
||||||
os << "Frame To Gui Timer:" << frameToGuiTimerinMS;
|
sprintf(cstreambuf, "Frame To Gui Timer: %u ", frameToGuiTimerinMS);
|
||||||
string message(os.str()); FILE_LOG(logINFO, message);
|
FILE_LOG(logINFO, cstreambuf);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
uint32_t UDPBaseImplementation::setDataStreamEnable(const uint32_t enable){
|
uint32_t UDPBaseImplementation::setDataStreamEnable(const uint32_t enable){
|
||||||
|
|
||||||
|
|
||||||
dataStreamEnable = enable;
|
dataStreamEnable = enable;
|
||||||
ostringstream os;
|
char cstreambuf[MAX_STR_LENGTH]; memset(cstreambuf, 0, MAX_STR_LENGTH);
|
||||||
os << "Streaming Data from Receiver:" << dataStreamEnable;
|
sprintf(cstreambuf, "Streaming Data from Receiver: %d ", dataStreamEnable);
|
||||||
string message(os.str()); FILE_LOG(logINFO, message);
|
FILE_LOG(logINFO, cstreambuf);
|
||||||
|
|
||||||
//overrridden child classes might return FAIL
|
//overrridden child classes might return FAIL
|
||||||
return OK;
|
return OK;
|
||||||
@ -388,11 +376,10 @@ uint32_t UDPBaseImplementation::setDataStreamEnable(const uint32_t enable){
|
|||||||
|
|
||||||
int UDPBaseImplementation::setAcquisitionPeriod(const uint64_t i){
|
int UDPBaseImplementation::setAcquisitionPeriod(const uint64_t i){
|
||||||
|
|
||||||
|
|
||||||
acquisitionPeriod = i;
|
acquisitionPeriod = i;
|
||||||
ostringstream os;
|
char cstreambuf[MAX_STR_LENGTH]; memset(cstreambuf, 0, MAX_STR_LENGTH);
|
||||||
os << "Acquisition Period:" << (double)acquisitionPeriod/(1E9) << "s";
|
sprintf(cstreambuf, "Acquisition Period: %f s ", (double)acquisitionPeriod/(1E9));
|
||||||
string message(os.str()); FILE_LOG(logINFO, message);
|
FILE_LOG(logINFO, cstreambuf);
|
||||||
|
|
||||||
//overrridden child classes might return FAIL
|
//overrridden child classes might return FAIL
|
||||||
return OK;
|
return OK;
|
||||||
@ -400,11 +387,10 @@ int UDPBaseImplementation::setAcquisitionPeriod(const uint64_t i){
|
|||||||
|
|
||||||
int UDPBaseImplementation::setAcquisitionTime(const uint64_t i){
|
int UDPBaseImplementation::setAcquisitionTime(const uint64_t i){
|
||||||
|
|
||||||
|
|
||||||
acquisitionTime = i;
|
acquisitionTime = i;
|
||||||
ostringstream os;
|
char cstreambuf[MAX_STR_LENGTH]; memset(cstreambuf, 0, MAX_STR_LENGTH);
|
||||||
os << "Acquisition Time:" << (double)acquisitionTime/(1E9) << "s";
|
sprintf(cstreambuf, "Acquisition Time: %f s ", (double)acquisitionTime/(1E9));
|
||||||
string message(os.str()); FILE_LOG(logINFO, message);
|
FILE_LOG(logINFO, cstreambuf);
|
||||||
|
|
||||||
//overrridden child classes might return FAIL
|
//overrridden child classes might return FAIL
|
||||||
return OK;
|
return OK;
|
||||||
@ -412,11 +398,10 @@ int UDPBaseImplementation::setAcquisitionTime(const uint64_t i){
|
|||||||
|
|
||||||
int UDPBaseImplementation::setNumberOfFrames(const uint64_t i){
|
int UDPBaseImplementation::setNumberOfFrames(const uint64_t i){
|
||||||
|
|
||||||
|
|
||||||
numberOfFrames = i;
|
numberOfFrames = i;
|
||||||
ostringstream os;
|
char cstreambuf[MAX_STR_LENGTH]; memset(cstreambuf, 0, MAX_STR_LENGTH);
|
||||||
os << "Number of Frames:" << numberOfFrames;
|
sprintf(cstreambuf, "Number of Frames: %lu ", numberOfFrames);
|
||||||
string message(os.str()); FILE_LOG(logINFO, message);
|
FILE_LOG(logINFO, cstreambuf);
|
||||||
|
|
||||||
//overrridden child classes might return FAIL
|
//overrridden child classes might return FAIL
|
||||||
return OK;
|
return OK;
|
||||||
@ -424,11 +409,10 @@ int UDPBaseImplementation::setNumberOfFrames(const uint64_t i){
|
|||||||
|
|
||||||
int UDPBaseImplementation::setDynamicRange(const uint32_t i){
|
int UDPBaseImplementation::setDynamicRange(const uint32_t i){
|
||||||
|
|
||||||
|
|
||||||
dynamicRange = i;
|
dynamicRange = i;
|
||||||
ostringstream os;
|
char cstreambuf[MAX_STR_LENGTH]; memset(cstreambuf, 0, MAX_STR_LENGTH);
|
||||||
os << "Dynamic Range:" << dynamicRange;
|
sprintf(cstreambuf, "Dynamic Range: %u ", dynamicRange);
|
||||||
string message(os.str()); FILE_LOG(logINFO, message);
|
FILE_LOG(logINFO, cstreambuf);
|
||||||
|
|
||||||
//overrridden child classes might return FAIL
|
//overrridden child classes might return FAIL
|
||||||
return OK;
|
return OK;
|
||||||
@ -436,11 +420,10 @@ int UDPBaseImplementation::setDynamicRange(const uint32_t i){
|
|||||||
|
|
||||||
int UDPBaseImplementation::setTenGigaEnable(const bool b){
|
int UDPBaseImplementation::setTenGigaEnable(const bool b){
|
||||||
|
|
||||||
|
|
||||||
tengigaEnable = b;
|
tengigaEnable = b;
|
||||||
ostringstream os;
|
char cstreambuf[MAX_STR_LENGTH]; memset(cstreambuf, 0, MAX_STR_LENGTH);
|
||||||
os << "Ten Giga Enable: " << stringEnable(tengigaEnable);
|
sprintf(cstreambuf, "Ten Giga Enable: %s ", stringEnable(tengigaEnable).c_str());
|
||||||
string message(os.str()); FILE_LOG(logINFO, message);
|
FILE_LOG(logINFO, cstreambuf);
|
||||||
|
|
||||||
//overridden functions might return FAIL
|
//overridden functions might return FAIL
|
||||||
return OK;
|
return OK;
|
||||||
@ -448,11 +431,10 @@ int UDPBaseImplementation::setTenGigaEnable(const bool b){
|
|||||||
|
|
||||||
int UDPBaseImplementation::setFifoDepth(const uint32_t i){
|
int UDPBaseImplementation::setFifoDepth(const uint32_t i){
|
||||||
|
|
||||||
|
|
||||||
fifoDepth = i;
|
fifoDepth = i;
|
||||||
ostringstream os;
|
char cstreambuf[MAX_STR_LENGTH]; memset(cstreambuf, 0, MAX_STR_LENGTH);
|
||||||
os << "Fifo Depth: " << i;
|
sprintf(cstreambuf, "Fifo Depth: %u ", i);
|
||||||
string message(os.str()); FILE_LOG(logINFO, message);
|
FILE_LOG(logINFO, cstreambuf);
|
||||||
|
|
||||||
//overridden functions might return FAIL
|
//overridden functions might return FAIL
|
||||||
return OK;
|
return OK;
|
||||||
@ -467,23 +449,23 @@ int UDPBaseImplementation::setFifoDepth(const uint32_t i){
|
|||||||
/***initial functions***/
|
/***initial functions***/
|
||||||
int UDPBaseImplementation::setDetectorType(const detectorType d){
|
int UDPBaseImplementation::setDetectorType(const detectorType d){
|
||||||
|
|
||||||
|
|
||||||
myDetectorType = d;
|
myDetectorType = d;
|
||||||
//if eiger, set numberofListeningThreads = 2;
|
//if eiger, set numberofListeningThreads = 2;
|
||||||
ostringstream os;
|
char cstreambuf[MAX_STR_LENGTH]; memset(cstreambuf, 0, MAX_STR_LENGTH);
|
||||||
os << "Detector Type:" << getDetectorType(d);
|
sprintf(cstreambuf, "Detector Type: %s ", getDetectorType(d).c_str());
|
||||||
string message(os.str()); FILE_LOG(logINFO, message);
|
FILE_LOG(logINFO, cstreambuf);
|
||||||
|
|
||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
void UDPBaseImplementation::initialize(const char *c){
|
void UDPBaseImplementation::initialize(const char *c){
|
||||||
|
|
||||||
|
|
||||||
if(strlen(c))
|
if(strlen(c))
|
||||||
strcpy(detHostname, c);
|
strcpy(detHostname, c);
|
||||||
ostringstream os;
|
char cstreambuf[MAX_STR_LENGTH]; memset(cstreambuf, 0, MAX_STR_LENGTH);
|
||||||
os << "Detector Hostname:" << detHostname;
|
sprintf(cstreambuf, "Detector Hostname: %s ", detHostname);
|
||||||
string message(os.str()); FILE_LOG(logINFO, message);
|
FILE_LOG(logINFO, cstreambuf);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -492,68 +474,62 @@ void UDPBaseImplementation::resetAcquisitionCount(){
|
|||||||
|
|
||||||
|
|
||||||
totalPacketsCaught = 0;
|
totalPacketsCaught = 0;
|
||||||
ostringstream os;
|
char cstreambuf[MAX_STR_LENGTH]; memset(cstreambuf, 0, MAX_STR_LENGTH);
|
||||||
os << "totalPacketsCaught:" << totalPacketsCaught;
|
sprintf(cstreambuf, "Total Packets Caught: %lu ", totalPacketsCaught);
|
||||||
string message(os.str()); FILE_LOG(logINFO, message);
|
FILE_LOG(logINFO, cstreambuf);
|
||||||
}
|
}
|
||||||
|
|
||||||
int UDPBaseImplementation::startReceiver(char *c){
|
int UDPBaseImplementation::startReceiver(char *c){
|
||||||
ostringstream os;
|
|
||||||
os << " must be overridden by child classes";
|
FILE_LOG(logERROR, " must be overridden by child classes");
|
||||||
string message(os.str()); FILE_LOG(logERROR, message);
|
|
||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
void UDPBaseImplementation::stopReceiver(){
|
void UDPBaseImplementation::stopReceiver(){
|
||||||
ostringstream os;
|
|
||||||
os << " must be overridden by child classes";
|
FILE_LOG(logERROR, " must be overridden by child classes");
|
||||||
string message(os.str()); FILE_LOG(logERROR, message);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void UDPBaseImplementation::startReadout(){
|
void UDPBaseImplementation::startReadout(){
|
||||||
ostringstream os;
|
|
||||||
os << " must be overridden by child classes";
|
FILE_LOG(logERROR, " must be overridden by child classes");
|
||||||
string message(os.str()); FILE_LOG(logERROR, message);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int UDPBaseImplementation::shutDownUDPSockets(){
|
int UDPBaseImplementation::shutDownUDPSockets(){
|
||||||
ostringstream os;
|
|
||||||
os << " must be overridden by child classes";
|
FILE_LOG(logERROR, " must be overridden by child classes");
|
||||||
string message(os.str()); FILE_LOG(logERROR, message);
|
|
||||||
|
|
||||||
//overridden functions might return FAIL
|
//overridden functions might return FAIL
|
||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
void UDPBaseImplementation::readFrame(int ithread, char* c,char** raw, int64_t &startAcquisitionIndex, int64_t &startFrameIndex){
|
void UDPBaseImplementation::readFrame(int ithread, char* c,char** raw, int64_t &startAcquisitionIndex, int64_t &startFrameIndex){
|
||||||
ostringstream os;
|
|
||||||
os << " must be overridden by child classes";
|
FILE_LOG(logERROR, " must be overridden by child classes");
|
||||||
string message(os.str()); FILE_LOG(logERROR, message);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//FIXME: needed, isnt stopReceiver enough?
|
//FIXME: needed, isnt stopReceiver enough?
|
||||||
void UDPBaseImplementation::abort(){
|
void UDPBaseImplementation::abort(){
|
||||||
ostringstream os;
|
|
||||||
os << " must be overridden by child classes";
|
FILE_LOG(logERROR, " must be overridden by child classes");
|
||||||
string message(os.str()); FILE_LOG(logERROR, message);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void UDPBaseImplementation::closeFile(int ithread){
|
void UDPBaseImplementation::closeFile(int ithread){
|
||||||
ostringstream os;
|
|
||||||
os << " must be overridden by child classes";
|
FILE_LOG(logERROR, " must be overridden by child classes");
|
||||||
string message(os.str()); FILE_LOG(logERROR, message);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int UDPBaseImplementation::setActivate(int enable){
|
int UDPBaseImplementation::setActivate(int enable){
|
||||||
|
|
||||||
|
|
||||||
if(enable != -1){
|
if(enable != -1){
|
||||||
activated = enable;
|
activated = enable;
|
||||||
ostringstream os;
|
|
||||||
os << "Activation: " << stringEnable(activated);
|
char cstreambuf[MAX_STR_LENGTH]; memset(cstreambuf, 0, MAX_STR_LENGTH);
|
||||||
string message(os.str()); FILE_LOG(logINFO, message);
|
sprintf(cstreambuf, "Activation: %s ", stringEnable(activated).c_str());
|
||||||
|
FILE_LOG(logINFO, cstreambuf);
|
||||||
}
|
}
|
||||||
|
|
||||||
return activated;
|
return activated;
|
||||||
|
@ -22,24 +22,21 @@ using namespace std;
|
|||||||
|
|
||||||
UDPInterface * UDPInterface::create(string receiver_type){
|
UDPInterface * UDPInterface::create(string receiver_type){
|
||||||
|
|
||||||
|
char cstreambuf[MAX_STR_LENGTH]; memset(cstreambuf, 0, MAX_STR_LENGTH);
|
||||||
|
sprintf(cstreambuf, "Starting %s ", receiver_type.c_str());
|
||||||
|
|
||||||
if (receiver_type == "standard"){
|
if (receiver_type == "standard"){
|
||||||
ostringstream os;
|
FILE_LOG(logINFO, cstreambuf);
|
||||||
os << "Starting " << receiver_type;
|
|
||||||
string message(os.str()); FILE_LOG(logINFO, message);
|
|
||||||
return new UDPStandardImplementation();
|
return new UDPStandardImplementation();
|
||||||
}
|
}
|
||||||
#ifdef REST
|
#ifdef REST
|
||||||
else if (receiver_type == "REST"){
|
else if (receiver_type == "REST"){
|
||||||
ostringstream os;
|
FILE_LOG(logINFO, cstreambuf);
|
||||||
os << "Starting " << receiver_type;
|
|
||||||
string message(os.str()); FILE_LOG(logINFO, message);
|
|
||||||
return new UDPRESTImplementation();
|
return new UDPRESTImplementation();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
else{
|
else{
|
||||||
ostringstream os;
|
FILE_LOG(logWARNING, "[ERROR] UDP interface not supported, using standard implementation");
|
||||||
os << "[ERROR] UDP interface not supported, using standard implementation";
|
|
||||||
string message(os.str()); FILE_LOG(logWARNING, message);
|
|
||||||
return new UDPBaseImplementation();
|
return new UDPBaseImplementation();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -106,31 +106,32 @@ slsReceiver::slsReceiver(int argc, char *argv[], int &success){
|
|||||||
|
|
||||||
if( !fname.empty() ){
|
if( !fname.empty() ){
|
||||||
try{
|
try{
|
||||||
ostringstream os;
|
char cstreambuf[MAX_STR_LENGTH]; memset(cstreambuf, 0, MAX_STR_LENGTH);
|
||||||
os << "config file name " << fname;
|
sprintf(cstreambuf, "config file name : %s ",fname.c_str());
|
||||||
string message(os.str()); FILE_LOG(logDEBUG, message);
|
FILE_LOG(logDEBUG1, cstreambuf);
|
||||||
|
|
||||||
success = read_config_file(fname, &tcpip_port_no, &configuration_map);
|
success = read_config_file(fname, &tcpip_port_no, &configuration_map);
|
||||||
//VERBOSE_PRINT("Read configuration file of " + iline + " lines");
|
//VERBOSE_PRINT("Read configuration file of " + iline + " lines");
|
||||||
}
|
}
|
||||||
catch(...){
|
catch(...){
|
||||||
ostringstream os;
|
char cstreambuf[MAX_STR_LENGTH]; memset(cstreambuf, 0, MAX_STR_LENGTH);
|
||||||
os << "Error opening configuration file " << fname ;
|
sprintf(cstreambuf, "Error opening configuration file : %s ",fname.c_str());
|
||||||
string message(os.str()); FILE_LOG(logERROR, message);
|
FILE_LOG(logERROR, cstreambuf);
|
||||||
|
|
||||||
success = FAIL;
|
success = FAIL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if(success != OK){
|
if(success != OK){
|
||||||
ostringstream os;
|
FILE_LOG(logERROR, "Failed: see output above for more information ");
|
||||||
os << "Failed: see output above for more information " ;
|
|
||||||
string message(os.str()); FILE_LOG(logERROR, message);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (success==OK){
|
if (success==OK){
|
||||||
ostringstream os;
|
|
||||||
os << "SLS Receiver starting " << udp_interface_type << " on port " << tcpip_port_no << endl;
|
char cstreambuf[MAX_STR_LENGTH]; memset(cstreambuf, 0, MAX_STR_LENGTH);
|
||||||
string message(os.str()); FILE_LOG(logDEBUG, message);
|
sprintf(cstreambuf, "SLS Receiver starting %s on port %d ",udp_interface_type.c_str(), tcpip_port_no);
|
||||||
|
FILE_LOG(logDEBUG1, cstreambuf);
|
||||||
#ifdef REST
|
#ifdef REST
|
||||||
udp_interface = UDPInterface::create(udp_interface_type);
|
udp_interface = UDPInterface::create(udp_interface_type);
|
||||||
udp_interface->configure(configuration_map);
|
udp_interface->configure(configuration_map);
|
||||||
|
@ -126,22 +126,17 @@ int slsReceiverTCPIPInterface::setPortNumber(int pn){
|
|||||||
|
|
||||||
|
|
||||||
int slsReceiverTCPIPInterface::start(){
|
int slsReceiverTCPIPInterface::start(){
|
||||||
{
|
|
||||||
ostringstream os;
|
FILE_LOG(logDEBUG1, "Creating TCP Server Thread");
|
||||||
os << "Creating TCP Server Thread" << endl;
|
|
||||||
string message(os.str()); FILE_LOG(logDEBUG, message);
|
|
||||||
}
|
|
||||||
killTCPServerThread = 0;
|
killTCPServerThread = 0;
|
||||||
if(pthread_create(&TCPServer_thread, NULL,startTCPServerThread, (void*) this)){
|
if(pthread_create(&TCPServer_thread, NULL,startTCPServerThread, (void*) this)){
|
||||||
cout << "Could not create TCP Server thread" << endl;
|
cout << "Could not create TCP Server thread" << endl;
|
||||||
return FAIL;
|
return FAIL;
|
||||||
}
|
}
|
||||||
//#ifdef VERYVERBOSE
|
//#ifdef VERYVERBOSE
|
||||||
{
|
FILE_LOG(logDEBUG1, "TCP Server thread created successfully.");
|
||||||
ostringstream os;
|
|
||||||
os << "TCP Server thread created successfully." << endl;
|
|
||||||
string message(os.str()); FILE_LOG(logDEBUG, message);
|
|
||||||
}
|
|
||||||
//#endif
|
//#endif
|
||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
@ -402,20 +397,20 @@ int slsReceiverTCPIPInterface::set_detector_type(){
|
|||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//#ifdef VERYVERBOSE
|
//#ifdef VERYVERBOSE
|
||||||
if(ret!=FAIL)
|
if(ret!=FAIL)
|
||||||
{
|
{
|
||||||
ostringstream os;
|
char cstreambuf[MAX_STR_LENGTH]; memset(cstreambuf, 0, MAX_STR_LENGTH);
|
||||||
os << "detector type " << dr;
|
sprintf(cstreambuf, "Detector Type %d ", (int)dr);
|
||||||
string message(os.str()); FILE_LOG(logDEBUG, message);
|
FILE_LOG(logDEBUG1, cstreambuf);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
cprintf(RED, "%s\n", mess);
|
cprintf(RED, "%s\n", mess);
|
||||||
//#endif
|
//#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if(ret==OK && mySock->differentClients){
|
if(ret==OK && mySock->differentClients){
|
||||||
FILE_LOG(logDEBUG,"Force update" );
|
FILE_LOG(logDEBUG1,"Force update" );
|
||||||
ret=FORCE_UPDATE;
|
ret=FORCE_UPDATE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -482,7 +477,7 @@ int slsReceiverTCPIPInterface::set_file_name() {
|
|||||||
|
|
||||||
|
|
||||||
if(ret==OK && mySock->differentClients){
|
if(ret==OK && mySock->differentClients){
|
||||||
FILE_LOG(logDEBUG,"Force update" );
|
FILE_LOG(logDEBUG1,"Force update" );
|
||||||
ret=FORCE_UPDATE;
|
ret=FORCE_UPDATE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -557,7 +552,7 @@ int slsReceiverTCPIPInterface::set_file_dir() {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
if(ret==OK && mySock->differentClients){
|
if(ret==OK && mySock->differentClients){
|
||||||
FILE_LOG(logDEBUG,"Force update" );
|
FILE_LOG(logDEBUG1,"Force update" );
|
||||||
ret=FORCE_UPDATE;
|
ret=FORCE_UPDATE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -629,7 +624,7 @@ int slsReceiverTCPIPInterface::set_file_index() {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
if(ret==OK && mySock->differentClients){
|
if(ret==OK && mySock->differentClients){
|
||||||
FILE_LOG(logDEBUG,"Force update" );
|
FILE_LOG(logDEBUG1,"Force update" );
|
||||||
ret=FORCE_UPDATE;
|
ret=FORCE_UPDATE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -707,7 +702,7 @@ int slsReceiverTCPIPInterface::set_frame_index() {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
if(ret==OK && mySock->differentClients){
|
if(ret==OK && mySock->differentClients){
|
||||||
FILE_LOG(logDEBUG,"Force update" );
|
FILE_LOG(logDEBUG1,"Force update" );
|
||||||
ret=FORCE_UPDATE;
|
ret=FORCE_UPDATE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -772,15 +767,15 @@ int slsReceiverTCPIPInterface::setup_udp(){
|
|||||||
//setup udpip
|
//setup udpip
|
||||||
//get ethernet interface or IP to listen to
|
//get ethernet interface or IP to listen to
|
||||||
{
|
{
|
||||||
ostringstream os;
|
char cstreambuf[MAX_STR_LENGTH]; memset(cstreambuf, 0, MAX_STR_LENGTH);
|
||||||
os << "Receiver UDP IP: " << args[0];
|
sprintf(cstreambuf, "Receiver UDP IP: %s ",args[0]);
|
||||||
string message(os.str()); FILE_LOG(logINFO, message);
|
FILE_LOG(logINFO, cstreambuf);
|
||||||
}
|
}
|
||||||
temp = genericSocket::ipToName(args[0]);
|
temp = genericSocket::ipToName(args[0]);
|
||||||
if(temp=="none"){
|
if(temp=="none"){
|
||||||
ret = FAIL;
|
ret = FAIL;
|
||||||
strcpy(mess, "Failed to get ethernet interface or IP\n");
|
strcpy(mess, "Failed to get ethernet interface or IP\n");
|
||||||
FILE_LOG(logERROR, string(mess));
|
FILE_LOG(logERROR, "Failed to get ethernet interface or IP ");
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
strcpy(eth,temp.c_str());
|
strcpy(eth,temp.c_str());
|
||||||
@ -801,9 +796,10 @@ int slsReceiverTCPIPInterface::setup_udp(){
|
|||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
strcpy(retval,temp.c_str());
|
strcpy(retval,temp.c_str());
|
||||||
ostringstream os;
|
|
||||||
os << "Reciever MAC Address: " << retval;
|
char cstreambuf[MAX_STR_LENGTH]; memset(cstreambuf, 0, MAX_STR_LENGTH);
|
||||||
string message(os.str()); FILE_LOG(logINFO, message);
|
sprintf(cstreambuf, "Reciever MAC Address: %s ",retval);
|
||||||
|
FILE_LOG(logINFO, cstreambuf);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -811,14 +807,16 @@ int slsReceiverTCPIPInterface::setup_udp(){
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
if(ret==OK && mySock->differentClients){
|
if(ret==OK && mySock->differentClients){
|
||||||
FILE_LOG(logDEBUG,"Force update" );
|
FILE_LOG(logDEBUG1,"Force update" );
|
||||||
ret=FORCE_UPDATE;
|
ret=FORCE_UPDATE;
|
||||||
}
|
}
|
||||||
|
|
||||||
// send answer
|
// send answer
|
||||||
mySock->SendDataOnly(&ret,sizeof(ret));
|
mySock->SendDataOnly(&ret,sizeof(ret));
|
||||||
if(ret==FAIL){
|
if(ret==FAIL){
|
||||||
FILE_LOG(logERROR, string(mess));
|
char cstreambuf[MAX_STR_LENGTH]; memset(cstreambuf, 0, MAX_STR_LENGTH);
|
||||||
|
sprintf(cstreambuf, "%s ", mess);
|
||||||
|
FILE_LOG(logERROR, cstreambuf);
|
||||||
mySock->SendDataOnly(mess,sizeof(mess));
|
mySock->SendDataOnly(mess,sizeof(mess));
|
||||||
}
|
}
|
||||||
mySock->SendDataOnly(retval,MAX_STR_LENGTH);
|
mySock->SendDataOnly(retval,MAX_STR_LENGTH);
|
||||||
@ -867,7 +865,7 @@ int slsReceiverTCPIPInterface::start_receiver(){
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
if(ret==OK && mySock->differentClients){
|
if(ret==OK && mySock->differentClients){
|
||||||
FILE_LOG(logDEBUG,"Force update" );
|
FILE_LOG(logDEBUG1,"Force update" );
|
||||||
ret=FORCE_UPDATE;
|
ret=FORCE_UPDATE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -915,7 +913,7 @@ int slsReceiverTCPIPInterface::stop_receiver(){
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
if(ret==OK && mySock->differentClients){
|
if(ret==OK && mySock->differentClients){
|
||||||
FILE_LOG(logDEBUG,"Force update" );
|
FILE_LOG(logDEBUG1,"Force update" );
|
||||||
ret=FORCE_UPDATE;
|
ret=FORCE_UPDATE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -946,7 +944,7 @@ int slsReceiverTCPIPInterface::get_status(){
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
if(ret==OK && mySock->differentClients){
|
if(ret==OK && mySock->differentClients){
|
||||||
FILE_LOG(logDEBUG,"Force update" );
|
FILE_LOG(logDEBUG1,"Force update" );
|
||||||
ret=FORCE_UPDATE;
|
ret=FORCE_UPDATE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -977,7 +975,7 @@ int slsReceiverTCPIPInterface::get_frames_caught(){
|
|||||||
}else retval=receiverBase->getTotalFramesCaught();
|
}else retval=receiverBase->getTotalFramesCaught();
|
||||||
#endif
|
#endif
|
||||||
if(ret==OK && mySock->differentClients){
|
if(ret==OK && mySock->differentClients){
|
||||||
FILE_LOG(logDEBUG,"Force update" );
|
FILE_LOG(logDEBUG1,"Force update" );
|
||||||
ret=FORCE_UPDATE;
|
ret=FORCE_UPDATE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1009,7 +1007,7 @@ int slsReceiverTCPIPInterface::get_frame_index(){
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
if(ret==OK && mySock->differentClients){
|
if(ret==OK && mySock->differentClients){
|
||||||
FILE_LOG(logDEBUG,"Force update" );
|
FILE_LOG(logDEBUG1,"Force update" );
|
||||||
ret=FORCE_UPDATE;
|
ret=FORCE_UPDATE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1054,7 +1052,7 @@ int slsReceiverTCPIPInterface::reset_frames_caught(){
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
if(ret==OK && mySock->differentClients){
|
if(ret==OK && mySock->differentClients){
|
||||||
FILE_LOG(logDEBUG,"Force update" );
|
FILE_LOG(logDEBUG1,"Force update" );
|
||||||
ret=FORCE_UPDATE;
|
ret=FORCE_UPDATE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1123,7 +1121,7 @@ int slsReceiverTCPIPInterface::set_short_frame() {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
if(ret==OK && mySock->differentClients){
|
if(ret==OK && mySock->differentClients){
|
||||||
FILE_LOG(logDEBUG,"Force update" );
|
FILE_LOG(logDEBUG1,"Force update" );
|
||||||
ret=FORCE_UPDATE;
|
ret=FORCE_UPDATE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1305,7 +1303,7 @@ int slsReceiverTCPIPInterface::moench_read_frame(){
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
if(ret==OK && mySock->differentClients){
|
if(ret==OK && mySock->differentClients){
|
||||||
FILE_LOG(logDEBUG,"Force update" );
|
FILE_LOG(logDEBUG1,"Force update" );
|
||||||
ret=FORCE_UPDATE;
|
ret=FORCE_UPDATE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1486,7 +1484,7 @@ int slsReceiverTCPIPInterface::gotthard_read_frame(){
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
if(ret==OK && mySock->differentClients){
|
if(ret==OK && mySock->differentClients){
|
||||||
FILE_LOG(logDEBUG,"Force update" );
|
FILE_LOG(logDEBUG1,"Force update" );
|
||||||
ret=FORCE_UPDATE;
|
ret=FORCE_UPDATE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1640,7 +1638,7 @@ int slsReceiverTCPIPInterface::propix_read_frame(){
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
if(ret==OK && mySock->differentClients){
|
if(ret==OK && mySock->differentClients){
|
||||||
FILE_LOG(logDEBUG,"Force update" );
|
FILE_LOG(logDEBUG1,"Force update" );
|
||||||
ret=FORCE_UPDATE;
|
ret=FORCE_UPDATE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1907,7 +1905,7 @@ int slsReceiverTCPIPInterface::eiger_read_frame(){
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
if(ret==OK && mySock->differentClients){
|
if(ret==OK && mySock->differentClients){
|
||||||
FILE_LOG(logDEBUG,"Force update" );
|
FILE_LOG(logDEBUG1,"Force update" );
|
||||||
ret=FORCE_UPDATE;
|
ret=FORCE_UPDATE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2070,7 +2068,7 @@ int slsReceiverTCPIPInterface::jungfrau_read_frame(){
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
if(ret==OK && mySock->differentClients){
|
if(ret==OK && mySock->differentClients){
|
||||||
FILE_LOG(logDEBUG,"Force update" );
|
FILE_LOG(logDEBUG1,"Force update" );
|
||||||
ret=FORCE_UPDATE;
|
ret=FORCE_UPDATE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2148,7 +2146,7 @@ int slsReceiverTCPIPInterface::set_read_frequency(){
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
if(ret==OK && mySock->differentClients){
|
if(ret==OK && mySock->differentClients){
|
||||||
FILE_LOG(logDEBUG,"Force update" );
|
FILE_LOG(logDEBUG1,"Force update" );
|
||||||
ret=FORCE_UPDATE;
|
ret=FORCE_UPDATE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2214,7 +2212,7 @@ int slsReceiverTCPIPInterface::set_read_receiver_timer(){
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
if(ret==OK && mySock->differentClients){
|
if(ret==OK && mySock->differentClients){
|
||||||
FILE_LOG(logDEBUG,"Force update" );
|
FILE_LOG(logDEBUG1,"Force update" );
|
||||||
ret=FORCE_UPDATE;
|
ret=FORCE_UPDATE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2277,7 +2275,7 @@ int slsReceiverTCPIPInterface::set_data_stream_enable(){
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
if(ret==OK && mySock->differentClients){
|
if(ret==OK && mySock->differentClients){
|
||||||
FILE_LOG(logDEBUG,"Force update" );
|
FILE_LOG(logDEBUG1,"Force update" );
|
||||||
ret=FORCE_UPDATE;
|
ret=FORCE_UPDATE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2337,7 +2335,7 @@ int slsReceiverTCPIPInterface::enable_file_write(){
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
if(ret==OK && mySock->differentClients){
|
if(ret==OK && mySock->differentClients){
|
||||||
FILE_LOG(logDEBUG,"Force update" );
|
FILE_LOG(logDEBUG1,"Force update" );
|
||||||
ret=FORCE_UPDATE;
|
ret=FORCE_UPDATE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2365,7 +2363,7 @@ int slsReceiverTCPIPInterface::get_id(){
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
if(mySock->differentClients){
|
if(mySock->differentClients){
|
||||||
FILE_LOG(logDEBUG,"Force update" );
|
FILE_LOG(logDEBUG1,"Force update" );
|
||||||
ret=FORCE_UPDATE;
|
ret=FORCE_UPDATE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2413,7 +2411,7 @@ else{
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
if(ret==OK && mySock->differentClients){
|
if(ret==OK && mySock->differentClients){
|
||||||
FILE_LOG(logDEBUG,"Force update" );
|
FILE_LOG(logDEBUG1,"Force update" );
|
||||||
ret=FORCE_UPDATE;
|
ret=FORCE_UPDATE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2501,7 +2499,7 @@ int slsReceiverTCPIPInterface::set_timer() {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
if(ret==OK && mySock->differentClients){
|
if(ret==OK && mySock->differentClients){
|
||||||
FILE_LOG(logDEBUG,"Force update" );
|
FILE_LOG(logDEBUG1,"Force update" );
|
||||||
ret=FORCE_UPDATE;
|
ret=FORCE_UPDATE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2573,7 +2571,7 @@ int slsReceiverTCPIPInterface::enable_compression() {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
if(ret==OK && mySock->differentClients){
|
if(ret==OK && mySock->differentClients){
|
||||||
FILE_LOG(logDEBUG,"Force update" );
|
FILE_LOG(logDEBUG1,"Force update" );
|
||||||
ret=FORCE_UPDATE;
|
ret=FORCE_UPDATE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2639,7 +2637,7 @@ int slsReceiverTCPIPInterface::set_detector_hostname() {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
if(ret==OK && mySock->differentClients){
|
if(ret==OK && mySock->differentClients){
|
||||||
FILE_LOG(logDEBUG,"Force update" );
|
FILE_LOG(logDEBUG1,"Force update" );
|
||||||
ret=FORCE_UPDATE;
|
ret=FORCE_UPDATE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2740,7 +2738,7 @@ int slsReceiverTCPIPInterface::set_dynamic_range() {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
if(ret==OK && mySock->differentClients){
|
if(ret==OK && mySock->differentClients){
|
||||||
FILE_LOG(logDEBUG,"Force update" );
|
FILE_LOG(logDEBUG1,"Force update" );
|
||||||
ret=FORCE_UPDATE;
|
ret=FORCE_UPDATE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2808,7 +2806,7 @@ int slsReceiverTCPIPInterface::enable_overwrite() {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
if(ret==OK && mySock->differentClients){
|
if(ret==OK && mySock->differentClients){
|
||||||
FILE_LOG(logDEBUG,"Force update" );
|
FILE_LOG(logDEBUG1,"Force update" );
|
||||||
ret=FORCE_UPDATE;
|
ret=FORCE_UPDATE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2878,7 +2876,7 @@ int slsReceiverTCPIPInterface::enable_tengiga() {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
if(ret==OK && mySock->differentClients){
|
if(ret==OK && mySock->differentClients){
|
||||||
FILE_LOG(logDEBUG,"Force update" );
|
FILE_LOG(logDEBUG1,"Force update" );
|
||||||
ret=FORCE_UPDATE;
|
ret=FORCE_UPDATE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2950,7 +2948,7 @@ int slsReceiverTCPIPInterface::set_fifo_depth() {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
if(ret==OK && mySock->differentClients){
|
if(ret==OK && mySock->differentClients){
|
||||||
FILE_LOG(logDEBUG,"Force update" );
|
FILE_LOG(logDEBUG1,"Force update" );
|
||||||
ret=FORCE_UPDATE;
|
ret=FORCE_UPDATE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3024,7 +3022,7 @@ int slsReceiverTCPIPInterface::set_activate() {
|
|||||||
|
|
||||||
|
|
||||||
if(ret==OK && mySock->differentClients){
|
if(ret==OK && mySock->differentClients){
|
||||||
FILE_LOG(logDEBUG,"Force update" );
|
FILE_LOG(logDEBUG1,"Force update" );
|
||||||
ret=FORCE_UPDATE;
|
ret=FORCE_UPDATE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3088,7 +3086,7 @@ int slsReceiverTCPIPInterface::set_flipped_data(){
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
if(ret==OK && mySock->differentClients){
|
if(ret==OK && mySock->differentClients){
|
||||||
FILE_LOG(logDEBUG,"Force update" );
|
FILE_LOG(logDEBUG1,"Force update" );
|
||||||
ret=FORCE_UPDATE;
|
ret=FORCE_UPDATE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user