Merge branch 'developer' into gui

This commit is contained in:
2019-06-25 10:51:17 +02:00
11 changed files with 117 additions and 52 deletions

View File

@ -5,10 +5,10 @@
#include "CmdLineParser.h"
#include "CmdProxy.h"
#include "container_utils.h"
#include "string_utils.h"
#include "multiSlsDetector.h"
#include "slsDetectorCommand.h"
#include "sls_detector_exceptions.h"
#include "string_utils.h"
#include <cstdlib>
#include <memory>
@ -27,14 +27,17 @@ class multiSlsDetectorClient {
std::ostream &output = std::cout)
: action_(action), detPtr(myDetector), os(output) {
parser.Parse(argc, argv);
if (parser.isHelp())
action_ = slsDetectorDefs::HELP_ACTION;
runCommand();
}
multiSlsDetectorClient(const std::string &args, int action,
multiSlsDetector *myDetector = nullptr,
std::ostream &output = std::cout)
: action_(action), detPtr(myDetector), os(output) {
parser.Parse(args);
if (parser.isHelp())
action_ = slsDetectorDefs::HELP_ACTION;
runCommand();
}
@ -108,7 +111,7 @@ class multiSlsDetectorClient {
if (action_ != slsDetectorDefs::READOUT_ACTION) {
sls::CmdProxy<multiSlsDetector> proxy(detPtr);
auto cmd = proxy.Call(parser.command(), parser.arguments(),
parser.detector_id());
parser.detector_id(), action_);
if (cmd.empty()) {
return;
} else {

View File

@ -3188,7 +3188,7 @@ void slsDetector::updateRateCorrection() {
break;
default:
setRateCorrection(0);
throw sls::NonCriticalError(
throw sls::RuntimeError(
"Rate correction Deactivated, must be in 32 or 16 bit mode");
}
}