Back to Aurora Vision Library Lite website
You are here: Start » System » Serial Port » SerialPort_ReadString
![](../../img/icon/SerialPort.png)
SerialPort_ReadString
Header: | STD.h |
---|---|
Namespace: | avl |
Reads string characters from serial port.
Syntax
void avl::SerialPort_ReadString ( SerialPortState& ioState, int inPortId, atl::Conditional<atl::String>& outString )
Parameters
Name | Type | Range | Default | Description | |
---|---|---|---|---|---|
![]() |
ioState | SerialPortState& | Object used to maintain state of the function. | ||
![]() |
inPortId | int | 0 - 7 | 0 | Identifies open port instance when working with multiple serial ports |
![]() |
outString | Conditional<String>& | Conditionally returns string with concatenated all characters available in input buffer. |
Description
Filter reads all data from input and returns it as string. Result string will be read in UTF8 format.
Filter perform non-blocking reading form buffer and will return NIL when no data was read.
Remarks
Using the SerialPort_Config filter is necessary before using the SerialPort_ReadString filter.
Filter SerialPort_Config does not guarantee that input buffer will be empty.
Errors
Using filters reading from serial port without previous configuration will cause "SerialPort not initialized" error.
See Also
- SerialPort_Config – Configures the serial port.
- SerialPort_ReadByte – Reads one character in binary mode from serial port.
- SerialPort_ReadBuffer – Reads raw binary data from serial port.
- SerialPort_ReadChar – Reads single character from serial port.
- SerialPort_ReadStringUntil – Reads the string from the serial port to encounter a string delimiter.