diff --git a/slsReceiverSoftware/gitInfo.txt b/slsReceiverSoftware/gitInfo.txt index cf5def048..410c414c3 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: 1c259aeba8b068b9f6e550d63a9a3a14bd7d3ab7 -Revision: 6 +Repsitory UUID: e019a6ce7d96d4ac9cb5762b7137245aedb4d5b8 +Revision: 22 Branch: master -Last Changed Author: Maliakal_Dhanya -Last Changed Rev: 6 -Last Changed Date: 2014-06-03 12:06:57 +0200 +Last Changed Author: Anna_Bergamaschi +Last Changed Rev: 22 +Last Changed Date: 2014-10-15 09:22:40 +0200 diff --git a/slsReceiverSoftware/include/UDPBaseImplementation.h b/slsReceiverSoftware/include/UDPBaseImplementation.h index 19d6a932b..90aaf52b9 100644 --- a/slsReceiverSoftware/include/UDPBaseImplementation.h +++ b/slsReceiverSoftware/include/UDPBaseImplementation.h @@ -213,6 +213,7 @@ class UDPBaseImplementation : protected virtual slsReceiverDefs, public UDPInter * Set UDP Port Number */ void setUDPPortNo(int p); + void setUDPPortNo2(int p); /* * Returns number of frames to receive @@ -287,9 +288,9 @@ class UDPBaseImplementation : protected virtual slsReceiverDefs, public UDPInter * @param c pointer to current file name * @param raw address of pointer, pointing to current frame to send to gui * @param fnum frame number for eiger as it is not in the packet + * @param fstartind is the start index of the acquisition */ - void readFrame(char* c,char** raw, uint32_t &fnum); - + void readFrame(char* c,char** raw, uint32_t &fnum, uint32_t &fstartind); /** * Closes all files * @param ithr thread index @@ -777,6 +778,8 @@ protected: * 2 we open, close, write file, callback does not do anything */ int cbAction; + /** true if bottom half module for eiger */ + bool bottom; public: diff --git a/slsReceiverSoftware/include/UDPInterface.h b/slsReceiverSoftware/include/UDPInterface.h index 60d9cc75b..9ecf83fe6 100644 --- a/slsReceiverSoftware/include/UDPInterface.h +++ b/slsReceiverSoftware/include/UDPInterface.h @@ -281,6 +281,11 @@ class UDPInterface { */ virtual void setUDPPortNo(int p) = 0; + /** + * Set UDP Port Number + */ + virtual void setUDPPortNo2(int p) = 0; + /** * Set Ethernet Interface or IP to listen to */ @@ -322,8 +327,9 @@ class UDPInterface { * @param c pointer to current file name * @param raw address of pointer, pointing to current frame to send to gui * @param fnum frame number for eiger as it is not in the packet + * @param fstartind is the start index of the acquisition */ - virtual void readFrame(char* c,char** raw, uint32_t &fnum) = 0; + virtual void readFrame(char* c,char** raw, uint32_t &fnum, uint32_t &fstartind ) = 0; /** set status to transmitting and * when fifo is empty later, sets status to run_finished diff --git a/slsReceiverSoftware/include/UDPRESTImplementation.h b/slsReceiverSoftware/include/UDPRESTImplementation.h index 7cfe2b23d..6f59c30c2 100644 --- a/slsReceiverSoftware/include/UDPRESTImplementation.h +++ b/slsReceiverSoftware/include/UDPRESTImplementation.h @@ -223,6 +223,7 @@ class UDPRESTImplementation : protected virtual slsReceiverDefs, public UDPBaseI * Set UDP Port Number */ void setUDPPortNo(int p); + void setUDPPortNo2(int p); /* * Returns number of frames to receive @@ -300,7 +301,7 @@ class UDPRESTImplementation : protected virtual slsReceiverDefs, public UDPBaseI * @param raw address of pointer, pointing to current frame to send to gui * @param fnum frame number for eiger as it is not in the packet */ - void readFrame(char* c,char** raw, uint32_t &fnum); + void readFrame(char* c,char** raw, uint32_t &fnum, uint32_t &fstartind); /** * Closes all files diff --git a/slsReceiverSoftware/include/UDPStandardImplementation.h b/slsReceiverSoftware/include/UDPStandardImplementation.h index b6c25a144..6b5c0c0c4 100644 --- a/slsReceiverSoftware/include/UDPStandardImplementation.h +++ b/slsReceiverSoftware/include/UDPStandardImplementation.h @@ -212,6 +212,10 @@ class UDPStandardImplementation: private virtual slsReceiverDefs, public UDPBase * Set UDP Port Number */ void setUDPPortNo(int p); + /** + * Set UDP Port Number + */ + void setUDPPortNo2(int p); /* * Returns number of frames to receive @@ -287,8 +291,7 @@ class UDPStandardImplementation: private virtual slsReceiverDefs, public UDPBase * @param raw address of pointer, pointing to current frame to send to gui * @param fnum frame number for eiger as it is not in the packet */ - void readFrame(char* c,char** raw, uint32_t &fnum); - + void readFrame(char* c,char** raw, uint32_t &fnum, uint32_t &fstartind); /** * Closes all files * @param ithr thread index diff --git a/slsReceiverSoftware/include/genericSocket.h b/slsReceiverSoftware/include/genericSocket.h index bb899f35b..a798a0fef 100644 --- a/slsReceiverSoftware/include/genericSocket.h +++ b/slsReceiverSoftware/include/genericSocket.h @@ -61,6 +61,8 @@ class sockaddr_in; #endif +#include /******exit */ + #include #include #include @@ -558,6 +560,16 @@ enum communicationProtocol{ break; case UDP: if (socketDescriptor<0) return -1; + +/* + cout <<"******listening inside genericsocket"<0){ diff --git a/slsReceiverSoftware/include/gitInfoReceiver.h b/slsReceiverSoftware/include/gitInfoReceiver.h index 05f3c2ab6..967f26e15 100644 --- a/slsReceiverSoftware/include/gitInfoReceiver.h +++ b/slsReceiverSoftware/include/gitInfoReceiver.h @@ -1,11 +1,11 @@ //#define SVNPATH "" #define SVNURL "git@gitorious.psi.ch:sls_det_software/sls_receiver_software.git" //#define SVNREPPATH "" -#define SVNREPUUID "1c259aeba8b068b9f6e550d63a9a3a14bd7d3ab7" -//#define SVNREV 0x6 +#define SVNREPUUID "e019a6ce7d96d4ac9cb5762b7137245aedb4d5b8" +//#define SVNREV 0x22 //#define SVNKIND "" //#define SVNSCHED "" -#define SVNAUTH "Maliakal_Dhanya" -#define SVNREV 0x6 -#define SVNDATE 0x20140603 +#define SVNAUTH "Anna_Bergamaschi" +#define SVNREV 0x22 +#define SVNDATE 0x20141015 // diff --git a/slsReceiverSoftware/include/slsReceiverTCPIPInterface.h b/slsReceiverSoftware/include/slsReceiverTCPIPInterface.h index adff81697..ea0e1a3d0 100644 --- a/slsReceiverSoftware/include/slsReceiverTCPIPInterface.h +++ b/slsReceiverSoftware/include/slsReceiverTCPIPInterface.h @@ -26,9 +26,11 @@ class slsReceiverTCPIPInterface : private virtual slsReceiverDefs { * @param succecc socket creation was successfull * @param rbase pointer to the receiver base * @param pn port number (defaults to default port number) + * @param bot mode is bottom if true, else its a top half module */ - slsReceiverTCPIPInterface(int &success, UDPInterface* rbase, int pn=-1); - + + slsReceiverTCPIPInterface(int &success, UDPInterface* rbase, int pn=-1, bool bot=false); + /** * Sets the port number to listen to. Take care that the client must know to whcih port it has to listen to, so normally it is better to use a fixes port from the instatiation or change it from the client. @@ -272,6 +274,9 @@ private: /** port number */ int portNumber; + /** true if bottom half module for eiger */ + bool bottom; + protected: /** Socket */ diff --git a/slsReceiverSoftware/include/slsReceiverUDPFunctions.h b/slsReceiverSoftware/include/slsReceiverUDPFunctions.h index 6adce30ad..e9ff00590 100644 --- a/slsReceiverSoftware/include/slsReceiverUDPFunctions.h +++ b/slsReceiverSoftware/include/slsReceiverUDPFunctions.h @@ -43,7 +43,7 @@ class slsReceiverUDPFunctions : private virtual slsReceiverDefs, public UDPInter /** * Constructor */ - slsReceiverUDPFunctions(); + slsReceiverUDPFunctions(bool bot); /** * Destructor @@ -216,6 +216,11 @@ class slsReceiverUDPFunctions : private virtual slsReceiverDefs, public UDPInter */ void setUDPPortNo(int p); + /** + * Set UDP Port Number2 + */ + void setUDPPortNo2(int p); + /* * Returns number of frames to receive * This is the number of frames to expect to receiver from the detector. @@ -289,8 +294,9 @@ class slsReceiverUDPFunctions : private virtual slsReceiverDefs, public UDPInter * @param c pointer to current file name * @param raw address of pointer, pointing to current frame to send to gui * @param fnum frame number for eiger as it is not in the packet + * @param fstartind is the start index of the acquisition */ - void readFrame(char* c,char** raw, uint32_t &fnum); + void readFrame(char* c,char** raw, uint32_t &fnum, uint32_t &fstartind); /** * Closes all files @@ -471,7 +477,6 @@ private: unsigned char header_after[24]; } eiger_image_header; - /** structure of an eiger image header*/ typedef struct { @@ -766,6 +771,9 @@ private: * 2 we open, close, write file, callback does not do anything */ int cbAction; + /** true if bottom half module for eiger */ + bool bottom; + public: diff --git a/slsReceiverSoftware/include/sls_receiver_defs.h b/slsReceiverSoftware/include/sls_receiver_defs.h index 70fc6ece8..f21579ae9 100755 --- a/slsReceiverSoftware/include/sls_receiver_defs.h +++ b/slsReceiverSoftware/include/sls_receiver_defs.h @@ -55,7 +55,9 @@ public: GOTTHARD, /**< gotthard */ PICASSO, /**< picasso */ AGIPD, /**< agipd */ - MOENCH /**< moench */ + MOENCH, /**< moench */ + JUNGFRAU, /**< jungfrau */ + JUNGFRAUCTB /**< jungfrauCTBversion */ }; @@ -85,7 +87,9 @@ public: MEASUREMENT_TIME, /**< Time of the measurement from the detector (fifo) */ PROGRESS, /**< fraction of measurement elapsed - only get! */ - MEASUREMENTS_NUMBER + MEASUREMENTS_NUMBER, + FRAMES_FROM_START, + FRAMES_FROM_START_PG }; diff --git a/slsReceiverSoftware/include/sls_receiver_funcs.h b/slsReceiverSoftware/include/sls_receiver_funcs.h index bb7655481..7f3842576 100644 --- a/slsReceiverSoftware/include/sls_receiver_funcs.h +++ b/slsReceiverSoftware/include/sls_receiver_funcs.h @@ -8,7 +8,7 @@ enum { //General functions - F_EXEC_RECEIVER_COMMAND=0, /**< command is executed */ + F_EXEC_RECEIVER_COMMAND=128, /**< command is executed */ F_EXIT_RECEIVER, /**< turn off receiver server */ F_LOCK_RECEIVER, /**< Locks/Unlocks server communication to the given client */ F_GET_LAST_RECEIVER_CLIENT_IP, /**< returns the IP of the client last connected to the receiver */ diff --git a/slsReceiverSoftware/src/UDPBaseImplementation.cpp b/slsReceiverSoftware/src/UDPBaseImplementation.cpp index 42296fda4..351255df3 100644 --- a/slsReceiverSoftware/src/UDPBaseImplementation.cpp +++ b/slsReceiverSoftware/src/UDPBaseImplementation.cpp @@ -29,7 +29,8 @@ using namespace std; -UDPBaseImplementation::UDPBaseImplementation(){} +UDPBaseImplementation::UDPBaseImplementation(){ +} UDPBaseImplementation::~UDPBaseImplementation(){} @@ -291,10 +292,13 @@ void UDPBaseImplementation::setEthernetInterface(char* c){ FILE_LOG(logDEBUG) << } -void UDPBaseImplementation::setUDPPortNo(int p){ FILE_LOG(logDEBUG) << __AT__ << " starting"; - for(int i=0;i #include - - using namespace std; +#define EIGER_32BIT_INITIAL_CONSTANT 0x17c + + + + +UDPStandardImplementation::UDPStandardImplementation() +//: +//thread_started(0), +//eth(NULL), +//latestData(NULL), +//guiFileName(NULL), +//guiFrameNumber(0), +//tengigaEnable(0) +{ + + thread_started = 0; + eth = NULL; + latestData = NULL; + guiFileName = NULL; + guiFrameNumber = NULL; + tengigaEnable = 0; + for(int i=0;i /proc/sys/net/core/rmem_max")) + cout << "\nWARNING: Could not change socket receiver buffer size in file /proc/sys/net/core/rmem_max" << endl; + else if(system("echo 250000 > /proc/sys/net/core/netdev_max_backlog")) + cout << "\nWARNING: Could not change max length of input queue in file /proc/sys/net/core/netdev_max_backlog" << endl; + /** permanent setting heiner + net.core.rmem_max = 104857600 # 100MiB + net.core.netdev_max_backlog = 250000 + sysctl -p + // from the manual + sysctl -w net.core.rmem_max=16777216 + sysctl -w net.core.netdev_max_backlog=250000 + */ + } + + void UDPStandardImplementation::initializeMembers(){ myDetectorType = GENERIC; maxPacketsPerFile = 0; @@ -125,63 +188,6 @@ void UDPStandardImplementation::initializeMembers(){ } -UDPStandardImplementation::UDPStandardImplementation(){ FILE_LOG(logDEBUG) << __AT__ << " called"; - - - FILE_LOG(logDEBUG) << __FILE__ << "::" << __func__ << " starting" ; - - thread_started = 0; - eth = NULL; - latestData = NULL; - guiFileName = NULL; - guiFrameNumber = 0; - tengigaEnable = 0; - - for(int i=0;i /proc/sys/net/core/rmem_max")) - cout << "\nWARNING: Could not change socket receiver buffer size in file /proc/sys/net/core/rmem_max" << endl; - else if(system("echo 250000 > /proc/sys/net/core/netdev_max_backlog")) - cout << "\nWARNING: Could not change max length of input queue in file /proc/sys/net/core/netdev_max_backlog" << endl; - /** permanent setting heiner - net.core.rmem_max = 104857600 # 100MiB - net.core.netdev_max_backlog = 250000 - sysctl -p - // from the manual - sysctl -w net.core.rmem_max=16777216 - sysctl -w net.core.netdev_max_backlog=250000 - */ -} - - UDPStandardImplementation::~UDPStandardImplementation(){ FILE_LOG(logDEBUG) << __AT__ << " called"; @@ -478,11 +484,15 @@ void UDPStandardImplementation::setEthernetInterface(char* c){ FILE_LOG(logDEBU } -void UDPStandardImplementation::setUDPPortNo(int p){ FILE_LOG(logDEBUG) << __AT__ << " called"; +void UDPStandardImplementation::setUDPPortNo(int p){ +FILE_LOG(logDEBUG) << __AT__ << " called"; + server_port[0] = p; +} - for(int i=0;igetErrorStatus(); - if(iret){ + if(!iret) + cout << "UDP port opened at port " << port[i] << endl; + else{ #ifdef VERBOSE - cout << "Could not create UDP socket on port " << server_port[i] << " error:" << iret << endl; + cout << "Could not create UDP socket on port " << port[i] << " error:" << iret << endl; #endif return FAIL; } @@ -1418,7 +1438,7 @@ int UDPStandardImplementation::startReceiver(char message[]){ cout << endl << message << endl; return FAIL; } - cout << "UDP socket(s) created successfully. 1st port " << server_port[0] << endl; + cout << "UDP socket(s) created successfully." << endl; if(setupWriter() == FAIL){ @@ -1589,9 +1609,13 @@ int UDPStandardImplementation::startListening(){ //normal listening else if(!carryonBufferSize){ + /* if(!ithread){*/ rc = udpSocket[ithread]->ReceiveDataOnly(buffer[ithread] + HEADER_SIZE_NUM_TOT_PACKETS, maxBufferSize); expected = maxBufferSize; - + /*}else{ + while(1) usleep(100000000); + } +*/ } //the remaining packets from previous buffer else{ @@ -1608,24 +1632,26 @@ int UDPStandardImplementation::startListening(){ expected = maxBufferSize - carryonBufferSize; } -#ifdef VERYDEBUG +//#ifdef VERYDEBUG cout << ithread << " *** rc:" << dec << rc << ". expected:" << dec << expected << endl; -#endif - - +//#endif //start indices for each start of scan/acquisition - eiger does it before - if((!measurementStarted) && (rc > 0) && (!ithread)) - startFrameIndices(ithread); + if((!measurementStarted) && (rc > 0) && (!ithread)) + startFrameIndices(ithread); + //problem in receiving or end of acquisition if((rc < expected)||(rc <= 0)){ stopListening(ithread,rc,packetcount,total); continue; } - - +/* + //start indices for each start of scan/acquisition - eiger does it before + if((!measurementStarted) && (rc > 0) && (!ithread)) + startFrameIndices(ithread); +*/ //reset packetcount = (packetsPerFrame/numListeningThreads) * numJobsPerThread; @@ -1811,7 +1837,10 @@ int loop; //for progress if(myDetectorType == EIGER){ tempframenum = htonl(*(unsigned int*)((eiger_image_header *)((char*)(wbuf[ithread] + HEADER_SIZE_NUM_TOT_PACKETS)))->fnum); - tempframenum += (startFrameIndex-1); //eiger frame numbers start at 1, so need to -1 + if(dynamicRange != 32) + tempframenum += (startFrameIndex-1); //eiger frame numbers start at 1, so need to -1 + else + tempframenum = ((tempframenum / EIGER_32BIT_INITIAL_CONSTANT) + startFrameIndex)-1;//eiger 32 bit mode is a multiple of 17c. +startframeindex for scans }else if ((myDetectorType == GOTTHARD) && (shortFrame == -1)) tempframenum = (((((uint32_t)(*((uint32_t*)(wbuf[ithread] + HEADER_SIZE_NUM_TOT_PACKETS))))+1)& (frameIndexMask)) >> frameIndexOffset); else @@ -1836,6 +1865,7 @@ int loop; if (cbAction < DO_EVERYTHING){ for(i=0;i 0){ for(i=0;i mode? //parse command line for config static struct option long_options[] = { /* These options set a flag. */ //{"verbose", no_argument, &verbose_flag, 1}, /* These options don’t set a flag. We distinguish them by their indices. */ + {"mode", required_argument, 0, 'm'}, {"type", required_argument, 0, 't'}, {"config", required_argument, 0, 'f'}, {"rx_tcpport", required_argument, 0, 'b'}, @@ -55,13 +57,14 @@ slsReceiver::slsReceiver(int argc, char *argv[], int &success){ int c; while ( c != -1 ){ - c = getopt_long (argc, argv, "bfhtr", long_options, &option_index); + c = getopt_long (argc, argv, "mbfhtr", long_options, &option_index); /* Detect the end of the options. */ if (c == -1) break; switch(c){ + case 'f': fname = optarg; //cout << long_options[option_index].name << " " << optarg << endl; @@ -83,6 +86,7 @@ slsReceiver::slsReceiver(int argc, char *argv[], int &success){ string help_message = """\nSLS Receiver Server\n\n"""; help_message += """usage: slsReceiver --config config_fname [--rx_tcpport port]\n\n"""; help_message += """\t--config:\t configuration filename for SLS Detector receiver\n"""; + help_message += """\t--mode:\t ???\n"""; help_message += """\t--rx_tcpport:\t TCP Communication Port with the client. Default: 1954.\n\n"""; help_message += """\t--rest_hostname:\t Receiver hostname:port. It applies only to REST receivers, and indicates the hostname of the REST backend. Default: localhost:8081.\n\n"""; diff --git a/slsReceiverSoftware/src/slsReceiverTCPIPInterface.cpp b/slsReceiverSoftware/src/slsReceiverTCPIPInterface.cpp index fc770729b..20c95a051 100644 --- a/slsReceiverSoftware/src/slsReceiverTCPIPInterface.cpp +++ b/slsReceiverSoftware/src/slsReceiverTCPIPInterface.cpp @@ -17,6 +17,9 @@ #include #include #include +#include //linux5 +#define be64toh(x) __bswap_64 (x) //linux5 +//#include //linux6 using namespace std; @@ -27,27 +30,27 @@ slsReceiverTCPIPInterface::~slsReceiverTCPIPInterface() { closeFile(0); } +slsReceiverTCPIPInterface::slsReceiverTCPIPInterface(int &success, UDPInterface* rbase, int pn, bool bot): + myDetectorType(GOTTHARD), + receiverBase(rbase), + ret(OK), + lockStatus(0), + shortFrame(-1), + packetsPerFrame(GOTTHARD_PACKETS_PER_FRAME), + dynamicrange(16), + socket(NULL), + killTCPServerThread(0), + tenGigaEnable(0), portNumber(DEFAULT_PORTNO+2), + bottom(bot){ + + int port_no=portNumber; + + + if (pn>0) + port_no = pn; + + success=OK; -slsReceiverTCPIPInterface::slsReceiverTCPIPInterface(int &success, UDPInterface* rbase, int pn): - myDetectorType(GOTTHARD), - receiverBase(rbase), - ret(OK), - lockStatus(0), - shortFrame(-1), - packetsPerFrame(GOTTHARD_PACKETS_PER_FRAME), - dynamicrange(16), - socket(NULL), - killTCPServerThread(0), - tenGigaEnable(0), portNumber(DEFAULT_PORTNO+2){ - - int port_no=portNumber; - - - if (pn>0) - port_no = pn; - - success=OK; - //create socket if(success == OK){ socket = new MySocketTCP(port_no); @@ -615,10 +618,10 @@ int slsReceiverTCPIPInterface::setup_udp(){ ret=OK; strcpy(mess,"could not set up udp connection"); char retval[MAX_STR_LENGTH]=""; - char args[2][MAX_STR_LENGTH]; + char args[3][MAX_STR_LENGTH]; string temp; - int udpport; + int udpport,udpport2; char eth[MAX_STR_LENGTH]; @@ -643,8 +646,9 @@ int slsReceiverTCPIPInterface::setup_udp(){ else{ //set up udp port sscanf(args[1],"%d",&udpport); + sscanf(args[2],"%d",&udpport2); receiverBase->setUDPPortNo(udpport); - + receiverBase->setUDPPortNo2(udpport2); //setup udpip //get ethernet interface or IP to listen to temp = genericSocket::ipToName(args[0]); @@ -1002,8 +1006,8 @@ int slsReceiverTCPIPInterface::moench_read_frame(){ else{ ret = OK; - startIndex=receiverBase->getStartFrameIndex(); - receiverBase->readFrame(fName,&raw,index); + /*startIndex=receiverBase->getStartFrameIndex();*/ + receiverBase->readFrame(fName,&raw,index,startIndex); /**send garbage with -1 index to try again*/ if (raw == NULL){ @@ -1172,8 +1176,8 @@ int slsReceiverTCPIPInterface::gotthard_read_frame(){ cout<<"haven't caught any frame yet"<getStartFrameIndex(); - receiverBase->readFrame(fName,&raw,index); + /*startIndex=receiverBase->getStartFrameIndex();*/ + receiverBase->readFrame(fName,&raw,index,startIndex); /**send garbage with -1 index to try again*/ if (raw == NULL){ @@ -1304,13 +1308,9 @@ int slsReceiverTCPIPInterface::eiger_read_frame(){ char* raw = new char[frameSize]; char* origVal = new char[frameSize]; char* retval = new char[dataSize]; - + uint32_t startIndex=0; strcpy(mess,"Could not read frame\n"); -/* typedef struct{ - unsigned char num1[4]; - unsigned char num2[4]; - } eiger_packet_header;*/ // execute action if the arguments correctly arrived #ifdef SLS_RECEIVER_UDP_FUNCTIONS @@ -1328,7 +1328,7 @@ int slsReceiverTCPIPInterface::eiger_read_frame(){ else{ ret = OK; /** read a frame */ - receiverBase->readFrame(fName,&raw, index); + receiverBase->readFrame(fName,&raw,index,startIndex); #ifdef VERBOSE cout << "index:" << dec << index << endl; #endif @@ -1341,7 +1341,7 @@ int slsReceiverTCPIPInterface::eiger_read_frame(){ } /**proper frame*/ - else{ + else{//cout<<"**** got proper frame ******"<> 8) & 0x00FF00FF00FF00FFULL ); temp = ((temp << 16) & 0xFFFF0000FFFF0000ULL ) | ((temp >> 16) & 0x0000FFFF0000FFFFULL ); temp = (temp << 32) | ((temp >> 32) & 0xFFFFFFFFULL); (*(((uint64_t*)retval)+i)) = temp; + */ } -/* - ( (((val) >> 56) & 0x00000000000000FF) | (((val) >> 40) & 0x000000000000FF00) | \ - (((val) >> 24) & 0x0000000000FF0000) | (((val) >> 8) & 0x00000000FF000000) | \ - (((val) << 8) & 0x000000FF00000000) | (((val) << 24) & 0x0000FF0000000000) | \ - (((val) << 40) & 0x00FF000000000000) | (((val) << 56) & 0xFF00000000000000) ) - */ - /* - for(i=0;i<(1024*(16*dynamicrange)*2)/4;i++) - (*(((uint32_t*)retval)+i)) = htonl((uint32_t)(*(((uint32_t*)retval)+i))); - */ - arg = index-1; + arg = index-startIndex; } }