mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-23 10:07:59 +02:00
timer split up
This commit is contained in:
@ -544,10 +544,10 @@ class CmdProxy {
|
||||
{"exptime", &CmdProxy::exptime},
|
||||
{"period", &CmdProxy::period},
|
||||
{"delay", &CmdProxy::delay},
|
||||
{"delay", &CmdProxy::delay},
|
||||
{"framesl", &CmdProxy::framesl},
|
||||
{"triggersl", &CmdProxy::triggersl},
|
||||
{"delayl", &CmdProxy::delayl},
|
||||
{"periodl", &CmdProxy::periodl},
|
||||
{"speed", &CmdProxy::Speed},
|
||||
{"adcphase", &CmdProxy::Adcphase},
|
||||
{"maxadcphaseshift", &CmdProxy::maxadcphaseshift},
|
||||
@ -739,7 +739,6 @@ class CmdProxy {
|
||||
{"roi", &CmdProxy::ROI},
|
||||
{"clearroi", &CmdProxy::ClearROI},
|
||||
{"exptimel", &CmdProxy::exptimel},
|
||||
{"periodl", &CmdProxy::periodl},
|
||||
{"extsig", &CmdProxy::extsig},
|
||||
{"imagetest", &CmdProxy::imagetest},
|
||||
|
||||
@ -958,17 +957,20 @@ class CmdProxy {
|
||||
"[duration] [(optional unit) ns|us|ms|s]\n\tPeriod between frames");
|
||||
|
||||
TIME_COMMAND(delay, getDelayAfterTrigger, setDelayAfterTrigger,
|
||||
"[duration] [(optional unit) ns|us|ms|s]\n\t[Jungfrau][Gotthard][Ctb] Delay after trigger");
|
||||
"[duration] [(optional unit) ns|us|ms|s]\n\t[Jungfrau][Gotthard][Ctb][Mythen3] Delay after trigger");
|
||||
|
||||
GET_COMMAND(framesl, getNumberOfFramesLeft,
|
||||
"\n\t[Gotthard][Jungfrau][CTB] Number of frames left in acquisition.");
|
||||
"\n\t[Gotthard][Jungfrau][CTB][Mythen3][Gotthard2] Number of frames left in acquisition.");
|
||||
|
||||
GET_COMMAND(triggersl, getNumberOfTriggersLeft,
|
||||
"\n\t[Gotthard][Jungfrau][CTB] Number of triggers left in acquisition.");
|
||||
"\n\t[Gotthard][Jungfrau][CTB][Mythen3][Gotthard2] Number of triggers left in acquisition.");
|
||||
|
||||
TIME_GET_COMMAND(delayl, getDelayAfterTriggerLeft,
|
||||
"[(optional unit) ns|us|ms|s]\n\t[Gotthard][Jungfrau][CTB] DelayLeft Delay Left in Acquisition.");
|
||||
|
||||
"\n\t[Gotthard][Jungfrau][CTB] DelayLeft Delay Left in Acquisition.");
|
||||
|
||||
TIME_GET_COMMAND(periodl, getPeriodLeft,
|
||||
"\n\t[Gotthard][Jungfrau][CTB] Period left for current frame.");
|
||||
|
||||
GET_COMMAND(maxadcphaseshift, getMaxADCPhaseShift,
|
||||
"\n\t[Jungfrau][CTB] Absolute maximum Phase shift of ADC clock.");
|
||||
|
||||
@ -1441,9 +1443,6 @@ class CmdProxy {
|
||||
TIME_GET_COMMAND(exptimel, getExptimeLeft,
|
||||
"[(optional unit) ns|us|ms|s]\n\t[Gotthard] Exposure time left for current frame. ");
|
||||
|
||||
TIME_GET_COMMAND(periodl, getPeriodLeft,
|
||||
"[(optional unit) ns|us|ms|s]\n\t[Gotthard] Period left for current frame.");
|
||||
|
||||
INTEGER_COMMAND(extsig, getExternalSignalFlags, setExternalSignalFlags, sls::StringTo<slsDetectorDefs::externalSignalFlag>,
|
||||
"[trigger_in_rising_edge|trigger_in_falling_edge]\n\t[Gotthard] External signal mode for trigger timing mode.");
|
||||
|
||||
|
@ -128,11 +128,11 @@ class Detector {
|
||||
* *
|
||||
* ************************************************/
|
||||
|
||||
Result<int64_t> getNumberOfFrames() const;
|
||||
Result<int64_t> getNumberOfFrames(Positions pos = {}) const;
|
||||
|
||||
void setNumberOfFrames(int64_t value);
|
||||
|
||||
Result<int64_t> getNumberOfTriggers() const;
|
||||
Result<int64_t> getNumberOfTriggers(Positions pos = {}) const;
|
||||
|
||||
void setNumberOfTriggers(int64_t value);
|
||||
|
||||
@ -144,21 +144,24 @@ class Detector {
|
||||
|
||||
void setPeriod(ns t, Positions pos = {});
|
||||
|
||||
/** [Gotthard][Jungfrau] */
|
||||
/** [Gotthard][Jungfrau][CTB][Mythen3] */
|
||||
Result<ns> getDelayAfterTrigger(Positions pos = {}) const;
|
||||
|
||||
/** [Gotthard][Jungfrau] */
|
||||
/** [Gotthard][Jungfrau][CTB][Mythen3] */
|
||||
void setDelayAfterTrigger(ns value, Positions pos = {});
|
||||
|
||||
/** [Gotthard][Jungfrau][CTB] */
|
||||
/** [Gotthard][Jungfrau][CTB][Mythen3][Gotthard2] */
|
||||
Result<int64_t> getNumberOfFramesLeft(Positions pos = {}) const;
|
||||
|
||||
/** [Gotthard][Jungfrau][CTB] */
|
||||
/** [Gotthard][Jungfrau][CTB][Mythen3][Gotthard2] */
|
||||
Result<int64_t> getNumberOfTriggersLeft(Positions pos = {}) const;
|
||||
|
||||
/** [Gotthard][Jungfrau][CTB] */
|
||||
Result<ns> getDelayAfterTriggerLeft(Positions pos = {}) const;
|
||||
|
||||
/** [Gotthard][Jungfrau][CTB] */
|
||||
Result<ns> getPeriodLeft(Positions pos = {}) const;
|
||||
|
||||
/** [Eiger][Jungfrau] */
|
||||
Result<defs::speedLevel> getSpeed(Positions pos = {}) const;
|
||||
|
||||
@ -277,7 +280,7 @@ class Detector {
|
||||
|
||||
Result<defs::runStatus> getReceiverStatus(Positions pos = {}) const;
|
||||
|
||||
Result<int> getFramesCaught(Positions pos = {}) const;
|
||||
Result<int64_t> getFramesCaught(Positions pos = {}) const;
|
||||
|
||||
/** [Eiger][Jungfrau] */
|
||||
Result<uint64_t> getStartingFrameNumber(Positions pos = {}) const;
|
||||
@ -806,10 +809,10 @@ class Detector {
|
||||
void setAutoCompDisable(bool value, Positions pos = {});
|
||||
|
||||
/** [Jungfrau] Advanced TODO naming */
|
||||
Result<int64_t> getNumberOfAdditionalStorageCells() const;
|
||||
Result<int> getNumberOfAdditionalStorageCells(Positions pos = {}) const;
|
||||
|
||||
/** [Jungfrau] Advanced */
|
||||
void setNumberOfAdditionalStorageCells(int64_t value);
|
||||
void setNumberOfAdditionalStorageCells(int value);
|
||||
|
||||
/** [Jungfrau] Advanced */
|
||||
Result<int> getStorageCellStart(Positions pos = {}) const;
|
||||
@ -849,9 +852,6 @@ class Detector {
|
||||
/** [Gotthard] */
|
||||
Result<ns> getExptimeLeft(Positions pos = {}) const;
|
||||
|
||||
/** [Gotthard] */
|
||||
Result<ns> getPeriodLeft(Positions pos = {}) const;
|
||||
|
||||
/** [Gotthard] */
|
||||
Result<defs::externalSignalFlag>
|
||||
getExternalSignalFlags(Positions pos = {}) const;
|
||||
@ -874,16 +874,16 @@ class Detector {
|
||||
* ************************************************/
|
||||
|
||||
/** [CTB] */
|
||||
Result<int64_t> getNumberOfAnalogSamples(Positions pos = {}) const;
|
||||
Result<int> getNumberOfAnalogSamples(Positions pos = {}) const;
|
||||
|
||||
/** [CTB] */
|
||||
void setNumberOfAnalogSamples(int64_t value, Positions pos = {});
|
||||
void setNumberOfAnalogSamples(int value, Positions pos = {});
|
||||
|
||||
/** [CTB] */
|
||||
Result<int64_t> getNumberOfDigitalSamples(Positions pos = {}) const;
|
||||
Result<int> getNumberOfDigitalSamples(Positions pos = {}) const;
|
||||
|
||||
/** [CTB] */
|
||||
void setNumberOfDigitalSamples(int64_t value, Positions pos = {});
|
||||
void setNumberOfDigitalSamples(int value, Positions pos = {});
|
||||
|
||||
/** [CTB] */
|
||||
Result<defs::readoutMode> getReadoutMode(Positions pos = {}) const;
|
||||
|
@ -386,13 +386,13 @@ class multiSlsDetector : public virtual slsDetectorDefs {
|
||||
*/
|
||||
int processImageWithGapPixels(char *image, char *&gpImage, bool quadEnable);
|
||||
|
||||
int setTotalProgress();
|
||||
double setTotalProgress();
|
||||
|
||||
double getCurrentProgress();
|
||||
|
||||
void incrementProgress();
|
||||
|
||||
void setCurrentProgress(int i = 0);
|
||||
void setCurrentProgress(int64_t i = 0);
|
||||
|
||||
void startProcessingThread();
|
||||
|
||||
@ -446,10 +446,10 @@ class multiSlsDetector : public virtual slsDetectorDefs {
|
||||
sem_t sem_endRTAcquisition;
|
||||
|
||||
/** Total number of frames/images for next acquisition */
|
||||
int totalProgress{0};
|
||||
double totalProgress{0};
|
||||
|
||||
/** Current progress or frames/images processed in current acquisition */
|
||||
int progressIndex{0};
|
||||
double progressIndex{0};
|
||||
|
||||
/** mutex to synchronize main and data processing threads */
|
||||
mutable std::mutex mp;
|
||||
|
@ -13,7 +13,7 @@
|
||||
class ServerInterface;
|
||||
|
||||
#define SLS_SHMAPIVERSION 0x190726
|
||||
#define SLS_SHMVERSION 0x190830
|
||||
#define SLS_SHMVERSION 0x191030
|
||||
|
||||
/**
|
||||
* @short structure allocated in shared memory to store detector settings for
|
||||
@ -77,8 +77,14 @@ struct sharedSlsDetector {
|
||||
/** detector threshold (eV) */
|
||||
int currentThresholdEV;
|
||||
|
||||
/** timer values */
|
||||
int64_t timerValue[slsDetectorDefs::timerIndex::MAX_TIMERS];
|
||||
/** number of frames */
|
||||
int64_t nFrames;
|
||||
|
||||
/** number of triggers */
|
||||
int64_t nTriggers;
|
||||
|
||||
/** number of additional storage cells */
|
||||
int nAddStorageCells;
|
||||
|
||||
/** rate correction in ns */
|
||||
int64_t deadTime;
|
||||
@ -510,24 +516,103 @@ class slsDetector : public virtual slsDetectorDefs {
|
||||
*/
|
||||
uint64_t getStartingFrameNumber();
|
||||
|
||||
/**
|
||||
* Set/get timer value (not all implemented for all detectors)
|
||||
* @param index timer index
|
||||
* @param t time in ns or number of...(e.g. frames, probes)
|
||||
* @returns timer set value in ns or number of...(e.g. frames,
|
||||
* probes)
|
||||
*/
|
||||
int64_t setTimer(timerIndex index, int64_t t = -1);
|
||||
void sendTotalNumFramestoReceiver();
|
||||
|
||||
/**
|
||||
* Set/get timer value left in acquisition (not all implemented for all
|
||||
* detectors)
|
||||
* @param index timer index
|
||||
* @param t time in ns or number of...(e.g. frames, probes)
|
||||
* @returns timer set value in ns or number of...(e.g. frames,
|
||||
* probes)
|
||||
*/
|
||||
int64_t getTimeLeft(timerIndex index) const;
|
||||
int64_t getNumberOfFramesFromShm();
|
||||
|
||||
int64_t getNumberOfFrames();
|
||||
|
||||
void setNumberOfFrames(int64_t value);
|
||||
|
||||
int64_t getNumberOfTriggersFromShm();
|
||||
|
||||
int64_t getNumberOfTriggers();
|
||||
|
||||
void setNumberOfTriggers(int64_t value);
|
||||
|
||||
/** [Jungfrau] Advanced */
|
||||
int getNumberOfAdditionalStorageCellsFromShm();
|
||||
|
||||
/** [Jungfrau] Advanced */
|
||||
int getNumberOfAdditionalStorageCells();
|
||||
|
||||
/** [Jungfrau] Advanced */
|
||||
void setNumberOfAdditionalStorageCells(int value);
|
||||
|
||||
/** [CTB] */
|
||||
int getNumberOfAnalogSamples();
|
||||
|
||||
/** [CTB] */
|
||||
void setNumberOfAnalogSamples(int value);
|
||||
|
||||
/** [CTB] */
|
||||
int getNumberOfDigitalSamples();
|
||||
|
||||
/** [CTB] */
|
||||
void setNumberOfDigitalSamples(int value);
|
||||
|
||||
int64_t getExptime();
|
||||
|
||||
void setExptime(int64_t value);
|
||||
|
||||
int64_t getPeriod();
|
||||
|
||||
void setPeriod(int64_t value);
|
||||
|
||||
/** [Gotthard][Jungfrau][CTB][Mythen3] */
|
||||
int64_t getDelayAfterTrigger();
|
||||
|
||||
/** [Gotthard][Jungfrau][CTB][Mythen3] */
|
||||
void setDelayAfterTrigger(int64_t value);
|
||||
|
||||
/** [Eiger] in 32 bit mode */
|
||||
int64_t getSubExptime();
|
||||
|
||||
/** [Eiger] in 32 bit mode */
|
||||
void setSubExptime(int64_t value);
|
||||
|
||||
/** [Eiger] in 32 bit mode */
|
||||
int64_t getSubDeadTime();
|
||||
|
||||
/** [Eiger] in 32 bit mode */
|
||||
void setSubDeadTime(int64_t value);
|
||||
|
||||
/** [Jungfrau] Advanced*/
|
||||
int64_t getStorageCellDelay();
|
||||
|
||||
/** [Jungfrau] Advanced
|
||||
* Options: (0-1638375 ns (resolution of 25ns) */
|
||||
void setStorageCellDelay(int64_t value);
|
||||
|
||||
/** [Gotthard][Jungfrau][CTB][Mythen3][Gotthard2] */
|
||||
int64_t getNumberOfFramesLeft() const;
|
||||
|
||||
/** [Gotthard][Jungfrau][CTB][Mythen3][Gotthard2] */
|
||||
int64_t getNumberOfTriggersLeft() const;
|
||||
|
||||
/** [Gotthard][Jungfrau][CTB] */
|
||||
int64_t getDelayAfterTriggerLeft() const;
|
||||
|
||||
/** [Gotthard] */
|
||||
int64_t getExptimeLeft() const;
|
||||
|
||||
/** [Gotthard][Jungfrau][CTB] */
|
||||
int64_t getPeriodLeft() const;
|
||||
|
||||
/** [Eiger] minimum two frames */
|
||||
int64_t getMeasuredPeriod() const;
|
||||
|
||||
/** [Eiger] */
|
||||
int64_t getMeasuredSubFramePeriod() const;
|
||||
|
||||
/** [Jungfrau][CTB] */
|
||||
int64_t getNumberOfFramesFromStart() const;
|
||||
|
||||
/** [Jungfrau][CTB] Get time from detector start */
|
||||
int64_t getActualTime() const;
|
||||
|
||||
/** [Jungfrau][CTB] Get timestamp at a frame start */
|
||||
int64_t getMeasurementTime() const;
|
||||
|
||||
/**
|
||||
* Set speed
|
||||
@ -1475,7 +1560,7 @@ class slsDetector : public virtual slsDetectorDefs {
|
||||
* Gets the number of frames caught by receiver
|
||||
* @returns number of frames caught by receiver
|
||||
*/
|
||||
int getFramesCaughtByReceiver() const;
|
||||
int64_t getFramesCaughtByReceiver() const;
|
||||
|
||||
/**
|
||||
* Gets the current frame index of receiver
|
||||
|
Reference in New Issue
Block a user