mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-29 09:30:02 +02:00
debugging statements
This commit is contained in:
parent
15bbb099d3
commit
d9809925af
@ -92,6 +92,13 @@ enum communicationProtocol{
|
|||||||
UDP /**< UDP */
|
UDP /**< UDP */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
unsigned char header_before[20];
|
||||||
|
unsigned char fnum[4];
|
||||||
|
unsigned char header_after[24];
|
||||||
|
} eiger_image_header;
|
||||||
|
|
||||||
genericSocket(const char* const host_ip_or_name, unsigned short int const port_number, communicationProtocol p, int ps = DEFAULT_PACKET_SIZE) :
|
genericSocket(const char* const host_ip_or_name, unsigned short int const port_number, communicationProtocol p, int ps = DEFAULT_PACKET_SIZE) :
|
||||||
// portno(port_number),
|
// portno(port_number),
|
||||||
protocol(p),
|
protocol(p),
|
||||||
@ -578,8 +585,33 @@ enum communicationProtocol{
|
|||||||
|
|
||||||
//if length given, listens to length, else listens for packetsize till length is reached
|
//if length given, listens to length, else listens for packetsize till length is reached
|
||||||
if(length){
|
if(length){
|
||||||
|
|
||||||
|
/*int k =0;*/
|
||||||
while(length>0){
|
while(length>0){
|
||||||
nsending = (length>packet_size) ? packet_size:length;
|
nsending = (length>packet_size) ? packet_size:length;
|
||||||
|
|
||||||
|
/*
|
||||||
|
//created for debugging on 11.05.2015
|
||||||
|
nsending=5000;
|
||||||
|
|
||||||
|
nsent = recvfrom(socketDescriptor,(char*)buf,nsending, 0, (struct sockaddr *) &clientAddress, &clientAddress_length);
|
||||||
|
|
||||||
|
if(nsent <1000){
|
||||||
|
if(nsent < 48){
|
||||||
|
cout << " "<<nsent<<" ";
|
||||||
|
}else{
|
||||||
|
cout << "nsent: " << nsent << "\tfnum:" <<
|
||||||
|
htonl(*(unsigned int*)((eiger_image_header *)((char*)(buf)))->fnum)<< "\t";
|
||||||
|
|
||||||
|
cout << k <<" packets" << endl;
|
||||||
|
k = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
k++;
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
nsent = recvfrom(socketDescriptor,(char*)buf+total_sent,nsending, 0, (struct sockaddr *) &clientAddress, &clientAddress_length);
|
nsent = recvfrom(socketDescriptor,(char*)buf+total_sent,nsending, 0, (struct sockaddr *) &clientAddress, &clientAddress_length);
|
||||||
if(!nsent) break;
|
if(!nsent) break;
|
||||||
length-=nsent;
|
length-=nsent;
|
||||||
|
@ -1950,9 +1950,8 @@ int UDPStandardImplementation::startWriting(){
|
|||||||
currframenum = tempframenum;
|
currframenum = tempframenum;
|
||||||
pthread_mutex_unlock(&progress_mutex);
|
pthread_mutex_unlock(&progress_mutex);
|
||||||
}
|
}
|
||||||
#ifdef VERYDEBUG
|
#ifdef EIGER_DEBUG2
|
||||||
if(myDetectorType == EIGER)
|
cout << endl <<ithread << " tempframenum:" << dec << tempframenum << " curframenum:" << currframenum << endl;
|
||||||
cout << endl <<ithread << " tempframenum:" << dec << tempframenum << " curframenum:" << currframenum << endl;
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user