#include <unix.h>
Public Member Functions | |
size_t | available () |
void | close () |
void | flush () |
void | flushInput () |
void | flushOutput () |
unsigned long | getBaudrate () const |
bytesize_t | getBytesize () const |
bool | getCD () |
bool | getCTS () |
bool | getDSR () |
flowcontrol_t | getFlowcontrol () const |
parity_t | getParity () const |
string | getPort () const |
bool | getRI () |
stopbits_t | getStopbits () const |
Timeout | getTimeout () const |
bool | isOpen () const |
void | open () |
size_t | read (uint8_t *buf, size_t size=1) |
void | readLock () |
void | readUnlock () |
void | sendBreak (int duration) |
SerialImpl (const string &port, unsigned long baudrate, bytesize_t bytesize, parity_t parity, stopbits_t stopbits, flowcontrol_t flowcontrol) | |
void | setBaudrate (unsigned long baudrate) |
void | setBreak (bool level) |
void | setBytesize (bytesize_t bytesize) |
void | setDTR (bool level) |
void | setFlowcontrol (flowcontrol_t flowcontrol) |
void | setParity (parity_t parity) |
void | setPort (const string &port) |
void | setRTS (bool level) |
void | setStopbits (stopbits_t stopbits) |
void | setTimeout (Timeout &timeout) |
void | waitByteTimes (size_t count) |
bool | waitForChange () |
bool | waitReadable (uint32_t timeout) |
size_t | write (const uint8_t *data, size_t length) |
void | writeLock () |
void | writeUnlock () |
virtual | ~SerialImpl () |
Protected Member Functions | |
void | reconfigurePort () |
Private Attributes | |
unsigned long | baudrate_ |
uint32_t | byte_time_ns_ |
bytesize_t | bytesize_ |
int | fd_ |
flowcontrol_t | flowcontrol_ |
bool | is_open_ |
parity_t | parity_ |
string | port_ |
pthread_mutex_t | read_mutex |
bool | rtscts_ |
stopbits_t | stopbits_ |
Timeout | timeout_ |
pthread_mutex_t | write_mutex |
bool | xonxoff_ |
Serial::SerialImpl::SerialImpl | ( | const string & | port, |
unsigned long | baudrate, | ||
bytesize_t | bytesize, | ||
parity_t | parity, | ||
stopbits_t | stopbits, | ||
flowcontrol_t | flowcontrol | ||
) |
Serial::SerialImpl::~SerialImpl | ( | ) | [virtual] |
size_t Serial::SerialImpl::available | ( | ) |
void Serial::SerialImpl::close | ( | ) |
void Serial::SerialImpl::flush | ( | ) |
void Serial::SerialImpl::flushInput | ( | ) |
void Serial::SerialImpl::flushOutput | ( | ) |
unsigned long Serial::SerialImpl::getBaudrate | ( | ) | const |
bool Serial::SerialImpl::getCD | ( | ) |
bool Serial::SerialImpl::getCTS | ( | ) |
bool Serial::SerialImpl::getDSR | ( | ) |
string Serial::SerialImpl::getPort | ( | ) | const |
bool Serial::SerialImpl::getRI | ( | ) |
bool Serial::SerialImpl::isOpen | ( | ) | const |
void Serial::SerialImpl::open | ( | ) |
size_t Serial::SerialImpl::read | ( | uint8_t * | buf, |
size_t | size = 1 |
||
) |
void Serial::SerialImpl::readLock | ( | ) |
void Serial::SerialImpl::readUnlock | ( | ) |
void Serial::SerialImpl::reconfigurePort | ( | ) | [protected] |
void Serial::SerialImpl::sendBreak | ( | int | duration | ) |
void Serial::SerialImpl::setBaudrate | ( | unsigned long | baudrate | ) |
void Serial::SerialImpl::setBreak | ( | bool | level | ) |
void Serial::SerialImpl::setBytesize | ( | serial::bytesize_t | bytesize | ) |
void Serial::SerialImpl::setDTR | ( | bool | level | ) |
void Serial::SerialImpl::setFlowcontrol | ( | serial::flowcontrol_t | flowcontrol | ) |
void Serial::SerialImpl::setParity | ( | serial::parity_t | parity | ) |
void Serial::SerialImpl::setPort | ( | const string & | port | ) |
void Serial::SerialImpl::setRTS | ( | bool | level | ) |
void Serial::SerialImpl::setStopbits | ( | serial::stopbits_t | stopbits | ) |
void Serial::SerialImpl::setTimeout | ( | serial::Timeout & | timeout | ) |
void Serial::SerialImpl::waitByteTimes | ( | size_t | count | ) |
bool Serial::SerialImpl::waitForChange | ( | ) |
bool Serial::SerialImpl::waitReadable | ( | uint32_t | timeout | ) |
size_t Serial::SerialImpl::write | ( | const uint8_t * | data, |
size_t | length | ||
) |
void Serial::SerialImpl::writeLock | ( | ) |
void Serial::SerialImpl::writeUnlock | ( | ) |
unsigned long serial::Serial::SerialImpl::baudrate_ [private] |
uint32_t serial::Serial::SerialImpl::byte_time_ns_ [private] |
int serial::Serial::SerialImpl::fd_ [private] |
bool serial::Serial::SerialImpl::is_open_ [private] |
parity_t serial::Serial::SerialImpl::parity_ [private] |
string serial::Serial::SerialImpl::port_ [private] |
pthread_mutex_t serial::Serial::SerialImpl::read_mutex [private] |
bool serial::Serial::SerialImpl::rtscts_ [private] |
Timeout serial::Serial::SerialImpl::timeout_ [private] |
pthread_mutex_t serial::Serial::SerialImpl::write_mutex [private] |
bool serial::Serial::SerialImpl::xonxoff_ [private] |