mirror of
https://github.com/FairRootGroup/FairMQ.git
synced 2025-10-15 09:31:45 +00:00
Modified runDDSCommandUI to accept command line argument.
If no arguments, it behaves like before. Removed runDDSCommand and replaced calls to it in controlDDS.
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
#include <sstream>
|
||||
#include <thread>
|
||||
#include <atomic>
|
||||
#include <unistd.h>
|
||||
|
||||
using namespace std;
|
||||
using namespace dds::intercom_api;
|
||||
@@ -38,7 +39,10 @@ int main(int argc, char* argv[])
|
||||
t.c_lflag &= ~ICANON; // disable canonical input
|
||||
tcsetattr(STDIN_FILENO, TCSANOW, &t); // apply the new settings
|
||||
|
||||
PrintControlsHelp();
|
||||
if ( argc != 2 )
|
||||
PrintControlsHelp();
|
||||
else
|
||||
cin.putback(argv[1][0]);
|
||||
|
||||
while (cin >> c)
|
||||
{
|
||||
@@ -96,6 +100,10 @@ int main(int argc, char* argv[])
|
||||
{
|
||||
cerr << "Error sending custom command" << endl;
|
||||
}
|
||||
if ( argc == 2 ) {
|
||||
usleep(50000);
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
}
|
||||
|
||||
// disable raw mode
|
||||
|
Reference in New Issue
Block a user