#include <Serial.h>
|
enum | BaudRate {
BAUDRATE_110BPS,
BAUDRATE_300BPS,
BAUDRATE_600BPS,
BAUDRATE_1200BPS,
BAUDRATE_2400BPS,
BAUDRATE_4800BPS,
BAUDRATE_9600BPS,
BAUDRATE_19200BPS,
BAUDRATE_38400BPS,
BAUDRATE_57600BPS,
BAUDRATE_115200BPS,
BAUDRATE_230400BPS,
BAUDRATE_460800BPS,
BAUDRATE_500000BPS,
BAUDRATE_576000BPS,
BAUDRATE_921600BPS,
BAUDRATE_1000000BPS,
BAUDRATE_1152000BPS,
BAUDRATE_1500000BPS,
BAUDRATE_2000000BPS,
BAUDRATE_2500000BPS,
BAUDRATE_3000000BPS,
BAUDRATE_3500000BPS,
BAUDRATE_4000000BPS
} |
|
enum | DataBits { DATABITS_5BITS,
DATABITS_6BITS,
DATABITS_7BITS,
DATABITS_8BITS
} |
|
enum | FlowControl { FLOWCONTROL_OFF,
FLOWCONTROL_RTSCTS,
FLOWCONTROL_XONXOFF
} |
|
enum | Parity { PARITY_EVENPARITY,
PARITY_NOPARITY,
PARITY_ODDPARITY
} |
|
enum | StopBits { STOPBITS_1BIT,
STOPBITS_2BITS
} |
|
|
| Serial (const ::std::string &filename, const BaudRate &baudRate=BAUDRATE_9600BPS, const DataBits &dataBits=DATABITS_8BITS, const FlowControl &flowControl=FLOWCONTROL_OFF, const Parity &parity=PARITY_NOPARITY, const StopBits &stopBits=STOPBITS_1BIT, const int &flags=O_RDWR|O_NONBLOCK|O_NOCTTY) |
|
virtual | ~Serial () |
|
void | changeParameters () |
|
void | close () |
|
void | doBreak (const bool &doOn) |
|
void | doDtr (const bool &doOn) |
|
void | doModemStatus (bool &ctsOn, bool &dsrOn, bool &riOn, bool &dcdOn) |
|
void | doRts (const bool &doOn) |
|
void | flush (const bool &read, const bool &write) |
|
const BaudRate & | getBaudRate () const |
|
const DataBits & | getDataBits () const |
|
const ::std::string & | getFilename () const |
|
const FlowControl & | getFlowControl () const |
|
const Parity & | getParity () const |
|
const StopBits & | getStopBits () const |
|
void | open () |
|
::std::size_t | read (void *buf, const ::std::size_t &count) |
|
::std::size_t | select (const bool &read, const bool &write, const ::std::chrono::nanoseconds &timeout) |
|
void | setBaudRate (const BaudRate &baudRate) |
|
void | setDataBits (const DataBits &dataBits) |
|
void | setFilename (const ::std::string &filename) |
|
void | setFlowControl (const FlowControl &flowControl) |
|
void | setParity (const Parity &parity) |
|
void | setStopBits (const StopBits &stopBits) |
|
::std::size_t | write (const void *buf, const ::std::size_t &count) |
|
| Com () |
|
virtual | ~Com () |
|
bool | isConnected () const |
|
◆ BaudRate
Enumerator |
---|
BAUDRATE_110BPS | 110 bps.
|
BAUDRATE_300BPS | 300 bps.
|
BAUDRATE_600BPS | 600 bps.
|
BAUDRATE_1200BPS | 1,200 bps.
|
BAUDRATE_2400BPS | 2,400 bps.
|
BAUDRATE_4800BPS | 4,800 bps.
|
BAUDRATE_9600BPS | 9,600 bps.
|
BAUDRATE_19200BPS | 19,200 bps.
|
BAUDRATE_38400BPS | 38,400 bps.
|
BAUDRATE_57600BPS | 57,600 bps.
|
BAUDRATE_115200BPS | 115,200 bps.
|
BAUDRATE_230400BPS | 230,400 bps.
|
BAUDRATE_460800BPS | 460,800 bps.
|
BAUDRATE_500000BPS | 500,000 bps.
|
BAUDRATE_576000BPS | 576,000 bps.
|
BAUDRATE_921600BPS | 921,600 bps.
|
BAUDRATE_1000000BPS | 1,000,000 bps.
|
BAUDRATE_1152000BPS | 1,152000 bps.
|
BAUDRATE_1500000BPS | 1,500,000 bps.
|
BAUDRATE_2000000BPS | 2,000,000 bps.
|
BAUDRATE_2500000BPS | 2,500,000 bps.
|
BAUDRATE_3000000BPS | 3,000,000 bps.
|
BAUDRATE_3500000BPS | 3,500,000 bps.
|
BAUDRATE_4000000BPS | 4,000,000 bps.
|
◆ DataBits
Enumerator |
---|
DATABITS_5BITS | 5 data bits.
|
DATABITS_6BITS | 6 data bits.
|
DATABITS_7BITS | 7 data bits.
|
DATABITS_8BITS | 8 data bits.
|
◆ FlowControl
Enumerator |
---|
FLOWCONTROL_OFF | No flow control.
|
FLOWCONTROL_RTSCTS | Hardware flow control (RTS/CTS).
|
FLOWCONTROL_XONXOFF | Software flow control (XON/XOFF).
|
◆ Parity
Enumerator |
---|
PARITY_EVENPARITY | Even parity.
|
PARITY_NOPARITY | No parity.
|
PARITY_ODDPARITY | Odd parity.
|
◆ StopBits
Enumerator |
---|
STOPBITS_1BIT | 1 stop bit.
|
STOPBITS_2BITS | 2 stop bits.
|
◆ Serial()
◆ ~Serial()
rl::hal::Serial::~Serial |
( |
| ) |
|
|
virtual |
◆ changeParameters()
void rl::hal::Serial::changeParameters |
( |
| ) |
|
◆ close()
void rl::hal::Serial::close |
( |
| ) |
|
|
virtual |
◆ doBreak()
void rl::hal::Serial::doBreak |
( |
const bool & |
doOn | ) |
|
◆ doDtr()
void rl::hal::Serial::doDtr |
( |
const bool & |
doOn | ) |
|
◆ doModemStatus()
void rl::hal::Serial::doModemStatus |
( |
bool & |
ctsOn, |
|
|
bool & |
dsrOn, |
|
|
bool & |
riOn, |
|
|
bool & |
dcdOn |
|
) |
| |
◆ doRts()
void rl::hal::Serial::doRts |
( |
const bool & |
doOn | ) |
|
◆ flush()
void rl::hal::Serial::flush |
( |
const bool & |
read, |
|
|
const bool & |
write |
|
) |
| |
◆ getBaudRate()
◆ getDataBits()
◆ getFilename()
const ::std::string & rl::hal::Serial::getFilename |
( |
| ) |
const |
◆ getFlowControl()
◆ getParity()
◆ getStopBits()
◆ open()
void rl::hal::Serial::open |
( |
| ) |
|
|
virtual |
◆ read()
std::size_t rl::hal::Serial::read |
( |
void * |
buf, |
|
|
const ::std::size_t & |
count |
|
) |
| |
◆ select()
std::size_t rl::hal::Serial::select |
( |
const bool & |
read, |
|
|
const bool & |
write, |
|
|
const ::std::chrono::nanoseconds & |
timeout |
|
) |
| |
◆ setBaudRate()
void rl::hal::Serial::setBaudRate |
( |
const BaudRate & |
baudRate | ) |
|
◆ setDataBits()
void rl::hal::Serial::setDataBits |
( |
const DataBits & |
dataBits | ) |
|
◆ setFilename()
void rl::hal::Serial::setFilename |
( |
const ::std::string & |
filename | ) |
|
◆ setFlowControl()
void rl::hal::Serial::setFlowControl |
( |
const FlowControl & |
flowControl | ) |
|
◆ setParity()
void rl::hal::Serial::setParity |
( |
const Parity & |
parity | ) |
|
◆ setStopBits()
void rl::hal::Serial::setStopBits |
( |
const StopBits & |
stopBits | ) |
|
◆ write()
std::size_t rl::hal::Serial::write |
( |
const void * |
buf, |
|
|
const ::std::size_t & |
count |
|
) |
| |
◆ baudRate
◆ current
struct termios rl::hal::Serial::current |
|
private |
◆ dataBits
◆ fd
◆ filename
::std::string rl::hal::Serial::filename |
|
private |
◆ flags
int rl::hal::Serial::flags |
|
private |
◆ flowControl
◆ parity
Parity rl::hal::Serial::parity |
|
private |
◆ restore
struct termios rl::hal::Serial::restore |
|
private |
◆ stopBits
The documentation for this class was generated from the following files: