TCP_Connection (FB)

FUNCTION_BLOCK PUBLIC FINAL TCP_Connection EXTENDS LCon IMPLEMENTS IConnection, IConnection_Internal

Encapsulates the connection between client and server

The TCP_Server function block will activate a related TCP_Connection function block,

if a client has successfully connected to its server.

itfConnection can be used as input itfConnection for function blocks TCP_Write, TCP_Writer, TCP_Read and TCP_Reader.

InOut:

Scope

Name

Type

Comment

Inherited from

Input

xEnable

BOOL

TRUE: Activates the defined operation FALSE: Aborts/resets the defined operation

LCon

Output

xDone

BOOL

Ready condition reached

LCon

xBusy

BOOL

TRUE: Operation is running

LCon

xError

BOOL

TRUE: Error condition reached

LCon

eErrorID

ERROR

LCon

Input

itfServer

IServer

The related TCP_Server function block

(One server function block can manage more than one connection function block).

Output

xActive

BOOL

TRUE if a Connection is established

itfConnection

IConnection

The established connection to the related client

Valid, as long xActive = TRUE