Back to Adaptive Vision Library website

You are here: Start » Function Reference » System » Serial Port » SerialPort_ReadBuffer

SerialPort_ReadBuffer


Header: STD.h
Namespace: avl
Module: FoundationLite

Reads raw binary data from serial port.

Syntax

void avl::SerialPort_ReadBuffer
(
	SerialPortState& ioState,
	int inPortId,
	atl::Conditional<avl::ByteBuffer>& outBuffer
)

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
outBuffer Conditional<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.

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

Using filters reading from serial port without previous configuration will cause "SerialPort not initialized" error.

See Also