WebSocketWrite (FB)¶
FUNCTION_BLOCK PUBLIC FINAL WebSocketWrite EXTENDS CBML.ETrigTo
Function block to send messages to WebSocket server using the Common Behavior Model (e.g. for CFC applications).
- InOut:
Scope
Name
Type
Initial
Comment
Inherited from
Input
xExecuteBOOLRising edge: Starts defined operationFALSE: Resets the defined operation after ready condition was reachedETrigTo
udiTimeOutUDINTMax. operating time for executing [µs], 0: No operating time limit
ETrigTo
Output
xDoneBOOLReady condition reached
ETrigTo
xBusyBOOLOperation is running
ETrigTo
xErrorBOOLError condition reached
ETrigTo
Input
itfWebSocketClientReference to the WebSocketClient
pData__XWORDPointer to the payload data
udiSizeUDINTSize of the payload
eFrameTypeFRAME_TYPE.BINARY
Type of the payload data
Output
udiCountUDINTNumber of sent bytes.
Bemerkung
It can take more than one cycles to send a message if the payload is greater than the maximum buffer size.