Back to FabImage Library website
You are here: Start » Function Reference » System » Serial Port » SerialPort_WriteBuffer
Header: | STD.h |
---|---|
Namespace: | fil |
Module: | FoundationLite |
Writes raw binary data from a byte buffer to serial port.
Syntax
void fil::SerialPort_WriteBuffer ( SerialPortState& ioState, int inPortId, const fil::ByteBuffer& inBuffer )
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 |
![]() |
inBuffer | const ByteBuffer& | Buffer containing raw data to write |
Examples
Filter writes raw data block from the inBuffer input to the serial port transmission output buffer.
Data buffer for the inBuffer input can be prepared using filters from the Binary Data category.
Remarks
Using the SerialPort_Config filter is necessary before using the SerialPort_WriteBuffer filter.
Errors
Using filters writing to serial port without previous configuration will cause "SerialPort not initialized" error.
See Also
- SerialPort_Config – Configures the serial port.
- SerialPort_WriteByte – Writes one character in binary mode to serial port.
- SerialPort_WriteString – Writes string characters to serial port.
- SerialPort_WriteChar – Writes single ASCII character to device.