24 #include "goby/util/as.h" 25 #include "goby/util/linebasedcomms.h" 29 int main(
int argc,
char* argv[])
36 <<
"usage: serial2tcp_server server_port serial_port serial_baud [run-frequency=100]" 41 std::string server_port = argv[1];
42 std::string serial_port = argv[2];
43 std::string serial_baud = argv[3];
45 run_freq = goby::util::as<int>(argv[4]);
51 serial_client.start();
56 while (serial_client.readline(&s)) tcp_server.write(s);
58 while (tcp_server.readline(&s)) serial_client.write(s);
60 usleep(1000000 / run_freq);
provides a basic client for line by line text based communications over a 8N1 tty (such as an RS-232 ...
provides a basic TCP server for line by line text based communications to a one or more remote TCP cl...