in between

This commit is contained in:
2018-04-06 17:48:10 +02:00
parent 753290b228
commit 8cf6e0cbd6
10 changed files with 170 additions and 102 deletions

View File

@ -151,9 +151,9 @@
<widget class="QWidget" name="gridLayoutWidget"> <widget class="QWidget" name="gridLayoutWidget">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>35</x> <x>0</x>
<y>10</y> <y>10</y>
<width>326</width> <width>357</width>
<height>321</height> <height>321</height>
</rect> </rect>
</property> </property>
@ -965,9 +965,9 @@ Frame period between exposures.
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>30</x> <x>30</x>
<y>297</y> <y>298</y>
<width>318</width> <width>318</width>
<height>30</height> <height>31</height>
</rect> </rect>
</property> </property>
<layout class="QHBoxLayout" name="horizontalLayout"> <layout class="QHBoxLayout" name="horizontalLayout">
@ -1049,9 +1049,6 @@ Frame period between exposures.
<iconset resource="../include/icons.qrc"> <iconset resource="../include/icons.qrc">
<normaloff>:/icons/images/stop.png</normaloff>:/icons/images/stop.png</iconset> <normaloff>:/icons/images/stop.png</normaloff>:/icons/images/stop.png</iconset>
</property> </property>
<property name="shortcut">
<string>Shift+Space</string>
</property>
<property name="checkable"> <property name="checkable">
<bool>false</bool> <bool>false</bool>
</property> </property>

View File

@ -49,6 +49,7 @@
int Beb_activated = 1; int Beb_activated = 1;
uint32_t Beb_detid = 0; uint32_t Beb_detid = 0;
int Beb_top =0;
@ -164,8 +165,10 @@ void Beb_GetModuleConfiguration(int* master, int* top, int* normal){
ret = Beb_Read32(csp0base, MODULE_CONFIGURATION_MASK); ret = Beb_Read32(csp0base, MODULE_CONFIGURATION_MASK);
printf("Module Configuration OK\n"); printf("Module Configuration OK\n");
printf("Beb: value =0x%x\n",ret); printf("Beb: value =0x%x\n",ret);
if(ret&TOP_BIT_MASK) if(ret&TOP_BIT_MASK) {
*top = 1; *top = 1;
Beb_top = 1;
}
if(ret&MASTER_BIT_MASK) if(ret&MASTER_BIT_MASK)
*master = 1; *master = 1;
if(ret&NORMAL_MODULE_BIT_MASK) if(ret&NORMAL_MODULE_BIT_MASK)
@ -1161,7 +1164,7 @@ int Beb_SetDetectorPosition(int pos[]) {
if(!Beb_activated) if(!Beb_activated)
return OK; return OK;
pos[0] = Beb_swap_uint16(pos[0]); pos[1] = Beb_swap_uint16(pos[1]);
pos[2] = Beb_swap_uint16(pos[2]); pos[2] = Beb_swap_uint16(pos[2]);
int ret = FAIL; int ret = FAIL;
@ -1176,37 +1179,37 @@ int Beb_SetDetectorPosition(int pos[]) {
uint32_t value = 0; uint32_t value = 0;
ret = OK; ret = OK;
// x left // x left
int posval = Beb_swap_uint16((Beb_top ? pos[0] : (pos[0]+1)));
value = Beb_Read32(csp0base, UDP_HEADER_A_RIGHT_OFST); value = Beb_Read32(csp0base, UDP_HEADER_A_RIGHT_OFST);
value &= UDP_HEADER_ID_MSK; // to keep previous id value value &= UDP_HEADER_ID_MSK; // to keep previous id value
Beb_Write32(csp0base, UDP_HEADER_A_LEFT_OFST, value | ((pos[0] << UDP_HEADER_X_OFST) & UDP_HEADER_X_MSK)); Beb_Write32(csp0base, UDP_HEADER_A_LEFT_OFST, value | ((posval << UDP_HEADER_X_OFST) & UDP_HEADER_X_MSK));
value = Beb_Read32(csp0base, UDP_HEADER_A_LEFT_OFST); value = Beb_Read32(csp0base, UDP_HEADER_A_LEFT_OFST);
if((value & UDP_HEADER_X_MSK) != ((pos[0] << UDP_HEADER_X_OFST) & UDP_HEADER_X_MSK)) if((value & UDP_HEADER_X_MSK) != ((posval << UDP_HEADER_X_OFST) & UDP_HEADER_X_MSK))
ret = FAIL; ret = FAIL;
// x right // x right
posval = Beb_swap_uint16((Beb_top ? (pos[0]+1) : pos[0]));
value = Beb_Read32(csp0base, UDP_HEADER_A_LEFT_OFST); value = Beb_Read32(csp0base, UDP_HEADER_A_LEFT_OFST);
value &= UDP_HEADER_ID_MSK; // to keep previous id value value &= UDP_HEADER_ID_MSK; // to keep previous id value
Beb_Write32(csp0base, UDP_HEADER_A_RIGHT_OFST, value | ((pos[0] << UDP_HEADER_X_OFST) & UDP_HEADER_X_MSK)); Beb_Write32(csp0base, UDP_HEADER_A_RIGHT_OFST, value | ((posval << UDP_HEADER_X_OFST) & UDP_HEADER_X_MSK));
value = Beb_Read32(csp0base, UDP_HEADER_A_RIGHT_OFST); value = Beb_Read32(csp0base, UDP_HEADER_A_RIGHT_OFST);
if((value & UDP_HEADER_X_MSK) != ((pos[0] << UDP_HEADER_X_OFST) & UDP_HEADER_X_MSK)) if((value & UDP_HEADER_X_MSK) != ((posval << UDP_HEADER_X_OFST) & UDP_HEADER_X_MSK))
ret = FAIL; ret = FAIL;
// y left // y left
int posval = Beb_swap_uint16(pos[1]);
// overwriting z anyway, so no need to look at previous z value // overwriting z anyway, so no need to look at previous z value
Beb_Write32(csp0base, UDP_HEADER_B_LEFT_OFST, ((posval << UDP_HEADER_Y_OFST) & UDP_HEADER_Y_MSK)); Beb_Write32(csp0base, UDP_HEADER_B_LEFT_OFST, ((pos[1] << UDP_HEADER_Y_OFST) & UDP_HEADER_Y_MSK));
value = Beb_Read32(csp0base, UDP_HEADER_B_LEFT_OFST); value = Beb_Read32(csp0base, UDP_HEADER_B_LEFT_OFST);
if(value != ((posval << UDP_HEADER_Y_OFST) & UDP_HEADER_Y_MSK)) if(value != ((pos[1] << UDP_HEADER_Y_OFST) & UDP_HEADER_Y_MSK))
ret = FAIL; ret = FAIL;
// y right // y right
posval = Beb_swap_uint16(pos[1]+1);
// overwriting z anyway, so no need to look at previous z value // overwriting z anyway, so no need to look at previous z value
Beb_Write32(csp0base, UDP_HEADER_B_RIGHT_OFST, ((posval << UDP_HEADER_Y_OFST) & UDP_HEADER_Y_MSK)); Beb_Write32(csp0base, UDP_HEADER_B_RIGHT_OFST, ((pos[1] << UDP_HEADER_Y_OFST) & UDP_HEADER_Y_MSK));
value = Beb_Read32(csp0base, UDP_HEADER_B_RIGHT_OFST); value = Beb_Read32(csp0base, UDP_HEADER_B_RIGHT_OFST);
if(value != ((posval << UDP_HEADER_Y_OFST) & UDP_HEADER_Y_MSK)) if(value != ((pos[1] << UDP_HEADER_Y_OFST) & UDP_HEADER_Y_MSK))
ret = FAIL; ret = FAIL;
@ -1235,8 +1238,8 @@ int Beb_SetDetectorPosition(int pos[]) {
cprintf(BLUE, "Position set to...\n" cprintf(BLUE, "Position set to...\n"
"Left: [%d, %d, %d]\n" "Left: [%d, %d, %d]\n"
"Right:[%d, %d, %d]\n", "Right:[%d, %d, %d]\n",
Beb_swap_uint16(pos[0]), pos[1], Beb_swap_uint16(pos[2]), (Beb_top ? pos[0] : (pos[0]+1)), Beb_swap_uint16(pos[1]), Beb_swap_uint16(pos[2]),
Beb_swap_uint16(pos[0]), pos[1]+1, Beb_swap_uint16(pos[2])); (Beb_top ? (pos[0]+1) : pos[0]), Beb_swap_uint16(pos[1]), Beb_swap_uint16(pos[2]));
} }
return ret; return ret;

View File

@ -1,9 +1,9 @@
Path: slsDetectorsPackage/slsDetectorSoftware/eigerDetectorServer Path: slsDetectorsPackage/slsDetectorSoftware/eigerDetectorServer
URL: origin git@github.com:slsdetectorgroup/slsDetectorPackage.git URL: origin git@github.com:slsdetectorgroup/slsDetectorPackage.git
Repository Root: origin git@github.com:slsdetectorgroup/slsDetectorPackage.git Repository Root: origin git@github.com:slsdetectorgroup/slsDetectorPackage.git
Repsitory UUID: da010a03d725b6f18020d2142d58771534414274 Repsitory UUID: 753290b2289ec7a3dbb153493896f778a7182aae
Revision: 328 Revision: 329
Branch: developer Branch: zmqhandler
Last Changed Author: Erik_Frojdh Last Changed Author: Dhanya_Thattil
Last Changed Rev: 3751 Last Changed Rev: 3755
Last Changed Date: 2018-04-03 16:29:39.000000002 +0200 ./xparameters.h Last Changed Date: 2018-04-06 14:04:16.000000002 +0200 ./Beb.c

View File

@ -1,6 +1,6 @@
#define GITURL "git@github.com:slsdetectorgroup/slsDetectorPackage.git" #define GITURL "git@github.com:slsdetectorgroup/slsDetectorPackage.git"
#define GITREPUUID "da010a03d725b6f18020d2142d58771534414274" #define GITREPUUID "753290b2289ec7a3dbb153493896f778a7182aae"
#define GITAUTH "Erik_Frojdh" #define GITAUTH "Dhanya_Thattil"
#define GITREV 0x3751 #define GITREV 0x3755
#define GITDATE 0x20180403 #define GITDATE 0x20180406
#define GITBRANCH "developer" #define GITBRANCH "zmqhandler"

View File

@ -6028,15 +6028,19 @@ int multiSlsDetector::createReceivingDataSockets(const bool destroy){
void multiSlsDetector::readFrameFromReceiver(){ void multiSlsDetector::readFrameFromReceiver(){
int nX = thisMultiDetector->numberOfDetector[X]; // to copy data in multi module
int nY = thisMultiDetector->numberOfDetector[Y]; // for eiger, to reverse the data
int numSockets = thisMultiDetector->numberOfDetectors; int numSockets = thisMultiDetector->numberOfDetectors;
bool gappixelsenable = false; bool gappixelsenable = false;
bool eiger = false;
if (getDetectorsType() == EIGER) { if (getDetectorsType() == EIGER) {
eiger = true;
nX *= 2;
numSockets *= 2; numSockets *= 2;
gappixelsenable = detectors[0]->enableGapPixels(-1) >= 1 ? true: false; gappixelsenable = detectors[0]->enableGapPixels(-1) >= 1 ? true: false;
} }
bool runningList[numSockets]; bool runningList[numSockets], connectList[numSockets];
bool connectList[numSockets];
int numRunning = 0; int numRunning = 0;
for(int i = 0; i < numSockets; ++i) { for(int i = 0; i < numSockets; ++i) {
if(!zmqSocket[i]->Connect()) { if(!zmqSocket[i]->Connect()) {
@ -6054,17 +6058,15 @@ void multiSlsDetector::readFrameFromReceiver(){
bool data = false; bool data = false;
char* image = NULL; char* image = NULL;
char* multiframe = NULL; char* multiframe = NULL;
char* multigappixels = NULL char* multigappixels = NULL;
int multisize = 0; int multisize = 0;
// header info // only first message header
uint32_t size = 0; // only first message header uint32_t size = 0, nPixelsX = 0, nPixelsY = 0, dynamicRange = 0;
uint32_t nPixelsx = 0, nPixelsY = 0; float bytesPerPixel = 0;
uint32_t dynamicRange = 0; // header info every header
string currentFileName = ""; string currentFileName = "";
uint64_t currentAcquisitionIndex = -1; uint64_t currentAcquisitionIndex = -1, currentFrameIndex = -1, currentFileIndex = -1;
uint64_t currentFrameIndex = -1; uint32_t currentSubFrameIndex = -1, coordX = -1, coordY = -1, flippedDataX = -1;
uint32_t currentSubFrameIndex = -1;
uint64_t currentFileIndex = -1;
//wait for real time acquisition to start //wait for real time acquisition to start
bool running = true; bool running = true;
@ -6075,64 +6077,109 @@ void multiSlsDetector::readFrameFromReceiver(){
//exit when checkJoinThread() (all sockets done) //exit when checkJoinThread() (all sockets done)
while(running){ while(running){
// reset data
data = false;
if (multiframe != NULL)
memset(multiframe, 0xFF, multisize);
//get each frame //get each frame
for(int isocket=0; isocket<numSockets; ++isocket){ for(int isocket=0; isocket<numSockets; ++isocket){
// reset data
data = false;
if (multiframe != NULL)
memset(multiframe, 0xFF, multisize);
//if running //if running
if (runningList[isocket]) { if (runningList[isocket]) {
// sub images - header
rapidjson::Document doc;
if(!zmqSocket[isocket]->ReceiveHeader(isocket, doc, SLS_DETECTOR_JSON_HEADER_VERSION)){
zmqSocket[isocket]->CloseHeaderMessage();
// parse error, version error or end of acquisition for socket
runningList[isocket] = false;
--numRunning;
continue;
}
// if first message, allocate (all one time stuff) // HEADER
if (image == NULL) { {
// allocate rapidjson::Document doc;
size = doc["size"].GetUint(); if(!zmqSocket[isocket]->ReceiveHeader(isocket, doc, SLS_DETECTOR_JSON_HEADER_VERSION)){
multisize = size * numSockets; zmqSocket[isocket]->CloseHeaderMessage();
image = new char[size]; // parse error, version error or end of acquisition for socket
multiframe = new char[multisize]; runningList[isocket] = false;
--numRunning;
// one time values continue;
// dynamic range
dynamicRange = doc["bitmode"].GetUint();
// shape
if (dynamicRange == 4) {
nPixelsx = thisMultiDetector->numberOfChannelInclGapPixels[X];
nPixelsY = thisMultiDetector->numberOfChannelInclGapPixels[Y];
} else {
const Value& a = doc["shape"];
nPixelsx = a[0].GetUint(); /* later try doc["shape"].GetUint();*/
nPixelsY = a[1].GetUint();
} }
}
// parse rest of header
currentFileName = doc["fname"].GetString();
currentAcquisitionIndex = doc["acqIndex"].GetUint64();
currentFrameIndex = doc["fIndex"].GetUint64();
currentFileIndex = doc["fileIndex"].GetUint64();
currentSubFrameIndex = doc["expLength"].GetUint();
zmqSocket[isocket]->CloseHeaderMessage();
// copying data (receiving incorrect size is replaced by 0xFF) // if first message, allocate (all one time stuff)
if (image == NULL) {
// allocate
size = doc["size"].GetUint();
multisize = size * numSockets;
image = new char[size];
multiframe = new char[multisize];
memset(multiframe, 0xFF, multisize);
// dynamic range
dynamicRange = doc["bitmode"].GetUint();
bytesPerPixel = (float)dynamicRange / 8;
// shape
nPixelsX = doc["shape"][0].GetUint();
nPixelsY = doc["shape"][1].GetUint();
#ifdef VERBOSE
cprintf(BLUE,"(Debug) One Time Header Info:\n"
"size: %u\n"
"multisize: %u\n"
"dynamicRange: %u\n"
"bytesPerPixel: %f\n"
"nPixelsX: %u\n"
"nPixelsY: %u\n",
size, multisize, dynamicRange, bytesPerPixel, nPixelsX, nPixelsY);
#endif
}
// each time, parse rest of header
currentFileName = doc["fname"].GetString();
currentAcquisitionIndex = doc["acqIndex"].GetUint64();
currentFrameIndex = doc["fIndex"].GetUint64();
currentFileIndex = doc["fileIndex"].GetUint64();
currentSubFrameIndex = doc["expLength"].GetUint();
coordX = doc["xCoord"].GetUint();
coordY = doc["yCoord"].GetUint();
if (eiger)
coordY = (nY - 1) - coordY;
//cout << "X:" << doc["xCoord"].GetUint() <<" Y:"<<doc["yCoord"].GetUint();
flippedDataX = doc["flippedDataX"].GetUint();
#ifdef VERBOSE
cprintf(BLUE,"(Debug) Header Info:\n"
"currentFileName: %s\n"
"currentAcquisitionIndex: %lu\n"
"currentFrameIndex: %lu\n"
"currentFileIndex: %lu\n"
"currentSubFrameIndex: %u\n"
"coordX: %u\n"
"coordY: %u\n"
"flippedDataX: %u\n",
currentFileName.c_str(), currentAcquisitionIndex, currentFrameIndex,
currentFileIndex, currentSubFrameIndex, coordX, coordY, flippedDataX);
#endif
zmqSocket[isocket]->CloseHeaderMessage();
}
// DATA
data = true; data = true;
zmqSocket[isocket]->ReceiveData(isocket, image, size); zmqSocket[isocket]->ReceiveData(isocket, image, size);
// creaing multi image // creating multi image
{
uint32_t xoffset = coordX * nPixelsX * bytesPerPixel;
uint32_t yoffset = coordY * nPixelsY;
uint32_t singledetrowoffset = nPixelsX * bytesPerPixel;
uint32_t rowoffset = nX * singledetrowoffset;
if (eiger && flippedDataX) {
for (uint32_t i = 0; i < nPixelsY; ++i) {
memcpy( ((char*)multiframe) + ((yoffset + (nPixelsY - 1 - i) ) * rowoffset) + xoffset,
(char*)image + (i * singledetrowoffset),
singledetrowoffset);
}
}
else {
for (uint32_t i = 0; i < nPixelsY; ++i) {
memcpy( ((char*)multiframe) + ((yoffset + i ) * rowoffset) + xoffset,
(char*)image + (i * singledetrowoffset),
singledetrowoffset);
}
}
}
} }
} }
//send data to callback //send data to callback
@ -6140,15 +6187,18 @@ void multiSlsDetector::readFrameFromReceiver(){
// 4bit gap pixels // 4bit gap pixels
if (dynamicRange == 4 && gappixelsenable) { if (dynamicRange == 4 && gappixelsenable) {
int n = processImageWithGapPixels(multiframe, multigappixels); int n = processImageWithGapPixels(multiframe, multigappixels);
nPixelsX = thisMultiDetector->numberOfChannelInclGapPixels[X];
nPixelsY = thisMultiDetector->numberOfChannelInclGapPixels[Y];
thisData = new detectorData(NULL,NULL,NULL,getCurrentProgress(), thisData = new detectorData(NULL,NULL,NULL,getCurrentProgress(),
currentFileName.c_str(), nPixelsx, nPixelsY, currentFileName.c_str(), nPixelsX, nPixelsY,
multigappixels, n, dynamicRange, currentFileIndex); multigappixels, n, dynamicRange, currentFileIndex);
} }
// normal pixels // normal pixels
else else {
thisData = new detectorData(NULL, NULL, NULL, getCurrentProgress(), thisData = new detectorData(NULL, NULL, NULL, getCurrentProgress(),
currentFileName.c_str(), nPixelsx, nPixelsY, currentFileName.c_str(), nPixelsX, nPixelsY,
multiframe, multisize, dynamicRange, currentFileIndex); multiframe, multisize, dynamicRange, currentFileIndex);
}
dataReady(thisData, currentFrameIndex, dataReady(thisData, currentFrameIndex,
((dynamicRange == 32) ? currentSubFrameIndex : -1), ((dynamicRange == 32) ? currentSubFrameIndex : -1),
pCallbackArg); pCallbackArg);

View File

@ -6782,10 +6782,13 @@ int slsDetector::configureMAC(){
pos[0] = 0; pos[0] = 0;
pos[1] = 0; pos[1] = 0;
} else { } else {
pos[0] = posId / max; pos[1] = posId / max;
pos[1] = (posId % max) * ((thisDetector->myDetectorType == EIGER) ? 2 : 1); // for horiz. udp ports pos[0] = (posId % max) * ((thisDetector->myDetectorType == EIGER) ? 2 : 1); // for horiz. udp ports
} }
} }
#ifdef VERBOSE
cout << "SLS [" << posId << "] - (" << pos[0] << "," << pos[1] << "," << pos[2] << ")" << endl;
#endif
//if udpip wasnt initialized in config file //if udpip wasnt initialized in config file

View File

@ -24,8 +24,9 @@ class DataStreamer : private virtual slsReceiverDefs, public ThreadObject {
* @param dr pointer to dynamic range * @param dr pointer to dynamic range
* @param sEnable pointer to short frame enable * @param sEnable pointer to short frame enable
* @param fi pointer to file index * @param fi pointer to file index
* @param fd flipped data enable for x and y dimensions
*/ */
DataStreamer(Fifo*& f, uint32_t* dr, int* sEnable, uint64_t* fi); DataStreamer(Fifo*& f, uint32_t* dr, int* sEnable, uint64_t* fi, int* fd);
/** /**
* Destructor * Destructor
@ -229,5 +230,8 @@ class DataStreamer : private virtual slsReceiverDefs, public ThreadObject {
/** Complete buffer used for roi, eg. shortGotthard */ /** Complete buffer used for roi, eg. shortGotthard */
char* completeBuffer; char* completeBuffer;
/** flipped data across both dimensions enable */
int* flippedData;
}; };

View File

@ -276,7 +276,7 @@ public:
uint64_t bunchId = 0, uint64_t timestamp = 0, uint64_t bunchId = 0, uint64_t timestamp = 0,
uint16_t modId = 0, uint16_t xCoord = 0, uint16_t yCoord = 0, uint16_t zCoord = 0, uint16_t modId = 0, uint16_t xCoord = 0, uint16_t yCoord = 0, uint16_t zCoord = 0,
uint32_t debug = 0, uint16_t roundRNumber = 0, uint32_t debug = 0, uint16_t roundRNumber = 0,
uint8_t detType = 0, uint8_t version = 0) { uint8_t detType = 0, uint8_t version = 0, int* flippedData = 0) {
char buf[MAX_STR_LENGTH] = ""; char buf[MAX_STR_LENGTH] = "";
@ -305,14 +305,23 @@ public:
"\"debug\":%u, " "\"debug\":%u, "
"\"roundRNumber\":%u, " "\"roundRNumber\":%u, "
"\"detType\":%u, " "\"detType\":%u, "
"\"version\":%u" "\"version\":%u, "
//additional stuff
"\"flippedDataX\":%u"
"}\n\0"; "}\n\0";
int length = sprintf(buf, jsonHeaderFormat, int length = sprintf(buf, jsonHeaderFormat,
jsonversion, dynamicrange, fileIndex, npixelsx, npixelsy, imageSize, jsonversion, dynamicrange, fileIndex, npixelsx, npixelsy, imageSize,
acqIndex, fIndex, (fname == NULL)? "":fname, dummy?0:1, acqIndex, fIndex, (fname == NULL)? "":fname, dummy?0:1,
frameNumber, expLength, packetNumber, bunchId, timestamp,
frameNumber, expLength, packetNumber, bunchId, timestamp,
modId, xCoord, yCoord, zCoord, debug, roundRNumber, modId, xCoord, yCoord, zCoord, debug, roundRNumber,
detType, version); detType, version,
//additional stuff
((flippedData == 0 ) ? 0 :flippedData[0])
);
#ifdef VERBOSE #ifdef VERBOSE
//if(!index) //if(!index)
FILE_LOG(logINFO) << index << ": Streamer: buf:" << buf; FILE_LOG(logINFO) << index << ": Streamer: buf:" << buf;

View File

@ -26,7 +26,7 @@ pthread_mutex_t DataStreamer::Mutex = PTHREAD_MUTEX_INITIALIZER;
bool DataStreamer::SilentMode(false); bool DataStreamer::SilentMode(false);
DataStreamer::DataStreamer(Fifo*& f, uint32_t* dr, int* sEnable, uint64_t* fi) : DataStreamer::DataStreamer(Fifo*& f, uint32_t* dr, int* sEnable, uint64_t* fi, int* fd) :
ThreadObject(NumberofDataStreamers), ThreadObject(NumberofDataStreamers),
generalData(0), generalData(0),
fifo(f), fifo(f),
@ -38,7 +38,8 @@ DataStreamer::DataStreamer(Fifo*& f, uint32_t* dr, int* sEnable, uint64_t* fi) :
measurementStartedFlag(false), measurementStartedFlag(false),
firstAcquisitionIndex(0), firstAcquisitionIndex(0),
firstMeasurementIndex(0), firstMeasurementIndex(0),
completeBuffer(0) completeBuffer(0),
flippedData(fd)
{ {
if(ThreadObject::CreateThread()){ if(ThreadObject::CreateThread()){
pthread_mutex_lock(&Mutex); pthread_mutex_lock(&Mutex);
@ -285,7 +286,8 @@ int DataStreamer::SendHeader(sls_detector_header* header, uint32_t size, uint32_
header->frameNumber, header->expLength, header->packetNumber, header->bunchId, header->timestamp, header->frameNumber, header->expLength, header->packetNumber, header->bunchId, header->timestamp,
header->modId, header->xCoord, header->yCoord, header->zCoord, header->modId, header->xCoord, header->yCoord, header->zCoord,
header->debug, header->roundRNumber, header->debug, header->roundRNumber,
header->detType, header->version header->detType, header->version,
flippedData
); );
} }

View File

@ -218,7 +218,7 @@ int UDPStandardImplementation::setDataStreamEnable(const bool enable) {
if (enable) { if (enable) {
bool error = false; bool error = false;
for ( int i = 0; i < numThreads; ++i ) { for ( int i = 0; i < numThreads; ++i ) {
dataStreamer.push_back(new DataStreamer(fifo[i], &dynamicRange, &shortFrameEnable, &fileIndex)); dataStreamer.push_back(new DataStreamer(fifo[i], &dynamicRange, &shortFrameEnable, &fileIndex, flippedData));
dataStreamer[i]->SetGeneralData(generalData); dataStreamer[i]->SetGeneralData(generalData);
if (dataStreamer[i]->CreateZmqSockets(&numThreads, streamingPort, streamingSrcIP) == FAIL) { if (dataStreamer[i]->CreateZmqSockets(&numThreads, streamingPort, streamingSrcIP) == FAIL) {
error = true; error = true;