mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-15 06:17:12 +02:00
size change in receiver call back API now streamed, gui allows smaller packet size than expected to be caught and replaced the rest with 0xFF
This commit is contained in:
@ -35,8 +35,9 @@ bool DataProcessor::SilentMode(false);
|
||||
|
||||
DataProcessor::DataProcessor(Fifo*& f, fileFormat* ftype, bool fwenable, bool* dsEnable, bool* gpEnable, uint32_t* dr,
|
||||
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 (*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) :
|
||||
|
||||
ThreadObject(NumberofDataProcessors),
|
||||
@ -316,7 +317,7 @@ void DataProcessor::ThreadExecution() {
|
||||
return;
|
||||
}
|
||||
|
||||
ProcessAnImage(buffer + FIFO_HEADER_NUMBYTES);
|
||||
ProcessAnImage(buffer);
|
||||
|
||||
//stream (if time/freq to stream) or free
|
||||
if (*dataStreamEnable && SendToStreamer())
|
||||
@ -348,7 +349,7 @@ void DataProcessor::StopProcessing(char* buf) {
|
||||
/** buf includes only the standard header */
|
||||
void DataProcessor::ProcessAnImage(char* buf) {
|
||||
|
||||
sls_detector_header* header = (sls_detector_header*) (buf);
|
||||
sls_detector_header* header = (sls_detector_header*) (buf + FIFO_HEADER_NUMBYTES);
|
||||
uint64_t fnum = header->frameNumber;
|
||||
currentFrameIndex = fnum;
|
||||
uint32_t nump = header->packetNumber;
|
||||
@ -381,7 +382,7 @@ void DataProcessor::ProcessAnImage(char* buf) {
|
||||
}
|
||||
|
||||
if (*gapPixelsEnable && (*dynamicRange!=4))
|
||||
InsertGapPixels(buf + sizeof(sls_detector_header), *dynamicRange);
|
||||
InsertGapPixels(buf + FIFO_HEADER_NUMBYTES + sizeof(sls_detector_header), *dynamicRange);
|
||||
|
||||
// x coord is 0 for detector in pos [0,0,0]
|
||||
if (xcoordin1D) {
|
||||
@ -409,14 +410,14 @@ void DataProcessor::ProcessAnImage(char* buf) {
|
||||
header->roundRNumber,
|
||||
header->detType,
|
||||
header->version,
|
||||
buf + sizeof(sls_detector_header),
|
||||
generalData->imageSize,
|
||||
buf + FIFO_HEADER_NUMBYTES + sizeof(sls_detector_header),
|
||||
(uint32_t*)buf,
|
||||
pRawDataReady);
|
||||
}
|
||||
|
||||
|
||||
if (file)
|
||||
file->WriteToFile(buf, sizeof(sls_detector_header) + generalData->imageSize, fnum-firstMeasurementIndex, nump);
|
||||
file->WriteToFile(buf + FIFO_HEADER_NUMBYTES, sizeof(sls_detector_header) + (uint32_t)(*((uint32_t*)buf)), fnum-firstMeasurementIndex, nump);
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user