GetPayload
Syntax
METHOD GetPayload : BOOL
VAR_INPUT
pPayload : PVOID; // payload buffer
nPayloadSize : UDINT; // maximum size of payload buffer in bytes
bSetNullTermination: BOOL; // The publisher specifies the kind of payload. If it is a string, it could be null terminated or not. Setting this input to TRUE will force a null termination. One more byte is required for that.
END_VAR
Return value
Name | Type | Description |
---|---|---|
GetPayload | BOOL |
|
Inputs
Name | Type | Description |
---|---|---|
pPayload | PVOID | The memory address for the buffer into which the payload is to be copied is specified here. |
nPayloadSize | UDINT | The maximum available buffer size (in bytes) is specified here. |
bSetNullTermination | BOOL | If the payload type requires null termination (string), this can be implemented during the copy process. This is not necessary if the message source (publisher) has already implemented a null termination and this was taken into account in the payload size specification. In many cases no reliable information is available. |