mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-29 01:20:02 +02:00
some small changes
This commit is contained in:
parent
e9f51e2ef5
commit
667c1c0304
@ -31,7 +31,7 @@ using namespace std;
|
|||||||
*************************************************************************/
|
*************************************************************************/
|
||||||
|
|
||||||
UDPStandardImplementation::UDPStandardImplementation(){
|
UDPStandardImplementation::UDPStandardImplementation(){
|
||||||
FILE_LOG(logDEBUG1) << __AT__ << " called";
|
FILE_LOG(logDEBUG) << __AT__ << " called";
|
||||||
|
|
||||||
initializeMembers();
|
initializeMembers();
|
||||||
|
|
||||||
@ -59,7 +59,7 @@ UDPStandardImplementation::UDPStandardImplementation(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
UDPStandardImplementation::~UDPStandardImplementation(){
|
UDPStandardImplementation::~UDPStandardImplementation(){
|
||||||
FILE_LOG(logDEBUG1) << __AT__ << " called";
|
FILE_LOG(logDEBUG) << __AT__ << " called";
|
||||||
closeFile();
|
closeFile();
|
||||||
deleteMembers();
|
deleteMembers();
|
||||||
}
|
}
|
||||||
@ -73,7 +73,7 @@ UDPStandardImplementation::~UDPStandardImplementation(){
|
|||||||
/***initial parameters***/
|
/***initial parameters***/
|
||||||
|
|
||||||
void UDPStandardImplementation::deleteMembers(){
|
void UDPStandardImplementation::deleteMembers(){
|
||||||
FILE_LOG(logDEBUG1) << __AT__ << " starting";
|
FILE_LOG(logDEBUG) << __AT__ << " starting";
|
||||||
|
|
||||||
FILE_LOG(logDEBUG) << "Info: Deleting member pointers";
|
FILE_LOG(logDEBUG) << "Info: Deleting member pointers";
|
||||||
shutDownUDPSockets();
|
shutDownUDPSockets();
|
||||||
@ -95,7 +95,7 @@ void UDPStandardImplementation::deleteMembers(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
void UDPStandardImplementation::deleteFilter(){
|
void UDPStandardImplementation::deleteFilter(){
|
||||||
FILE_LOG(logDEBUG1) << __AT__ << " starting";
|
FILE_LOG(logDEBUG) << __AT__ << " starting";
|
||||||
|
|
||||||
moenchCommonModeSubtraction = NULL;
|
moenchCommonModeSubtraction = NULL;
|
||||||
for(int i=0; i<MAX_NUMBER_OF_WRITER_THREADS; i++){
|
for(int i=0; i<MAX_NUMBER_OF_WRITER_THREADS; i++){
|
||||||
@ -111,7 +111,7 @@ void UDPStandardImplementation::deleteFilter(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
void UDPStandardImplementation::initializeBaseMembers(){
|
void UDPStandardImplementation::initializeBaseMembers(){
|
||||||
FILE_LOG(logDEBUG1) << __AT__ << " starting";
|
FILE_LOG(logDEBUG) << __AT__ << " starting";
|
||||||
|
|
||||||
UDPBaseImplementation::initializeMembers();
|
UDPBaseImplementation::initializeMembers();
|
||||||
acquisitionPeriod = SAMPLE_TIME_IN_NS;
|
acquisitionPeriod = SAMPLE_TIME_IN_NS;
|
||||||
@ -119,7 +119,7 @@ void UDPStandardImplementation::initializeBaseMembers(){
|
|||||||
|
|
||||||
|
|
||||||
void UDPStandardImplementation::initializeMembers(){
|
void UDPStandardImplementation::initializeMembers(){
|
||||||
FILE_LOG(logDEBUG1) << __AT__ << " starting";
|
FILE_LOG(logDEBUG) << __AT__ << " starting";
|
||||||
|
|
||||||
FILE_LOG(logDEBUG) << "Info: Initializing members";
|
FILE_LOG(logDEBUG) << "Info: Initializing members";
|
||||||
|
|
||||||
@ -207,7 +207,7 @@ void UDPStandardImplementation::initializeMembers(){
|
|||||||
|
|
||||||
|
|
||||||
void UDPStandardImplementation::initializeFilter(){
|
void UDPStandardImplementation::initializeFilter(){
|
||||||
FILE_LOG(logDEBUG1) << __AT__ << " starting";
|
FILE_LOG(logDEBUG) << __AT__ << " starting";
|
||||||
|
|
||||||
double hc = 0, sigma = 5;
|
double hc = 0, sigma = 5;
|
||||||
int sign = 1, csize, i;
|
int sign = 1, csize, i;
|
||||||
@ -249,7 +249,7 @@ void UDPStandardImplementation::initializeFilter(){
|
|||||||
|
|
||||||
|
|
||||||
int UDPStandardImplementation::setupFifoStructure(){
|
int UDPStandardImplementation::setupFifoStructure(){
|
||||||
FILE_LOG(logDEBUG1) << __AT__ << " called";
|
FILE_LOG(logDEBUG) << __AT__ << " called";
|
||||||
|
|
||||||
int64_t i;
|
int64_t i;
|
||||||
int oldNumberofJobsPerBuffer = numberofJobsPerBuffer;
|
int oldNumberofJobsPerBuffer = numberofJobsPerBuffer;
|
||||||
@ -356,7 +356,7 @@ int UDPStandardImplementation::setupFifoStructure(){
|
|||||||
|
|
||||||
|
|
||||||
void UDPStandardImplementation::configure(map<string, string> config_map){
|
void UDPStandardImplementation::configure(map<string, string> config_map){
|
||||||
FILE_LOG(logDEBUG1) << __AT__ << " starting";
|
FILE_LOG(logDEBUG) << __AT__ << " starting";
|
||||||
|
|
||||||
map<string, string>::const_iterator pos;
|
map<string, string>::const_iterator pos;
|
||||||
pos = config_map.find("mode");
|
pos = config_map.find("mode");
|
||||||
@ -375,7 +375,7 @@ void UDPStandardImplementation::configure(map<string, string> config_map){
|
|||||||
|
|
||||||
/***file parameters***/
|
/***file parameters***/
|
||||||
int UDPStandardImplementation::setDataCompressionEnable(const bool b){
|
int UDPStandardImplementation::setDataCompressionEnable(const bool b){
|
||||||
FILE_LOG(logDEBUG1) << __AT__ << " starting";
|
FILE_LOG(logDEBUG) << __AT__ << " starting";
|
||||||
|
|
||||||
if(myDetectorType != EIGER){
|
if(myDetectorType != EIGER){
|
||||||
cout << "Info: Setting up Data Compression Enable to " << stringEnable(b);
|
cout << "Info: Setting up Data Compression Enable to " << stringEnable(b);
|
||||||
@ -419,7 +419,7 @@ int UDPStandardImplementation::setDataCompressionEnable(const bool b){
|
|||||||
|
|
||||||
/***acquisition parameters***/
|
/***acquisition parameters***/
|
||||||
void UDPStandardImplementation::setShortFrameEnable(const int i){
|
void UDPStandardImplementation::setShortFrameEnable(const int i){
|
||||||
FILE_LOG(logDEBUG1) << __AT__ << " called";
|
FILE_LOG(logDEBUG) << __AT__ << " called";
|
||||||
|
|
||||||
shortFrameEnable = i;
|
shortFrameEnable = i;
|
||||||
|
|
||||||
@ -456,7 +456,7 @@ void UDPStandardImplementation::setShortFrameEnable(const int i){
|
|||||||
|
|
||||||
|
|
||||||
int UDPStandardImplementation::setFrameToGuiFrequency(const uint32_t i){
|
int UDPStandardImplementation::setFrameToGuiFrequency(const uint32_t i){
|
||||||
FILE_LOG(logDEBUG1) << __AT__ << " called";
|
FILE_LOG(logDEBUG) << __AT__ << " called";
|
||||||
|
|
||||||
FrameToGuiFrequency = i;
|
FrameToGuiFrequency = i;
|
||||||
if(setupFifoStructure() == FAIL)
|
if(setupFifoStructure() == FAIL)
|
||||||
@ -469,7 +469,7 @@ int UDPStandardImplementation::setFrameToGuiFrequency(const uint32_t i){
|
|||||||
|
|
||||||
|
|
||||||
int UDPStandardImplementation::setAcquisitionPeriod(const uint64_t i){
|
int UDPStandardImplementation::setAcquisitionPeriod(const uint64_t i){
|
||||||
FILE_LOG(logDEBUG1) << __AT__ << " called";
|
FILE_LOG(logDEBUG) << __AT__ << " called";
|
||||||
|
|
||||||
acquisitionPeriod = i;
|
acquisitionPeriod = i;
|
||||||
if(setupFifoStructure() == FAIL)
|
if(setupFifoStructure() == FAIL)
|
||||||
@ -482,7 +482,7 @@ int UDPStandardImplementation::setAcquisitionPeriod(const uint64_t i){
|
|||||||
}
|
}
|
||||||
|
|
||||||
int UDPStandardImplementation::setDynamicRange(const uint32_t i){
|
int UDPStandardImplementation::setDynamicRange(const uint32_t i){
|
||||||
FILE_LOG(logDEBUG1) << __AT__ << " called";
|
FILE_LOG(logDEBUG) << __AT__ << " called";
|
||||||
|
|
||||||
uint32_t oldDynamicRange = dynamicRange;
|
uint32_t oldDynamicRange = dynamicRange;
|
||||||
|
|
||||||
@ -536,7 +536,7 @@ int UDPStandardImplementation::setDynamicRange(const uint32_t i){
|
|||||||
|
|
||||||
|
|
||||||
int UDPStandardImplementation::setTenGigaEnable(const bool b){
|
int UDPStandardImplementation::setTenGigaEnable(const bool b){
|
||||||
FILE_LOG(logDEBUG1) << __AT__ << " called";
|
FILE_LOG(logDEBUG) << __AT__ << " called";
|
||||||
|
|
||||||
FILE_LOG(logDEBUG) << "Info: Setting Ten Giga to " << stringEnable(b);
|
FILE_LOG(logDEBUG) << "Info: Setting Ten Giga to " << stringEnable(b);
|
||||||
bool oldTenGigaEnable = tengigaEnable;
|
bool oldTenGigaEnable = tengigaEnable;
|
||||||
@ -618,7 +618,7 @@ int UDPStandardImplementation::setTenGigaEnable(const bool b){
|
|||||||
|
|
||||||
/***initial functions***/
|
/***initial functions***/
|
||||||
int UDPStandardImplementation::setDetectorType(const detectorType d){
|
int UDPStandardImplementation::setDetectorType(const detectorType d){
|
||||||
FILE_LOG(logDEBUG1) << __AT__ << " called";
|
FILE_LOG(logDEBUG) << __AT__ << " called";
|
||||||
|
|
||||||
FILE_LOG(logDEBUG) << "Setting receiver type";
|
FILE_LOG(logDEBUG) << "Setting receiver type";
|
||||||
|
|
||||||
@ -751,7 +751,7 @@ int UDPStandardImplementation::setDetectorType(const detectorType d){
|
|||||||
|
|
||||||
/***acquisition functions***/
|
/***acquisition functions***/
|
||||||
void UDPStandardImplementation::resetAcquisitionCount(){
|
void UDPStandardImplementation::resetAcquisitionCount(){
|
||||||
FILE_LOG(logDEBUG1) << __AT__ << " starting";
|
FILE_LOG(logDEBUG) << __AT__ << " starting";
|
||||||
|
|
||||||
totalPacketsCaught = 0;
|
totalPacketsCaught = 0;
|
||||||
acqStarted = false;
|
acqStarted = false;
|
||||||
@ -762,7 +762,7 @@ void UDPStandardImplementation::resetAcquisitionCount(){
|
|||||||
|
|
||||||
|
|
||||||
int UDPStandardImplementation::startReceiver(char *c){
|
int UDPStandardImplementation::startReceiver(char *c){
|
||||||
FILE_LOG(logDEBUG1) << __AT__ << " called";
|
FILE_LOG(logDEBUG) << __AT__ << " called";
|
||||||
|
|
||||||
cout << "Starting Receiver" << endl;
|
cout << "Starting Receiver" << endl;
|
||||||
|
|
||||||
@ -862,7 +862,7 @@ int UDPStandardImplementation::startReceiver(char *c){
|
|||||||
* Post: udp sockets shut down, status is idle, semaphores destroyed
|
* Post: udp sockets shut down, status is idle, semaphores destroyed
|
||||||
* */
|
* */
|
||||||
void UDPStandardImplementation::stopReceiver(){
|
void UDPStandardImplementation::stopReceiver(){
|
||||||
FILE_LOG(logDEBUG1) << __AT__ << " called";
|
FILE_LOG(logDEBUG) << __AT__ << " called";
|
||||||
|
|
||||||
cout << "Stopping Receiver" << endl;
|
cout << "Stopping Receiver" << endl;
|
||||||
|
|
||||||
@ -893,7 +893,7 @@ void UDPStandardImplementation::stopReceiver(){
|
|||||||
|
|
||||||
|
|
||||||
int UDPStandardImplementation::shutDownUDPSockets(){
|
int UDPStandardImplementation::shutDownUDPSockets(){
|
||||||
FILE_LOG(logDEBUG1) << __AT__ << " called";
|
FILE_LOG(logDEBUG) << __AT__ << " called";
|
||||||
|
|
||||||
FILE_LOG(logDEBUG) << "Info: Shutting down UDP Socket(s)";
|
FILE_LOG(logDEBUG) << "Info: Shutting down UDP Socket(s)";
|
||||||
|
|
||||||
@ -915,7 +915,7 @@ int UDPStandardImplementation::shutDownUDPSockets(){
|
|||||||
* Post:udp sockets closed, status is transmitting
|
* Post:udp sockets closed, status is transmitting
|
||||||
* */
|
* */
|
||||||
void UDPStandardImplementation::startReadout(){
|
void UDPStandardImplementation::startReadout(){
|
||||||
FILE_LOG(logDEBUG1) << __AT__ << " called";
|
FILE_LOG(logDEBUG) << __AT__ << " called";
|
||||||
|
|
||||||
FILE_LOG(logDEBUG) << "Info: Transmitting last data";
|
FILE_LOG(logDEBUG) << "Info: Transmitting last data";
|
||||||
|
|
||||||
@ -943,7 +943,7 @@ void UDPStandardImplementation::startReadout(){
|
|||||||
|
|
||||||
|
|
||||||
void UDPStandardImplementation::readFrame(char* c,char** raw, uint64_t &startAcq, uint64_t &startFrame){
|
void UDPStandardImplementation::readFrame(char* c,char** raw, uint64_t &startAcq, uint64_t &startFrame){
|
||||||
FILE_LOG(logDEBUG1) << __AT__ << " called";
|
FILE_LOG(logDEBUG) << __AT__ << " called";
|
||||||
|
|
||||||
//point to gui data, to let writer thread know that gui is back for data
|
//point to gui data, to let writer thread know that gui is back for data
|
||||||
if (guiData == NULL){
|
if (guiData == NULL){
|
||||||
@ -993,7 +993,7 @@ void UDPStandardImplementation::readFrame(char* c,char** raw, uint64_t &startAcq
|
|||||||
|
|
||||||
|
|
||||||
void UDPStandardImplementation::closeFile(int i){
|
void UDPStandardImplementation::closeFile(int i){
|
||||||
FILE_LOG(logDEBUG1) << __AT__ << " called for " << i ;
|
FILE_LOG(logDEBUG) << __AT__ << " called for " << i ;
|
||||||
|
|
||||||
//normal
|
//normal
|
||||||
if(!dataCompressionEnable){
|
if(!dataCompressionEnable){
|
||||||
@ -1054,7 +1054,7 @@ void UDPStandardImplementation::closeFile(int i){
|
|||||||
|
|
||||||
|
|
||||||
int UDPStandardImplementation::createListeningThreads(bool destroy){
|
int UDPStandardImplementation::createListeningThreads(bool destroy){
|
||||||
FILE_LOG(logDEBUG1) << __AT__ << " starting";
|
FILE_LOG(logDEBUG) << __AT__ << " starting";
|
||||||
|
|
||||||
//reset masks
|
//reset masks
|
||||||
killAllListeningThreads = false;
|
killAllListeningThreads = false;
|
||||||
@ -1104,7 +1104,7 @@ int UDPStandardImplementation::createListeningThreads(bool destroy){
|
|||||||
|
|
||||||
|
|
||||||
int UDPStandardImplementation::createWriterThreads(bool destroy){
|
int UDPStandardImplementation::createWriterThreads(bool destroy){
|
||||||
FILE_LOG(logDEBUG1) << __AT__ << " starting";
|
FILE_LOG(logDEBUG) << __AT__ << " starting";
|
||||||
|
|
||||||
//reset masks
|
//reset masks
|
||||||
killAllWritingThreads = false;
|
killAllWritingThreads = false;
|
||||||
@ -1157,7 +1157,7 @@ int UDPStandardImplementation::createWriterThreads(bool destroy){
|
|||||||
|
|
||||||
|
|
||||||
void UDPStandardImplementation::setThreadPriorities(){
|
void UDPStandardImplementation::setThreadPriorities(){
|
||||||
FILE_LOG(logDEBUG1) << __AT__ << " called";
|
FILE_LOG(logDEBUG) << __AT__ << " called";
|
||||||
|
|
||||||
struct sched_param tcp_param, listen_param, write_param;
|
struct sched_param tcp_param, listen_param, write_param;
|
||||||
bool rights = true;
|
bool rights = true;
|
||||||
@ -1193,7 +1193,7 @@ void UDPStandardImplementation::setThreadPriorities(){
|
|||||||
|
|
||||||
|
|
||||||
int UDPStandardImplementation::createUDPSockets(){
|
int UDPStandardImplementation::createUDPSockets(){
|
||||||
FILE_LOG(logDEBUG1) << __AT__ << " called";
|
FILE_LOG(logDEBUG) << __AT__ << " called";
|
||||||
|
|
||||||
//switching ports if bottom enabled
|
//switching ports if bottom enabled
|
||||||
uint32_t port[2];
|
uint32_t port[2];
|
||||||
@ -1247,7 +1247,7 @@ int UDPStandardImplementation::createUDPSockets(){
|
|||||||
|
|
||||||
|
|
||||||
int UDPStandardImplementation::setupWriter(){
|
int UDPStandardImplementation::setupWriter(){
|
||||||
FILE_LOG(logDEBUG1) << __AT__ << " starting";
|
FILE_LOG(logDEBUG) << __AT__ << " starting";
|
||||||
|
|
||||||
//acquisition start call back returns enable write
|
//acquisition start call back returns enable write
|
||||||
cbAction = DO_EVERYTHING;
|
cbAction = DO_EVERYTHING;
|
||||||
@ -1297,7 +1297,7 @@ int UDPStandardImplementation::setupWriter(){
|
|||||||
|
|
||||||
|
|
||||||
int UDPStandardImplementation::createNewFile(){
|
int UDPStandardImplementation::createNewFile(){
|
||||||
FILE_LOG(logDEBUG1) << __AT__ << " called";
|
FILE_LOG(logDEBUG) << __AT__ << " called";
|
||||||
|
|
||||||
int index = 0;
|
int index = 0;
|
||||||
if(packetsCaught)
|
if(packetsCaught)
|
||||||
@ -1370,7 +1370,7 @@ int UDPStandardImplementation::createNewFile(){
|
|||||||
|
|
||||||
|
|
||||||
int UDPStandardImplementation::createCompressionFile(int ithread, int iframe){
|
int UDPStandardImplementation::createCompressionFile(int ithread, int iframe){
|
||||||
FILE_LOG(logDEBUG1) << __AT__ << " called";
|
FILE_LOG(logDEBUG) << __AT__ << " called";
|
||||||
|
|
||||||
#ifdef MYROOT1
|
#ifdef MYROOT1
|
||||||
char temp[MAX_STR_LENGTH];
|
char temp[MAX_STR_LENGTH];
|
||||||
@ -1400,7 +1400,7 @@ int UDPStandardImplementation::createCompressionFile(int ithread, int iframe){
|
|||||||
|
|
||||||
|
|
||||||
void* UDPStandardImplementation::startListeningThread(void* this_pointer){
|
void* UDPStandardImplementation::startListeningThread(void* this_pointer){
|
||||||
FILE_LOG(logDEBUG1) << __AT__ << " called";
|
FILE_LOG(logDEBUG) << __AT__ << " called";
|
||||||
((UDPStandardImplementation*)this_pointer)->startListening();
|
((UDPStandardImplementation*)this_pointer)->startListening();
|
||||||
return this_pointer;
|
return this_pointer;
|
||||||
}
|
}
|
||||||
@ -1408,7 +1408,7 @@ void* UDPStandardImplementation::startListeningThread(void* this_pointer){
|
|||||||
|
|
||||||
|
|
||||||
void* UDPStandardImplementation::startWritingThread(void* this_pointer){
|
void* UDPStandardImplementation::startWritingThread(void* this_pointer){
|
||||||
FILE_LOG(logDEBUG1) << __AT__ << " called";
|
FILE_LOG(logDEBUG) << __AT__ << " called";
|
||||||
((UDPStandardImplementation*)this_pointer)->startWriting();
|
((UDPStandardImplementation*)this_pointer)->startWriting();
|
||||||
return this_pointer;
|
return this_pointer;
|
||||||
}
|
}
|
||||||
@ -1419,7 +1419,7 @@ void* UDPStandardImplementation::startWritingThread(void* this_pointer){
|
|||||||
|
|
||||||
|
|
||||||
void UDPStandardImplementation::startListening(){
|
void UDPStandardImplementation::startListening(){
|
||||||
FILE_LOG(logDEBUG1) << __AT__ << " called";
|
FILE_LOG(logDEBUG) << __AT__ << " called";
|
||||||
|
|
||||||
//set current thread value index
|
//set current thread value index
|
||||||
int ithread = currentThreadIndex;
|
int ithread = currentThreadIndex;
|
||||||
@ -1433,16 +1433,18 @@ void UDPStandardImplementation::startListening(){
|
|||||||
//split frames
|
//split frames
|
||||||
int carryonBufferSize; //from previous buffer to keep frames together in a buffer
|
int carryonBufferSize; //from previous buffer to keep frames together in a buffer
|
||||||
char* tempBuffer = NULL; //temporary buffer to store split frames
|
char* tempBuffer = NULL; //temporary buffer to store split frames
|
||||||
if(myDetectorType != EIGER){
|
|
||||||
listenSize = bufferSize * numberofJobsPerBuffer; //listen to more than 1 packet
|
|
||||||
tempBuffer = new char[onePacketSize * (packetsPerFrame - 1)]; //store maximum of 1 packets less in a frame
|
|
||||||
}
|
|
||||||
/* outer loop - loops once for each acquisition */
|
/* outer loop - loops once for each acquisition */
|
||||||
//infinite loop, exited only to change dynamic range, 10G parameters etc (then recreated again)
|
//infinite loop, exited only to change dynamic range, 10G parameters etc (then recreated again)
|
||||||
while(true){
|
while(true){
|
||||||
|
|
||||||
//reset parameters before acquisition
|
//reset parameters before acquisition
|
||||||
carryonBufferSize = 0;
|
carryonBufferSize = 0;
|
||||||
|
if(myDetectorType != EIGER){
|
||||||
|
listenSize = bufferSize * numberofJobsPerBuffer; //listen to more than 1 packet
|
||||||
|
if(tempBuffer!=NULL){delete []tempBuffer;tempBuffer=NULL;}
|
||||||
|
tempBuffer = new char[onePacketSize * (packetsPerFrame - 1)]; //store maximum of 1 packets less in a frame
|
||||||
|
}
|
||||||
|
|
||||||
/* inner loop - loop for each buffer */
|
/* inner loop - loop for each buffer */
|
||||||
//until mask unset (udp sockets shut down by client)
|
//until mask unset (udp sockets shut down by client)
|
||||||
@ -1512,7 +1514,7 @@ void UDPStandardImplementation::startListening(){
|
|||||||
|
|
||||||
|
|
||||||
int UDPStandardImplementation::prepareAndListenBuffer(int ithread, int lSize, int cSize, char* temp){
|
int UDPStandardImplementation::prepareAndListenBuffer(int ithread, int lSize, int cSize, char* temp){
|
||||||
FILE_LOG(logDEBUG1) << __AT__ << " called";
|
FILE_LOG(logDEBUG) << __AT__ << " called";
|
||||||
|
|
||||||
//listen to UDP packets
|
//listen to UDP packets
|
||||||
memcpy(buffer[ithread] + HEADER_SIZE_NUM_TOT_PACKETS, temp, cSize);
|
memcpy(buffer[ithread] + HEADER_SIZE_NUM_TOT_PACKETS, temp, cSize);
|
||||||
@ -1529,6 +1531,17 @@ int UDPStandardImplementation::prepareAndListenBuffer(int ithread, int lSize, in
|
|||||||
receivedSize = udpSocket[ithread]->ReceiveDataOnly(buffer[ithread] + HEADER_SIZE_NUM_TOT_PACKETS);
|
receivedSize = udpSocket[ithread]->ReceiveDataOnly(buffer[ithread] + HEADER_SIZE_NUM_TOT_PACKETS);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef MANUALDEBUG
|
||||||
|
eiger_packet_header_t* header = (eiger_packet_header_t*) (buffer[ithread]+HEADER_SIZE_NUM_TOT_PACKETS);
|
||||||
|
eiger_packet_footer_t* footer = (eiger_packet_footer_t*)(buffer[ithread] + footerOffset + HEADER_SIZE_NUM_TOT_PACKETS);
|
||||||
|
cprintf(GREEN,"thread:%d subframenum:%d oldpacketnum:%d new pnum:%d\n",
|
||||||
|
ithread,
|
||||||
|
(*( (unsigned int*) header->subFameNumber)),
|
||||||
|
(*( (uint8_t*) header->dynamicRange)),
|
||||||
|
(*( (uint16_t*) footer->packetNumber)));
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
cprintf(BLUE, "Listening_Thread %d : Received bytes: %d. Expected bytes: %d\n", ithread, receivedSize, bufferSize * numberofJobsPerBuffer-cSize);
|
cprintf(BLUE, "Listening_Thread %d : Received bytes: %d. Expected bytes: %d\n", ithread, receivedSize, bufferSize * numberofJobsPerBuffer-cSize);
|
||||||
#endif
|
#endif
|
||||||
@ -1541,7 +1554,7 @@ int UDPStandardImplementation::prepareAndListenBuffer(int ithread, int lSize, in
|
|||||||
|
|
||||||
|
|
||||||
void UDPStandardImplementation::startFrameIndices(int ithread){
|
void UDPStandardImplementation::startFrameIndices(int ithread){
|
||||||
FILE_LOG(logDEBUG1) << __AT__ << " called";
|
FILE_LOG(logDEBUG) << __AT__ << " called";
|
||||||
|
|
||||||
//determine startFrameIndex
|
//determine startFrameIndex
|
||||||
switch(myDetectorType){
|
switch(myDetectorType){
|
||||||
@ -1578,7 +1591,7 @@ void UDPStandardImplementation::startFrameIndices(int ithread){
|
|||||||
|
|
||||||
|
|
||||||
void UDPStandardImplementation::stopListening(int ithread, int numbytes){
|
void UDPStandardImplementation::stopListening(int ithread, int numbytes){
|
||||||
FILE_LOG(logDEBUG1) << __AT__ << " called";
|
FILE_LOG(logDEBUG) << __AT__ << " called";
|
||||||
|
|
||||||
#ifdef DEBUG4
|
#ifdef DEBUG4
|
||||||
cprintf(BLUE,"Listening_Thread %d: Stop Listening\nStatus: %s\n", ithread, runStatusType(status).c_str());
|
cprintf(BLUE,"Listening_Thread %d: Stop Listening\nStatus: %s\n", ithread, runStatusType(status).c_str());
|
||||||
@ -1657,7 +1670,7 @@ void UDPStandardImplementation::stopListening(int ithread, int numbytes){
|
|||||||
|
|
||||||
|
|
||||||
uint32_t UDPStandardImplementation::processListeningBuffer(int ithread, int cSize, char* temp){
|
uint32_t UDPStandardImplementation::processListeningBuffer(int ithread, int cSize, char* temp){
|
||||||
FILE_LOG(logDEBUG1) << __AT__ << " called";
|
FILE_LOG(logDEBUG) << __AT__ << " called";
|
||||||
|
|
||||||
int lastPacketOffset; //the offset of the last packet
|
int lastPacketOffset; //the offset of the last packet
|
||||||
uint32_t lastFrameHeader; //frame number of last packet in buffer
|
uint32_t lastFrameHeader; //frame number of last packet in buffer
|
||||||
@ -1741,7 +1754,7 @@ uint32_t UDPStandardImplementation::processListeningBuffer(int ithread, int cSiz
|
|||||||
|
|
||||||
|
|
||||||
void UDPStandardImplementation::startWriting(){
|
void UDPStandardImplementation::startWriting(){
|
||||||
FILE_LOG(logDEBUG1) << __AT__ << " called";
|
FILE_LOG(logDEBUG) << __AT__ << " called";
|
||||||
|
|
||||||
//set current thread value index
|
//set current thread value index
|
||||||
int ithread = currentThreadIndex;
|
int ithread = currentThreadIndex;
|
||||||
@ -1762,7 +1775,7 @@ void UDPStandardImplementation::startWriting(){
|
|||||||
|
|
||||||
|
|
||||||
void UDPStandardImplementation::processWritingBuffer(int ithread){
|
void UDPStandardImplementation::processWritingBuffer(int ithread){
|
||||||
FILE_LOG(logDEBUG1) << __AT__ << " called";
|
FILE_LOG(logDEBUG) << __AT__ << " called";
|
||||||
|
|
||||||
//variable definitions
|
//variable definitions
|
||||||
char* wbuf[numberofListeningThreads]; //buffer popped from FIFO
|
char* wbuf[numberofListeningThreads]; //buffer popped from FIFO
|
||||||
@ -1829,7 +1842,7 @@ void UDPStandardImplementation::processWritingBuffer(int ithread){
|
|||||||
|
|
||||||
|
|
||||||
void UDPStandardImplementation::processWritingBufferPacketByPacket(int ithread){
|
void UDPStandardImplementation::processWritingBufferPacketByPacket(int ithread){
|
||||||
FILE_LOG(logDEBUG1) << __AT__ << " called";
|
FILE_LOG(logDEBUG) << __AT__ << " called";
|
||||||
|
|
||||||
//variable definitions
|
//variable definitions
|
||||||
char* packetBuffer[numberofListeningThreads]; //buffer popped from FIFO
|
char* packetBuffer[numberofListeningThreads]; //buffer popped from FIFO
|
||||||
@ -2133,7 +2146,7 @@ void UDPStandardImplementation::processWritingBufferPacketByPacket(int ithread){
|
|||||||
|
|
||||||
|
|
||||||
void UDPStandardImplementation::waitWritingBufferForNextAcquisition(int ithread){
|
void UDPStandardImplementation::waitWritingBufferForNextAcquisition(int ithread){
|
||||||
FILE_LOG(logDEBUG1) << __AT__ << " called";
|
FILE_LOG(logDEBUG) << __AT__ << " called";
|
||||||
|
|
||||||
//in case they are not closed already
|
//in case they are not closed already
|
||||||
closeFile();
|
closeFile();
|
||||||
@ -2190,7 +2203,7 @@ void UDPStandardImplementation::waitWritingBufferForNextAcquisition(int ithread)
|
|||||||
|
|
||||||
|
|
||||||
bool UDPStandardImplementation::popAndCheckEndofAcquisition(int ithread, char* wbuffer[], bool ready[], uint32_t nP[],char* toFree[],int toFreeOffset[]){
|
bool UDPStandardImplementation::popAndCheckEndofAcquisition(int ithread, char* wbuffer[], bool ready[], uint32_t nP[],char* toFree[],int toFreeOffset[]){
|
||||||
FILE_LOG(logDEBUG1) << __AT__ << " called";
|
FILE_LOG(logDEBUG) << __AT__ << " called";
|
||||||
|
|
||||||
bool endofAcquisition = true;
|
bool endofAcquisition = true;
|
||||||
for(int i=0; i<numberofListeningThreads; ++i){
|
for(int i=0; i<numberofListeningThreads; ++i){
|
||||||
@ -2239,7 +2252,7 @@ bool UDPStandardImplementation::popAndCheckEndofAcquisition(int ithread, char* w
|
|||||||
|
|
||||||
|
|
||||||
void UDPStandardImplementation::stopWriting(int ithread, char* wbuffer[]){
|
void UDPStandardImplementation::stopWriting(int ithread, char* wbuffer[]){
|
||||||
FILE_LOG(logDEBUG1) << __AT__ << " called";
|
FILE_LOG(logDEBUG) << __AT__ << " called";
|
||||||
|
|
||||||
cprintf(GREEN,"Info: Writing_Thread %d: End of Acquisition\n",ithread);
|
cprintf(GREEN,"Info: Writing_Thread %d: End of Acquisition\n",ithread);
|
||||||
|
|
||||||
@ -2302,7 +2315,7 @@ void UDPStandardImplementation::stopWriting(int ithread, char* wbuffer[]){
|
|||||||
|
|
||||||
|
|
||||||
void UDPStandardImplementation::handleWithoutDataCompression(int ithread, char* wbuffer[],uint32_t npackets){
|
void UDPStandardImplementation::handleWithoutDataCompression(int ithread, char* wbuffer[],uint32_t npackets){
|
||||||
FILE_LOG(logDEBUG1) << __AT__ << " called";
|
FILE_LOG(logDEBUG) << __AT__ << " called";
|
||||||
|
|
||||||
|
|
||||||
//get frame number (eiger already gets it when it does packet to packet processing)
|
//get frame number (eiger already gets it when it does packet to packet processing)
|
||||||
@ -2362,7 +2375,7 @@ void UDPStandardImplementation::handleWithoutDataCompression(int ithread, char*
|
|||||||
|
|
||||||
|
|
||||||
void UDPStandardImplementation::writeFileWithoutCompression(char* wbuffer[],uint32_t numpackets){
|
void UDPStandardImplementation::writeFileWithoutCompression(char* wbuffer[],uint32_t numpackets){
|
||||||
FILE_LOG(logDEBUG1) << __AT__ << " called";
|
FILE_LOG(logDEBUG) << __AT__ << " called";
|
||||||
|
|
||||||
|
|
||||||
//create headers for eiger
|
//create headers for eiger
|
||||||
@ -2505,7 +2518,7 @@ void UDPStandardImplementation::createHeaders(char* wbuffer[]){
|
|||||||
|
|
||||||
|
|
||||||
void UDPStandardImplementation::copyFrameToGui(char* buffer[]){
|
void UDPStandardImplementation::copyFrameToGui(char* buffer[]){
|
||||||
FILE_LOG(logDEBUG1) << __AT__ << " called";
|
FILE_LOG(logDEBUG) << __AT__ << " called";
|
||||||
|
|
||||||
|
|
||||||
//random read (gui not ready)
|
//random read (gui not ready)
|
||||||
@ -2565,7 +2578,7 @@ void UDPStandardImplementation::copyFrameToGui(char* buffer[]){
|
|||||||
|
|
||||||
|
|
||||||
void UDPStandardImplementation::handleDataCompression(int ithread, char* wbuffer[], uint64_t &nf){
|
void UDPStandardImplementation::handleDataCompression(int ithread, char* wbuffer[], uint64_t &nf){
|
||||||
FILE_LOG(logDEBUG1) << __AT__ << " called";
|
FILE_LOG(logDEBUG) << __AT__ << " called";
|
||||||
|
|
||||||
//frame number
|
//frame number
|
||||||
uint64_t tempframenumber = ((uint32_t)(*((uint32_t*)(wbuffer[ithread] + HEADER_SIZE_NUM_TOT_PACKETS))));
|
uint64_t tempframenumber = ((uint32_t)(*((uint32_t*)(wbuffer[ithread] + HEADER_SIZE_NUM_TOT_PACKETS))));
|
||||||
|
@ -64,7 +64,7 @@ slsReceiverTCPIPInterface::slsReceiverTCPIPInterface(int &success, UDPInterface*
|
|||||||
strcpy(socket->thisClientIP,"none1");
|
strcpy(socket->thisClientIP,"none1");
|
||||||
strcpy(mess,"dummy message");
|
strcpy(mess,"dummy message");
|
||||||
function_table();
|
function_table();
|
||||||
#ifdef VERBOSE
|
#ifdef VERYVERBOSE
|
||||||
cout << "Function table assigned." << endl;
|
cout << "Function table assigned." << endl;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@ -124,7 +124,7 @@ int slsReceiverTCPIPInterface::start(){
|
|||||||
cout << "Could not create TCP Server thread" << endl;
|
cout << "Could not create TCP Server thread" << endl;
|
||||||
return FAIL;
|
return FAIL;
|
||||||
}
|
}
|
||||||
//#ifdef VERBOSE
|
//#ifdef VERYVERBOSE
|
||||||
FILE_LOG(logDEBUG) << "TCP Server thread created successfully." << endl;
|
FILE_LOG(logDEBUG) << "TCP Server thread created successfully." << endl;
|
||||||
//#endif
|
//#endif
|
||||||
return OK;
|
return OK;
|
||||||
@ -160,7 +160,7 @@ void slsReceiverTCPIPInterface::startTCPServer(){
|
|||||||
int v=OK;
|
int v=OK;
|
||||||
|
|
||||||
while(1) {
|
while(1) {
|
||||||
#ifdef VERBOSE
|
#ifdef VERYVERBOSE
|
||||||
cout<< endl;
|
cout<< endl;
|
||||||
#endif
|
#endif
|
||||||
#ifdef VERY_VERBOSE
|
#ifdef VERY_VERBOSE
|
||||||
@ -254,7 +254,7 @@ int slsReceiverTCPIPInterface::function_table(){
|
|||||||
flist[F_ENABLE_RECEIVER_TEN_GIGA] = &slsReceiverTCPIPInterface::enable_tengiga;
|
flist[F_ENABLE_RECEIVER_TEN_GIGA] = &slsReceiverTCPIPInterface::enable_tengiga;
|
||||||
|
|
||||||
|
|
||||||
#ifdef VERBOSE
|
#ifdef VERYVERBOSE
|
||||||
for (int i=0;i<numberOfFunctions;i++)
|
for (int i=0;i<numberOfFunctions;i++)
|
||||||
cout << "function " << i << "located at " << flist[i] << endl;
|
cout << "function " << i << "located at " << flist[i] << endl;
|
||||||
#endif
|
#endif
|
||||||
@ -269,22 +269,22 @@ int slsReceiverTCPIPInterface::function_table(){
|
|||||||
int slsReceiverTCPIPInterface::decode_function(){
|
int slsReceiverTCPIPInterface::decode_function(){
|
||||||
ret = FAIL;
|
ret = FAIL;
|
||||||
int n,fnum;
|
int n,fnum;
|
||||||
#ifdef VERBOSE
|
#ifdef VERYVERBOSE
|
||||||
cout << "receive data" << endl;
|
cout << "receive data" << endl;
|
||||||
#endif
|
#endif
|
||||||
n = socket->ReceiveDataOnly(&fnum,sizeof(fnum));
|
n = socket->ReceiveDataOnly(&fnum,sizeof(fnum));
|
||||||
if (n <= 0) {
|
if (n <= 0) {
|
||||||
#ifdef VERBOSE
|
#ifdef VERYVERBOSE
|
||||||
cout << "ERROR reading from socket " << n << ", " << fnum << endl;
|
cout << "ERROR reading from socket " << n << ", " << fnum << endl;
|
||||||
#endif
|
#endif
|
||||||
return FAIL;
|
return FAIL;
|
||||||
}
|
}
|
||||||
#ifdef VERBOSE
|
#ifdef VERYVERBOSE
|
||||||
else
|
else
|
||||||
cout << "size of data received " << n <<endl;
|
cout << "size of data received " << n <<endl;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef VERBOSE
|
#ifdef VERYVERBOSE
|
||||||
cout << "calling function fnum = "<< fnum << hex << ":"<< flist[fnum] << endl;
|
cout << "calling function fnum = "<< fnum << hex << ":"<< flist[fnum] << endl;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -372,7 +372,7 @@ int slsReceiverTCPIPInterface::set_detector_type(){
|
|||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//#ifdef VERBOSE
|
//#ifdef VERYVERBOSE
|
||||||
if(ret!=FAIL)
|
if(ret!=FAIL)
|
||||||
FILE_LOG(logDEBUG) << "detector type " << dr;
|
FILE_LOG(logDEBUG) << "detector type " << dr;
|
||||||
else
|
else
|
||||||
@ -433,7 +433,7 @@ int slsReceiverTCPIPInterface::set_file_name() {
|
|||||||
ret = FAIL;
|
ret = FAIL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#ifdef VERBOSE
|
#ifdef VERYVERBOSE
|
||||||
if(ret!=FAIL)
|
if(ret!=FAIL)
|
||||||
cout << "file name:" << retval << endl;
|
cout << "file name:" << retval << endl;
|
||||||
else
|
else
|
||||||
@ -505,7 +505,7 @@ int slsReceiverTCPIPInterface::set_file_dir() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
#ifdef VERBOSE
|
#ifdef VERYVERBOSE
|
||||||
if(ret!=FAIL)
|
if(ret!=FAIL)
|
||||||
cout << "file path:" << retval << endl;
|
cout << "file path:" << retval << endl;
|
||||||
else
|
else
|
||||||
@ -571,7 +571,7 @@ int slsReceiverTCPIPInterface::set_file_index() {
|
|||||||
ret = FAIL;
|
ret = FAIL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#ifdef VERBOSE
|
#ifdef VERYVERBOSE
|
||||||
if(ret!=FAIL)
|
if(ret!=FAIL)
|
||||||
cout << "file index:" << retval << endl;
|
cout << "file index:" << retval << endl;
|
||||||
else
|
else
|
||||||
@ -644,7 +644,7 @@ int slsReceiverTCPIPInterface::set_frame_index() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#ifdef VERBOSE
|
#ifdef VERYVERBOSE
|
||||||
if(ret!=FAIL)
|
if(ret!=FAIL)
|
||||||
cout << "frame index:" << retval << endl;
|
cout << "frame index:" << retval << endl;
|
||||||
else
|
else
|
||||||
@ -1130,7 +1130,7 @@ int slsReceiverTCPIPInterface::moench_read_frame(){
|
|||||||
/**send garbage with -1 index to try again*/
|
/**send garbage with -1 index to try again*/
|
||||||
if (raw == NULL){
|
if (raw == NULL){
|
||||||
startAcquisitionIndex = -1;
|
startAcquisitionIndex = -1;
|
||||||
#ifdef VERBOSE
|
#ifdef VERYVERBOSE
|
||||||
cout<<"data not ready for gui yet"<<endl;
|
cout<<"data not ready for gui yet"<<endl;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@ -1154,7 +1154,7 @@ int slsReceiverTCPIPInterface::moench_read_frame(){
|
|||||||
|
|
||||||
|
|
||||||
while (iPacket < (int)numPackets){
|
while (iPacket < (int)numPackets){
|
||||||
#ifdef VERBOSE
|
#ifdef VERYVERBOSE
|
||||||
printf("iPacket:%d\n",iPacket);cout << endl;
|
printf("iPacket:%d\n",iPacket);cout << endl;
|
||||||
#endif
|
#endif
|
||||||
//if missing packets, dont send to gui
|
//if missing packets, dont send to gui
|
||||||
@ -1179,7 +1179,7 @@ int slsReceiverTCPIPInterface::moench_read_frame(){
|
|||||||
|
|
||||||
x = packetIndex / 10;
|
x = packetIndex / 10;
|
||||||
y = packetIndex % 10;
|
y = packetIndex % 10;
|
||||||
#ifdef VERBOSE
|
#ifdef VERYVERBOSE
|
||||||
cout<<"x:"<<x<<" y:"<<y<<endl;
|
cout<<"x:"<<x<<" y:"<<y<<endl;
|
||||||
#endif
|
#endif
|
||||||
//copy 16 times 80 bytes
|
//copy 16 times 80 bytes
|
||||||
@ -1221,7 +1221,7 @@ int slsReceiverTCPIPInterface::moench_read_frame(){
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef VERBOSE
|
#ifdef VERYVERBOSE
|
||||||
cout << "fName:" << fName << endl;
|
cout << "fName:" << fName << endl;
|
||||||
cout << "acquisitionIndex:" << acquisitionIndex << endl;
|
cout << "acquisitionIndex:" << acquisitionIndex << endl;
|
||||||
cout << "frameIndex:" << frameIndex << endl;
|
cout << "frameIndex:" << frameIndex << endl;
|
||||||
@ -1318,7 +1318,7 @@ int slsReceiverTCPIPInterface::gotthard_read_frame(){
|
|||||||
/**send garbage with -1 index to try again*/
|
/**send garbage with -1 index to try again*/
|
||||||
if (raw == NULL){
|
if (raw == NULL){
|
||||||
startAcquisitionIndex = -1;
|
startAcquisitionIndex = -1;
|
||||||
#ifdef VERBOSE
|
#ifdef VERYVERBOSE
|
||||||
cout<<"data not ready for gui yet"<<endl;
|
cout<<"data not ready for gui yet"<<endl;
|
||||||
#endif
|
#endif
|
||||||
}else{
|
}else{
|
||||||
@ -1326,7 +1326,7 @@ int slsReceiverTCPIPInterface::gotthard_read_frame(){
|
|||||||
bindex = (uint32_t)(*((uint32_t*)raw));
|
bindex = (uint32_t)(*((uint32_t*)raw));
|
||||||
pindex = (bindex & GOTTHARD_SHORT_PACKET_INDEX_MASK);
|
pindex = (bindex & GOTTHARD_SHORT_PACKET_INDEX_MASK);
|
||||||
index = ((bindex & GOTTHARD_SHORT_FRAME_INDEX_MASK) >> GOTTHARD_SHORT_FRAME_INDEX_OFFSET);
|
index = ((bindex & GOTTHARD_SHORT_FRAME_INDEX_MASK) >> GOTTHARD_SHORT_FRAME_INDEX_OFFSET);
|
||||||
#ifdef VERBOSE
|
#ifdef VERYVERBOSE
|
||||||
cout << "index:" << hex << index << endl;
|
cout << "index:" << hex << index << endl;
|
||||||
#endif
|
#endif
|
||||||
}else{
|
}else{
|
||||||
@ -1336,7 +1336,7 @@ int slsReceiverTCPIPInterface::gotthard_read_frame(){
|
|||||||
bindex2 = ((uint32_t)(*((uint32_t*)((char*)(raw+onebuffersize)))))+1;
|
bindex2 = ((uint32_t)(*((uint32_t*)((char*)(raw+onebuffersize)))))+1;
|
||||||
pindex2 =(bindex2 & GOTTHARD_PACKET_INDEX_MASK);
|
pindex2 =(bindex2 & GOTTHARD_PACKET_INDEX_MASK);
|
||||||
index2 =((bindex2 & GOTTHARD_FRAME_INDEX_MASK) >> GOTTHARD_FRAME_INDEX_OFFSET);
|
index2 =((bindex2 & GOTTHARD_FRAME_INDEX_MASK) >> GOTTHARD_FRAME_INDEX_OFFSET);
|
||||||
#ifdef VERBOSE
|
#ifdef VERYVERBOSE
|
||||||
cout << "index1:" << hex << index << endl;
|
cout << "index1:" << hex << index << endl;
|
||||||
cout << "index2:" << hex << index << endl;
|
cout << "index2:" << hex << index << endl;
|
||||||
#endif
|
#endif
|
||||||
@ -1398,7 +1398,7 @@ int slsReceiverTCPIPInterface::gotthard_read_frame(){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef VERBOSE
|
#ifdef VERYVERBOSE
|
||||||
if(frameIndex!=-1){
|
if(frameIndex!=-1){
|
||||||
cout << "fName:" << fName << endl;
|
cout << "fName:" << fName << endl;
|
||||||
cout << "acquisitionIndex:" << acquisitionIndex << endl;
|
cout << "acquisitionIndex:" << acquisitionIndex << endl;
|
||||||
@ -1493,7 +1493,7 @@ int slsReceiverTCPIPInterface::propix_read_frame(){
|
|||||||
/**send garbage with -1 index to try again*/
|
/**send garbage with -1 index to try again*/
|
||||||
if (raw == NULL){
|
if (raw == NULL){
|
||||||
startAcquisitionIndex = -1;
|
startAcquisitionIndex = -1;
|
||||||
#ifdef VERBOSE
|
#ifdef VERYVERBOSE
|
||||||
cout<<"data not ready for gui yet"<<endl;
|
cout<<"data not ready for gui yet"<<endl;
|
||||||
#endif
|
#endif
|
||||||
}else{
|
}else{
|
||||||
@ -1503,7 +1503,7 @@ int slsReceiverTCPIPInterface::propix_read_frame(){
|
|||||||
bindex2 = ((uint32_t)(*((uint32_t*)((char*)(raw+onebuffersize)))))+1;
|
bindex2 = ((uint32_t)(*((uint32_t*)((char*)(raw+onebuffersize)))))+1;
|
||||||
pindex2 =(bindex2 & PROPIX_PACKET_INDEX_MASK);
|
pindex2 =(bindex2 & PROPIX_PACKET_INDEX_MASK);
|
||||||
index2 =((bindex2 & PROPIX_FRAME_INDEX_MASK) >> PROPIX_FRAME_INDEX_OFFSET);
|
index2 =((bindex2 & PROPIX_FRAME_INDEX_MASK) >> PROPIX_FRAME_INDEX_OFFSET);
|
||||||
#ifdef VERBOSE
|
#ifdef VERYVERBOSE
|
||||||
cout << "index1:" << hex << index << endl;
|
cout << "index1:" << hex << index << endl;
|
||||||
cout << "index2:" << hex << index << endl;
|
cout << "index2:" << hex << index << endl;
|
||||||
#endif
|
#endif
|
||||||
@ -1552,7 +1552,7 @@ int slsReceiverTCPIPInterface::propix_read_frame(){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef VERBOSE
|
#ifdef VERYVERBOSE
|
||||||
if(frameIndex!=-1){
|
if(frameIndex!=-1){
|
||||||
cout << "fName:" << fName << endl;
|
cout << "fName:" << fName << endl;
|
||||||
cout << "acquisitionIndex:" << acquisitionIndex << endl;
|
cout << "acquisitionIndex:" << acquisitionIndex << endl;
|
||||||
@ -1652,7 +1652,7 @@ int slsReceiverTCPIPInterface::eiger_read_frame(){
|
|||||||
/**send garbage with -1 index to try again*/
|
/**send garbage with -1 index to try again*/
|
||||||
else if(!receiverBase->getFramesCaught()){
|
else if(!receiverBase->getFramesCaught()){
|
||||||
startAcquisitionIndex=-1;
|
startAcquisitionIndex=-1;
|
||||||
#ifdef VERBOSE
|
#ifdef VERYVERBOSE
|
||||||
cout<<"haven't caught any frame yet"<<endl;
|
cout<<"haven't caught any frame yet"<<endl;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@ -1665,7 +1665,7 @@ int slsReceiverTCPIPInterface::eiger_read_frame(){
|
|||||||
/**send garbage with -1 index to try again*/
|
/**send garbage with -1 index to try again*/
|
||||||
if (raw == NULL){
|
if (raw == NULL){
|
||||||
startAcquisitionIndex = -1;
|
startAcquisitionIndex = -1;
|
||||||
#ifdef VERBOSE
|
#ifdef VERYVERBOSE
|
||||||
cout<<"data not ready for gui yet"<<endl;
|
cout<<"data not ready for gui yet"<<endl;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@ -1683,7 +1683,7 @@ int slsReceiverTCPIPInterface::eiger_read_frame(){
|
|||||||
subframenumber = *( (uint32_t*) wbuf_header->subframenum);
|
subframenumber = *( (uint32_t*) wbuf_header->subframenum);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef VERBOSE
|
#ifdef VERYVERBOSE
|
||||||
cout << "index:" << dec << index << endl;
|
cout << "index:" << dec << index << endl;
|
||||||
cout << "subframenumber:" << dec << subframenumber << endl;
|
cout << "subframenumber:" << dec << subframenumber << endl;
|
||||||
#endif
|
#endif
|
||||||
@ -1813,7 +1813,7 @@ int slsReceiverTCPIPInterface::eiger_read_frame(){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef VERBOSE
|
#ifdef VERYVERBOSE
|
||||||
if(frameIndex!=-1){
|
if(frameIndex!=-1){
|
||||||
cout << "fName:" << fName << endl;
|
cout << "fName:" << fName << endl;
|
||||||
cout << "acquisitionIndex:" << acquisitionIndex << endl;
|
cout << "acquisitionIndex:" << acquisitionIndex << endl;
|
||||||
@ -2093,7 +2093,7 @@ int slsReceiverTCPIPInterface::set_timer() {
|
|||||||
ret = FAIL;
|
ret = FAIL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#ifdef VERBOSE
|
#ifdef VERYVERBOSE
|
||||||
if(ret!=FAIL){
|
if(ret!=FAIL){
|
||||||
if(index[0] == FRAME_PERIOD)
|
if(index[0] == FRAME_PERIOD)
|
||||||
cout << "acquisition period:" << retval << endl;
|
cout << "acquisition period:" << retval << endl;
|
||||||
@ -2228,7 +2228,7 @@ int slsReceiverTCPIPInterface::set_detector_hostname() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#ifdef VERBOSE
|
#ifdef VERYVERBOSE
|
||||||
if(ret!=FAIL)
|
if(ret!=FAIL)
|
||||||
cout << "hostname:" << retval << endl;
|
cout << "hostname:" << retval << endl;
|
||||||
else
|
else
|
||||||
@ -2320,7 +2320,7 @@ int slsReceiverTCPIPInterface::set_dynamic_range() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#ifdef VERBOSE
|
#ifdef VERYVERBOSE
|
||||||
if(ret!=FAIL)
|
if(ret!=FAIL)
|
||||||
cout << "dynamic range" << dr << endl;
|
cout << "dynamic range" << dr << endl;
|
||||||
else
|
else
|
||||||
@ -2383,7 +2383,7 @@ int slsReceiverTCPIPInterface::enable_overwrite() {
|
|||||||
ret = FAIL;
|
ret = FAIL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#ifdef VERBOSE
|
#ifdef VERYVERBOSE
|
||||||
if(ret!=FAIL)
|
if(ret!=FAIL)
|
||||||
cout << "overwrite:" << retval << endl;
|
cout << "overwrite:" << retval << endl;
|
||||||
else
|
else
|
||||||
@ -2448,7 +2448,7 @@ int slsReceiverTCPIPInterface::enable_tengiga() {
|
|||||||
tenGigaEnable = retval;
|
tenGigaEnable = retval;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#ifdef VERBOSE
|
#ifdef VERYVERBOSE
|
||||||
if(ret!=FAIL)
|
if(ret!=FAIL)
|
||||||
cout << "10Gbe:" << val << endl;
|
cout << "10Gbe:" << val << endl;
|
||||||
else
|
else
|
||||||
@ -2749,7 +2749,7 @@ int slsReceiverTCPIPInterface::exec_command() {
|
|||||||
|
|
||||||
// execute action if the arguments correctly arrived
|
// execute action if the arguments correctly arrived
|
||||||
if (ret==OK) {
|
if (ret==OK) {
|
||||||
#ifdef VERBOSE
|
#ifdef VERYVERBOSE
|
||||||
cout << "executing command " << cmd << endl;
|
cout << "executing command " << cmd << endl;
|
||||||
#endif
|
#endif
|
||||||
if (lockStatus==0 || socket->differentClients==0)
|
if (lockStatus==0 || socket->differentClients==0)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user