API return and error codes. The return values to most API functions are plain int
types.
When successful, the functions return zero or a positive integer result. When unsuccessful, the functions return a negative integer result.
OmErrorString() returns a string representation of an error code.
◆ OM_E_ABORT
Return code: Operation was aborted.
(Not used)
Definition at line 1027 of file omapi.h.
◆ OM_E_ACCESS_DENIED
#define OM_E_ACCESS_DENIED -9 |
Return code: Access was denied opening, reading from, or writing to a device.
This can be returned if the device has been removed, or through some permissions problem. This could also be returned if the specified device is currently busy executing a command called from another thread. If the caller attempts to run a function on a specific device whilst another function is being run on that same device, E_ACCESS_DENIED will be returned. This is true if called from another thread or another process.
Definition at line 1028 of file omapi.h.
◆ OM_E_FAIL
Return code: Unspecified failure.
An error occurred that didn't have a more specific category.
Definition at line 1020 of file omapi.h.
◆ OM_E_INVALID_ARG
#define OM_E_INVALID_ARG -5 |
Return code: Invalid argument error.
For example, an out-of-range value.
Definition at line 1024 of file omapi.h.
◆ OM_E_INVALID_DEVICE
#define OM_E_INVALID_DEVICE -10 |
Return code: Device identifier was invalid.
For example, if the device has been removed.
Definition at line 1029 of file omapi.h.
◆ OM_E_LOCKED
Return code: Device is locked and the requested operation cannot be performed until it is unlocked.
Definition at line 1031 of file omapi.h.
◆ OM_E_NOT_IMPLEMENTED
#define OM_E_NOT_IMPLEMENTED -7 |
Return code: Requested functionality not implemented, either at the API level on this platform or the firmware version on the device.
Definition at line 1026 of file omapi.h.
◆ OM_E_NOT_VALID_STATE
#define OM_E_NOT_VALID_STATE -3 |
Return code: API not in a valid state.
For example, it is uninitialized, or an operation cannot be completed because a download is currently in progress. This error should be avoidable on the client side.
Definition at line 1022 of file omapi.h.
◆ OM_E_OUT_OF_MEMORY
#define OM_E_OUT_OF_MEMORY -4 |
Return code: Out of memory error.
A memory allocation failed.
Definition at line 1023 of file omapi.h.
◆ OM_E_POINTER
Return code: Invalid pointer.
For example, a 'NULL pointer'.
Definition at line 1025 of file omapi.h.
◆ OM_E_UNEXPECTED
#define OM_E_UNEXPECTED -2 |
Return code: Unexpected error.
An error occurred which was not anticipated by the code.
Definition at line 1021 of file omapi.h.
◆ OM_E_UNEXPECTED_RESPONSE
#define OM_E_UNEXPECTED_RESPONSE -11 |
Return code: Device response was not as expected.
Definition at line 1030 of file omapi.h.
◆ OM_FAILED
#define OM_FAILED |
( |
|
value | ) |
((value) < 0) |
Macro to check the specified return value for failure.
- Returns
- true for a failed (negative) value, false otherwise.
Definition at line 1033 of file omapi.h.
◆ OM_FALSE
Return code: 'False' boolean value.
- Since
- 1.2
Definition at line 1018 of file omapi.h.
◆ OM_OK
Return code: Success.
Definition at line 1019 of file omapi.h.
◆ OM_SUCCEEDED
#define OM_SUCCEEDED |
( |
|
value | ) |
((value) >= 0) |
Macro to check the specified return value for success.
- Returns
- true for a successful (non-negative) value, false otherwise.
Definition at line 1032 of file omapi.h.
◆ OM_TRUE
Return code: 'True' boolean value.
- Since
- 1.2
Definition at line 1017 of file omapi.h.
◆ OmErrorString()
const char* OmErrorString |
( |
int |
status | ) |
|
Returns an error string for the specified API return code.
- Parameters
-
status | An API return value. |
- Returns
- Error string for the specified status.