beautypg.com

Functions, that returns information about device, Getdkerror, Resetdkerror – Dataman 570 Series User Manual

Page 12: Return value, Getdeviceid, Getdkerror 3.1.2. resetdkerror 3.1.3. getdeviceid

background image


Development kit for DATAMAN 570 series

Programmer’s Guide


3.1. Functions, that returns information about device

3.1.1. GetDKError

In the case where the error occurs during the call of any DK function the error code is
stored in the DK internal variable. All subsequent calls of DK functions will fail.
GetDKError returns error code.

Declaration:

public static extern int GetDKError();


Parameters: -

Return value:

ERROR_OK – no error occured
ERROR_DRIVER_NOT_LOADED – unable to load driver/driver wasn’t

loaded before call

ERROR_DRIVER_INCOMPATIBLE - driver is not compatible with DK
ERROR_UNABLE_TO_LOAD_EM57X – unable to load em57x driver
ERROR_INIT_FAILED – device initialization failed
ERROR_FPGA_CONFIG_FAILED – FPGA configuration failed
ERROR_COMMUNICATION_FAILED – the communication with device is

broken

ERROR_OPERATION_FAILED – unable to finish last operation
ERROR_DK_NOT_ENABLED – the device doesn’t have DK enabled
ERROR_INCORRECT_PARAMETER – the function was called with incorrect

parameter value

3.1.2. ResetDKError

In the case where the error occurs during the call of any DK function the error code is
stored in the DK internal variable. All subsequent calls of any DK functions will fail.
ResetDKError function resets this variable, thus allowing you to call the DK functions
again.

Declaration:

public static extern void ResetDKError();


Parameters: -

Return value: -

3.1.3. GetDeviceID

Returns ID of the connected device.

public static extern int GetDeviceID();

- 12 -