ArDrone SDK 1.8 added
[mardrone] / mardrone / ARDrone_SDK_Version_1_8_20110726 / ARDroneLib / VP_SDK / VP_Os / vp_os_error_handling.h
1 /**
2  *  \brief    VP OS. Error Handling
3  *  \author   Sylvain Gaeremynck <sylvain.gaeremynck@parrot.fr>
4  *  \version  1.0
5  *  \date     first release 26/03/2007
6  */
7
8 #ifndef _VP_OS_ERROR_HANDLING_H_
9 #define _VP_OS_ERROR_HANDLING_H_
10
11
12 #include <VP_Os/vp_os_types.h>
13
14
15 #define VP_OS_MAX_NUM_ERROR_HANDLERS      8
16 #define VP_OS_MAX_NUM_ERROR_MESSAGE_SIZE  256
17
18
19 /**
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
23  */
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
28
29 typedef const char* (*vp_os_error_handler_t)(int32_t errorCode);
30
31 void vp_os_install_error_handler(uint32_t signature, vp_os_error_handler_t handler);
32
33 /**
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
37  */
38 const char* vp_os_get_error_message(uint32_t errorCode);
39
40 #endif // _VP_OS_ERROR_HANDLING_H_