Back to Adaptive Vision Library website

You are here: Start » Function Reference » Serial Port » SerialPort_ReadChar


Header: STD.h
Namespace: avl
Module: FoundationLite

Reads single character from serial port.


void avl::SerialPort_ReadChar
	SerialPortState& ioState,
	int inPortId,
	atl::Conditional<atl::String>& outCharacter


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
outCharacter Conditional<String>& Conditionally returns string with one received character.


Filter reads single byte from input buffer and return data as a single character.

Filter perform non-blocking reading form buffer and will return NIL when no data was read.


Using the SerialPort_Config filter is necessary before using the SerialPort_ReadChar filter.

Filter SerialPort_Config does not guarantee that input buffer will be empty.


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

See Also