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
xEnable
BOOL
TRUE
: Activates the defined operationFALSE
: Aborts/resets the defined operationLConC
Output
xBusy
BOOL
TRUE
: Operation is runningLConC
xError
BOOL
TRUE
: Error condition reachedLConC
Input
itfWebSocketClient
Reference to the WebSocketClient
pData
__XWORD
Pointer to the payload data
udiSize
UDINT
Maximum size of the payload
Output
xReady
BOOL
TRUE if data received
udiCount
UDINT
Size of the received data
eFrameType
Type of the payload
xIsFinalFragment
BOOL
FALSE 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.