mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2026-02-10 23:08:40 +01:00
remove testing code, minor
This commit is contained in:
@@ -11,6 +11,7 @@
|
|||||||
#include <cstring>
|
#include <cstring>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
|
/** for testing */
|
||||||
ParsedOptions CommandLineOptions::parse(const std::vector<std::string> &args) {
|
ParsedOptions CommandLineOptions::parse(const std::vector<std::string> &args) {
|
||||||
std::vector<char *> argv;
|
std::vector<char *> argv;
|
||||||
argv.reserve(args.size());
|
argv.reserve(args.size());
|
||||||
@@ -23,15 +24,12 @@ ParsedOptions CommandLineOptions::parse(const std::vector<std::string> &args) {
|
|||||||
|
|
||||||
ParsedOptions CommandLineOptions::parse(int argc, char *argv[]) {
|
ParsedOptions CommandLineOptions::parse(int argc, char *argv[]) {
|
||||||
CommonOptions base;
|
CommonOptions base;
|
||||||
base.port = DEFAULT_TCP_RX_PORTNO;
|
|
||||||
|
|
||||||
MultiReceiverOptions multi;
|
MultiReceiverOptions multi;
|
||||||
FrameSyncOptions frame;
|
FrameSyncOptions frame;
|
||||||
|
base.port = DEFAULT_TCP_RX_PORTNO;
|
||||||
|
|
||||||
// leading '+' to stop parsing at first non-option argument (to allow for deprecated options)
|
auto optString = buildOptString();
|
||||||
auto optString = "+" + buildOptString();
|
|
||||||
auto longOptions = buildOptionList();
|
auto longOptions = buildOptionList();
|
||||||
|
|
||||||
optind = 0; // reset getopt
|
optind = 0; // reset getopt
|
||||||
int opt, option_index = 0;
|
int opt, option_index = 0;
|
||||||
|
|
||||||
|
|||||||
@@ -29,9 +29,6 @@ Receiver::~Receiver() = default;
|
|||||||
|
|
||||||
Receiver::Receiver(uint16_t port) {
|
Receiver::Receiver(uint16_t port) {
|
||||||
validatePortNumber(port);
|
validatePortNumber(port);
|
||||||
//#ifdef SLS_USE_TESTS
|
|
||||||
if (port == 9999) throw RuntimeError("throwing for 9999 test");
|
|
||||||
//#endif
|
|
||||||
tcpipInterface = make_unique<ClientInterface>(port);
|
tcpipInterface = make_unique<ClientInterface>(port);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user