]> git.mxchange.org Git - simgear.git/blob - Serial/testserial.cxx
Initial revision.
[simgear.git] / Serial / testserial.cxx
1 #include <string>
2
3 #include "serial.hxx"
4
5 main () {
6     fgSERIAL port( "/dev/ttyS1", 4800);
7     string value;
8
9     port.write_port("ATDT 626-9800\n");
10
11     while ( true ) {
12         value = port.read_port();
13         if ( value.length() ) {
14             cout << "-> " << value << endl;
15         }
16     }
17 }