From 237c5286cad8988da0d94dc1158498cdecd19bdf Mon Sep 17 00:00:00 2001 From: Dhanya Maliakal Date: Fri, 26 Jun 2015 11:49:26 +0200 Subject: [PATCH] includes dynamic range in offline headers for eiger --- slsReceiverSoftware/gitInfo.txt | 8 +++--- slsReceiverSoftware/include/gitInfoReceiver.h | 12 ++++---- .../src/UDPStandardImplementation.cpp | 28 +++++++++++-------- 3 files changed, 27 insertions(+), 21 deletions(-) diff --git a/slsReceiverSoftware/gitInfo.txt b/slsReceiverSoftware/gitInfo.txt index a8b18fa13..787a95474 100644 --- a/slsReceiverSoftware/gitInfo.txt +++ b/slsReceiverSoftware/gitInfo.txt @@ -1,9 +1,9 @@ Path: slsDetectorsPackage/slsReceiverSoftware URL: origin maliakal_d@gitorious.psi.ch:sls_det_software/sls_receiver_software.git Repository Root: origin maliakal_d@gitorious.psi.ch:sls_det_software/sls_receiver_software.git -Repsitory UUID: 44d2a6ae0422ef1d792890a409d202d3cec5b7f7 -Revision: 108 +Repsitory UUID: 2afc468d30f3078b2bb8637584ae3a88f476f20b +Revision: 110 Branch: master Last Changed Author: Dhanya_Maliakal -Last Changed Rev: 108 -Last Changed Date: 2015-06-12 17:46:50 +0200 +Last Changed Rev: 110 +Last Changed Date: 2015-06-16 16:28:24 +0200 diff --git a/slsReceiverSoftware/include/gitInfoReceiver.h b/slsReceiverSoftware/include/gitInfoReceiver.h index 967f26e15..59e2a1dff 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 SVNURL "maliakal_d@gitorious.psi.ch:sls_det_software/sls_receiver_software.git" //#define SVNREPPATH "" -#define SVNREPUUID "e019a6ce7d96d4ac9cb5762b7137245aedb4d5b8" -//#define SVNREV 0x22 +#define SVNREPUUID "2afc468d30f3078b2bb8637584ae3a88f476f20b" +//#define SVNREV 0x110 //#define SVNKIND "" //#define SVNSCHED "" -#define SVNAUTH "Anna_Bergamaschi" -#define SVNREV 0x22 -#define SVNDATE 0x20141015 +#define SVNAUTH "Dhanya_Maliakal" +#define SVNREV 0x110 +#define SVNDATE 0x20150616 // diff --git a/slsReceiverSoftware/src/UDPStandardImplementation.cpp b/slsReceiverSoftware/src/UDPStandardImplementation.cpp index e6722aeda..7c6f9ee4e 100644 --- a/slsReceiverSoftware/src/UDPStandardImplementation.cpp +++ b/slsReceiverSoftware/src/UDPStandardImplementation.cpp @@ -1982,13 +1982,27 @@ int UDPStandardImplementation::startWriting(){ for(i=0;i 0){ + } + + else if (numpackets > 0){ for(j=0;jnum1)) = currframenum; + //overwriting port number and dynamic range + if (!j) (*(uint8_t*)(((eiger_packet_header *)((char*)(wbuf[j] + totalheader + EIGER_ONE_GIGA_ONE_PACKET_SIZE*i)))->num3)) = (dynamicRange<<2); + else (*(uint8_t*)(((eiger_packet_header *)((char*)(wbuf[j] + totalheader + EIGER_ONE_GIGA_ONE_PACKET_SIZE*i)))->num3)) = ((dynamicRange<<2)|(0x1)); + +#ifdef VERYDEBUG + cprintf(RED, "%d - 0x%x - %d\n", i, + (*(uint8_t*)(((eiger_packet_header *)((char*)(wbuf[j] + totalheader +i*EIGER_ONE_GIGA_ONE_PACKET_SIZE)))->num3)), + (*(uint8_t*)(((eiger_packet_header *)((char*)(wbuf[j] + totalheader +i*EIGER_ONE_GIGA_ONE_PACKET_SIZE)))->num4))); +#endif + + } //for 32 bit,port number needs to be changed and packet number reconstructed if(dynamicRange == 32){ @@ -1997,10 +2011,6 @@ int UDPStandardImplementation::startWriting(){ (*(uint16_t*)(((eiger_packet_header *)((char*)(wbuf[j] + totalheader + EIGER_ONE_GIGA_ONE_PACKET_SIZE*i)))->num2)) = ((*(uint8_t*)(((eiger_packet_header *)((char*)(wbuf[j] + totalheader + EIGER_ONE_GIGA_ONE_PACKET_SIZE*i)))->num4))); - //new port number as its the same everywhere for 32 bit!! - if((!j)&& (!bottom)) (*(uint8_t*)(((eiger_packet_header *)((char*)(wbuf[j] + totalheader + EIGER_ONE_GIGA_ONE_PACKET_SIZE*i)))->num3)) = 0x00; - - #ifdef VERYDEBUG cprintf(RED, "%d - 0x%x - %d - %d\n", i, (*(uint8_t*)(((eiger_packet_header *)((char*)(wbuf[j] + totalheader +i*EIGER_ONE_GIGA_ONE_PACKET_SIZE)))->num3)), @@ -2013,10 +2023,6 @@ int UDPStandardImplementation::startWriting(){ (*(uint16_t*)(((eiger_packet_header *)((char*)(wbuf[j] + totalheader + EIGER_ONE_GIGA_ONE_PACKET_SIZE*i)))->num2)) = ((*(uint8_t*)(((eiger_packet_header *)((char*)(wbuf[j] + totalheader + EIGER_ONE_GIGA_ONE_PACKET_SIZE*i)))->num4))+(packetsPerFrame/4)); - //new port number as its the same everywhere for 32 bit!! - if(!j) (*(uint8_t*)(((eiger_packet_header *)((char*)(wbuf[j] + totalheader + EIGER_ONE_GIGA_ONE_PACKET_SIZE*i)))->num3)) = 0x00; - - #ifdef VERYDEBUG cprintf(RED, "%d -0x%x - %d - %d\n", i, (*(uint8_t*)(((eiger_packet_header *)((char*)(wbuf[j] + totalheader +i*EIGER_ONE_GIGA_ONE_PACKET_SIZE)))->num3)),