started the basics for sending every nth frame from receiver to gui.incomplete and will be implemented later

git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorSoftware@506 951219d9-93cf-4727-9268-0efd64621fa3
This commit is contained in:
l_maliakal_d
2013-04-11 12:00:44 +00:00
parent 02376bbc62
commit 778cd97317
12 changed files with 174 additions and 16 deletions

View File

@ -13,10 +13,12 @@
#include "genericSocket.h"
#include "circularFifo.h"
#include <string.h>
#include <pthread.h>
#include <stdio.h>
/**
* @short does all the functions for a receiver, set/get parameters, start/stop etc.
*/
@ -185,6 +187,12 @@ public:
*/
int setShortFrame(int i);
/**
* Set the variable to send every nth frame to gui
* or if 0,send frame only upon gui request
*/
int setNFrameToGui(int i){if(i>=0) nFrameToGui = i; return nFrameToGui;};
/**
* Register call back function to write receiver data
*/
@ -298,6 +306,11 @@ private:
/** current frame number */
int currframenum;
/** send every nth frame to gui or only upon gui request*/
int nFrameToGui;
/** register for call back to get data */
int (*writeReceiverData)(char*,int,FILE*,void*);
void *pwriteReceiverDataArg;
@ -343,6 +356,9 @@ private:
* 2 we open, close, write file, callback does not do anything */
int cbAction;
public:
/** File Descriptor */
static FILE *sfilefd;
@ -350,6 +366,7 @@ public:
/** if the listening thread is running*/
static int listening_thread_running;
/**
callback arguments are
filepath
@ -365,7 +382,6 @@ public:
*/
void registerCallBackStartAcquisition(int (*func)(char*, char*,int, int, void*),void *arg){startAcquisitionCallBack=func; pStartAcquisition=arg;};
/**
callback argument is
toatal frames caught
@ -373,8 +389,6 @@ public:
*/
void registerCallBackAcquisitionFinished(void (*func)(int, void*),void *arg){acquisitionFinishedCallBack=func; pAcquisitionFinished=arg;};
/**
args to raw data ready callback are
framenum
@ -383,10 +397,6 @@ public:
guidatapointer (NULL, no data required)
*/
void registerCallBackRawDataReady(void (*func)(int, char*, FILE*, char*, void*),void *arg){rawDataReadyCallBack=func; pRawDataReady=arg;};
};