changes upto the receiver, not incl gui

This commit is contained in:
Dhanya Maliakal
2017-10-03 10:44:08 +02:00
parent d0b379a2d5
commit 7cde5dbe38
9 changed files with 166 additions and 0 deletions

View File

@@ -10,6 +10,7 @@
#include "sls_receiver_defs.h"
#include "receiver_defs.h"
#define NUM_BITS_IN_ONE_BYTE 8
class GeneralData {
@@ -171,6 +172,15 @@ public:
bprintf(RED,"This is a generic function that should be overloaded by a derived class\n");
};
/**
* Enable Gap Pixels changes member variables
* @param enable true if gap pixels enable, else false
*/
virtual void SetGapPixelsEnable(bool b, int dr) {
bprintf(RED,"This is a generic function that should be overloaded by a derived class\n");
};
/**
* Print all variables
*/
@@ -544,6 +554,26 @@ class EigerData : public GeneralData {
imageSize = dataSize*packetsPerFrame;
};
/**
* Enable Gap Pixels changes member variables
* @param enable true if gap pixels enable, else false
*/
void SetGapPixelsEnable(bool b, int dr) {
switch((int)b) {
case 1:
nPixelsX_Streamer = (256*2) + 3;
nPixelsY_Streamer = 256 + 1;
imageSize_Streamer = nPixelsX_Streamer * imageSize_Streamer *
((double)dr/(double)NUM_BITS_IN_ONE_BYTE);
break;
default:
nPixelsX_Streamer = (256*2);
nPixelsY_Streamer = 256;
imageSize_Streamer = dataSize*packetsPerFrame;
break;
}
};
};

View File

@@ -66,6 +66,12 @@ class UDPBaseImplementation : protected virtual slsReceiverDefs, public UDPInter
*/
int getFlippedData(int axis=0) const;
/**
* Get Gap Pixels Enable (eiger specific)
* @return true if gap pixels enabled, else false
*/
bool getGapPixelsEnable() const;
//***file parameters***
/**
@@ -284,6 +290,13 @@ class UDPBaseImplementation : protected virtual slsReceiverDefs, public UDPInter
*/
void setFlippedData(int axis=0, int enable=-1);
/**
* Set Gap Pixels Enable (eiger specific)
* @param b true for gap pixels enable, else false
* @return OK or FAIL
*/
int setGapPixelsEnable(const bool b);
//***file parameters***
/**
@@ -609,6 +622,8 @@ class UDPBaseImplementation : protected virtual slsReceiverDefs, public UDPInter
uint32_t fifoDepth;
/** enable for flipping data across both axes */
int flippedData[2];
/** gap pixels enable */
bool gapPixelsEnable;
//***receiver parameters***
/** Maximum Number of Listening Threads/ UDP Ports */

View File

@@ -48,6 +48,7 @@ class UDPInterface {
* -setFlippedData (if eiger)
* -setActivate (if eiger)
* -setTenGigaEnable (if eiger)
* -setGapPixelsEnable
* -setStreamingPort
* -setStreamingSourceIP
* -setDataStreamEnable
@@ -151,6 +152,12 @@ class UDPInterface {
*/
virtual int getFlippedData(int axis=0) const = 0;
/**
* Get Gap Pixels Enable (eiger specific)
* @return true if gap pixels enabled, else false
*/
virtual bool getGapPixelsEnable() const = 0;
//***file parameters***
/**
@@ -370,6 +377,14 @@ class UDPInterface {
virtual void setFlippedData(int axis=0, int enable=-1) = 0;
/**
* Set Gap Pixels Enable (eiger specific)
* @param b true for gap pixels enable, else false
* @return OK or FAIL
*/
virtual int setGapPixelsEnable(const bool b) = 0;
//***file parameters***
/**
* Set File Format

View File

@@ -53,6 +53,13 @@ class UDPStandardImplementation: private virtual slsReceiverDefs, public UDPBase
*/
int64_t getAcquisitionIndex() const;
/**
* Set Gap Pixels Enable (eiger specific)
* @param b true for gap pixels enable, else false
* @return OK or FAIL
*/
int setGapPixelsEnable(const bool b);
/**
* Set File Format
* @param f fileformat binary or hdf5

View File

@@ -261,6 +261,9 @@ class slsReceiverTCPIPInterface : private virtual slsReceiverDefs {
/** set streaming source ip */
int set_streaming_source_ip();
/** enable gap pixels */
int enable_gap_pixels();
/** detector type */

View File

@@ -60,6 +60,7 @@ enum recFuncs{
F_SEND_RECEIVER_MULTIDETSIZE, /** < sets the multi detector size to the receiver */
F_SET_RECEIVER_STREAMING_PORT, /** < sets the receiver streaming port */
F_RECEIVER_STREAMING_SRC_IP, /** < sets the receiver streaming source IP */
F_ENABLE_GAPPIXELS_IN_RECEIVER, /** < sets gap pixels in the receiver */
/* Always append functions hereafter!!! */