WebSocketRead (FB)ΒΆ
FUNCTION_BLOCK PUBLIC FINAL WebSocketRead EXTENDS CBML.LConC
Function block to read incoming messages using the Common Behavior Model (e.g. for CFC applications).
Bemerkung
This function block OR the Write method of the WebSocketClient MUST be called in each cycle
because the method also handles other requests in background (ping, pong etc.).
Set xEnable to TRUE if xActive of the WebSocketClient is TRUE.
- InOut:
Scope
Name
Type
Comment
Inherited from
Input
xEnableBOOLTRUE: Activates the defined operationFALSE: Aborts/resets the defined operationLConC
Output
xBusyBOOLTRUE: Operation is runningLConC
xErrorBOOLTRUE: Error condition reachedLConC
Input
itfWebSocketClientReference to the WebSocketClient
pData__XWORDPointer to the payload data
udiSizeUDINTMaximum size of the payload
Output
xReadyBOOLTRUE if data received
udiCountUDINTSize of the received data
eFrameTypeType of the payload
xIsFinalFragmentBOOLFALSE if the payload is incomplete and is sent via multiple packets. TRUE, if the payload is complete or if the payload was incomplete and this packet is the last packet of a message.