Back to FabImage Library website

You are here: Start » Function Reference » System » Modbus TCP » ModbusTCP_SendBuffer

ModbusTCP_SendBuffer


Header: STD.h
Namespace: fil
Module: FoundationLite

Sends data using Modbus TCP frame format.

Syntax

void fil::ModbusTCP_SendBuffer
(
	const fil::SocketId& inSocket,
	const ftl::Optional<int>& inTimeout,
	int inUnitID,
	int inFunctionCode,
	const fil::ByteBuffer& inBuffer,
	fil::ByteBuffer& outResponse
)

Parameters

Name Type Range Default Description
Input value
inSocket const SocketId& Connected socket ID on port 502.
Input value
inTimeout const Optional<int>& 10 - NIL Timeout in milliseconds, block if not specified.
Input value
inUnitID int 0 - 255 1 Default is 1
Input value
inFunctionCode int 0 - 255 1 Function code
Input value
inBuffer const ByteBuffer& Data to send
Output value
outResponse ByteBuffer& Response data