|
duvc-ctl 2.0.0
USB Video Class Camera Control Library
|
C ABI error handling and diagnostics implementation. More...
#include "duvc-ctl/c/api.h"#include "duvc-ctl/core/result.h"#include "duvc-ctl/utils/error_decoder.h"#include "duvc-ctl/utils/logging.h"#include <comdef.h>#include <psapi.h>#include <windows.h>#include <atomic>#include <cstring>#include <iomanip>#include <mutex>#include <sstream>#include <string>#include <thread>#include <unordered_map>Go to the source code of this file.
Functions | |
| int | duvc_is_temporary_error (duvc_result_t result) |
| int | duvc_is_user_error (duvc_result_t result) |
| duvc_result_t | duvc_set_error_context (const char *operation, const char *device_info) |
| duvc_result_t | duvc_get_error_statistics (char *buffer, size_t buffer_size, size_t *required_size) |
| void | duvc_reset_error_statistics (void) |
| duvc_result_t | duvc_suggest_error_resolution (duvc_result_t error_code, char *buffer, size_t buffer_size, size_t *required_size) |
| int | duvc_should_retry_operation (duvc_result_t error_code) |
C ABI error handling and diagnostics implementation.
This file implements comprehensive error handling for the C ABI, including error code conversion, detailed error information management, and diagnostic utilities for troubleshooting camera control issues.
Definition in file error_handling.cpp.
| duvc_result_t duvc_get_error_statistics | ( | char * | buffer, |
| size_t | buffer_size, | ||
| size_t * | required_size ) |
Definition at line 126 of file error_handling.cpp.
References DUVC_ERROR_BUFFER_TOO_SMALL, duvc_error_code_to_string(), and DUVC_SUCCESS.
| int duvc_is_temporary_error | ( | duvc_result_t | result | ) |
Definition at line 84 of file error_handling.cpp.
References DUVC_ERROR_CONNECTION_FAILED, DUVC_ERROR_DEVICE_BUSY, and DUVC_ERROR_TIMEOUT.
| int duvc_is_user_error | ( | duvc_result_t | result | ) |
Definition at line 96 of file error_handling.cpp.
References DUVC_ERROR_BUFFER_TOO_SMALL, DUVC_ERROR_INVALID_ARGUMENT, and DUVC_ERROR_INVALID_VALUE.
| void duvc_reset_error_statistics | ( | void | ) |
Definition at line 199 of file error_handling.cpp.
| duvc_result_t duvc_set_error_context | ( | const char * | operation, |
| const char * | device_info ) |
Definition at line 112 of file error_handling.cpp.
References DUVC_ERROR_INVALID_ARGUMENT, DUVC_ERROR_SYSTEM_ERROR, and DUVC_SUCCESS.
| int duvc_should_retry_operation | ( | duvc_result_t | error_code | ) |
Definition at line 318 of file error_handling.cpp.
References DUVC_ERROR_CONNECTION_FAILED, DUVC_ERROR_DEVICE_BUSY, DUVC_ERROR_DEVICE_NOT_FOUND, DUVC_ERROR_INVALID_ARGUMENT, DUVC_ERROR_INVALID_VALUE, DUVC_ERROR_NOT_IMPLEMENTED, DUVC_ERROR_PERMISSION_DENIED, DUVC_ERROR_PROPERTY_NOT_SUPPORTED, and DUVC_ERROR_TIMEOUT.
| duvc_result_t duvc_suggest_error_resolution | ( | duvc_result_t | error_code, |
| char * | buffer, | ||
| size_t | buffer_size, | ||
| size_t * | required_size ) |
Definition at line 211 of file error_handling.cpp.
References DUVC_ERROR_BUFFER_TOO_SMALL, duvc_error_code_to_string(), DUVC_ERROR_CONNECTION_FAILED, DUVC_ERROR_DEVICE_BUSY, DUVC_ERROR_DEVICE_NOT_FOUND, DUVC_ERROR_INVALID_VALUE, DUVC_ERROR_PERMISSION_DENIED, DUVC_ERROR_PROPERTY_NOT_SUPPORTED, DUVC_ERROR_SYSTEM_ERROR, and DUVC_SUCCESS.