Definition at line 40 of file sl_serial_channel.cpp.
◆ SerialPortChannel()
sl::SerialPortChannel::SerialPortChannel |
( |
const std::string & |
device, |
|
|
int |
baudrate |
|
) |
| |
|
inline |
◆ ~SerialPortChannel()
sl::SerialPortChannel::~SerialPortChannel |
( |
| ) |
|
|
inline |
◆ bind()
bool sl::SerialPortChannel::bind |
( |
const std::string & |
device, |
|
|
sl_s32 |
baudrate |
|
) |
| |
|
inline |
◆ clearReadCache()
void sl::SerialPortChannel::clearReadCache |
( |
| ) |
|
|
inlinevirtual |
◆ close()
void sl::SerialPortChannel::close |
( |
| ) |
|
|
inlinevirtual |
◆ flush()
void sl::SerialPortChannel::flush |
( |
| ) |
|
|
inlinevirtual |
◆ getChannelType()
int sl::SerialPortChannel::getChannelType |
( |
| ) |
|
|
inlinevirtual |
◆ open()
bool sl::SerialPortChannel::open |
( |
| ) |
|
|
inlinevirtual |
◆ read()
int sl::SerialPortChannel::read |
( |
void * |
buffer, |
|
|
size_t |
size |
|
) |
| |
|
inlinevirtual |
Read data from the chanel
- Parameters
-
buffer | The buffer to receive data |
size | The size of the read buffer |
- Returns
- Bytes read (negative for read failure)
Implements sl::IChannel.
Definition at line 112 of file sl_serial_channel.cpp.
◆ setDTR()
void sl::SerialPortChannel::setDTR |
( |
bool |
dtr | ) |
|
|
inlinevirtual |
◆ waitForData()
bool sl::SerialPortChannel::waitForData |
( |
size_t |
size, |
|
|
sl_u32 |
timeoutInMs, |
|
|
size_t * |
actualReady |
|
) |
| |
|
inlinevirtual |
Wait for some data
- Parameters
-
size | Bytes to wait |
timeoutInMs | Wait timeout (in microseconds, -1 for forever) |
actualReady | [out] actual ready bytes |
- Returns
- true for data ready
Implements sl::IChannel.
Definition at line 101 of file sl_serial_channel.cpp.
◆ waitForDataExt()
sl_result sl::SerialPortChannel::waitForDataExt |
( |
size_t & |
size_hint, |
|
|
sl_u32 |
timeoutInMs |
|
) |
| |
|
inlinevirtual |
Wait for some data
- Parameters
-
size_hint | Byte count may available to retrieve without beening blocked |
timeoutInMs | Wait timeout (in microseconds, -1 for forever) |
- Returns
- RESULT_OK if there is data available for receiving RESULT_OPERATION_TIMEOUT if the given timeout duration is exceed RESULT_OPERATION_FAIL if there is something wrong with the channel
Implements sl::IChannel.
Definition at line 79 of file sl_serial_channel.cpp.
◆ write()
int sl::SerialPortChannel::write |
( |
const void * |
data, |
|
|
size_t |
size |
|
) |
| |
|
inlinevirtual |
Send data to remote endpoint
- Parameters
-
data | The data buffer |
size | The size of data buffer (in bytes) |
- Returns
- Bytes written (negative for write failure)
Implements sl::IChannel.
Definition at line 107 of file sl_serial_channel.cpp.
◆ _baudrate
int sl::SerialPortChannel::_baudrate |
|
private |
◆ _closePending
bool sl::SerialPortChannel::_closePending |
|
private |
◆ _device
std::string sl::SerialPortChannel::_device |
|
private |
◆ _rxtxSerial
The documentation for this class was generated from the following file: