9 string name =
"/dev/ttyUSB0";
10 int32_t baud = 115200;
18 if (!strcmp(argv[6],
"rtscts"))
22 if (!strcmp(argv[6],
"xonxoff"))
29 parity = atoi(argv[4]);
43 size_t errorcount = 0;
44 size_t timeoutcount = 0;
45 int32_t lastresult = 0;
54 if (result != lastresult)
57 double lap = et.
lap();
58 printf(
"%f %f: Read %lu %c(%0x) @ %f BPS: %lu Errors: %lu Timeouts\n", et.
split(), lap, readcount, result, result, readcount/lap, errorcount, timeoutcount);
#define SERIAL_ERROR_TIMEOUT
Definition: cosmos-errno.h:171
static string port
Definition: add_radio.cpp:16
Definition: serialclass.h:43
ElapsedTime et
Definition: agent_cpu_device_test.cpp:51
int32_t get_char()
Definition: serialclass.cpp:987
string cosmos_error_string(int32_t cosmos_errno)
Definition: cosmos-errno.cpp:45
double lap()
Lap Time.
Definition: elapsedtime.cpp:145
string name
Definition: cubesat2obj.cpp:6
Definition: elapsedtime.h:62
int32_t set_timeout(int, double timeout)
Definition: serialclass.cpp:515
int32_t set_flowcontrol(bool rtscts, bool xonxoff)
Definition: serialclass.cpp:386
double split()
ElapsedTime::split, gets the current elapsed time since the start()
Definition: elapsedtime.cpp:234