This commit is contained in:
2019-08-07 15:23:58 +02:00
parent 615835f03d
commit 6a71e61c12
4 changed files with 125 additions and 18 deletions

View File

@@ -124,6 +124,11 @@ class Detector {
void setPeriod(ns t, Positions pos = {});
// dhanya
/**
* Get multidetector Id
* @returns multidetector Id
*/
int getMultiId() const;
/**
* Check version compatibility with detector software
@@ -142,34 +147,67 @@ class Detector {
* @param pos detector position
* @returns detector firmware version
*/
int64_t getDetectorFirmwareVersion(Positions pos = {}) const;
Result<int64_t> getDetectorFirmwareVersion(Positions pos = {}) const;
/**
* Get detector server version
* @param pos detector position
* @returns detector server version
*/
int64_t getDetectorServerVersion(Positions pos = {}) const;
Result<int64_t> getDetectorServerVersion(Positions pos = {}) const;
/**
* Get detector serial number
* @param pos detector position
* @returns detector serial number
*/
int64_t getDetectorSerialNumber(Positions pos = {}) const;
Result<int64_t> getDetectorSerialNumber(Positions pos = {}) const;
/**
* Get Client Software version
* @returns client software version
*/
int64_t getClientSoftwareVersion() const;
Result<int64_t> getClientSoftwareVersion() const;
/**
* Get Receiver software version
* @param pos detector position
* @return receiver software version
*/
int64_t getReceiverSoftwareVersion(Positions pos = {}) const;
Result<int64_t> getReceiverSoftwareVersion(Positions pos = {}) const;
/**
* Get user details of shared memory
* @returns string with user details
*/
std::string getUserDetails() const;
/**
* Frees shared memory and adds detectors to the list
* Also updates local detector cache
* @param name hostnames for the positions given
*/
void setHostname(const std::vector<std::string> &name);
/**
* Get Detector type as an enum
* @returns detector type
*/
detectorType Detector::getDetectorTypeAsEnum() const;
/**
* Get Detector type as an enum
* @param pos detector position
* @returns detector type
*/
Result<detectorType> getDetectorTypeAsEnum(Positions pos = {}) const;
/**
* Returns detector type as a string
* @param pos detector position
* @returns detector type as string
*/
Result<std::string> getDetectorTypeAsString(Positions pos = {});
};
} // namespace sls

View File

@@ -304,7 +304,7 @@ class multiSlsDetector : public virtual slsDetectorDefs {
*/
int64_t getId(idMode mode, int detPos = -1);//not needed anymore (later remove this_software_version from enum)
int getMultiId()const{return multiId;} //public but part of multi
int getMultiId()const{return multiId;} //part of multi also
/**
* Get Client Software version
@@ -329,7 +329,7 @@ class multiSlsDetector : public virtual slsDetectorDefs {
* @param multiId multi detector Id
* @param detPos -1 for all detectors in list or specific detector position
*/
static void freeSharedMemory(int multiId, int detPos = -1);//
static void freeSharedMemory(int multiId, int detPos = -1);// private or not needed
/**
* Free shared memory and delete shared memory structure
@@ -338,21 +338,27 @@ class multiSlsDetector : public virtual slsDetectorDefs {
* object back to state before object creation amap
* @param detPos -1 for all detectors in list or specific detector position
*/
void freeSharedMemory(int detPos = -1);
void freeSharedMemory(int detPos = -1);//
/**
* Get user details of shared memory
* @returns string with user details
*/
std::string getUserDetails();
std::string getUserDetails();// part of multi
/**
* Sets the hostname of all sls detectors in shared memory and updates local cache
* @param name hostname of all the sls detectors
*/
void setHostname(const std::vector<std::string> &name);//cannot set individually
/**
* Sets the hostname of all sls detectors in shared memory
* Connects to them
* @param name concatenated hostname of all the sls detectors
* @param detPos -1 for all detectors in list or specific detector position
*/
void setHostname(const char *name, int detPos = -1);
void setHostname(const char *name, int detPos = -1);// not needed
/**
* Gets the hostname of detector at particular position
@@ -369,7 +375,13 @@ class multiSlsDetector : public virtual slsDetectorDefs {
* @param name concatenated hostname of the sls detectors to be appended to
* the list
*/
void addMultipleDetectors(const char *name);
void addMultipleDetectors(const char *name);// ????
/**
* Get Detector type as an enum
* @returns detector type
*/
detectorType getDetectorTypeAsEnum() const;
/**
* Get Detector type for a particular sls detector or get the first one
@@ -377,7 +389,7 @@ class multiSlsDetector : public virtual slsDetectorDefs {
* @returns detector type of sls detector in position pos, if -1, returns
* the first det type
*/
detectorType getDetectorTypeAsEnum(int detPos = -1);
detectorType getDetectorTypeAsEnum(int detPos);//??
/**
* Concatenates string types of all sls detectors or
@@ -2335,6 +2347,9 @@ class multiSlsDetector : public virtual slsDetectorDefs {
/** Multi detector Id */
const int multiId{0};
/** multi detector type */
detectorType multiDetType;
/** Shared Memory object */
sls::SharedMemory<sharedMultiSlsDetector> multi_shm{0, -1};