mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2026-05-06 19:04:13 +02:00
Dev/verify shm (#1276)
* removed verify, update, fixed getUser to be a free function, generated commands, python bindings yet to do * python bindings * fixed tests * minor * minor * format
This commit is contained in:
@@ -50,14 +50,27 @@ int main(int argc, char *argv[]) {
|
||||
action = slsDetectorDefs::HELP_ACTION;
|
||||
else {
|
||||
// Free shared memory should work also without a detector
|
||||
// if we have an option for verify in the detector constructor
|
||||
// we could avoid this but clutter the code
|
||||
if (parser.command() == "free") {
|
||||
if (parser.detector_id() != -1)
|
||||
std::cout << "Cannot free shared memory of sub-detector\n";
|
||||
else
|
||||
sls::freeSharedMemory(parser.multi_id());
|
||||
return 0;
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
||||
// Get user details from shared memory should work also without a
|
||||
// detector
|
||||
if (parser.command() == "user") {
|
||||
if (action == slsDetectorDefs::PUT_ACTION) {
|
||||
std::cout << "Cannot set user details\n";
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
if (parser.detector_id() != -1)
|
||||
std::cout << "Cannot get user details of only a sub-detector\n";
|
||||
else
|
||||
std::cout << sls::getUserDetails(parser.multi_id())
|
||||
<< std::endl;
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user