kernelv_ch_get_filename()

Prototype

KERNELV_RETURN

kernelv_ch_get_filename (unsigned long int chanIndex,
                                          char *filename,
                                          unsigned short int nameLength,
                                          unsigned short int* returnLength);

Description

Reads the file name of the program currently active in the channel.

Parameter

Name

Type

Meaning

chanIndex

unsigned long

Channel index of the channel whose file name is to be read.

filename

char*

Pointer to the memory location for the file name.

nameLength

unsigned short

Length of the memory area for the file name.

returnLength

unsigned short*

Pointer to the value to which the actually returned number of bytes is to be written. The number of characters in the file name +1 is returned.

Return values

Symbol

Value

Meaning

RET_FINISHED

0

The function was executed without error.

ERR_INVALID_CHAN

-1

The transferred channel index is higher than the number of configured channels -1.

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. In this case, the required memory including the terminating 0 are returned in the returnLength parameter.