beautypg.com

Functions which return information about device, Getdkerror, Resetdkerror – Dataman 530 Series User Manual

Page 9: Ispowered, Getdkerror 3.1.2. resetdkerror 3.1.3. ispowered

background image


Development kit for DATAMAN 530

Programmer’s Guide

3.1. Functions which return information about device

3.1.1. GetDKError

If an error occurs during a 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 the error code.

Declaration:

Public Shared Function GetDKError() As Integer


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 – 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

If an error occurs during a call of any DK function the error code is stored in

the DK internal variable. All subsequent calls of DK functions will fail.
ResetDKError function resets this variable thus allowing you to call DK functions
again.

Deklarácia:

Public Shared Sub ResetDKError()


Parameters: -

Return value: -

3.1.3. IsPowered

Returns whether the device is powered from external power source.

Public Shared Function IsPowered() As Integer

- 9 -