head 1.4; access; symbols; locks; strict; comment @# @; 1.4 date 2002.09.07.01.50.41; author curt; state Exp; branches; next 1.3; 1.3 date 2002.08.31.19.01.59; author curt; state Exp; branches; next 1.2; 1.2 date 2002.08.31.18.54.05; author curt; state Exp; branches; next 1.1; 1.1 date 2002.02.15.17.22.02; author curt; state Exp; branches; next ; desc @@ 1.4 log @Updated doxygen docs. @ text @
Main Page Class Hierarchy Compound List File List Compound Members File Members

# testserial.cxx

    00001 #include <simgear/compiler.h>
    00002
    00003 #include STL_STRING
    00004 #include STL_IOSTREAM
    00005
    00006 #include <simgear/debug/logstream.hxx>
    00007
    00008 #include "serial.hxx"
    00009
    00010 #if !defined(SG_HAVE_NATIVE_SGI_COMPILERS)
    00011 SG_USING_STD(cout);
    00012 SG_USING_STD(endl);
    00013 #endif
    00014
    00015
    00016 int main () {
    00017     FGSerialPort port;
    00018     string value;
    00019     bool result;
    00020
    00021     sglog().setLogLevels( SG_ALL, SG_INFO );
    00022
    00023     cout << "start of main" << endl;
    00024
    00025     result = port.open_port("/dev/ttyS1");
    00026     cout << "opened port, result = " << result << endl;
    00027
    00028     result = port.set_baud(4800);
    00029     cout << "set baud, result = " << result << endl;
    00030
    00031     port.write_port("ATDT 626-9800\n");
    00032
    00033     while ( true ) {
    00034         value = port.read_port();
    00035         if ( value.length() ) {
    00036             cout << "-> " << value << endl;
    00037         }
    00038     }
    00039
    00040     return 0;
    00041 }

@ 1.3 log @Oops, try again. @ text @d50 1 a50 1