TMS International BV |
GetErrorCode
int APIENTRY GetErrorCode(
IN HANDLE Handle
);
Parameters
Handle
Handle of the library
Return Value
This function returns the error code of the previously called
function.
Comments
This function should only be called if the previously called
SDK function returns FALSE.
Use the GetErrorCodeMessage
function
to get a text string (in English) describing the error code.
Error codes can be negative or positive values. A negative code
means someting went wrong in the SDK. A zero error code means
there is no error.
Error Codes
The following is a list of TMSi internal error codes which are
returned by GetErrorCode.
Positive error codes > 255 are from the OS.
Code |
Message |
Possible cause |
-1 |
Undefined error |
Unclear |
-2 |
A NULL parameter is given to the API where not allowed | Programming error of the calling
application |
-3 |
IO port on which is read/write is not initialized | There is no longer a connection
to the frontend |
-4 |
A received data-block contains a CRC error | Due to transmission errors the data block was not received correctly. |
-5 |
Not enough data for block-type |
Due to transmission errors the data block was not received correctly. |
-6 |
No data received from frontend |
The frontend does not respond |
-7 |
Buffer given in function call is too small | Programming error of the calling application |
-8 |
Connection has been broken for unknown reasons | For wireless connections: The device has moved out-of-range. |
-9 |
Unexpected block-type received |
Device
is busy processing older requests |
-10 |
Invalid handle given to function | Function is called with an
invalid handle/pointer |
-11 |
Allocation of memory failed | Programming error of the calling
application: To much memory is used |
-12 |
Initalization of (underlying) library failed |
Missing libraries on the OS |
-13 |
No USB device found | Dongle has been removed by user, or frontend has been switched off |
-14 |
No WLAN device found | Dongle has been removed by user, or frontend has been switched off |
-15 |
Parameter in data-block Out-Of-Range | Development firmware in the
device |
-16 |
Function Parameter1 Out-Of-Range | The value of the first parameter
after the handle is invalid |
-17 |
Function Parameter2 Out-Of-Range | The value of the second parameter after the handle is invalid |
-18 |
Function Parameter3 Out-Of-Range | The value of the third parameter after the handle is invalid |
-19 |
Bluetooth Name Not Found | Name of the Bluetooth frontend is not found |
-20 |
Not Implemented | This function is not implemented |
-21 |
No WLAN Dongle |
No WLAN Dongle on PC found |
-22 |
No Bluetooth Dongle |
No Bluetooth Dongle on PC found |
-23 |
Wrong Order Of Calls |
The order in which the API functions are called is wrong |
0 | No error, positive acknowledge | All is OK |
1 | Unknown or not implemented block-type |
Function is not supported by the
frontend. Examples could be Get/Set Clock, Set Impedance. |
2 | CRC error in received block | |
3 | Error in command data (can't do that for this communication method) | Application calls a function which is not supported on the selected communication method, like calling a function using a Bluetooth connection, while the function is only supported on a USB connection. |
4 | Invalid block size (too large) | |
17 |
No external power supplied | You try to do something for
which the frontend needs external power, and the power supply is not
connected or not working |
18 |
Not possible because the frontend is recording | Application calls a function to change some configuration settings, while the frontend is busy recording sample data on (internal) storage. |
19 |
Storage medium is busy | Application calls a function to do something with the (internal) storage, while that storage is busy doing something |
20 |
Flash memory not present | Application calls a function to
change data on flash memory, while the device has no flash memory at
all. |
21 |
Number of words to read from flash memory out of range | Application calls a function to read data on flash memory, but ask more data than available |
22 |
Flash memory is write protected | Application calls a function to write data on flash memory, but the flash memory is write protected. |
23 |
Incorrect value for initial inflation pressure | |
24 |
Wrong size or values in BP cycle list | |
25 |
Selected sample frequency out of range for this communication method | You try to use a sample rate
which is too low for the connected frontend |
26 |
Wrong nr of user channels (<=0, >maxUSRchan) | Invalid number
of channels (<0 or more than the frontend has available) |
27 |
Address flash memory out of range | Application calls a function to read/write data on flash memory, but asks data on a address larger than the amount of flash memory available |
28 |
Erasing not possible because battery low | Application calls a function to erase data on (internal) storage, but there is no sufficient amount of power available to perform the erase. Load the battery or use an external power supply. |
29 |
Frontend locked |
The frontend is locked and can only be unlocked by the OEM application |
30 |
No valid data available |
There is no valid data available as answer on the send command |
31 |
Requested sample frequency is different from configured ambulant recording frequency |
The requested sample frequency for the selected
communication method is different from configured ambulant recording
frequency on the frontend |