kernelv_get_error_message_string()

Prototype

KERNELV_RETURN

kernelv_get_error_message_string(char * string,
                                         unsigned long int *length);

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

string

char*

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

length

unsigned long*

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.

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