kernelv_ch_get_cont_visu_data()
Prototype
[ret, buffer_length, data] | ch_get_cont_visu_data (vnck: ctypes.CDLL, chan_index: int, buffer_size: int = 296); |
Description
Reads the contour visualisation of a channel. The format of the returned data is set by the parameter P-STUP-00039. A structure of type CONTOUR_VISU is returned followed by structures of type COUNTOUR_VISU_DATA_V0 … _V8.
If the memory provided by the calling application is not sufficient to return the structure CONTOUR_VISU, ERR_CNC_RET_MEMORY is returned and the minimum size of the required memory area is returned in retLength.
parse_contour_visu(data: bytes) can be used for data assignment.
Parameter
Name | Type | Meaning |
vnck | ctypes.CDLL | Instance of the loaded KernelV DLL. |
chan_index | int (unsigned) | Channel index of the channel from which the variable is to be read. |
buffer_size | int (unsigned) | Memory size in bytes. Default = 296. |
Return values
Name | Type | Meaning |
ret | KERNELV_RETURN (int) | Return value of the native integrated C function. |
buffer_length | int (unsigned) | Length of the return buffer in bytes.. |
data | bytes | Contour visualisation data in the form of bytes. |
KERNELV_RETURN
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. The number of bytes required is returned in the returnSize parameter. |