#include <net_serial.h>
Public Types | |
enum | { SERIAL_RX_BUFFER_SIZE = 512, SERIAL_TX_BUFFER_SIZE = 128 } |
enum | { SERIAL_RX_BUFFER_SIZE = 512, SERIAL_TX_BUFFER_SIZE = 128, SERIAL_RX_TIMEOUT = 2000, SERIAL_TX_TIMEOUT = 2000 } |
Public Member Functions | |
virtual bool | bind (const char *portname, uint32_t baudrate, uint32_t flags=NULL) |
virtual bool | bind (const char *portname, _u32 baudrate, _u32 flags=0) |
virtual void | clearDTR () |
virtual void | clearDTR () |
virtual void | close () |
virtual void | close () |
virtual void | flush (_u32 flags) |
virtual void | flush (_u32 flags) |
_u32 | getTermBaudBitmap (_u32 baud) |
virtual bool | open () |
virtual bool | open () |
raw_serial () | |
raw_serial () | |
virtual int | recvdata (unsigned char *data, size_t size) |
virtual int | recvdata (unsigned char *data, size_t size) |
virtual size_t | rxqueue_count () |
virtual size_t | rxqueue_count () |
virtual int | senddata (const unsigned char *data, size_t size) |
virtual int | senddata (const unsigned char *data, size_t size) |
virtual void | setDTR () |
virtual void | setDTR () |
virtual int | waitfordata (size_t data_count, _u32 timeout=-1, size_t *returned_size=NULL) |
virtual int | waitfordata (size_t data_count, _u32 timeout=-1, size_t *returned_size=NULL) |
virtual int | waitforrecv (_u32 timeout=-1, size_t *returned_size=NULL) |
virtual int | waitforrecv (_u32 timeout=-1, size_t *returned_size=NULL) |
virtual int | waitforsent (_u32 timeout=-1, size_t *returned_size=NULL) |
virtual int | waitforsent (_u32 timeout=-1, size_t *returned_size=NULL) |
virtual | ~raw_serial () |
virtual | ~raw_serial () |
Protected Member Functions | |
void | _init () |
void | _init () |
bool | open (const char *portname, uint32_t baudrate, uint32_t flags=NULL) |
bool | open (const char *portname, _u32 baudrate, _u32 flags) |
Protected Attributes | |
uint32_t | _baudrate |
COMMTIMEOUTS | _co |
DCB | _dcb |
uint32_t | _flags |
char | _portName [200] |
OVERLAPPED | _ro |
volatile HANDLE | _serial_handle |
OVERLAPPED | _wait_o |
OVERLAPPED | _wo |
size_t | required_rx_cnt |
size_t | required_tx_cnt |
int | serial_fd |
Definition at line 43 of file linux/net_serial.h.
anonymous enum |
Definition at line 46 of file linux/net_serial.h.
anonymous enum |
Definition at line 46 of file win32/net_serial.h.
Definition at line 44 of file linux/net_serial.cpp.
rp::arch::net::raw_serial::~raw_serial | ( | ) | [virtual] |
Definition at line 53 of file linux/net_serial.cpp.
virtual rp::arch::net::raw_serial::~raw_serial | ( | ) | [virtual] |
void rp::arch::net::raw_serial::_init | ( | ) | [protected] |
Definition at line 295 of file linux/net_serial.cpp.
void rp::arch::net::raw_serial::_init | ( | ) | [protected] |
bool rp::arch::net::raw_serial::bind | ( | const char * | portname, |
uint32_t | baudrate, | ||
uint32_t | flags = NULL |
||
) | [virtual] |
Implements rp::hal::serial_rxtx.
Definition at line 64 of file linux/net_serial.cpp.
virtual bool rp::arch::net::raw_serial::bind | ( | const char * | portname, |
_u32 | baudrate, | ||
_u32 | flags = 0 |
||
) | [virtual] |
Implements rp::hal::serial_rxtx.
void rp::arch::net::raw_serial::clearDTR | ( | ) | [virtual] |
Implements rp::hal::serial_rxtx.
Definition at line 285 of file linux/net_serial.cpp.
virtual void rp::arch::net::raw_serial::clearDTR | ( | ) | [inline, virtual] |
Implements rp::hal::serial_rxtx.
Definition at line 71 of file win32/net_serial.h.
void rp::arch::net::raw_serial::close | ( | ) | [virtual] |
Implements rp::hal::serial_rxtx.
Definition at line 136 of file linux/net_serial.cpp.
virtual void rp::arch::net::raw_serial::close | ( | ) | [virtual] |
Implements rp::hal::serial_rxtx.
void rp::arch::net::raw_serial::flush | ( | _u32 | flags | ) | [virtual] |
Implements rp::hal::serial_rxtx.
Definition at line 180 of file linux/net_serial.cpp.
virtual void rp::arch::net::raw_serial::flush | ( | _u32 | flags | ) | [virtual] |
Implements rp::hal::serial_rxtx.
Definition at line 304 of file linux/net_serial.cpp.
bool rp::arch::net::raw_serial::open | ( | ) | [virtual] |
Implements rp::hal::serial_rxtx.
Definition at line 59 of file linux/net_serial.cpp.
virtual bool rp::arch::net::raw_serial::open | ( | ) | [virtual] |
Implements rp::hal::serial_rxtx.
bool rp::arch::net::raw_serial::open | ( | const char * | portname, |
uint32_t | baudrate, | ||
uint32_t | flags = NULL |
||
) | [protected] |
Definition at line 72 of file linux/net_serial.cpp.
bool rp::arch::net::raw_serial::open | ( | const char * | portname, |
_u32 | baudrate, | ||
_u32 | flags | ||
) | [protected] |
int rp::arch::net::raw_serial::recvdata | ( | unsigned char * | data, |
size_t | size | ||
) | [virtual] |
Implements rp::hal::serial_rxtx.
Definition at line 168 of file linux/net_serial.cpp.
virtual int rp::arch::net::raw_serial::recvdata | ( | unsigned char * | data, |
size_t | size | ||
) | [virtual] |
Implements rp::hal::serial_rxtx.
size_t rp::arch::net::raw_serial::rxqueue_count | ( | ) | [virtual] |
Implements rp::hal::serial_rxtx.
Definition at line 267 of file linux/net_serial.cpp.
virtual size_t rp::arch::net::raw_serial::rxqueue_count | ( | ) | [virtual] |
Implements rp::hal::serial_rxtx.
int rp::arch::net::raw_serial::senddata | ( | const unsigned char * | data, |
size_t | size | ||
) | [virtual] |
Implements rp::hal::serial_rxtx.
Definition at line 145 of file linux/net_serial.cpp.
virtual int rp::arch::net::raw_serial::senddata | ( | const unsigned char * | data, |
size_t | size | ||
) | [virtual] |
Implements rp::hal::serial_rxtx.
void rp::arch::net::raw_serial::setDTR | ( | ) | [virtual] |
Implements rp::hal::serial_rxtx.
Definition at line 276 of file linux/net_serial.cpp.
virtual void rp::arch::net::raw_serial::setDTR | ( | ) | [inline, virtual] |
Implements rp::hal::serial_rxtx.
Definition at line 70 of file win32/net_serial.h.
int rp::arch::net::raw_serial::waitfordata | ( | size_t | data_count, |
_u32 | timeout = -1 , |
||
size_t * | returned_size = NULL |
||
) | [virtual] |
Implements rp::hal::serial_rxtx.
Definition at line 199 of file linux/net_serial.cpp.
virtual int rp::arch::net::raw_serial::waitfordata | ( | size_t | data_count, |
_u32 | timeout = -1 , |
||
size_t * | returned_size = NULL |
||
) | [virtual] |
Implements rp::hal::serial_rxtx.
int rp::arch::net::raw_serial::waitforrecv | ( | _u32 | timeout = -1 , |
size_t * | returned_size = NULL |
||
) | [virtual] |
Implements rp::hal::serial_rxtx.
Definition at line 191 of file linux/net_serial.cpp.
virtual int rp::arch::net::raw_serial::waitforrecv | ( | _u32 | timeout = -1 , |
size_t * | returned_size = NULL |
||
) | [virtual] |
Implements rp::hal::serial_rxtx.
int rp::arch::net::raw_serial::waitforsent | ( | _u32 | timeout = -1 , |
size_t * | returned_size = NULL |
||
) | [virtual] |
Implements rp::hal::serial_rxtx.
Definition at line 185 of file linux/net_serial.cpp.
virtual int rp::arch::net::raw_serial::waitforsent | ( | _u32 | timeout = -1 , |
size_t * | returned_size = NULL |
||
) | [virtual] |
Implements rp::hal::serial_rxtx.
uint32_t rp::arch::net::raw_serial::_baudrate [protected] |
Definition at line 77 of file linux/net_serial.h.
COMMTIMEOUTS rp::arch::net::raw_serial::_co [protected] |
Definition at line 85 of file win32/net_serial.h.
DCB rp::arch::net::raw_serial::_dcb [protected] |
Definition at line 84 of file win32/net_serial.h.
uint32_t rp::arch::net::raw_serial::_flags [protected] |
Definition at line 78 of file linux/net_serial.h.
char rp::arch::net::raw_serial::_portName [protected] |
Definition at line 76 of file linux/net_serial.h.
OVERLAPPED rp::arch::net::raw_serial::_ro [protected] |
Definition at line 81 of file win32/net_serial.h.
volatile HANDLE rp::arch::net::raw_serial::_serial_handle [protected] |
Definition at line 83 of file win32/net_serial.h.
OVERLAPPED rp::arch::net::raw_serial::_wait_o [protected] |
Definition at line 82 of file win32/net_serial.h.
OVERLAPPED rp::arch::net::raw_serial::_wo [protected] |
Definition at line 81 of file win32/net_serial.h.
size_t rp::arch::net::raw_serial::required_rx_cnt [protected] |
Definition at line 83 of file linux/net_serial.h.
size_t rp::arch::net::raw_serial::required_tx_cnt [protected] |
Definition at line 82 of file linux/net_serial.h.
int rp::arch::net::raw_serial::serial_fd [protected] |
Definition at line 80 of file linux/net_serial.h.