mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-24 23:30:03 +02:00
WIP
This commit is contained in:
parent
d9ecec9bf7
commit
6a780de22f
@ -356,14 +356,6 @@ class multiSlsDetector : public virtual slsDetectorDefs {
|
|||||||
*/
|
*/
|
||||||
std::string getHostname(int detPos = -1) const; //
|
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
|
* Get Detector type as an enum
|
||||||
* @returns detector type
|
* @returns detector type
|
||||||
|
@ -202,6 +202,10 @@ defs::coordinates Detector::getMaxNumberOfChannels() const {
|
|||||||
void Detector::setMaxNumberOfChannels(const defs::coordinates value) {
|
void Detector::setMaxNumberOfChannels(const defs::coordinates value) {
|
||||||
pimpl->setMaxNumberOfChannels(value);
|
pimpl->setMaxNumberOfChannels(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
// Erik
|
// Erik
|
||||||
Result<int> Detector::getFramesCaughtByReceiver(Positions pos) const{
|
Result<int> Detector::getFramesCaughtByReceiver(Positions pos) const{
|
||||||
return pimpl->Parallel(&slsDetector::getFramesCaughtByReceiver, pos);
|
return pimpl->Parallel(&slsDetector::getFramesCaughtByReceiver, pos);
|
||||||
|
@ -275,13 +275,6 @@ slsDetectorCommand::slsDetectorCommand(multiSlsDetector *det) {
|
|||||||
descrToFuncMap[i].m_pFuncPtr = &slsDetectorCommand::cmdHostname;
|
descrToFuncMap[i].m_pFuncPtr = &slsDetectorCommand::cmdHostname;
|
||||||
++i;
|
++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
|
/*! \page config
|
||||||
- <b>user</b> \c Returns user details from shared memory. Only allowed at multi detector level. Cannot put. \c (string)
|
- <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) {
|
if (action == HELP_ACTION) {
|
||||||
return helpHostname(HELP_ACTION);
|
return helpHostname(HELP_ACTION);
|
||||||
}
|
}
|
||||||
if (action == GET_ACTION) {
|
|
||||||
if (cmd == "replace")
|
|
||||||
return std::string("cannot get");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (action == PUT_ACTION) {
|
if (action == PUT_ACTION) {
|
||||||
if ((cmd == "hostname") &&
|
if (detPos >= 0) {
|
||||||
(detPos >= 0)) {
|
|
||||||
return std::string("Wrong usage - setting hostname/add only from "
|
return std::string("Wrong usage - setting hostname/add only from "
|
||||||
"multiDetector level");
|
"multiDetector level");
|
||||||
}
|
}
|
||||||
if ((cmd == "replace") && (detPos < 0)) {
|
|
||||||
return std::string("Wrong usage - replace only from "
|
|
||||||
"single detector level");
|
|
||||||
}
|
|
||||||
|
|
||||||
char hostname[1000];
|
char hostname[1000];
|
||||||
strcpy(hostname, "");
|
strcpy(hostname, "");
|
||||||
@ -2406,14 +2390,10 @@ std::string slsDetectorCommand::helpHostname(int action) {
|
|||||||
std::ostringstream os;
|
std::ostringstream os;
|
||||||
if (action == GET_ACTION || action == HELP_ACTION) {
|
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("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) {
|
if (action == PUT_ACTION || action == HELP_ACTION) {
|
||||||
os << std::string("hostname name [name name]\t frees shared memory and "
|
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");
|
"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();
|
return os.str();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user