adding printouts , resetting an image size for each listen image, if last image is not complete, it should be checked with rc==0 and not if itis transmitting, else it doesnt send last incomplete image

This commit is contained in:
Dhanya Maliakal
2017-06-21 17:07:45 +02:00
parent cbd1570a8c
commit 1c7ff1dd8c
4 changed files with 39 additions and 18 deletions

View File

@ -10,6 +10,8 @@
#include "ansi.h"
//#include "sls_receiver_defs.h"
//#define ZMQ_DETAIL
#include <zmq.h>
#include <errno.h>
#include <netdb.h> //gethostbyname()
@ -303,21 +305,23 @@ public:
int len = ReceiveMessage(index, message);
if ( len > 0 ) {
bool dummy = false;
#ifdef VERBOSE
cprintf( BLUE,"Header %d Length: %d Header:%s \n", index, len, (char*) zmq_msg_data (&message) );
#ifdef ZMQ_DETAIL
cprintf( BLUE,"Header %d [%d] Length: %d Header:%s \n", index, portno, len, (char*) zmq_msg_data (&message) );
#endif
if ( ParseHeader (index, len, message, acqIndex, frameIndex, subframeIndex, filename, dummy)) {
zmq_msg_close (&message);
#ifdef VERBOSE
cprintf( RED,"Parsed Header %d Length: %d Header:%s \n", index, len, (char*) zmq_msg_data (&message) );
#ifdef ZMQ_DETAIL
cprintf( RED,"Parsed Header %d [%d] Length: %d Header:%s \n", index, portno, len, (char*) zmq_msg_data (&message) );
#endif
zmq_msg_close (&message);
if (dummy) {
#ifdef VERBOSE
cprintf(RED,"%d Received end of acquisition\n", index);
#ifdef ZMQ_DETAIL
cprintf(RED,"%d [%d] Received end of acquisition\n", index, portno );
#endif
return 0;
}
cprintf(GREEN,"%d data\n",index);
#ifdef ZMQ_DETAIL
cprintf(GREEN,"%d [%d] data\n",index, portno );
#endif
return 1;
}
}