mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2026-02-15 22:58:41 +01:00
fixed help, -t for multi should not be supported as it never had it
This commit is contained in:
@@ -45,6 +45,7 @@ ParsedOptions CommandLineOptions::parse(int argc, char *argv[]) {
|
|||||||
case 'u':
|
case 'u':
|
||||||
handleCommonOption(opt, optarg, base);
|
handleCommonOption(opt, optarg, base);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'c':
|
case 'c':
|
||||||
case 'n':
|
case 'n':
|
||||||
case 't':
|
case 't':
|
||||||
@@ -62,7 +63,7 @@ ParsedOptions CommandLineOptions::parse(int argc, char *argv[]) {
|
|||||||
if (base.port != DEFAULT_TCP_RX_PORTNO ||
|
if (base.port != DEFAULT_TCP_RX_PORTNO ||
|
||||||
multi.numReceivers != 1 || frame.numReceivers != 1 || multi.callbackEnabled != false || frame.printHeaders != false) {
|
multi.numReceivers != 1 || frame.numReceivers != 1 || multi.callbackEnabled != false || frame.printHeaders != false) {
|
||||||
LOG(sls::logWARNING)
|
LOG(sls::logWARNING)
|
||||||
<< "Cannot use both deprecated options and the valid options simultaneously. Please use only the new options.\n";
|
<< "Cannot use both deprecated options and the valid options simultaneously. Please move away from the deprecated options.\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
// unsupported deprecated arguments
|
// unsupported deprecated arguments
|
||||||
@@ -116,22 +117,19 @@ std::vector<option> CommandLineOptions::buildOptionList() const {
|
|||||||
{"uid", required_argument, nullptr, 'u'},
|
{"uid", required_argument, nullptr, 'u'},
|
||||||
{"help", no_argument, nullptr, 'h'},
|
{"help", no_argument, nullptr, 'h'},
|
||||||
};
|
};
|
||||||
|
|
||||||
switch (appType_) {
|
switch (appType_) {
|
||||||
case AppType::SingleReceiver:
|
case AppType::SingleReceiver:
|
||||||
opts.push_back({"rx_tcpport", required_argument, nullptr, 't'});
|
opts.push_back({"rx_tcpport", required_argument, nullptr, 't'});
|
||||||
break;
|
break;
|
||||||
case AppType::MultiReceiver:
|
case AppType::MultiReceiver:
|
||||||
opts.push_back({"callback", no_argument, nullptr, 'c'});
|
|
||||||
opts.push_back({"rx_tcpport", required_argument, nullptr, 't'});
|
|
||||||
opts.push_back({"num-receivers", required_argument, nullptr, 'n'});
|
opts.push_back({"num-receivers", required_argument, nullptr, 'n'});
|
||||||
|
opts.push_back({"callback", no_argument, nullptr, 'c'});
|
||||||
break;
|
break;
|
||||||
case AppType::FrameSynchronizer:
|
case AppType::FrameSynchronizer:
|
||||||
opts.push_back({"num-receivers", required_argument, nullptr, 'n'});
|
opts.push_back({"num-receivers", required_argument, nullptr, 'n'});
|
||||||
opts.push_back({"print-headers", no_argument, nullptr, 'c'});
|
opts.push_back({"print-headers", no_argument, nullptr, 'c'});
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
opts.push_back({nullptr, 0, nullptr, 0}); // null-terminator for getopt
|
opts.push_back({nullptr, 0, nullptr, 0}); // null-terminator for getopt
|
||||||
return opts;
|
return opts;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user