Wrapper class for a serial port.
More...
#include <UART.h>
|
|
| UART () |
| | Constructor.
|
| |
| | UART (const std::string &devfile, int baud) |
| | Connects to a serial port. More...
|
| |
| bool | Connect (const std::string &devfile, int baud, bool dtrEnable=false) |
| | Connects to a serial port. More...
|
| |
|
void | Close () |
| | Disconnects from the serial port.
|
| |
|
virtual | ~UART () |
| | Destructor.
|
| |
|
bool | Read (unsigned char *data, int len) |
| |
|
bool | Write (const unsigned char *data, int len) |
| |
|
FILE_DESCRIPTOR | GetHandle () |
| |
|
bool | IsValid () const |
| |
|
|
bool | m_networked |
| |
|
FILE_DESCRIPTOR | m_fd |
| |
|
Socket | m_socket |
| |
Wrapper class for a serial port.
◆ UART()
| UART::UART |
( |
const std::string & |
devfile, |
|
|
int |
baud |
|
) |
| |
Connects to a serial port.
- Exceptions
-
- Parameters
-
| devfile | The device file |
| baud | Baud rate to use (in bits per second) |
◆ Connect()
| bool UART::Connect |
( |
const std::string & |
devfile, |
|
|
int |
baud, |
|
|
bool |
dtrEnable = false |
|
) |
| |
Connects to a serial port.
- Exceptions
-
- Parameters
-
| devfile | The device file |
| baud | Baud rate to use (in bits per second) |
| dtrEnable | True if DTR line should be enabled (needed by some devices like the NanoVNA to communicate) |
The documentation for this class was generated from the following files: