mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-11 12:27:14 +02:00
Command proxy (#25)
* added cmd proxy * minor * minor * WIP * clean up * added comment
This commit is contained in:

committed by
Dhanya Thattil

parent
85d4dfc7c8
commit
788ad8d3b6
@ -3,6 +3,7 @@
|
||||
#include <string>
|
||||
|
||||
#include "CmdLineParser.h"
|
||||
#include "CmdProxy.h"
|
||||
#include "container_utils.h"
|
||||
#include "string_utils.h"
|
||||
#include "multiSlsDetector.h"
|
||||
@ -88,6 +89,18 @@ class multiSlsDetectorClient {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
//Call CmdProxy which execute the command if it exists, on success returns an empty string
|
||||
//If the command is not in CmdProxy but deprecated the new command is returned
|
||||
sls::CmdProxy<multiSlsDetector> proxy(detPtr);
|
||||
auto cmd = proxy.Call(parser.command(), parser.arguments(), parser.detector_id());
|
||||
if (cmd.empty())
|
||||
return;
|
||||
else
|
||||
parser.setCommand(cmd);
|
||||
|
||||
|
||||
|
||||
// call multi detector command line
|
||||
slsDetectorCommand myCmd(detPtr);
|
||||
std::string answer = myCmd.executeLine(parser.n_arguments()+1, parser.argv().data(), action_, parser.detector_id());
|
||||
|
Reference in New Issue
Block a user