mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-23 18:17:59 +02:00
set starting frame number of next acquisition for both jungfrau and e… (#27)
* set starting frame number of next acquisition for both jungfrau and eiger. firmware has not implemented a get, so workaround. tests included. frame number 0 not allowed due to Eiger. Eiger max frame is 48 bit, while jungfrau is 64 bit * made argument of setstartingframenumber const
This commit is contained in:
@ -156,9 +156,9 @@ class slsReceiverImplementation: private virtual slsDetectorDefs {
|
||||
|
||||
/**
|
||||
* Get Current Frame Index for an entire acquisition (including all scans)
|
||||
* @return -1 if no frames have been caught, else current frame index (represents all scans too)
|
||||
* @return 0 if no frames have been caught, else average of all current frame index
|
||||
*/
|
||||
int64_t getAcquisitionIndex() const;
|
||||
uint64_t getAcquisitionIndex() const;
|
||||
|
||||
|
||||
//***connection parameters***
|
||||
@ -586,7 +586,7 @@ class slsReceiverImplementation: private virtual slsDetectorDefs {
|
||||
* The data receiver status will change from running to idle when it gets this number of frames
|
||||
* @param i number of frames expected
|
||||
*/
|
||||
int setNumberOfFrames(const uint64_t i);
|
||||
void setNumberOfFrames(const uint64_t i);
|
||||
|
||||
/**
|
||||
* Set Number of Analog Samples expected by receiver from detector
|
||||
|
@ -249,7 +249,7 @@ uint64_t slsReceiverImplementation::getFramesCaught() const {
|
||||
return (sum/dataProcessor.size());
|
||||
}
|
||||
|
||||
int64_t slsReceiverImplementation::getAcquisitionIndex() const {
|
||||
uint64_t slsReceiverImplementation::getAcquisitionIndex() const {
|
||||
uint64_t sum = 0;
|
||||
uint32_t flagsum = 0;
|
||||
|
||||
@ -259,7 +259,7 @@ int64_t slsReceiverImplementation::getAcquisitionIndex() const {
|
||||
}
|
||||
//no data processed
|
||||
if (flagsum != dataProcessor.size())
|
||||
return -1;
|
||||
return 0;
|
||||
|
||||
return (sum/dataProcessor.size());
|
||||
}
|
||||
@ -963,13 +963,11 @@ void slsReceiverImplementation::setSubPeriod(const uint64_t i) {
|
||||
FILE_LOG(logINFO) << "Sub Exposure Period: " << (double)subPeriod/(1E9) << "s";
|
||||
}
|
||||
|
||||
int slsReceiverImplementation::setNumberOfFrames(const uint64_t i) {
|
||||
void slsReceiverImplementation::setNumberOfFrames(const uint64_t i) {
|
||||
FILE_LOG(logDEBUG3) << __SHORT_AT__ << " called";
|
||||
|
||||
numberOfFrames = i;
|
||||
FILE_LOG(logINFO) << "Number of Frames: " << numberOfFrames;
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
||||
|
||||
|
@ -1205,7 +1205,7 @@ int slsReceiverTCPIPInterface::set_file_index(sls::ServerInterface2 &socket) {
|
||||
int slsReceiverTCPIPInterface::get_frame_index(sls::ServerInterface2 &socket){
|
||||
ret = OK;
|
||||
memset(mess, 0, sizeof(mess));
|
||||
int retval = -1;
|
||||
uint64_t retval = -1;
|
||||
|
||||
if(receiver == nullptr){
|
||||
NullObjectError(ret, mess);
|
||||
|
Reference in New Issue
Block a user