Back to Aurora Vision Library Lite website

You are here: Start » System » Serial Port » SerialPort_ReadByte

SerialPort_ReadByte


Header: STD.h
Namespace: avl

Reads one character in binary mode from serial port.

Syntax

C++
Python
 
void avl::SerialPort_ReadByte
(
	SerialPortState& ioState,
	int inPortId,
	atl::Conditional<int>& outData,
	bool& outOverflowOccurred
)

Parameters

Name Type Range Default Description
Input will be modified ioState SerialPortState& Object used to maintain state of the function.
Input value inPortId int 0 - 7 0 Identifies open port instance when working with multiple serial ports
Output value outData Conditional<int>& Conditionally returns received character value, when one is available.
Output value outOverflowOccurred bool& True when the internal read buffer reached its maximum size and oldest data was dropped since the last call.

Description

Filter reads single byte from input buffer.

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_ReadByte filter.

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

Warning:All tools applied to a specific device or file should be managed within a single thread to ensure centralized tracking, traceability, and consistency throughout the process.

Errors

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

See Also