36 #define PORTREAD_VERSION \ 37 "PORTREAD V1.0 read from port" 38 #define PORTREAD_CVSID \ 43 #include <tfxx/commandline.h> 55 int main(
int iargc,
char* argv[])
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);
138 cout << text << endl;
std::string read(const std::string &delim="\) const
read from port until delimiter
code to access a serial port (prototypes)
int main(int iargc, char *argv[])