changes to make jungfrau work

This commit is contained in:
Dhanya Maliakal
2016-10-27 08:27:31 +02:00
parent 0cd9261332
commit 942f024761
4 changed files with 69 additions and 50 deletions

View File

@ -663,6 +663,9 @@ private:
/** Total fifo size */
uint32_t fifoSize;
/** fifo buffer header size */
uint32_t fifoBufferHeaderSize;
/** Missing Packet */
int missingPacketinFile;

View File

@ -615,13 +615,14 @@ enum communicationProtocol{
/*int k = 0;*/
while(length>0){
nsending = (length>packet_size) ? packet_size:length;
if(length<packet_size)
nsending = length; //works for jungfrau to read packet header
else
nsending = (length>packet_size) ? packet_size:length; //works for eiger to get packets to discard image header packets
nsent = recvfrom(socketDescriptor,(char*)buf+total_sent,nsending, 0, (struct sockaddr *) &clientAddress, &clientAddress_length);
if(nsent < packet_size) {
if(nsent){
if((nsent != header_packet_size) && (nsent != -1))
if(nsent != nsending){ //if((nsent != nsending)){ && (nsent < packet_size)){
if(nsent && (nsent != header_packet_size) && (nsent != -1))
cprintf(RED,"Incomplete Packet size %d\n",nsent);
}
break;
}
length-=nsent;

View File

@ -129,7 +129,7 @@ typedef struct {
#define JFRAU_FILE_FRAME_HEADER_LENGTH 16
#define JFRAU_FIFO_SIZE 2500 //cannot be less than max jobs per thread = 1000
#define JFRAU_PACKETS_PER_FRAME 128
#define JFRAU_HEADER_LENGTH 22