mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-06 18:10: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 ds digital number of samples
|
||||||
* @param t tengiga enable
|
* @param t tengiga enable
|
||||||
* @param f readout flags
|
* @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");
|
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 ds digital number of samples
|
||||||
* @param t tengiga enable
|
* @param t tengiga enable
|
||||||
* @param f readout flags
|
* @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 nachans = 0, ndchans = 0;
|
||||||
int adatabytes = 0, ddatabytes = 0;
|
int adatabytes = 0, ddatabytes = 0;
|
||||||
|
|
||||||
@ -632,6 +635,7 @@ public:
|
|||||||
packetsPerFrame = ceil((double)imageSize / (double)dataSize);
|
packetsPerFrame = ceil((double)imageSize / (double)dataSize);
|
||||||
standardheader = true;
|
standardheader = true;
|
||||||
}
|
}
|
||||||
|
return adatabytes;
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
@ -670,8 +674,9 @@ public:
|
|||||||
* @param ds digital number of samples
|
* @param ds digital number of samples
|
||||||
* @param t tengiga enable
|
* @param t tengiga enable
|
||||||
* @param f readout flags
|
* @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 nachans = 0;
|
||||||
int adatabytes = 0;
|
int adatabytes = 0;
|
||||||
|
|
||||||
@ -706,6 +711,7 @@ public:
|
|||||||
imageSize = adatabytes;
|
imageSize = adatabytes;
|
||||||
packetsPerFrame = ceil((double)imageSize / (double)dataSize);
|
packetsPerFrame = ceil((double)imageSize / (double)dataSize);
|
||||||
}
|
}
|
||||||
|
return adatabytes;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -113,6 +113,11 @@ void slsReceiverImplementation::InitializeMembers() {
|
|||||||
//** class objects ***
|
//** class objects ***
|
||||||
generalData = nullptr;
|
generalData = nullptr;
|
||||||
|
|
||||||
|
//** ctb callback parameters
|
||||||
|
ctbType = 0;
|
||||||
|
ctbDigitalOffset = 0;
|
||||||
|
ctbAnalogDataBytes = 0;
|
||||||
|
|
||||||
//***callback parameters***
|
//***callback parameters***
|
||||||
startAcquisitionCallBack = nullptr;
|
startAcquisitionCallBack = nullptr;
|
||||||
pStartAcquisition = nullptr;
|
pStartAcquisition = nullptr;
|
||||||
@ -482,7 +487,7 @@ int slsReceiverImplementation::setReadOutFlags(const readOutFlags f) {
|
|||||||
|
|
||||||
// side effects
|
// side effects
|
||||||
if (myDetectorType == CHIPTESTBOARD) {
|
if (myDetectorType == CHIPTESTBOARD) {
|
||||||
generalData->setImageSize(adcEnableMask, numberOfAnalogSamples, numberOfDigitalSamples, tengigaEnable, readoutFlags);
|
ctbAnalogDataBytes = generalData->setImageSize(adcEnableMask, numberOfAnalogSamples, numberOfDigitalSamples, tengigaEnable, readoutFlags);
|
||||||
for (const auto& it : dataProcessor)
|
for (const auto& it : dataProcessor)
|
||||||
it->SetPixelDimension();
|
it->SetPixelDimension();
|
||||||
if (SetupFifoStructure() == FAIL)
|
if (SetupFifoStructure() == FAIL)
|
||||||
@ -838,7 +843,7 @@ int slsReceiverImplementation::setADCEnableMask(uint32_t mask) {
|
|||||||
generalData->setImageSize(mask, numberOfAnalogSamples, numberOfDigitalSamples, tengigaEnable);
|
generalData->setImageSize(mask, numberOfAnalogSamples, numberOfDigitalSamples, tengigaEnable);
|
||||||
break;
|
break;
|
||||||
case CHIPTESTBOARD:
|
case CHIPTESTBOARD:
|
||||||
generalData->setImageSize(mask, numberOfAnalogSamples, numberOfDigitalSamples, tengigaEnable, readoutFlags);
|
ctbAnalogDataBytes = generalData->setImageSize(mask, numberOfAnalogSamples, numberOfDigitalSamples, tengigaEnable, readoutFlags);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
@ -972,7 +977,7 @@ int slsReceiverImplementation::setNumberofAnalogSamples(const uint64_t i) {
|
|||||||
if(myDetectorType == MOENCH) {
|
if(myDetectorType == MOENCH) {
|
||||||
generalData->setImageSize(adcEnableMask, numberOfAnalogSamples, numberOfDigitalSamples, tengigaEnable);
|
generalData->setImageSize(adcEnableMask, numberOfAnalogSamples, numberOfDigitalSamples, tengigaEnable);
|
||||||
} else if(myDetectorType == CHIPTESTBOARD) {
|
} else if(myDetectorType == CHIPTESTBOARD) {
|
||||||
generalData->setImageSize(adcEnableMask, numberOfAnalogSamples, numberOfDigitalSamples, tengigaEnable, readoutFlags);
|
ctbAnalogDataBytes = generalData->setImageSize(adcEnableMask, numberOfAnalogSamples, numberOfDigitalSamples, tengigaEnable, readoutFlags);
|
||||||
}
|
}
|
||||||
for (const auto& it : dataProcessor)
|
for (const auto& it : dataProcessor)
|
||||||
it->SetPixelDimension();
|
it->SetPixelDimension();
|
||||||
@ -992,7 +997,7 @@ int slsReceiverImplementation::setNumberofDigitalSamples(const uint64_t i) {
|
|||||||
if(myDetectorType == MOENCH) {
|
if(myDetectorType == MOENCH) {
|
||||||
generalData->setImageSize(adcEnableMask, numberOfAnalogSamples, numberOfDigitalSamples, tengigaEnable);
|
generalData->setImageSize(adcEnableMask, numberOfAnalogSamples, numberOfDigitalSamples, tengigaEnable);
|
||||||
} else if(myDetectorType == CHIPTESTBOARD) {
|
} else if(myDetectorType == CHIPTESTBOARD) {
|
||||||
generalData->setImageSize(adcEnableMask, numberOfAnalogSamples, numberOfDigitalSamples, tengigaEnable, readoutFlags);
|
ctbAnalogDataBytes = generalData->setImageSize(adcEnableMask, numberOfAnalogSamples, numberOfDigitalSamples, tengigaEnable, readoutFlags);
|
||||||
}
|
}
|
||||||
for (const auto& it : dataProcessor)
|
for (const auto& it : dataProcessor)
|
||||||
it->SetPixelDimension();
|
it->SetPixelDimension();
|
||||||
@ -1034,7 +1039,7 @@ int slsReceiverImplementation::setTenGigaEnable(const bool b) {
|
|||||||
generalData->setImageSize(adcEnableMask, numberOfAnalogSamples, numberOfDigitalSamples, tengigaEnable);
|
generalData->setImageSize(adcEnableMask, numberOfAnalogSamples, numberOfDigitalSamples, tengigaEnable);
|
||||||
break;
|
break;
|
||||||
case CHIPTESTBOARD:
|
case CHIPTESTBOARD:
|
||||||
generalData->setImageSize(adcEnableMask, numberOfAnalogSamples, numberOfDigitalSamples, tengigaEnable, readoutFlags);
|
ctbAnalogDataBytes = generalData->setImageSize(adcEnableMask, numberOfAnalogSamples, numberOfDigitalSamples, tengigaEnable, readoutFlags);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user