Back to Adaptive Vision Library website

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


Write single ASCII character to device.


void avl::SerialPort_WriteChar
	SerialPortState& ioState,
	int inPortId,
	const atl::String& inCharacter


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


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


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


Using filters writing to serial port without previous configuration will cause "SerialPort not initialized" error.

Possible exceptions:

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

See Also