diff --git a/slsReceiverSoftware/gitInfo.txt b/slsReceiverSoftware/gitInfo.txt index 410c414c3..d680dad1d 100644 --- a/slsReceiverSoftware/gitInfo.txt +++ b/slsReceiverSoftware/gitInfo.txt @@ -1,9 +1,9 @@ Path: slsDetectorsPackage/slsReceiverSoftware URL: origin git@gitorious.psi.ch:sls_det_software/sls_receiver_software.git Repository Root: origin git@gitorious.psi.ch:sls_det_software/sls_receiver_software.git -Repsitory UUID: e019a6ce7d96d4ac9cb5762b7137245aedb4d5b8 -Revision: 22 -Branch: master -Last Changed Author: Anna_Bergamaschi -Last Changed Rev: 22 -Last Changed Date: 2014-10-15 09:22:40 +0200 +Repsitory UUID: 879c5e2ee129acfd70aba4ae6fab829cc5409350 +Revision: 67 +Branch: gemma +Last Changed Author: Maliakal_Dhanya +Last Changed Rev: 67 +Last Changed Date: 2014-12-08 09:17:56 +0100 diff --git a/slsReceiverSoftware/include/UDPStandardImplementation.h b/slsReceiverSoftware/include/UDPStandardImplementation.h index 6b5c0c0c4..dca52e6a4 100644 --- a/slsReceiverSoftware/include/UDPStandardImplementation.h +++ b/slsReceiverSoftware/include/UDPStandardImplementation.h @@ -47,7 +47,7 @@ class UDPStandardImplementation: private virtual slsReceiverDefs, public UDPBase */ virtual ~UDPStandardImplementation(); - + void configure(map config_map); /** * delete and free member parameters diff --git a/slsReceiverSoftware/src/UDPStandardImplementation.cpp b/slsReceiverSoftware/src/UDPStandardImplementation.cpp index d97adf49a..b74f9c6cf 100644 --- a/slsReceiverSoftware/src/UDPStandardImplementation.cpp +++ b/slsReceiverSoftware/src/UDPStandardImplementation.cpp @@ -92,6 +92,22 @@ UDPStandardImplementation::UDPStandardImplementation() } +void UDPStandardImplementation::configure(map config_map){ + FILE_LOG(logWARNING) << __AT__ << " called"; + + map::const_iterator pos; + pos = config_map.find("mode"); + if (pos != config_map.end() ){ + int b; + if(!sscanf(pos->second.c_str(), "%d", &b)){ + cout << "Warning: Could not parse mode. Assuming top mode." << endl; + b = 0; + } + bottom = b!= 0; + cout << "bottom:"<< bottom << endl; + } +}; + void UDPStandardImplementation::initializeMembers(){ myDetectorType = GENERIC; maxPacketsPerFile = 0; @@ -849,8 +865,10 @@ void UDPStandardImplementation::setupFifoStructure(){ void UDPStandardImplementation::readFrame(char* c,char** raw, uint32_t &fnum, uint32_t &fstartind){ FILE_LOG(logDEBUG) << __AT__ << " called"; //point to gui data - if (guiData == NULL) + if (guiData == NULL){ guiData = latestData; + //cout <<"gui data not null anymore" << endl; + } //copy data and filename strcpy(c,guiFileName); @@ -859,10 +877,12 @@ void UDPStandardImplementation::readFrame(char* c,char** raw, uint32_t &fnum, ui //could not get gui data if(!guiDataReady){ + //cout<<"gui data not ready"<ReceiveDataOnly(buffer[ithread] + HEADER_SIZE_NUM_TOT_PACKETS, maxBufferSize); + //cout<<"value:"<fnum)<pop(wbuf[i]); numpackets = (uint16_t)(*((uint16_t*)wbuf[i])); -#ifdef VERYDEBUG - cout << ithread << " numpackets:" << dec << numpackets << endl; -#endif +//#ifdef VERYDEBUG + cout << ithread << " numpackets:" << dec << numpackets << "for fifo :"<< i << endl; +//#endif } #ifdef VERYDEBUG @@ -1878,7 +1921,9 @@ int UDPStandardImplementation::startWriting(){ if(myDetectorType == EIGER) { + //cout<<"gonna copy frame"<push(wbuf[i])); #ifdef VERYDEBUG @@ -1991,7 +2036,7 @@ void UDPStandardImplementation::startFrameIndices(int ithread){ startAcquisitionIndex=startFrameIndex; currframenum = startAcquisitionIndex; acqStarted = true; - cout << "startAcquisitionIndex:" << startAcquisitionIndex<configure(configuration_map); - tcpipInterface = new slsReceiverTCPIPInterface(success, udp_interface, tcpip_port_no); + tcpipInterface = new slsReceiverTCPIPInterface(success, udp_interface, tcpip_port_no, bottom); //tcp ip interface } }