Skip to content
Start free evaluation

pdcomm_opcua_last_error_copy

Function

Copies the detail text of the last failed call on this thread.

int32_t pdcomm_opcua_last_error_copy(uint8_t *output, size_t capacity, size_t *required)

Declared in: #include <pdcomm/opcua/pdcomm_opcua.h>

Every OPC UA function except pdcomm_opcua_abi_version() and this one replaces the text, and a successful call leaves it empty. This query preserves it. The text is English UTF-8 without a terminator, for logs and users only: do not base decisions on its exact wording.

Parameters

NameDescription
outputDestination, or null when capacity is zero.
capacitySize of output in bytes.
requiredReceives the complete text size in bytes; must not be null.

Returns

#PDCOMM_OPCUA_OK, #PDCOMM_OPCUA_BUFFER_TOO_SMALL (the output is unchanged) or #PDCOMM_OPCUA_INVALID_INPUT.

Notes

  • The text is local to the calling operating-system thread.