#include <ISSerialPort.h>
Definition at line 25 of file ISSerialPort.h.
◆ cISSerialPort() [1/2]
◆ cISSerialPort() [2/2]
Constructor
- Parameters
-
serial | inner serial port implementation or NULL for default, if not NULL, it will be copied |
Definition at line 17 of file ISSerialPort.cpp.
◆ ~cISSerialPort()
cISSerialPort::~cISSerialPort |
( |
| ) |
|
|
virtual |
◆ Close()
int cISSerialPort::Close |
( |
| ) |
|
|
virtual |
Close the serial port
- Returns
- 0 if success, otherwise an error code
Reimplemented from cISStream.
Definition at line 42 of file ISSerialPort.cpp.
◆ GetComPorts()
void cISSerialPort::GetComPorts |
( |
vector< string > & |
ports | ) |
|
|
static |
Gets a list of com names of all connected usb ports
- Parameters
-
ports | cleared and then receives the name of each connected usb port |
Definition at line 57 of file ISSerialPort.cpp.
◆ IsOpen()
bool cISSerialPort::IsOpen |
( |
| ) |
|
|
inline |
Checks if the serial port is open
- Returns
- true if open, false otherwise
Definition at line 60 of file ISSerialPort.h.
◆ Open()
Open the serial port
- Parameters
-
portName | the port name to open |
baudRate | the baud rate to open at |
timeout | read timeout, 0 for none |
blocking | whether the serial port blocks until data is read or written |
- Returns
- true if success, false if failure
Definition at line 35 of file ISSerialPort.cpp.
◆ Read()
int cISSerialPort::Read |
( |
void * |
data, |
|
|
int |
dataLength |
|
) |
| |
|
virtual |
Read data from the serial port
- Parameters
-
data | the buffer to read data into |
dataLength | the number of bytes available in data |
- Returns
- the number of bytes read or less than 0 if error
Reimplemented from cISStream.
Definition at line 47 of file ISSerialPort.cpp.
◆ Write()
int cISSerialPort::Write |
( |
const void * |
data, |
|
|
int |
dataLength |
|
) |
| |
|
virtual |
Write data to the serial port
- Parameters
-
data | the data to write |
dataLength | the number of bytes to write |
- Returns
- the number of bytes written or less than 0 if error
Reimplemented from cISStream.
Definition at line 52 of file ISSerialPort.cpp.
◆ m_blocking
bool cISSerialPort::m_blocking |
|
private |
◆ m_serial
◆ m_timeout
int cISSerialPort::m_timeout |
|
private |
The documentation for this class was generated from the following files: