mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-06 01:50:40 +02:00
connected analog databytes
This commit is contained in:
parent
fc7d3bcaea
commit
71dd43d252
@ -205,9 +205,11 @@ public:
|
||||
* @param ds digital number of samples
|
||||
* @param t tengiga enable
|
||||
* @param f readout flags
|
||||
* @returns analog data bytes
|
||||
*/
|
||||
virtual void setImageSize(uint32_t a, uint64_t as, uint64_t ds, bool t, slsDetectorDefs::readOutFlags f = slsDetectorDefs::GET_READOUT_FLAGS) {
|
||||
virtual int setImageSize(uint32_t a, uint64_t as, uint64_t ds, bool t, slsDetectorDefs::readOutFlags f = slsDetectorDefs::GET_READOUT_FLAGS) {
|
||||
cprintf(RED,"setImageSize is a generic function that should be overloaded by a derived class\n");
|
||||
return 0;
|
||||
};
|
||||
|
||||
/**
|
||||
@ -580,8 +582,9 @@ public:
|
||||
* @param ds digital number of samples
|
||||
* @param t tengiga enable
|
||||
* @param f readout flags
|
||||
* @returns analog data bytes
|
||||
*/
|
||||
void setImageSize(uint32_t a, uint64_t as, uint64_t ds, bool t, slsDetectorDefs::readOutFlags f = slsDetectorDefs::GET_READOUT_FLAGS) {
|
||||
int setImageSize(uint32_t a, uint64_t as, uint64_t ds, bool t, slsDetectorDefs::readOutFlags f = slsDetectorDefs::GET_READOUT_FLAGS) {
|
||||
int nachans = 0, ndchans = 0;
|
||||
int adatabytes = 0, ddatabytes = 0;
|
||||
|
||||
@ -632,6 +635,7 @@ public:
|
||||
packetsPerFrame = ceil((double)imageSize / (double)dataSize);
|
||||
standardheader = true;
|
||||
}
|
||||
return adatabytes;
|
||||
}
|
||||
|
||||
};
|
||||
@ -670,8 +674,9 @@ public:
|
||||
* @param ds digital number of samples
|
||||
* @param t tengiga enable
|
||||
* @param f readout flags
|
||||
* @returns analog data bytes
|
||||
*/
|
||||
void setImageSize(uint32_t a, uint64_t as, uint64_t ds, bool t, slsDetectorDefs::readOutFlags f = slsDetectorDefs::GET_READOUT_FLAGS) {
|
||||
int setImageSize(uint32_t a, uint64_t as, uint64_t ds, bool t, slsDetectorDefs::readOutFlags f = slsDetectorDefs::GET_READOUT_FLAGS) {
|
||||
int nachans = 0;
|
||||
int adatabytes = 0;
|
||||
|
||||
@ -706,6 +711,7 @@ public:
|
||||
imageSize = adatabytes;
|
||||
packetsPerFrame = ceil((double)imageSize / (double)dataSize);
|
||||
}
|
||||
return adatabytes;
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -113,6 +113,11 @@ void slsReceiverImplementation::InitializeMembers() {
|
||||
//** class objects ***
|
||||
generalData = nullptr;
|
||||
|
||||
//** ctb callback parameters
|
||||
ctbType = 0;
|
||||
ctbDigitalOffset = 0;
|
||||
ctbAnalogDataBytes = 0;
|
||||
|
||||
//***callback parameters***
|
||||
startAcquisitionCallBack = nullptr;
|
||||
pStartAcquisition = nullptr;
|
||||
@ -482,7 +487,7 @@ int slsReceiverImplementation::setReadOutFlags(const readOutFlags f) {
|
||||
|
||||
// side effects
|
||||
if (myDetectorType == CHIPTESTBOARD) {
|
||||
generalData->setImageSize(adcEnableMask, numberOfAnalogSamples, numberOfDigitalSamples, tengigaEnable, readoutFlags);
|
||||
ctbAnalogDataBytes = generalData->setImageSize(adcEnableMask, numberOfAnalogSamples, numberOfDigitalSamples, tengigaEnable, readoutFlags);
|
||||
for (const auto& it : dataProcessor)
|
||||
it->SetPixelDimension();
|
||||
if (SetupFifoStructure() == FAIL)
|
||||
@ -838,7 +843,7 @@ int slsReceiverImplementation::setADCEnableMask(uint32_t mask) {
|
||||
generalData->setImageSize(mask, numberOfAnalogSamples, numberOfDigitalSamples, tengigaEnable);
|
||||
break;
|
||||
case CHIPTESTBOARD:
|
||||
generalData->setImageSize(mask, numberOfAnalogSamples, numberOfDigitalSamples, tengigaEnable, readoutFlags);
|
||||
ctbAnalogDataBytes = generalData->setImageSize(mask, numberOfAnalogSamples, numberOfDigitalSamples, tengigaEnable, readoutFlags);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@ -972,7 +977,7 @@ int slsReceiverImplementation::setNumberofAnalogSamples(const uint64_t i) {
|
||||
if(myDetectorType == MOENCH) {
|
||||
generalData->setImageSize(adcEnableMask, numberOfAnalogSamples, numberOfDigitalSamples, tengigaEnable);
|
||||
} else if(myDetectorType == CHIPTESTBOARD) {
|
||||
generalData->setImageSize(adcEnableMask, numberOfAnalogSamples, numberOfDigitalSamples, tengigaEnable, readoutFlags);
|
||||
ctbAnalogDataBytes = generalData->setImageSize(adcEnableMask, numberOfAnalogSamples, numberOfDigitalSamples, tengigaEnable, readoutFlags);
|
||||
}
|
||||
for (const auto& it : dataProcessor)
|
||||
it->SetPixelDimension();
|
||||
@ -992,7 +997,7 @@ int slsReceiverImplementation::setNumberofDigitalSamples(const uint64_t i) {
|
||||
if(myDetectorType == MOENCH) {
|
||||
generalData->setImageSize(adcEnableMask, numberOfAnalogSamples, numberOfDigitalSamples, tengigaEnable);
|
||||
} else if(myDetectorType == CHIPTESTBOARD) {
|
||||
generalData->setImageSize(adcEnableMask, numberOfAnalogSamples, numberOfDigitalSamples, tengigaEnable, readoutFlags);
|
||||
ctbAnalogDataBytes = generalData->setImageSize(adcEnableMask, numberOfAnalogSamples, numberOfDigitalSamples, tengigaEnable, readoutFlags);
|
||||
}
|
||||
for (const auto& it : dataProcessor)
|
||||
it->SetPixelDimension();
|
||||
@ -1034,7 +1039,7 @@ int slsReceiverImplementation::setTenGigaEnable(const bool b) {
|
||||
generalData->setImageSize(adcEnableMask, numberOfAnalogSamples, numberOfDigitalSamples, tengigaEnable);
|
||||
break;
|
||||
case CHIPTESTBOARD:
|
||||
generalData->setImageSize(adcEnableMask, numberOfAnalogSamples, numberOfDigitalSamples, tengigaEnable, readoutFlags);
|
||||
ctbAnalogDataBytes = generalData->setImageSize(adcEnableMask, numberOfAnalogSamples, numberOfDigitalSamples, tengigaEnable, readoutFlags);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
Loading…
x
Reference in New Issue
Block a user