SDK Result Codes
This page aggregates all SDK-related result codes returned by functions and methods from the C and C++ APIs.
-
SDK_ERROR_TIMEOUT
Hex.: 0x2000, Dec.: 8192. The USB host adapter device did not respond within the expected timeout period.
-
SDK_ERROR_DISCONNECT
Hex.: 0x4000, Dec.: 16384. The SDK’s USB HID handle to the host adapter is not usable and the request never left the host. The adapter may have been unplugged – but it may equally still be attached, enumerating and healthy, with only the handle broken: hidapi’s Windows write path abandons a timed-out overlapped write and every later write on that handle silently does nothing (libusb/hidapi #755). CosmicDriver::reopen repairs that in place and is retried on each subsequent command, so this code means “not right now”, not “not ever”. A caller that sees it repeatedly should close and reopen the device rather than reach for the cable.
-
SDK_ERROR_UNEXPECTED_RESPONSE
Hex.: 0x6000, Dec.: 24576. The device returned an unexpected response.
-
SDK_ERROR_WRONG_REQUEST
Hex.: 0x8000, Dec.: 32768. The request was malformed.
-
SDK_ERROR_WRONG_RESPONSE
Hex.: 0xA000, Dec.: 40960. The response was malformed.