mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-23 10:07:59 +02:00
sharedmem: config, sethostname call freesharedmemory and call setupmulti, freesharedmemoy(nonstatic) also cleans up member variables to make it consistent with shm, sharedmemory pointer set to 0 in non static free shared memory to be able to continue within application, sethostname frees memory only if detectors found in shm, add calls addmultipledetectors, replace replaces a detector in sls detector level, should also take lines in config file that has comments in between while ignoring the comments, sethostname in slsdetector also updates client, adding object in sls when creating new shm complains if shm existed and must delete again, removed remove commands
This commit is contained in:
@ -21,7 +21,7 @@ class ZmqSocket;
|
||||
|
||||
#define MULTI_SHMVERSION 0x180625
|
||||
#define SHORT_STRING_LENGTH 50
|
||||
#define DATE_LENGTH 29
|
||||
#define DATE_LENGTH 30
|
||||
|
||||
class multiSlsDetector : public slsDetectorUtils {
|
||||
|
||||
@ -244,6 +244,14 @@ public:
|
||||
*/
|
||||
bool isMultiSlsDetectorClass();
|
||||
|
||||
/**
|
||||
* Creates/open shared memory, initializes detector structure and members
|
||||
* Called by constructor/ set hostname / read config file
|
||||
* @param verify true to verify if shared memory version matches existing one
|
||||
* @param update true to update last user pid, date etc
|
||||
*/
|
||||
void setupMultiDetector(bool verify = true, bool update = true);
|
||||
|
||||
/**
|
||||
* If specific position, then provide result with that detector at position pos
|
||||
* else concatenate the result of all detectors
|
||||
@ -501,6 +509,8 @@ public:
|
||||
/**
|
||||
* Free shared memory and delete shared memory structure
|
||||
* occupied by the sharedMultiSlsDetector structure
|
||||
* Clears all the vectors and destroys threadpool to bring
|
||||
* object back to state before object creation amap
|
||||
*/
|
||||
void freeSharedMemory();
|
||||
|
||||
@ -525,6 +535,13 @@ public:
|
||||
*/
|
||||
std::string getHostname(int pos = -1);
|
||||
|
||||
/**
|
||||
* Appends detectors to the end of the list in shared memory
|
||||
* Connects to them to set up online flag
|
||||
* @param name concatenated hostname of the sls detectors to be appended to the list
|
||||
*/
|
||||
void addMultipleDetectors(const char* name);
|
||||
|
||||
|
||||
using slsDetectorBase::getDetectorType;
|
||||
/**
|
||||
|
Reference in New Issue
Block a user