mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-16 23:07:13 +02:00
merge fix
This commit is contained in:
@ -14,8 +14,8 @@
|
||||
|
||||
class ServerInterface;
|
||||
|
||||
#define SLS_SHMAPIVERSION 0x190726
|
||||
#define SLS_SHMVERSION 0x210913
|
||||
#define MODULE_SHMAPIVERSION 0x190726
|
||||
#define MODULE_SHMVERSION 0x210913
|
||||
|
||||
namespace sls {
|
||||
|
||||
@ -25,24 +25,24 @@ struct sharedReceiver {
|
||||
};
|
||||
|
||||
/**
|
||||
* @short structure allocated in shared memory to store detector settings for
|
||||
* @short structure allocated in shared memory to store Module settings for
|
||||
* IPC and cache
|
||||
*/
|
||||
struct sharedSlsDetector {
|
||||
struct sharedModule {
|
||||
|
||||
/* FIXED PATTERN FOR STATIC FUNCTIONS. DO NOT CHANGE, ONLY APPEND ------*/
|
||||
|
||||
int shmversion;
|
||||
char hostname[MAX_STR_LENGTH];
|
||||
slsDetectorDefs::detectorType myDetectorType;
|
||||
slsDetectorDefs::detectorType detType;
|
||||
|
||||
/** END OF FIXED PATTERN -----------------------------------------------*/
|
||||
|
||||
slsDetectorDefs::xy numberOfDetector;
|
||||
slsDetectorDefs::xy numberOfModule;
|
||||
int controlPort;
|
||||
int stopPort;
|
||||
char settingsDir[MAX_STR_LENGTH];
|
||||
/** list of the energies at which the detector has been trimmed */
|
||||
/** list of the energies at which the Module has been trimmed */
|
||||
sls::StaticVector<int, MAX_TRIMEN> trimEnergies;
|
||||
/** number of channels per chip */
|
||||
slsDetectorDefs::xy nChan;
|
||||
@ -84,7 +84,7 @@ class Module : public virtual slsDetectorDefs {
|
||||
virtual ~Module();
|
||||
|
||||
/** Frees shared memory and deletes shared memory structure
|
||||
Safe to call only if detector shm also deleted or its numberOfDetectors is
|
||||
Safe to call only if detector shm also deleted or its numberOfModules is
|
||||
updated */
|
||||
void freeSharedMemory();
|
||||
bool isFixedPatternSharedMemoryCompatible() const;
|
||||
@ -107,7 +107,7 @@ class Module : public virtual slsDetectorDefs {
|
||||
detectorType getDetectorType() const;
|
||||
void updateNumberOfChannels();
|
||||
slsDetectorDefs::xy getNumberOfChannels() const;
|
||||
void updateNumberOfDetector(slsDetectorDefs::xy det);
|
||||
void updateNumberOfModule(slsDetectorDefs::xy det);
|
||||
detectorSettings getSettings() const;
|
||||
void setSettings(detectorSettings isettings);
|
||||
int getThresholdEnergy() const;
|
||||
@ -118,7 +118,7 @@ class Module : public virtual slsDetectorDefs {
|
||||
detectorSettings isettings, bool trimbits);
|
||||
std::string getSettingsDir() const;
|
||||
std::string setSettingsDir(const std::string &dir);
|
||||
void loadSettingsFile(const std::string &fname);
|
||||
void loadTrimbits(const std::string &fname);
|
||||
int getAllTrimbits() const;
|
||||
void setAllTrimbits(int val);
|
||||
std::vector<int> getTrimEn() const;
|
||||
@ -232,7 +232,7 @@ class Module : public virtual slsDetectorDefs {
|
||||
sls::UdpDestination getDestinationUDPList(const uint32_t entry) const;
|
||||
void setDestinationUDPList(const sls::UdpDestination dest);
|
||||
int getNumberofUDPDestinations() const;
|
||||
void setNumberofUDPDestinations(const int value);
|
||||
void clearUDPDestinations();
|
||||
int getFirstUDPDestination() const;
|
||||
void setFirstUDPDestination(const int value);
|
||||
sls::IpAddr getDestinationUDPIP(const int rxIndex) const;
|
||||
@ -718,9 +718,9 @@ class Module : public virtual slsDetectorDefs {
|
||||
verify is if shm size matches existing one */
|
||||
void initSharedMemory(detectorType type, int det_id, bool verify = true);
|
||||
|
||||
/** Initialize detector structure to defaults,
|
||||
/** Initialize module structure to defaults,
|
||||
Called when new shared memory is created */
|
||||
void initializeDetectorStructure(detectorType type);
|
||||
void initializeModuleStructure(detectorType type);
|
||||
|
||||
void checkDetectorVersionCompatibility();
|
||||
void checkReceiverVersionCompatibility();
|
||||
@ -763,7 +763,7 @@ class Module : public virtual slsDetectorDefs {
|
||||
void programFPGAviaNios(std::vector<char> buffer);
|
||||
|
||||
const int moduleIndex;
|
||||
mutable sls::SharedMemory<sharedSlsDetector> shm{0, 0};
|
||||
mutable sls::SharedMemory<sharedModule> shm{0, 0};
|
||||
};
|
||||
|
||||
} // namespace sls
|
Reference in New Issue
Block a user