TCP_ReadBuffer (FB)

FUNCTION_BLOCK TCP_ReadBuffer EXTENDS CBM.LTrig

Like TCP_Read this function block serves to read data from the previously established connection given in hConnection. As long as xEnable is TRUE the handle of the connection is valid. The function block returns the handle of the buffer containing the data. If xReady is TRUE, data has been read successfully and the handle of the buffer is valid. The buffer is passed on and not copied like at TCP_Read.

InOut:

Scope

Name

Type

Comment

Inherited from

Input

xEnable

BOOL

TRUE: Action starts

FALSE: Action stops, outputs xDone, xBusy, xError are resetted

LTrig

Output

xDone

BOOL

TRUE: Action successfully completed

LTrig

xBusy

BOOL

TRUE: Function block active

LTrig

xError

BOOL

TRUE: Error occurred, function block aborts action

FALSE: No error

LTrig

Input

hConnection

CAA.HANDLE

Output

eError

ERROR

xReady

BOOL

hBuffer

CAA.HANDLE