From 549fef568042b310f9512ba688a925ba7794e712 Mon Sep 17 00:00:00 2001 From: Dhanya Thattil Date: Fri, 7 Jan 2022 08:54:20 +0100 Subject: [PATCH] fixed warnings --- slsReceiverSoftware/src/GeneralData.h | 10 +++------- slsReceiverSoftware/src/Implementation.cpp | 4 ++-- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/slsReceiverSoftware/src/GeneralData.h b/slsReceiverSoftware/src/GeneralData.h index dd06bfbc3..a9e5126b5 100644 --- a/slsReceiverSoftware/src/GeneralData.h +++ b/slsReceiverSoftware/src/GeneralData.h @@ -58,7 +58,7 @@ class GeneralData { bool tengigaEnable{false}; uint32_t nAnalogSamples{0}; uint32_t nDigitalSamples{0}; - readoutMode readoutType{ANALOG_ONLY}; + slsDetectorDefs::readoutMode readoutType{slsDetectorDefs::ANALOG_ONLY}; uint32_t adcEnableMaskOneGiga{BIT32_MASK}; uint32_t adcEnableMaskTenGiga{BIT32_MASK}; slsDetectorDefs::ROI roi{}; @@ -69,7 +69,7 @@ class GeneralData { // Returns the pixel depth in byte, 4 bits being 0.5 byte float GetPixelDepth() { return float(dynamicRange) / 8; } - void ThrowGenericError(std::string msg) { + void ThrowGenericError(std::string msg) const { throw sls::RuntimeError( msg + std::string("SetROI is a generic function that should be " "overloaded by a derived class")); @@ -150,10 +150,6 @@ class GeneralData { virtual void SetReadoutMode(slsDetectorDefs::readoutMode r) { ThrowGenericError("SetReadoutMode"); }; - - virtual void SetTenGigaEnable(bool tg) { - ThrowGenericError("SetTenGigaEnable"); - }; }; class GotthardData : public GeneralData { @@ -571,7 +567,7 @@ class ChipTestBoardData : public GeneralData { dataSize = tengigaEnable ? 8144 : UDP_PACKET_DATA_BYTES; packetSize = headerSizeinPacket + dataSize; - imageSize = adatabytes + ddatabytes; + imageSize = nAnalogBytes + nDigitalBytes; packetsPerFrame = ceil((double)imageSize / (double)dataSize); }; }; diff --git a/slsReceiverSoftware/src/Implementation.cpp b/slsReceiverSoftware/src/Implementation.cpp index f1f024b1e..f8c156656 100644 --- a/slsReceiverSoftware/src/Implementation.cpp +++ b/slsReceiverSoftware/src/Implementation.cpp @@ -171,7 +171,7 @@ void Implementation::setDetectorType(const detectorType d) { &framesPerFile, &frameDiscardMode, &activated, &detectorDataStream[i], &silentMode)); int ctbAnalogDataBytes = 0; - if (myDetectorType == CHIPTESTBOARD) { + if (detType == CHIPTESTBOARD) { ctbAnalogDataBytes = generalData->GetNumberOfAnalogDatabytes(); } dataProcessor.push_back(sls::make_unique( @@ -896,7 +896,7 @@ void Implementation::setNumberofUDPInterfaces(const int n) { listener[i]->SetGeneralData(generalData); int ctbAnalogDataBytes = 0; - if (myDetectorType == CHIPTESTBOARD) { + if (detType == CHIPTESTBOARD) { ctbAnalogDataBytes = generalData->GetNumberOfAnalogDatabytes(); }