#include <LOW_portSerial_Linux.h>
Inheritance diagram for LOW_portSerial_Linux:
Public Types | |
enum | flowControl_t { none_flowControl, xonxoff_flowControl, rtscts_flowControl } |
Serial flow control type. More... | |
enum | dataBitsSite_t { bit5_size, bit6_size, bit7_size, bit8_size } |
Number of data bits type. More... | |
enum | parity_t { no_parity, odd_parity, even_parity } |
Parity control type. More... | |
enum | stopBits_t { bit1_stopBit, bit2_stopBit } |
Number of stop bits type. More... | |
enum | speed_t { B50_speed, B75_speed, B110_speed, B134_speed, B150_speed, B200_speed, B300_speed, B600_speed, B1200_speed, B1800_speed, B2400_speed, B4800_speed, B9600_speed, B19200_speed, B38400_speed, B57600_speed, B115200_speed, B10472_speed } |
Serial speed control type. More... | |
Public Member Functions | |
virtual | ~LOW_portSerial_Linux () |
Destructor. | |
virtual void | tty_configure (const flowControl_t inFlowCtl, const dataBitsSite_t inDataBits, const parity_t inParity, const stopBits_t inStopBits, const speed_t inSpeed) |
Configure the serial port. | |
virtual void | tty_flush (const bool inFlushIn=true, const bool inFlushOut=true) |
Flushs serial input and/or output buffers. | |
virtual void | tty_break () |
Sends break signal. | |
virtual uint8_t | tty_readByte (const bool inTrashExtraReply=false, const unsigned int inSecTimeout=defaultTimeout) |
Reads on byte from serial port. | |
virtual void | tty_read (byteVec_t &outReadBytes, const bool inTrashExtraReply=false, const unsigned int inSecTimeout=defaultTimeout) |
Reads multiple bytes from serial port. | |
virtual void | tty_write (const uint8_t inWriteByte) |
Writes one byte to serial port. | |
virtual void | tty_write (const byteVec_t &inWriteBytes) |
Writes multiple bytes to serial port. | |
class_DERIVE_FROM_EXCEPTION (portSerial_error, LOW_exception) | |
Exception base class for all exceptions thrown by LOW_portSerial. | |
Static Public Attributes | |
const unsigned int | defaultTimeout = 5 |
Protected Member Functions | |
LOW_portSerial_Linux (const LOW_portSerialFactory::portSpecifier_t inSerialPort) | |
Constructor. | |
Private Attributes | |
const std::string | serialPortPath |
Path to device file. | |
int | serialFD |
File descriptor of serial port. | |
Friends | |
class | LOW_portSerialFactory |
To allow construction. |
This class is thread-safe.
Definition at line 38 of file LOW_portSerial_Linux.h.
|
Number of data bits type.
Definition at line 79 of file LOW_portSerial.h. |
|
Serial flow control type.
Definition at line 76 of file LOW_portSerial.h. |
|
Parity control type.
Definition at line 82 of file LOW_portSerial.h. |
|
Serial speed control type.
Definition at line 88 of file LOW_portSerial.h. |
|
Number of stop bits type.
Definition at line 85 of file LOW_portSerial.h. |
|
Destructor.
Definition at line 56 of file LOW_portSerial_Linux.cpp. References serialFD. |
|
Constructor. Not publicly constructable. Use LOW_portSerialFactory.
Definition at line 46 of file LOW_portSerial_Linux.cpp. References serialFD, and serialPortPath. |
|
Exception base class for all exceptions thrown by LOW_portSerial.
|
|
Sends break signal. Abstract method to be implemented by derived class. Implements LOW_portSerial. Definition at line 234 of file LOW_portSerial_Linux.cpp. References __LOW_SYNCHRONIZE_METHOD_WRITE__, and serialFD. |
|
|
Flushs serial input and/or output buffers. Abstract method to be implemented by derived class.
Implements LOW_portSerial. Definition at line 218 of file LOW_portSerial_Linux.cpp. References __LOW_SYNCHRONIZE_METHOD_WRITE__, and serialFD. |
|
Reads multiple bytes from serial port. The desired number of bytes to read is specified by the preset length of the vector parameter. Abstract method to be implemented by derived class.
Implements LOW_portSerial. Definition at line 295 of file LOW_portSerial_Linux.cpp. References __LOW_SYNCHRONIZE_METHOD_WRITE__, and tty_readByte(). |
|
Reads on byte from serial port. Abstract method to be implemented by derived class.
Implements LOW_portSerial. Definition at line 242 of file LOW_portSerial_Linux.cpp. References __LOW_SYNCHRONIZE_METHOD_WRITE_WEAK__, LOW_helper_msglog::portSerial_dl, LOW_helper_msglog::printDebug(), and serialFD. Referenced by tty_read(). |
|
Writes multiple bytes to serial port. The desired number of bytes to write is specified by the preset length of the vector parameter. Abstract method to be implemented by derived class.
Implements LOW_portSerial. Definition at line 322 of file LOW_portSerial_Linux.cpp. References __LOW_SYNCHRONIZE_METHOD_WRITE__, and serialFD. |
|
Writes one byte to serial port. Abstract method to be implemented by derived class.
Implements LOW_portSerial. Definition at line 305 of file LOW_portSerial_Linux.cpp. References __LOW_SYNCHRONIZE_METHOD_WRITE__, LOW_helper_msglog::portSerial_dl, LOW_helper_msglog::printDebug(), and serialFD. |
|
To allow construction.
Definition at line 78 of file LOW_portSerial_Linux.h. |
|
Definition at line 67 of file LOW_portSerial.h. |
|
File descriptor of serial port.
Definition at line 113 of file LOW_portSerial_Linux.h. Referenced by LOW_portSerial_Linux(), tty_break(), tty_configure(), tty_flush(), tty_readByte(), tty_write(), and ~LOW_portSerial_Linux(). |
|
Path to device file.
Definition at line 112 of file LOW_portSerial_Linux.h. Referenced by LOW_portSerial_Linux(). |