Back to Aurora Vision Library Lite website

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

SerialPort_WriteChar


Header: STD.h
Namespace: avl

Writes single ASCII character to device.

Syntax

C++
Python
 
void avl::SerialPort_WriteChar
(
	SerialPortState& ioState,
	int inPortId,
	const atl::String& inCharacter
)

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
Input value inCharacter const String& Single character to send

Description

Filter writes single character inCharacter into input buffer. Input inCharacter must contains only single valid ASCII character.

Remarks

Using the SerialPort_Config filter is necessary before using the SerialPort_WriteChar filter.
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 writing to serial port without previous configuration will cause "SerialPort not initialized" error.

List of possible exceptions:

Error type Description
DomainError Length inCharacter is greater than 1 in SerialPort_WriteChar.
DomainError SerialPort_WriteChar can send only ASCII characters.
DomainError Value inCharacter is empty in SerialPort_WriteChar.

See Also