fixed effects of scan

This commit is contained in:
2019-10-29 14:43:51 +01:00
parent 4b2cb7ecc1
commit eb2040f0a7
11 changed files with 107 additions and 277 deletions

View File

@ -70,43 +70,25 @@ class DataProcessor : private virtual slsDetectorDefs, public ThreadObject {
* Get acquisition started flag
* @return acquisition started flag
*/
bool GetAcquisitionStartedFlag();
bool GetStartedFlag();
/**
* Get measurement started flag
* @return measurement started flag
*/
bool GetMeasurementStartedFlag();
/**
* Get Total Complete Frames Caught for an entire acquisition (including all scans)
* @return total number of frames caught for entire acquisition
*/
uint64_t GetNumTotalFramesCaught();
/**
* Get Frames Complete Caught for each real time acquisition (eg. for each scan)
* @return number of frames caught for each scan
* Get Frames Complete Caught
* @return number of frames
*/
uint64_t GetNumFramesCaught();
/**
* Gets Actual Current Frame Index (that has not been subtracted from firstAcquisitionIndex) thats been processed for an entire acquisition (including all scans)
* Gets Actual Current Frame Index (that has not been subtracted from firstAcquisitionIndex) thats been processed
* @return -1 if no frames have been caught, else current frame index (represents all scans too)
*/
uint64_t GetActualProcessedAcquisitionIndex();
uint64_t GetCurrentFrameIndex();
/**
* Get Current Frame Index thats been processed for an entire acquisition (including all scans)
* @return -1 if no frames have been caught, else current frame index (represents all scans too)
*/
uint64_t GetProcessedAcquisitionIndex();
/**
* Get Current Frame Index thats been processed for each real time acquisition (eg. for each scan)
* Get Current Frame Index thats been processed
* @return -1 if no frames have been caught, else current frame index
*/
uint64_t GetProcessedMeasurementIndex();
uint64_t GetProcessedIndex();
//*** setters ***
/**
@ -126,15 +108,10 @@ class DataProcessor : private virtual slsDetectorDefs, public ThreadObject {
void SetFifo(Fifo* f);
/**
* Reset parameters for new acquisition (including all scans)
* Reset parameters for new acquisition
*/
void ResetParametersforNewAcquisition();
/**
* Reset parameters for new measurement (eg. for each scan)
*/
void ResetParametersforNewMeasurement();
/**
* Set GeneralData pointer to the one given
* @param g address of GeneralData (Detector Data) pointer
@ -231,10 +208,10 @@ class DataProcessor : private virtual slsDetectorDefs, public ThreadObject {
std::string GetType() override;
/**
* Record First Indices (firstAcquisitionIndex, firstMeasurementIndex)
* Record First Index
* @param fnum frame index to record
*/
void RecordFirstIndices(uint64_t fnum);
void RecordFirstIndex(uint64_t fnum);
/**
* Destroy file writer object
@ -382,26 +359,17 @@ class DataProcessor : private virtual slsDetectorDefs, public ThreadObject {
//acquisition start
/** Aquisition Started flag */
bool acquisitionStartedFlag;
bool startedFlag;
/** Measurement Started flag */
bool measurementStartedFlag;
/** Frame Number of First Frame of an entire Acquisition (including all scans) */
uint64_t firstAcquisitionIndex;
/** Frame Number of First Frame for each real time acquisition (eg. for each scan) */
uint64_t firstMeasurementIndex;
/** Frame Number of First Frame */
uint64_t firstIndex;
//for statistics
/**Number of complete frames caught for an entire acquisition (including all scans) */
uint64_t numTotalFramesCaught;
/** Number of complete frames caught for each real time acquisition (eg. for each scan) */
/** Number of complete frames caught */
uint64_t numFramesCaught;
/** Frame Number of latest processed frame number of an entire Acquisition (including all scans) */
/** Frame Number of latest processed frame number */
uint64_t currentFrameIndex;

View File

@ -69,14 +69,9 @@ class DataStreamer : private virtual slsDetectorDefs, public ThreadObject {
void SetFifo(Fifo* f);
/**
* Reset parameters for new acquisition (including all scans)
* Reset parameters for new acquisition
*/
void ResetParametersforNewAcquisition();
/**
* Reset parameters for new measurement (eg. for each scan)
*/
void ResetParametersforNewMeasurement(const std::string& fname);
void ResetParametersforNewAcquisition(const std::string& fname);
/**
* Set GeneralData pointer to the one given
@ -133,10 +128,10 @@ class DataStreamer : private virtual slsDetectorDefs, public ThreadObject {
std::string GetType();
/**
* Record First Indices (firstAcquisitionIndex, firstMeasurementIndex)
* Record First Index
* @param fnum frame index to record
*/
void RecordFirstIndices(uint64_t fnum);
void RecordFirstIndex(uint64_t fnum);
/**
* Thread Exeution for DataStreamer Class
@ -205,16 +200,10 @@ class DataStreamer : private virtual slsDetectorDefs, public ThreadObject {
char* additionJsonHeader;
/** Aquisition Started flag */
bool acquisitionStartedFlag;
bool startedFlag;
/** Measurement Started flag */
bool measurementStartedFlag;
/** Frame Number of First Frame of an entire Acquisition (including all scans) */
uint64_t firstAcquisitionIndex;
/** Frame Number of First Frame for each real time acquisition (eg. for each scan) */
uint64_t firstMeasurementIndex;
/** Frame Number of First Frame */
uint64_t firstIndex;
/* File name to stream */
std::string fileNametoStream;

View File

@ -59,20 +59,8 @@ class Listener : private virtual slsDetectorDefs, public ThreadObject {
bool IsRunning() override;
/**
* Get acquisition started flag
* @return acquisition started flag
*/
bool GetAcquisitionStartedFlag();
/**
* Get measurement started flag
* @return measurement started flag
*/
bool GetMeasurementStartedFlag();
/**
* Get Packets caught in a real time acquisition (start and stop of receiver)
* @return Packets caught in a real time acquisition
* Get Packets caught
* @return Packets caught
*/
uint64_t GetPacketsCaught();
@ -101,15 +89,10 @@ class Listener : private virtual slsDetectorDefs, public ThreadObject {
void SetFifo(Fifo* f);
/**
* Reset parameters for new acquisition (including all scans)
* Reset parameters for new acquisition
*/
void ResetParametersforNewAcquisition();
/**
* Reset parameters for new measurement (eg. for each scan)
*/
void ResetParametersforNewMeasurement();
/**
* Set GeneralData pointer to the one given
* @param g address of GeneralData (Detector Data) pointer
@ -160,10 +143,10 @@ class Listener : private virtual slsDetectorDefs, public ThreadObject {
std::string GetType() override;
/**
* Record First Indices (firstAcquisitionIndex, firstMeasurementIndex)
* Record First Acquisition Index
* @param fnum frame index to record
*/
void RecordFirstIndices(uint64_t fnum);
void RecordFirstIndex(uint64_t fnum);
/**
* Thread Exeution for Listener Class
@ -263,20 +246,13 @@ class Listener : private virtual slsDetectorDefs, public ThreadObject {
// acquisition start
/** Aquisition Started flag */
std::atomic<bool> acquisitionStartedFlag;
/** Measurement Started flag */
std::atomic<bool> measurementStartedFlag;
/** Frame Number of First Frame of an entire Acquisition (including all scans) */
uint64_t firstAcquisitionIndex;
/** Frame Number of First Frame for each real time acquisition (eg. for each scan) */
uint64_t firstMeasurementIndex;
std::atomic<bool> startedFlag;
/** Frame Number of First Frame */
uint64_t firstIndex;
// for acquisition summary
/** Number of complete Packets caught for each real time acquisition (eg. for each scan (start& stop of receiver)) */
/** Number of complete Packets caught */
std::atomic<uint64_t> numPacketsCaught;
/** Last Frame Index caught from udp network */
@ -285,7 +261,7 @@ class Listener : private virtual slsDetectorDefs, public ThreadObject {
// parameters to acquire image
/** Current Frame Index, default value is 0
* ( always check acquisitionStartedFlag for validity first)
* ( always check startedFlag for validity first)
*/
uint64_t currentFrameIndex;

View File

@ -157,22 +157,15 @@ class slsReceiverImplementation : private virtual slsDetectorDefs {
//***acquisition count parameters***
/**
* Get Total Frames Caught for an entire acquisition (including all scans)
* @return total number of frames caught for entire acquisition
*/
uint64_t getTotalFramesCaught() const;
/**
* Get Frames Caught for each real time acquisition (eg. for each scan)
* @return number of frames caught for each scan
* Get Frames Caught
* @return number of frames caught (0 if none, else min of all)
*/
uint64_t getFramesCaught() const;
/**
* Get Current Frame Index for an entire acquisition (including all scans)
* @return 0 if no frames have been caught, else average of all current
* frame index
*/
* Get Current Frame Index
* @return current frame index (0 if none, else min of all)
*/
uint64_t getAcquisitionIndex() const;
//***connection parameters***
@ -709,11 +702,6 @@ class slsReceiverImplementation : private virtual slsDetectorDefs {
void setDetectorPositionId(const int id);
//***acquisition functions***
/**
* Reset acquisition parameters such as total frames caught for an entire
* acquisition (including all scans)
*/
void resetAcquisitionCount();
/**
* Start Listening for Packets by activating all configuration settings to
@ -839,9 +827,9 @@ class slsReceiverImplementation : private virtual slsDetectorDefs {
int SetupFifoStructure();
/**
* Reset parameters for new measurement (eg. for each scan)
* Reset parameters for new acquisition
*/
void ResetParametersforNewMeasurement();
void ResetParametersforNewAcquisition();
/**
* Creates UDP Sockets

View File

@ -180,13 +180,13 @@ class slsReceiverTCPIPInterface : private virtual slsDetectorDefs {
/** Set File path */
int set_file_dir(sls::ServerInterface2 &socket);
/** Set File name without frame index, file index and extension */
/** Set File name prefix */
int set_file_name(sls::ServerInterface2 &socket);
/** Set File index */
int set_file_index(sls::ServerInterface2 &socket);
/** Gets frame index for each acquisition */
/** Gets current frame index */
int get_frame_index(sls::ServerInterface2 &socket);
/** Gets Total Frames Caught */