kernelv_get_error_message_values()

Prototype

KERNELV_RETURN

kernelv_get_error_message_string (KERNELV_ERROR_VALUE * p_values,
                                                          unsigned long int *length);

Description

Returns the values output in an error message.

Before using this function, a check must first be made whether there is a current error by calling the function kernelv_read_error().

The values are returned in an array of structures of type KERNELV_ERROR_VALUE. The array size is KERNELV_ERROR_VALUE_COUNT. Specify the size of the memory areas for the error message values in the ‘length’ call parameter.

If the return array does not fit in the memory provided, the return value ERR_CNC_RET_MEMORY is output and ‘length’ contains the memory size in bytes required for the return.

Parameter

Name

Type

Meaning

p_values

KERNELV_ERROR_
VALUE*

Pointer to string for error message values. The calling application must provide the memory.

length

unsigned long*

Size of memory for the error message values. If the memory provided is not large enough, the required memory size in bytes is returned; otherwise the number of bytes is returned.

Return values

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 'length’ parameter.