You are here: Start » Filter Reference » System » Serial Port » SerialPort_ReadBuffer
Module: | FoundationLite |
---|
Reads raw binary data from serial port.
Name | Type | Range | Description | |
---|---|---|---|---|
![]() |
inPortId | Integer | 0 - 7 | Identifies open port instance when working with multiple serial ports |
![]() |
outBuffer | ByteBuffer? | Conditionally returns non empty byte buffer with raw data, when any data available. |
Description
Filter reads all data from the serial port transmission input buffer.
Filter perform non-blocking reading form buffer and will return NIL when no data was read.
Data buffer returned on the outBuffer output can be processed using filters from the Binary Data category.
Examples
Remarks
Using the SerialPort_Config filter is necessary before using the SerialPort_ReadBuffer filter.
Filter SerialPort_Config does not guarantee that input buffer will be empty.
Errors
This filter can throw an exception to report error. Read how to deal with errors in Error Handling.
Using filters reading from serial port without previous configuration will cause "SerialPort not initialized" error.
Complexity Level
This filter is available on Basic Complexity Level.
Filter Group
This filter is member of SerialPort_Read filter group.
See Also
- SerialPort_Config – Configures the serial port.
- SerialPort_ReadByte – Reads one character in binary mode from serial port.
- SerialPort_ReadChar – Reads single character from serial port.
- SerialPort_ReadString – Reads string characters from serial port.
- SerialPort_ReadStringUntil – Reads the string from the serial port to encounter a string delimiter.