DioGetErrorString


Function

Retrieves the error string from error code.

Format

Ret = DioGetErrorString ( ErrorCode , ErrorString )

Parameters

ErrorCode [ C, C++: long ] [ Python: ctypes.c_long ]
Specify the return value of each function.

ErrorString [ C, C++: char * ] [ Python: ctypes.c_char_p ]
Sets the base address of buffer for storing error string.
The max length of string is 256.

Return Value

Ret [ C, C++: long ] [ Python: ctypes.c_long ]

Definition

Value

[Dec]

Description

DIO_ERR_SUCCESS

0

Normal complete

DIO_ERR_DLL_BUFF_ADDRESS

10100

Invalid data buffer address.

The other errors: (See also: Error code details)

Initial Value

None

Remarks

IUtility function that returns the string in explicit description from error code.
Please use the error process.

Example

C, C++

long Ret;

char ErrorString[256];

Ret = DioGetErrorString(ErrorCode, &ErrorString[0]);
 

Python

Ret = ctypes.c_long()
ErrorString = ctypes.create_string_buffer(256)

Ret.value = cdio.DioGetErrorString(ErrorCode, ErrorString)
 

See Also

None