mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-23 10:07:59 +02:00
WIP
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@ -57,17 +57,10 @@ struct sharedMultiSlsDetector {
|
||||
int numberOfDetector[2];
|
||||
|
||||
/** total number of channels for all detectors */
|
||||
int numberOfChannels;
|
||||
int numberOfChannels[2];
|
||||
|
||||
/** total number of channels for all detectors in one dimension*/
|
||||
int numberOfChannel[2];
|
||||
|
||||
/** total number of channels including gap pixels in one dimension */
|
||||
int numberOfChannelInclGapPixels[2];
|
||||
|
||||
/** max number of channels allowed for the complete set of detectors in
|
||||
* one dimension */
|
||||
int maxNumberOfChannelsPerDetector[2];
|
||||
/** max number of channels for complete detector*/
|
||||
int maxNumberOfChannels[2];
|
||||
|
||||
/** flag for acquiring */
|
||||
bool acquiringFlag;
|
||||
@ -367,91 +360,32 @@ class multiSlsDetector : public virtual slsDetectorDefs {
|
||||
*/
|
||||
size_t size() const;//
|
||||
|
||||
/**
|
||||
* Returns number of detectors in dimension d
|
||||
* @param d dimension d
|
||||
* @returns number of detectors in dimension d
|
||||
*/
|
||||
int getNumberOfDetectors(dimension d) const;//
|
||||
|
||||
/**
|
||||
* Returns the number of detectors in each direction
|
||||
@param nx number of detectors in x direction
|
||||
@param ny number of detectors in y direction
|
||||
*/
|
||||
void getNumberOfDetectors(int &nx, int &ny) const;//
|
||||
slsDetectorDefs::xy getNumberOfDetectors() const;//
|
||||
|
||||
/**
|
||||
* Returns the total number of channels of all sls detectors from shared
|
||||
* memory
|
||||
* @param detPos -1 for all detectors in list or specific detector position
|
||||
* @returns the total number of channels of all sls detectors
|
||||
*/
|
||||
int getTotalNumberOfChannels(int detPos = -1);//
|
||||
|
||||
/**
|
||||
* Returns the total number of channels of all sls detectors in dimension d
|
||||
* from shared memory
|
||||
* Returns the total number of channels of all sls detectors including gap pixels
|
||||
* @param d dimension d
|
||||
* @param detPos -1 for all detectors in list or specific detector position
|
||||
* @returns the total number of channels of all sls detectors in dimension d
|
||||
* @returns the total number of channels of all sls detectors including gap pixels
|
||||
*/
|
||||
int getTotalNumberOfChannels(dimension d, int detPos = -1);//
|
||||
slsDetectorDefs::xy getNumberOfChannels(int detPos = -1);//
|
||||
|
||||
/**
|
||||
* Returns the total number of channels from shared memory in each dimension
|
||||
* @returns the total number of channels in each dimension
|
||||
*/
|
||||
slsDetectorDefs::coordinates getNumberOfChannels() const; //
|
||||
|
||||
/**
|
||||
* Returns the total number of channels of all sls detectors in dimension d
|
||||
* including gap pixels from shared memory
|
||||
* @param d dimension d
|
||||
* @param detPos -1 for all detectors in list or specific detector position
|
||||
* @returns the total number of channels of all sls detectors in dimension d
|
||||
* including gap pixels
|
||||
*/
|
||||
int getTotalNumberOfChannelsInclGapPixels(dimension d, int detPos = -1);//
|
||||
|
||||
/**
|
||||
* Returns the total number of channels including gap pixels
|
||||
* @returns the total number of channels including gap pixels
|
||||
*/
|
||||
slsDetectorDefs::coordinates getTotalNumberOfChannelsInclGapPixels() const; //
|
||||
|
||||
/**
|
||||
* Returns the maximum number of channels of all sls detectors in each
|
||||
* dimension d from shared memory.
|
||||
* @param d dimension d
|
||||
* @returns the maximum number of channels of all sls detectors in dimension
|
||||
* d
|
||||
*/
|
||||
int getMaxNumberOfChannelsPerDetector(dimension d);//
|
||||
|
||||
/**
|
||||
* Sets the maximum number of channels of all sls detectors in each
|
||||
* dimension d from shared memory
|
||||
* @param d dimension d
|
||||
* @param i maximum number of channels for multi structure in dimension d
|
||||
* @returns the maximum number of channels of all sls detectors in dimension
|
||||
* d
|
||||
*/
|
||||
int setMaxNumberOfChannelsPerDetector(dimension d, int i);//
|
||||
|
||||
/**
|
||||
* Returns maximum number of channels of all sls detectors in each
|
||||
* dimension d from shared memory
|
||||
* @returns maximum number of channels of all sls detectors
|
||||
*/
|
||||
slsDetectorDefs::coordinates getMaxNumberOfChannels() const; //
|
||||
slsDetectorDefs::xy getMaxNumberOfChannels() const; //
|
||||
|
||||
/**
|
||||
* Sets maximum number of channels of all sls detectors in each
|
||||
* dimension d from shared memory
|
||||
* @param c maximum number of channels of all sls detectors
|
||||
*/
|
||||
void setMaxNumberOfChannels(const slsDetectorDefs::coordinates c); //
|
||||
void setMaxNumberOfChannels(const slsDetectorDefs::xy c); //
|
||||
|
||||
/**
|
||||
* Get Quad Type (Only for Eiger Quad detector hardware)
|
||||
@ -935,6 +869,7 @@ class multiSlsDetector : public virtual slsDetectorDefs {
|
||||
std::string getDetectorMAC2(int detPos = -1); //
|
||||
|
||||
/**
|
||||
* //TODO: custom ip (eiger 10G and other detectors), use 0.0.0.0 and test
|
||||
* Validates the format of the detector IP address and sets it
|
||||
* @param detectorIP detector IP address
|
||||
* @param detPos -1 for all detectors in list or specific detector position
|
||||
@ -985,6 +920,7 @@ class multiSlsDetector : public virtual slsDetectorDefs {
|
||||
std::string getReceiverHostname(int detPos = -1) const; //
|
||||
|
||||
/**
|
||||
* TODO: replace this with setEthernetInterface
|
||||
* Validates the format of the receiver UDP IP address and sets it
|
||||
* @param udpip receiver UDP IP address
|
||||
* @param detPos -1 for all detectors in list or specific detector position
|
||||
|
@ -13,7 +13,7 @@
|
||||
class ServerInterface;
|
||||
|
||||
#define SLS_SHMAPIVERSION 0x190726
|
||||
#define SLS_SHMVERSION 0x190813
|
||||
#define SLS_SHMVERSION 0x190815
|
||||
|
||||
/**
|
||||
* @short structure allocated in shared memory to store detector settings for
|
||||
@ -68,9 +68,6 @@ struct sharedSlsDetector {
|
||||
/** dynamic range of the detector data */
|
||||
int dynamicRange;
|
||||
|
||||
/** size of the data that are transfered from the detector */
|
||||
int dataBytes;
|
||||
|
||||
/** roi */
|
||||
slsDetectorDefs::ROI roi;
|
||||
|
||||
@ -171,9 +168,6 @@ struct sharedSlsDetector {
|
||||
/** gap pixels in each direction */
|
||||
int nGappixels[2];
|
||||
|
||||
/** data bytes including gap pixels */
|
||||
int dataBytesInclGapPixels;
|
||||
|
||||
/** additional json header */
|
||||
char rxAdditionalJsonHeader[MAX_STR_LENGTH];
|
||||
|
||||
@ -324,73 +318,17 @@ class slsDetector : public virtual slsDetectorDefs {
|
||||
*/
|
||||
int setDetectorType(detectorType type = GET_DETECTOR_TYPE);
|
||||
|
||||
/**
|
||||
* Returns the total number of channels from shared memory
|
||||
* @returns the total number of channels
|
||||
*/
|
||||
int getTotalNumberOfChannels() const;
|
||||
|
||||
/**
|
||||
* Update total number of channels (chiptestboard or moench)
|
||||
* depending on the number of samples, adenablemask, readout flags(ctb)
|
||||
*/
|
||||
void updateTotalNumberOfChannels();
|
||||
|
||||
/**
|
||||
* Returns the total number of channels in dimension d from shared memory
|
||||
* @param d dimension d
|
||||
* @returns the total number of channels in dimension d
|
||||
*/
|
||||
int getTotalNumberOfChannels(dimension d) const;
|
||||
|
||||
/**
|
||||
* Returns the total number of channels from shared memory in each dimension
|
||||
* @returns the total number of channels in each dimension
|
||||
*/
|
||||
slsDetectorDefs::coordinates getNumberOfChannels() const;
|
||||
|
||||
/**
|
||||
* Returns the total number of channels of in dimension d including gap
|
||||
* pixels from shared memory
|
||||
* @param d dimension d
|
||||
* @returns the total number of channels including gap pixels in dimension d
|
||||
* including gap pixels
|
||||
*/
|
||||
int getTotalNumberOfChannelsInclGapPixels(dimension d) const;
|
||||
void updateNumberOfChannels();
|
||||
|
||||
/**
|
||||
* Returns the total number of channels including gap pixels
|
||||
* @returns the total number of channels including gap pixels
|
||||
*/
|
||||
slsDetectorDefs::coordinates getNumberOfChannelsInclGapPixels() const;
|
||||
|
||||
/**
|
||||
* returns the number of channels per chip from shared memory (Mythen)
|
||||
* @returns number of channels per chip
|
||||
*/
|
||||
int getNChans() const;
|
||||
|
||||
/**
|
||||
* returns the number of channels per chip in dimension d from shared memory
|
||||
* (Mythen)
|
||||
* @param d dimension d
|
||||
* @returns number of channels per chip in dimension d
|
||||
*/
|
||||
int getNChans(dimension d) const;
|
||||
|
||||
/**
|
||||
* returns the number of chips per module from shared memory (Mythen)
|
||||
* @returns number of chips per module
|
||||
*/
|
||||
int getNChips() const;
|
||||
|
||||
/**
|
||||
* returns the number of chips per module in dimension d from shared memory
|
||||
* (Mythen)
|
||||
* @param d dimension d
|
||||
* @returns number of chips per module in dimension d
|
||||
*/
|
||||
int getNChips(dimension d) const;
|
||||
slsDetectorDefs::xy getNumberOfChannels() const;
|
||||
|
||||
/**
|
||||
* Get Quad Type (Only for Eiger Quad detector hardware)
|
||||
@ -654,7 +592,7 @@ class slsDetector : public virtual slsDetectorDefs {
|
||||
int setSpeed(speedVariable sp, int value = -1, int mode = 0);
|
||||
|
||||
/**
|
||||
* Set/get dynamic range and updates the number of dataBytes
|
||||
* Set/get dynamic range
|
||||
* (Eiger: If i is 32, also sets clkdivider to 2, if 16, sets clkdivider to
|
||||
* 1)
|
||||
* @param i dynamic range (-1 get)
|
||||
@ -665,18 +603,6 @@ class slsDetector : public virtual slsDetectorDefs {
|
||||
|
||||
int getDynamicRangeFromShm();
|
||||
|
||||
/**
|
||||
* Recalculated number of data bytes
|
||||
* @returns tota number of data bytes
|
||||
*/
|
||||
int getDataBytes();
|
||||
|
||||
/**
|
||||
* Recalculated number of data bytes including gap pixels
|
||||
* @returns tota number of data bytes including gap pixels
|
||||
*/
|
||||
int getDataBytesInclGapPixels();
|
||||
|
||||
/**
|
||||
* Set/get dacs value
|
||||
* @param val value (in V)
|
||||
|
Reference in New Issue
Block a user