#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 Methods | |
LOW_portSerial_Linux (const string inSerialPort) | |
Constructor. More... | |
virtual | ~LOW_portSerial_Linux () |
Destructor. More... | |
Protected Methods | |
void | tty_configure (const flowControl_t inFlowCtl, const dataBitsSite_t inDataBits, const parity_t inParity, const stopBits_t inStopBits, const speed_t inSpeed) const |
Configure the serial port. More... | |
void | tty_flush (const bool inFlushIn=true, const bool inFlushOut=true) const |
Flushs serial input and/or output buffers. More... | |
void | tty_break () const |
Sends break signal. More... | |
uint8_t | tty_readByte (const bool inTrashExtraReply=false) const |
Reads on byte from serial port. More... | |
void | tty_read (byteVec_t &outReadBytes, const bool inTrashExtraReply=false) const |
Reads multiple bytes from serial port. More... | |
void | tty_write (const uint8_t inWriteByte) const |
Writes one byte to serial port. More... | |
void | tty_write (const byteVec_t &inWriteBytes) const |
Writes multiple bytes to serial port. More... | |
Private Attributes | |
const string | serialPortPath |
Path to device file. More... | |
int | serialFD |
File descriptor of serial port. More... | |
Static Private Attributes | |
const int | serialTimeout = 5 |
Timeout of serial operations in seconds. More... |
Definition at line 34 of file LOW_portSerial_Linux.h.
|
Number of data bits type.
Definition at line 69 of file LOW_portSerial.h. |
|
Serial flow control type.
Definition at line 66 of file LOW_portSerial.h. |
|
Parity control type.
Definition at line 72 of file LOW_portSerial.h. |
|
Serial speed control type.
Definition at line 78 of file LOW_portSerial.h. |
|
Number of stop bits type.
Definition at line 75 of file LOW_portSerial.h. |
|
Constructor.
Definition at line 43 of file LOW_portSerial_Linux.cpp. References serialFD, and serialPortPath. |
|
Destructor.
Definition at line 53 of file LOW_portSerial_Linux.cpp. References serialFD. |
|
Sends break signal. Abstract method to be implemented by derived class. Reimplemented from LOW_portSerial. Definition at line 296 of file LOW_portSerial_Linux.cpp. References serialFD. |
|
|
Flushs serial input and/or output buffers. Abstract method to be implemented by derived class.
Reimplemented from LOW_portSerial. Definition at line 282 of file LOW_portSerial_Linux.cpp. References 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.
Reimplemented from LOW_portSerial. Definition at line 353 of file LOW_portSerial_Linux.cpp. References byteVec_t, and tty_readByte(). |
|
Reads on byte from serial port. Abstract method to be implemented by derived class.
Reimplemented from LOW_portSerial. Definition at line 302 of file LOW_portSerial_Linux.cpp. References LOW_helper_msglog::portSerial_dl, LOW_helper_msglog::printDebug(), serialFD, and serialTimeout. 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.
Reimplemented from LOW_portSerial. Definition at line 376 of file LOW_portSerial_Linux.cpp. References byteVec_t, LOW_helper_msglog::portSerial_dl, LOW_helper_msglog::printDebug(), and serialFD. |
|
Writes one byte to serial port. Abstract method to be implemented by derived class.
Reimplemented from LOW_portSerial. Definition at line 361 of file LOW_portSerial_Linux.cpp. References LOW_helper_msglog::portSerial_dl, LOW_helper_msglog::printDebug(), and serialFD. |
|
File descriptor of serial port.
Definition at line 98 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 97 of file LOW_portSerial_Linux.h. Referenced by LOW_portSerial_Linux(). |
|
Timeout of serial operations in seconds.
Definition at line 89 of file LOW_portSerial_Linux.h. Referenced by tty_readByte(). |