kernelv_get_error_message_string()

Prototype

[ret, err_msg, err_length]

get_error_id(vnck: ctypes.CDLL);

Description

Returns the formatted string of an error message previously read by kernelv_read_error() in the form of a string. The returned string is identical to the string returned by the function kernelv_get_error().

When called, the ‘string’ parameter transfers a pointer to the memory for the return string. The size of this memory area is contained in ‘length’. If the memory provided is sufficient to return the string, the length of the returned string is returned in ‘length’.

If the memory provided by the calling application is too small for the string to be returned, the return value ERR_CNC_RET_MEMORY is returned In this case, the 'length' parameter contains the size in bytes required to return the string.

Parameter

Name

Type

Meaning

vnck

ctypes.CDLL

Instance of the loaded KernelV DLL.

Return values

Name

Type

Meaning

ret

KERNELV_RETURN (int)

Return value of the native integrated C function.

err_msg

str

Error message text

err_length

int (unsigned)

Size of memory for the error message string. No string is returned if the error message string generated by the simulation CNC is longer than the memory provided. Either the length of the returned string is returned or the size of the memory area required for the return.

KERNELV_RETURN

Symbol

Value

Meaning

RET_FINISHED

0

The function was executed without error

ERR_CNC_NOT_INIT

-3

The simulation CNC kernel was not yet initialised.

ERR_CNC_RET_MEMORY

-4

The return value(s) does/do not fit into the memory provided. The number of bytes required is returned in the 'returnSize’ parameter.