mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-22 22:40:02 +02:00
receiver bug fix: function pointer not initialized as null in dataprocessor
This commit is contained in:
parent
6b4d6084f5
commit
708975acb5
2
cmk.sh
2
cmk.sh
@ -168,7 +168,7 @@ fi
|
||||
|
||||
#Debug
|
||||
if [ $DEBUG -eq 1 ]; then
|
||||
CMAKE_POST+=" -DCMAKE_BUILD_TYPE=Debug "
|
||||
CMAKE_POST+=" -DCMAKE_BUILD_TYPE=Debug -DSLS_USE_SANITIZER=ON "
|
||||
echo "Debug Option enabled"
|
||||
fi
|
||||
|
||||
|
@ -34,7 +34,6 @@
|
||||
|
||||
//parameters to calculate fifo depth
|
||||
#define SAMPLE_TIME_IN_NS 100000000//100ms
|
||||
#define MAX_JOBS_PER_THREAD 1000
|
||||
|
||||
|
||||
//to differentiate between gotthard and short gotthard
|
||||
|
@ -54,7 +54,10 @@ DataProcessor::DataProcessor(int ind, detectorType dtype, Fifo* f,
|
||||
firstMeasurementIndex(0),
|
||||
numTotalFramesCaught(0),
|
||||
numFramesCaught(0),
|
||||
currentFrameIndex(0)
|
||||
currentFrameIndex(0),
|
||||
rawDataReadyCallBack(nullptr),
|
||||
rawDataModifyReadyCallBack(nullptr),
|
||||
pRawDataReady(nullptr)
|
||||
{
|
||||
if(ThreadObject::CreateThread() == FAIL)
|
||||
throw sls::RuntimeError("Could not create processing thread");
|
||||
|
@ -455,7 +455,7 @@ uint32_t Listener::ListenToAnImage(char* buf) {
|
||||
|
||||
carryOverFlag = false;
|
||||
++numpackets; //number of packets in this image (each time its copied to buf)
|
||||
new_header->packetsMask[((pnum < MAX_NUM_PACKETS) ? pnum : MAX_NUM_PACKETS)] = 1;
|
||||
new_header->packetsMask[((pnum < MAX_NUM_PACKETS) ? pnum : MAX_NUM_PACKETS - 1)] = 1;
|
||||
|
||||
//writer header
|
||||
if(isHeaderEmpty) {
|
||||
@ -599,7 +599,7 @@ uint32_t Listener::ListenToAnImage(char* buf) {
|
||||
break;
|
||||
}
|
||||
++numpackets; //number of packets in this image (each time its copied to buf)
|
||||
new_header->packetsMask[((pnum < MAX_NUM_PACKETS) ? pnum : MAX_NUM_PACKETS)] = 1;
|
||||
new_header->packetsMask[((pnum < MAX_NUM_PACKETS) ? pnum : MAX_NUM_PACKETS - 1)] = 1;
|
||||
|
||||
if(isHeaderEmpty) {
|
||||
// -------------------------- new header ----------------------------------------------------------------------
|
||||
|
@ -708,6 +708,16 @@ int slsReceiverImplementation::setNumberofUDPInterfaces(const int n) {
|
||||
// update row and column in dataprocessor
|
||||
setDetectorPositionId(detID);
|
||||
|
||||
// update call backs
|
||||
if(rawDataReadyCallBack) {
|
||||
for (const auto& it : dataProcessor)
|
||||
it->registerCallBackRawDataReady(rawDataReadyCallBack,pRawDataReady);
|
||||
}
|
||||
if(rawDataModifyReadyCallBack) {
|
||||
for (const auto& it : dataProcessor)
|
||||
it->registerCallBackRawDataModifyReady(rawDataModifyReadyCallBack,pRawDataReady);
|
||||
}
|
||||
|
||||
// test socket buffer size with current set up
|
||||
if (setUDPSocketBufferSize(0) == FAIL) {
|
||||
return FAIL;
|
||||
|
Loading…
x
Reference in New Issue
Block a user