GetRemainingData
This method can be used to read the remaining data in JSON format after the validation. This includes records which could not be assigned to the PLC structure, for example.
Syntax
METHOD GetRemainingData : BOOL
VAR_INPUT
pData : POINTER TO BYTE;
cbData : UDINT;
cbDocument : UDINT;
bDataRelease : BOOL;
END_VAR
Inputs
Name | Type | Description |
---|---|---|
pData | POINTER TO BYTE | Indicates the address of the string array into which the records are to be written. |
cbData | UDINT | Indicates the size of the string array in bytes. |
cbDocument | UDINT | Specifies the length of the string in the array. |
bDataRelease | BOOL | Releases the cached data. |
Return value
Name | Type | Description |
---|---|---|
GetRemainingData | BOOL | Displays the status of the method. Returns TRUE as soon as the method execution is finished, even in the event of an error. |
Sample:
VAR CONSTANT
cDocumentSize : UDINT := 1000;
END_VAR
VAR
fbNoSqlValidation : FB_NoSQLValidation(sNetID := '', tTimeout := t#15S);
aRemainingData : ARRAY[0..1000] OF STRING(cDocumentSize);
END_VAR
IF fbNoSqlValidation.GetRemainingData(
pData:= ADR(aRemainingData),
cbData:= SIZEOF(aRemainingData),
cbDocument:= cDocumentSize,
bDataRelease:= TRUE)
THEN
IF fbNoSqlValidation.bError THEN
TcMessage := fbNoSqlValidation.ipTcResult;
nstate := 255;
ELSE
nstate := nstate+1;
END_IF
END_IF