FUNCTION_BLOCK TCP_Server EXTENDS CBM.LTrig IMPLEMENTS ITCPServer
Sets up a server over the ip and port specified in ipAddr and uiPort. A server can handle several connections. The output handle hServer of these function block can be used to establish a connection via TCP_Connection.
The output``xDone`` has no meaning.
InOut:
|
Scope
|
Name
|
Type
|
Initial
|
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
|
ipAddr
|
IP_ADDR
|
STRUCT(sAddr := '0.0.0.0')
|
|
|
uiPort
|
UINT
|
|
|
|
Output
|
eError
|
ERROR
|
|
|
|
hServer
|
CAA.HANDLE
|
|
|
|
|