OSAPI  0.29
Open System API
error_priv.h
1 // *****************************************************************************************
2 //
3 // File description:
4 //
5 // Author: Joao Costa
6 // Purpose: Status declarations
7 //
8 // *****************************************************************************************
9 
10 #ifndef OSAPI_ERROR_PRIV_H_
11 #define OSAPI_ERROR_PRIV_H_
12 
13 // *****************************************************************************************
14 //
15 // Section: Import headers
16 //
17 // *****************************************************************************************
18 
19 // Force baseline before system headers
20 #include "general/general_baseline.h"
21 
22 // System headers
23 #include <stddef.h>
24 
25 // OSAPI module error information
26 #include "general/general_types.h"
27 #include "general/general_modules.h"
28 
29 // Error information
30 #include "error/error_types.h"
31 #include "error/private/error_priv_common.h"
32 #include "error/private/error_priv_clock.h"
33 #include "error/private/error_priv_io.h"
34 #include "error/private/error_priv_fs.h"
35 #include "error/private/error_priv_machine.h"
36 #include "error/private/error_priv_os.h"
37 #include "error/private/error_priv_proc.h"
38 #include "error/private/error_priv_sec.h"
39 #include "error/private/error_priv_string.h"
40 #include "error/private/error_priv_util.h"
41 #include "error/private/error_priv_com.h"
42 #include "error/private/error_priv_log.h"
43 #include "error/private/error_priv_parallel.h"
44 
45 
54 
55 
56 // *****************************************************************************************
57 //
58 // Section: Error Definitions
59 //
60 // *****************************************************************************************
61 
62 // Generic error definitions
63 
65 static const char * osapi_error_none [] =
66 {
67  "Success",
68  NULL
69 };
70 
73 {
74  t_error topValue;
75  const char ** name;
76 };
77 
78 // The following structure must match exactly the modules defined in general/mappings/table_modules.h
79 static const struct osapi_error_S osapi_error_strings[ OSAPI_MODULE_MAX ] = {
80  { 1, osapi_error_none },
81  { osapi_common_error_max, osapi_common_errors },
82  { osapi_string_error_max, osapi_string_errors },
83  { osapi_os_error_max, osapi_os_errors },
84  { osapi_machine_error_max, osapi_machine_errors },
85  { osapi_proc_error_max, osapi_proc_errors },
86  { osapi_clock_error_max, osapi_clock_errors },
87  { osapi_sec_error_max, osapi_sec_errors },
88  { osapi_io_error_max, osapi_io_errors },
89  { osapi_log_error_max, osapi_log_errors },
90  { osapi_fs_error_max, osapi_fs_errors },
91  { osapi_com_error_max, osapi_com_errors },
92  { osapi_util_error_max, osapi_util_errors },
93  { osapi_parallel_error_max, osapi_parallel_errors },
94 };
95 
96 
97 
100 
101 #endif /* OSAPI_ERROR_PRIV_H_ */
osapi_error_S
Auxiliary structure that helps in the definition of the maximum error code in each module.
Definition: error_priv.h:72
osapi_error_S::name
const char ** name
The error string that corresponds to the maximum error value.
Definition: error_priv.h:75
osapi_error_S::topValue
t_error topValue
The maximum error value in a module.
Definition: error_priv.h:74