mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-05 17:40:40 +02:00
trying
This commit is contained in:
parent
89928246d2
commit
351d911f46
@ -620,6 +620,7 @@ enum communicationProtocol{
|
||||
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);
|
||||
cout<<"nsent:"<<nsent<<endl;
|
||||
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);
|
||||
|
@ -2118,15 +2118,17 @@ int UDPStandardImplementation::prepareAndListenBuffer(int ithread, int cSize, ch
|
||||
(*((uint32_t*)(buffer[ithread]+8))) = (*( (uint32_t*) header->frameNumber))&frameIndexMask;
|
||||
cout<<"current fnum:"<<(*((uint32_t*)(buffer[ithread]+8)))<<endl;
|
||||
}
|
||||
//get data
|
||||
receivedSize = udpSocket[ithread]->ReceiveDataOnly(buffer[ithread] + offset, oneDataSize);
|
||||
if(!receivedSize) return 0;
|
||||
cout<<"got data for " << pnum << endl;
|
||||
offset+=oneDataSize;
|
||||
|
||||
cout<<"offset now at:" << offset << endl;
|
||||
//got a complete frame
|
||||
if(pnum == 0)
|
||||
break;
|
||||
pnum --;
|
||||
|
||||
receivedSize = udpSocket[ithread]->ReceiveDataOnly(buffer[ithread] + offset, JFRAU_HEADER_LENGTH);
|
||||
if(!receivedSize) return 0;
|
||||
header = (jfrau_packet_header_t*)(buffer[ithread] + offset);
|
||||
|
Loading…
x
Reference in New Issue
Block a user