Definition at line 55 of file portread.cc.
References Options::delimiter, Options::device, PORTREAD_CVSID, PORTREAD_VERSION, serialport::SerialPort::read(), and Options::verbose.
62 "usage: portread [-p device] [-v] [-d delimiter]" "\n" 63 " or: portread --help|-h" "\n" 73 using namespace tfxx::cmdline;
74 static Declare options[]=
81 {
"p",arg_yes,
"/dev/ttyS0"},
90 cerr << usage_text << endl;
95 Commandline cmdline(iargc, argv, options);
98 if (cmdline.optset(0))
100 cerr << usage_text << endl;
101 cerr << help_text << endl;
132 opt.
device=cmdline.string_arg(2);
137 std::string text=port.read(opt.
delimiter);
138 cout << text << endl;