COSMOS core
1.0.2 (beta)
Comprehensive Open-architecture Solution for Mission Operations Systems
|
#include <serialclass.h>
Public Member Functions | |
Serial (string dname, size_t dbaud=9600, size_t dbits=8, size_t dparity=0, size_t dstop=1) | |
~Serial () | |
int32_t | open_device () |
int32_t | close_device () |
int32_t | set_restoreonclose (bool argument) |
int32_t | set_params (size_t dbaud, size_t dbits, size_t dparity, size_t dstop) |
int32_t | set_flowcontrol (bool rtscts, bool xonxoff) |
int32_t | set_timeout (int, double timeout) |
int32_t | set_timeout (double timeout) |
int32_t | set_dtr (bool state) |
int32_t | set_rts (bool state) |
bool | get_cts () |
int32_t | put_char (uint8_t c) |
int32_t | put_string (string data) |
int32_t | put_data (vector< uint8_t > data) |
int32_t | put_data (const uint8_t *data, size_t size) |
int32_t | put_slip (vector< uint8_t > data) |
int32_t | put_nmea (vector< uint8_t > data) |
int32_t | drain () |
int32_t | poll_char () |
int32_t | get_char () |
int32_t | get_char (uint8_t &buffer) |
int32_t | get_data (vector< uint8_t > &data, size_t size=SIZE_MAX) |
int32_t | get_string (string &data, size_t size=SIZE_MAX) |
int32_t | get_string (string &data, char endc=0) |
int32_t | get_data (uint8_t *data, size_t size) |
int32_t | get_slip (vector< uint8_t > &data, size_t size=SIZE_MAX) |
Read SLIP frame. More... | |
int32_t | get_nmea (vector< uint8_t > &data, size_t size) |
Read NMEA response. More... | |
int32_t | get_xmodem (vector< uint8_t > &data, size_t size) |
Read Xmodem frame. More... | |
int32_t | get_error () |
bool | get_open () |
int32_t | SendByte (uint8_t byte) |
int32_t | ReceiveBuffer (uint8_t *buf, int size) |
int32_t | ReceiveByte (uint8_t &buf) |
int32_t | SendBuffer (uint8_t *buffer, int size) |
Private Attributes | |
int | fd = -1 |
int32_t | error |
vector< uint32_t > | baud_speed [2] |
double | ictimeout = .002 |
bool | restoreonclose = true |
DCB | dcb |
HANDLE | handle |
string | name |
size_t | baud |
size_t | bits |
size_t | parity |
size_t | stop |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |