2 * \brief VP OS. Error Handling
3 * \author Sylvain Gaeremynck <sylvain.gaeremynck@parrot.fr>
5 * \date first release 26/03/2007
8 #ifndef _VP_OS_ERROR_HANDLING_H_
9 #define _VP_OS_ERROR_HANDLING_H_
12 #include <VP_Os/vp_os_types.h>
15 #define VP_OS_MAX_NUM_ERROR_HANDLERS 8
16 #define VP_OS_MAX_NUM_ERROR_MESSAGE_SIZE 256
20 * \brief API_SDK_SIGNATURE definition is used to parse the error messages.
21 * \brief COM_SDK_SIGNATURE definition is used to parse the error messages.
22 * \todo Put these declarations in the makefile if possible
24 #define VP_API_SDK_SIGNATURE 0x00AA
25 #define VP_COM_SDK_SIGNATURE 0x00BB
26 #define API_SDK_VERSION 1
27 #define COM_SDK_VERSION 1
29 typedef const char* (*vp_os_error_handler_t)(int32_t errorCode);
31 void vp_os_install_error_handler(uint32_t signature, vp_os_error_handler_t handler);
34 * @fn error api message display
35 * @param int errorCode : error message in the list of error state message
36 * @return return the error Message
38 const char* vp_os_get_error_message(uint32_t errorCode);
40 #endif // _VP_OS_ERROR_HANDLING_H_