mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2026-08-01 23:43:38 +02:00
Dev/verify shm (#1276)
* removed verify, update, fixed getUser to be a free function, generated commands, python bindings yet to do * python bindings * fixed tests * minor * minor * format
This commit is contained in:
@@ -71,13 +71,7 @@ struct sharedDetector {
|
||||
|
||||
class DetectorImpl : public virtual slsDetectorDefs {
|
||||
public:
|
||||
/**
|
||||
* @param verify true to verify if shared memory version matches existing
|
||||
* one
|
||||
* @param update true to update last user pid, date etc
|
||||
*/
|
||||
explicit DetectorImpl(int detector_index = 0, bool verify = true,
|
||||
bool update = true);
|
||||
explicit DetectorImpl(int detector_index = 0);
|
||||
|
||||
template <class CT> struct NonDeduced {
|
||||
using type = CT;
|
||||
@@ -195,9 +189,6 @@ class DetectorImpl : public virtual slsDetectorDefs {
|
||||
/** return detector index in shared memory */
|
||||
int getDetectorIndex() const;
|
||||
|
||||
/** Get user details of shared memory */
|
||||
std::string getUserDetails();
|
||||
|
||||
bool getInitialChecks() const;
|
||||
|
||||
/** initial compaibility and other server start up checks
|
||||
@@ -341,26 +332,20 @@ class DetectorImpl : public virtual slsDetectorDefs {
|
||||
/**
|
||||
* 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 setupDetector(bool verify = true, bool update = true);
|
||||
void setupDetector();
|
||||
|
||||
/**
|
||||
* Creates shm and initializes shm structure OR
|
||||
* Open shm and maps to structure
|
||||
* @param verify true to verify if shm size matches existing one
|
||||
*/
|
||||
void initSharedMemory(bool verify = true);
|
||||
void initSharedMemory();
|
||||
|
||||
/** Initialize detector structure for the shared memory just created */
|
||||
void initializeDetectorStructure();
|
||||
|
||||
/** Initialize members (eg. modules from shm, zmqsockets)
|
||||
* @param verify true to verify if shm size matches existing one
|
||||
*/
|
||||
void initializeMembers(bool verify = true);
|
||||
/** Initialize members (eg. modules from shm, zmqsockets) */
|
||||
void initializeMembers();
|
||||
|
||||
/** Update in shm */
|
||||
void updateUserdetails();
|
||||
|
||||
Reference in New Issue
Block a user