mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-23 18:17:59 +02:00
changes done
This commit is contained in:
@ -28,10 +28,13 @@ class DataProcessor : private virtual slsReceiverDefs, public ThreadObject {
|
||||
* @param ftype pointer to file format type
|
||||
* @param fwenable pointer to file writer enable
|
||||
* @param dsEnable pointer to data stream enable
|
||||
* @param freq pointer to streaming frequency
|
||||
* @param timer pointer to timer if streaming frequency is random
|
||||
* @param dataReadycb pointer to data ready call back function
|
||||
* @param pDataReadycb pointer to arguments of data ready call back function
|
||||
*/
|
||||
DataProcessor(Fifo*& f, fileFormat* ftype, bool* fwenable, bool* dsEnable,
|
||||
uint32_t* freq, uint32_t* timer,
|
||||
void (*dataReadycb)(uint64_t, uint32_t, uint32_t, uint64_t, uint64_t, uint16_t, uint16_t, uint16_t, uint16_t, uint32_t, uint16_t, uint8_t, uint8_t,
|
||||
char*, uint32_t, void*),
|
||||
void *pDataReadycb);
|
||||
@ -240,7 +243,26 @@ class DataProcessor : private virtual slsReceiverDefs, public ThreadObject {
|
||||
*/
|
||||
void ProcessAnImage(char* buf);
|
||||
|
||||
/**
|
||||
* Calls CheckTimer and CheckCount for streaming frequency and timer
|
||||
* and determines if the current image should be sent to streamer
|
||||
* @returns true if it should to streamer, else false
|
||||
*/
|
||||
bool SendToStreamer();
|
||||
|
||||
/**
|
||||
* This function should be called only in random frequency mode
|
||||
* Checks if timer is done and ready to send to stream
|
||||
* @returns true if ready to send to stream, else false
|
||||
*/
|
||||
bool CheckTimer();
|
||||
|
||||
/**
|
||||
* This function should be called only in non random frequency mode
|
||||
* Checks if count is done and ready to send to stream
|
||||
* @returns true if ready to send to stream, else false
|
||||
*/
|
||||
bool CheckCount();
|
||||
|
||||
/** type of thread */
|
||||
static const std::string TypeName;
|
||||
@ -277,6 +299,19 @@ class DataProcessor : private virtual slsReceiverDefs, public ThreadObject {
|
||||
/** File Write Enable */
|
||||
bool* fileWriteEnable;
|
||||
|
||||
/** Pointer to Streaming frequency, if 0, sending random images with a timer */
|
||||
uint32_t* streamingFrequency;
|
||||
|
||||
/** Pointer to the timer if Streaming frequency is random */
|
||||
uint32_t* streamingTimerInMs;
|
||||
|
||||
/** Current frequency count */
|
||||
uint32_t currentFreqCount;
|
||||
|
||||
/** timer beginning stamp for random streaming */
|
||||
struct timespec timerBegin;
|
||||
|
||||
|
||||
|
||||
//acquisition start
|
||||
/** Aquisition Started flag */
|
||||
@ -304,8 +339,6 @@ class DataProcessor : private virtual slsReceiverDefs, public ThreadObject {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//call back
|
||||
/**
|
||||
* Call back for raw data
|
||||
|
@ -22,11 +22,9 @@ class DataStreamer : private virtual slsReceiverDefs, public ThreadObject {
|
||||
* Calls Base Class CreateThread(), sets ErrorMask if error and increments NumberofDataStreamers
|
||||
* @param f address of Fifo pointer
|
||||
* @param dr pointer to dynamic range
|
||||
* @param freq pointer to streaming frequency
|
||||
* @param timer pointer to timer if streaming frequency is random
|
||||
* @param sEnable pointer to short frame enable
|
||||
*/
|
||||
DataStreamer(Fifo*& f, uint32_t* dr, uint32_t* freq, uint32_t* timer, int* sEnable);
|
||||
DataStreamer(Fifo*& f, uint32_t* dr, int* sEnable);
|
||||
|
||||
/**
|
||||
* Destructor
|
||||
@ -151,20 +149,6 @@ class DataStreamer : private virtual slsReceiverDefs, public ThreadObject {
|
||||
*/
|
||||
void ProcessAnImage(char* buf);
|
||||
|
||||
/**
|
||||
* This function should be called only in random frequency mode
|
||||
* Checks if timer is done and ready to send data
|
||||
* @returns true if ready to send data, else false
|
||||
*/
|
||||
bool CheckTimer();
|
||||
|
||||
/**
|
||||
* This function should be called only in non random frequency mode
|
||||
* Checks if count is done and ready to send data
|
||||
* @returns true if ready to send data, else false
|
||||
*/
|
||||
bool CheckCount();
|
||||
|
||||
/**
|
||||
* Create and send Json Header
|
||||
* @param header header of image
|
||||
@ -203,18 +187,6 @@ class DataStreamer : private virtual slsReceiverDefs, public ThreadObject {
|
||||
/** Pointer to short frame enable */
|
||||
int* shortFrameEnable;
|
||||
|
||||
/** Pointer to Streaming frequency, if 0, sending random images with a timer */
|
||||
uint32_t* streamingFrequency;
|
||||
|
||||
/** Pointer to the timer if Streaming frequency is random */
|
||||
uint32_t* streamingTimerInMs;
|
||||
|
||||
/** Current frequency count */
|
||||
uint32_t currentFreqCount;
|
||||
|
||||
/** timer beginning stamp for random streaming */
|
||||
struct timespec timerBegin;
|
||||
|
||||
/** Aquisition Started flag */
|
||||
bool acquisitionStartedFlag;
|
||||
|
||||
|
@ -650,7 +650,6 @@ class UDPBaseImplementation : protected virtual slsReceiverDefs, public UDPInter
|
||||
uint32_t frameToGuiTimerinMS;
|
||||
/** Data Stream Enable from Receiver */
|
||||
bool dataStreamEnable;
|
||||
static const int DEFAULT_STREAMING_TIMER = 500;
|
||||
/** streaming port */
|
||||
uint32_t streamingPort;
|
||||
|
||||
|
@ -27,6 +27,8 @@ typedef int int32_t;
|
||||
#define JFCTB_MAX_FRAMES_PER_FILE 100000
|
||||
|
||||
|
||||
#define DEFAULT_STREAMING_TIMER_IN_MS 500
|
||||
|
||||
/**
|
||||
\file sls_receiver_defs.h
|
||||
This file contains all the basic definitions common to the slsReceiver class
|
||||
|
Reference in New Issue
Block a user