GenApiCError.h 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. /*-----------------------------------------------------------------------------
  2. Basler pylon C SDK
  3. Copyright (c) 2009-2021 Basler AG
  4. http://www.baslerweb.com
  5. Author: AH, TK
  6. -----------------------------------------------------------------------------*/
  7. /**
  8. \file
  9. \brief Error codes for GenApi C bindings.
  10. */
  11. #ifndef GENAPICERROR_H_INCLUDED
  12. #define GENAPICERROR_H_INCLUDED
  13. /*
  14. * TODO: Define a more elaborate numbering scheme
  15. * TODO: Map to HRESULTS when library is built for usage with type library
  16. */
  17. #define GENAPIC_RESULT HRESULT
  18. /**
  19. * \defgroup errorcodes Error Codes
  20. * \brief Error codes returned by any of the \pylon_C API functions.
  21. *
  22. * These error codes can be returned from any of the \pylon_C API functions.\n
  23. * To get a textual representation for the error code you can call GenApiGetLastErrorMessage().\n
  24. * To get a detailed error description you can call GenApiGetLastErrorDetail(). The string returned will contain the specific reason why the call has failed.
  25. * \note If a function returns an error, you must call GenApiGetLastErrorMessage() and/or GenApiGetLastErrorDetail() directly after you received the error.
  26. * Calling other functions will either reset or overwrite the error text.
  27. *
  28. * @{
  29. */
  30. #define GENAPI_E_OK ((GENAPIC_RESULT) 0) /**< Operation completed successfully. */
  31. #define GENAPI_E_FAIL ((GENAPIC_RESULT) 0xC2000001) /**< Unspecified error occurred. Call GenApiGetLastErrorDetail() for more information about the error. */
  32. #define GENAPI_E_INVALID_ARG ((GENAPIC_RESULT) 0xC2000002) /**< Function called with invalid argument. */
  33. #define GENAPI_E_INSUFFICIENT_BUFFER ((GENAPIC_RESULT) 0xC2000003) /**< Buffer size passed is less than required. */
  34. #define GENAPI_E_INVALID_NODEMAPHANDLE ((GENAPIC_RESULT) 0xC2000004) /**< An invalid node map handle has been passed. */
  35. #define GENAPI_E_NODE_NOT_FOUND ((GENAPIC_RESULT) 0xC2000005) /**< Specified node not found in node map. */
  36. #define GENAPI_E_INVALID_NODEHANDLE ((GENAPIC_RESULT) 0xC2000006) /**< An invalid node handle has been passed. */
  37. #define GENAPI_E_RESULT_RANGE_EXCEEDED ((GENAPIC_RESULT) 0xC2000007) /**< A 64 bit result will be truncated if returned as a 32 bit value. */
  38. #define GENAPI_E_LIMITS_EXCEEDED ((GENAPIC_RESULT) 0xC2000008) /**< The value exceeds the valid range. */
  39. #define GENAPI_E_PROPERTY_ERROR ((GENAPIC_RESULT) 0xC2000009) /**< Generic GenICam property error occurred. Call GenApiGetLastErrorDetail() for more information about the error. */
  40. #define GENAPI_E_TIMEOUT ((GENAPIC_RESULT) 0xC200000A) /**< Timeout expired. */
  41. #define GENAPI_E_TYPE_ERROR ((GENAPIC_RESULT) 0xC200000B) /**< Expression has wrong type. */
  42. #define GENAPI_E_INDEX_ERROR ((GENAPIC_RESULT) 0xC200000C) /**< An index is out of range. */
  43. /* 0xC200000D left out intentionally */
  44. #define GENAPI_E_OBJECT_ILLEGAL_STATE ((GENAPIC_RESULT) 0xC200000E) /**< Object state illegal for operation. Call GenApiGetLastErrorDetail() for more information about the error.*/
  45. #define GENAPI_E_INVALID_NODECALLBACKHANDLE ((GENAPIC_RESULT) 0xC200000F) /**< An invalid callback handle has been passed. */
  46. #define GENAPI_E_LOGICAL_ERROR ((GENAPIC_RESULT) 0xC2000010) /**< Program logic error. Call GenApiGetLastErrorDetail() for more information about the error. */
  47. #define GENAPI_E_INVALID_FILEHANDLE ((GENAPIC_RESULT) 0xC2000011) /**< An invalid file handle has been passed. */
  48. /**
  49. * @}
  50. */
  51. #endif