This commit is contained in:
maliakal_d 2019-08-08 15:06:08 +02:00
parent d9ecec9bf7
commit 6a780de22f
3 changed files with 5 additions and 29 deletions

View File

@ -356,14 +356,6 @@ class multiSlsDetector : public virtual slsDetectorDefs {
*/
std::string getHostname(int detPos = -1) const; //
/**
* Appends detectors to the end of the list in shared memory
* Connects to them
* @param name concatenated hostname of the sls detectors to be appended to
* the list
*/
void addMultipleDetectors(const char *name); // ????
/**
* Get Detector type as an enum
* @returns detector type

View File

@ -202,6 +202,10 @@ defs::coordinates Detector::getMaxNumberOfChannels() const {
void Detector::setMaxNumberOfChannels(const defs::coordinates value) {
pimpl->setMaxNumberOfChannels(value);
}
//
//
//
// Erik
Result<int> Detector::getFramesCaughtByReceiver(Positions pos) const{
return pimpl->Parallel(&slsDetector::getFramesCaughtByReceiver, pos);

View File

@ -275,13 +275,6 @@ slsDetectorCommand::slsDetectorCommand(multiSlsDetector *det) {
descrToFuncMap[i].m_pFuncPtr = &slsDetectorCommand::cmdHostname;
++i;
/*! \page config
- <b>replace</b> \c Sets the hostname (or IP adress) for a single detector. Only allowed at single detector level. Cannot get. \c Returns the hostnames for that detector \c (string)
*/
descrToFuncMap[i].m_pFuncName = "replace";
descrToFuncMap[i].m_pFuncPtr = &slsDetectorCommand::cmdHostname;
++i;
/*! \page config
- <b>user</b> \c Returns user details from shared memory. Only allowed at multi detector level. Cannot put. \c (string)
*/
@ -2371,21 +2364,12 @@ std::string slsDetectorCommand::cmdHostname(int narg, const char * const args[],
if (action == HELP_ACTION) {
return helpHostname(HELP_ACTION);
}
if (action == GET_ACTION) {
if (cmd == "replace")
return std::string("cannot get");
}
if (action == PUT_ACTION) {
if ((cmd == "hostname") &&
(detPos >= 0)) {
if (detPos >= 0) {
return std::string("Wrong usage - setting hostname/add only from "
"multiDetector level");
}
if ((cmd == "replace") && (detPos < 0)) {
return std::string("Wrong usage - replace only from "
"single detector level");
}
char hostname[1000];
strcpy(hostname, "");
@ -2406,14 +2390,10 @@ std::string slsDetectorCommand::helpHostname(int action) {
std::ostringstream os;
if (action == GET_ACTION || action == HELP_ACTION) {
os << std::string("hostname \t returns the hostname(s) of the multi detector structure.\n");
os << std::string("replace \t cannot get\n");
}
if (action == PUT_ACTION || action == HELP_ACTION) {
os << std::string("hostname name [name name]\t frees shared memory and "
"sets the hostname (or IP adress). Only allowed at multi detector level.\n");
os << std::string("replace det \t Sets the hostname (or IP adress) for a "
"single detector. Only allowed at single detector level. "
"Returns the hostnames for that detector\n");
}
return os.str();
}