Example program to test key board pressings (class JSYSTEM::JKeypress).
More...
#include <string>
#include <iostream>
#include <iomanip>
#include "JSystem/JKeypress.hh"
#include "Jeep/JParser.hh"
#include "Jeep/JMessage.hh"
Go to the source code of this file.
|
int | main (int argc, char *argv[]) |
|
Example program to test key board pressings (class JSYSTEM::JKeypress).
- Author
- mdejong
Definition in file JKeypress.cc.
int main |
( |
int |
argc, |
|
|
char * |
argv[] |
|
) |
| |
Definition at line 16 of file JKeypress.cc.
25 JParser<> zap(
"Example program to test key board pressings.");
32 catch(
const exception &error) {
33 FATAL(error.what() << endl);
41 cout <<
"> " << flush;
43 int c = JKeypress(
echo).get();
45 cout << endl <<
"return <" << (char) c <<
">" << endl;
50 JKeypress keypress(
false);
54 for (
int i = 0; i != 10000; ++i) {
56 cout << setw(5) << i << flush <<
'\r';
58 if (keypress.timeout(timeout_us)) {
64 cout << endl <<
"return <" << (char) c <<
">" << endl;
Utility class to parse command line options.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
$WORKDIR ev_configure_dqsimulator txt echo process $DQ_SIMULATOR $i $SOURCE_HOST[$index] csh c(setenv ROOTSYS $ROOTSYS &&source $JPP_DIR/setenv.csh $JPP_DIR &&($DQ_SIMULATOR\-u\$NAME\$\-H\$SERVER\$\-M\$LOGGER\$\-d $DEBUG</dev/null > &/dev/null &))'