SendData (Method)

Overview

Type:

Method

Available as of:

V1.0.0.0

Description

This method is used to initiate the data transmission to the connected server. Independent from the connection status, the send request is stored in an internal send queue. The queue is processed when the client is connected to the server. To remove a send request from this queue, use the method AbortDataTransmission().

The return value is of type ET_Result and indicates the result of the execution. If the data transmission was initiated successfully the return value indicates Ok.

Interface

Inputs Data Type Description

i_pbyData

POINTER TO BYTE

Reference to the data to be transmitted

i_udiDataSize

UDINT

Size of the data to be sent in bytes.

i_ifStatus

IF_CallbackStatusSend

Interface to retrieve the status of the data transmission.

NOTE: To prevent access violation caused by invalid pointer access (out of bounds) to the memory, use the arithmetic operator SIZEOF in conjunction with the targeted buffer to limit the value for i_udiDataSize.
NOTE: The function block accesses the data to send through a pointer address. To prevent inconsistency within the transmitted data, do not modify the data while the transmission is in progress. Use the interface assigned to i_ifStatus to retrieve the status of the data transmission.