only call register call back which already enables streaming in client and receiver, added to postprocessing

This commit is contained in:
Dhanya Maliakal 2017-11-28 09:36:54 +01:00
parent 9f91b78696
commit 1dd300f713
3 changed files with 15 additions and 4 deletions

View File

@ -583,6 +583,12 @@ virtual void readFrameFromReceiver()=0;
*/
virtual int enableDataStreamingToClient(int enable=-1)=0;
/** Enable or disable streaming data from receiver to client
* @param enable 0 to disable 1 to enable -1 to only get the value
* @returns data streaming from receiver enable
*/
virtual int enableDataStreamingFromReceiver(int enable=-1)=0;
/** Sets the read receiver frequency
if data required from receiver randomly readRxrFrequency=0,
else every nth frame to be sent to gui

View File

@ -402,7 +402,7 @@ class slsDetectorUsers
int setReceiverMode(int n=-1);
/**
@short register calbback for accessing detector final data
@short register calbback for accessing detector final data, also enables data streaming in client and receiver (if receiver exists)
\param userCallback function for plotting/analyzing the data. Its arguments are the data structure d and the frame number f, s is for subframe number for eiger for 32 bit mode
*/
@ -459,7 +459,7 @@ class slsDetectorUsers
*/
int enableDataStreamingToClient(int i=-1);
/**
/** (for expert users)
* Set/Get receiver streaming out ZMQ port
* For multi modules, it calculates (increments), sets the ports and restarts the sockets
* @param i sets, -1 gets
@ -467,7 +467,7 @@ class slsDetectorUsers
*/
int setReceiverDataStreamingOutPort(int i=-1);
/**
/** (for expert users)
* Set/Get client streaming in ZMQ port
* For multi modules, it calculates (increments), sets the ports and restarts the sockets
* @param i sets, -1 gets

View File

@ -238,7 +238,12 @@ s
void ResetPositionIndex(){pthread_mutex_lock(&mp); resetPositionIndex(); pthread_mutex_unlock(&mp);};
void registerDataCallback(int( *userCallback)(detectorData*, int, int, void*), void *pArg) {dataReady = userCallback; pCallbackArg = pArg;enableDataStreamingToClient(1);};
void registerDataCallback(int( *userCallback)(detectorData*, int, int, void*), void *pArg) { \
dataReady = userCallback; \
pCallbackArg = pArg; \
if (setReceiverOnline() == slsDetectorDefs::ONLINE_FLAG) { \
enableDataStreamingToClient(1); \
enableDataStreamingFromReceiver(1);}}; \
void registerRawDataCallback(int( *userCallback)(double*, int, void*), void *pArg) {rawDataReady = userCallback; pRawDataArg = pArg;};