forked from AravisProject/aravis
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patharvdebugprivate.h
132 lines (106 loc) · 5.66 KB
/
arvdebugprivate.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
/* Aravis - Digital camera library
*
* Copyright © 2009-2022 Emmanuel Pacaud
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General
* Public License along with this library; if not, write to the
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*
* Author: Emmanuel Pacaud <[email protected]>
*/
#ifndef ARV_DEBUG_PRIVATE_H
#define ARV_DEBUG_PRIVATE_H
#include <arvdebug.h>
G_BEGIN_DECLS
typedef enum {
ARV_DEBUG_LEVEL_NONE,
ARV_DEBUG_LEVEL_WARNING,
ARV_DEBUG_LEVEL_INFO,
ARV_DEBUG_LEVEL_DEBUG,
ARV_DEBUG_LEVEL_TRACE,
ARV_DEBUG_LEVEL_N_ELEMENTS
} ArvDebugLevel;
typedef struct {
const char *name;
const char *description;
ArvDebugLevel level;
} ArvDebugCategoryInfos;
typedef enum {
ARV_DEBUG_CATEGORY_INTERFACE,
ARV_DEBUG_CATEGORY_DEVICE,
ARV_DEBUG_CATEGORY_STREAM,
ARV_DEBUG_CATEGORY_STREAM_THREAD,
ARV_DEBUG_CATEGORY_CP,
ARV_DEBUG_CATEGORY_SP,
ARV_DEBUG_CATEGORY_GENICAM,
ARV_DEBUG_CATEGORY_POLICIES,
ARV_DEBUG_CATEGORY_CHUNK,
ARV_DEBUG_CATEGORY_DOM,
ARV_DEBUG_CATEGORY_EVALUATOR,
ARV_DEBUG_CATEGORY_VIEWER,
ARV_DEBUG_CATEGORY_MISC,
ARV_DEBUG_CATEGORY_N_ELEMENTS
} ArvDebugCategory;
extern ArvDebugCategoryInfos arv_debug_category_infos[];
#define arv_warning_dom(...) arv_warning (ARV_DEBUG_CATEGORY_DOM, __VA_ARGS__)
#define arv_info_dom(...) arv_info (ARV_DEBUG_CATEGORY_DOM, __VA_ARGS__)
#define arv_debug_dom(...) arv_debug (ARV_DEBUG_CATEGORY_DOM, __VA_ARGS__)
#define arv_warning_interface(...) arv_warning (ARV_DEBUG_CATEGORY_INTERFACE, __VA_ARGS__)
#define arv_info_interface(...) arv_info (ARV_DEBUG_CATEGORY_INTERFACE, __VA_ARGS__)
#define arv_debug_interface(...) arv_debug (ARV_DEBUG_CATEGORY_INTERFACE, __VA_ARGS__)
#define arv_warning_device(...) arv_warning (ARV_DEBUG_CATEGORY_DEVICE, __VA_ARGS__)
#define arv_info_device(...) arv_info (ARV_DEBUG_CATEGORY_DEVICE, __VA_ARGS__)
#define arv_debug_device(...) arv_debug (ARV_DEBUG_CATEGORY_DEVICE, __VA_ARGS__)
#define arv_warning_chunk(...) arv_warning (ARV_DEBUG_CATEGORY_CHUNK, __VA_ARGS__)
#define arv_info_chunk(...) arv_info (ARV_DEBUG_CATEGORY_CHUNK, __VA_ARGS__)
#define arv_debug_chunk(...) arv_debug (ARV_DEBUG_CATEGORY_CHUNK, __VA_ARGS__)
#define arv_warning_stream(...) arv_warning (ARV_DEBUG_CATEGORY_STREAM, __VA_ARGS__)
#define arv_info_stream(...) arv_info (ARV_DEBUG_CATEGORY_STREAM, __VA_ARGS__)
#define arv_debug_stream(...) arv_debug (ARV_DEBUG_CATEGORY_STREAM, __VA_ARGS__)
#define arv_warning_stream_thread(...) arv_warning (ARV_DEBUG_CATEGORY_STREAM_THREAD, __VA_ARGS__)
#define arv_info_stream_thread(...) arv_info (ARV_DEBUG_CATEGORY_STREAM_THREAD, __VA_ARGS__)
#define arv_debug_stream_thread(...) arv_debug (ARV_DEBUG_CATEGORY_STREAM_THREAD, __VA_ARGS__)
#define arv_warning_cp(...) arv_warning (ARV_DEBUG_CATEGORY_CP, __VA_ARGS__)
#define arv_info_cp(...) arv_info (ARV_DEBUG_CATEGORY_CP, __VA_ARGS__)
#define arv_debug_cp(...) arv_debug (ARV_DEBUG_CATEGORY_CP, __VA_ARGS__)
#define arv_trace_cp(...) arv_trace (ARV_DEBUG_CATEGORY_CP, __VA_ARGS__)
#define arv_warning_sp(...) arv_warning (ARV_DEBUG_CATEGORY_SP, __VA_ARGS__)
#define arv_info_sp(...) arv_info (ARV_DEBUG_CATEGORY_SP, __VA_ARGS__)
#define arv_debug_sp(...) arv_debug (ARV_DEBUG_CATEGORY_SP, __VA_ARGS__)
#define arv_trace_sp(...) arv_trace (ARV_DEBUG_CATEGORY_SP, __VA_ARGS__)
#define arv_warning_genicam(...) arv_warning (ARV_DEBUG_CATEGORY_GENICAM, __VA_ARGS__)
#define arv_info_genicam(...) arv_info (ARV_DEBUG_CATEGORY_GENICAM, __VA_ARGS__)
#define arv_debug_genicam(...) arv_debug (ARV_DEBUG_CATEGORY_GENICAM, __VA_ARGS__)
#define arv_warning_policies(...) arv_warning (ARV_DEBUG_CATEGORY_POLICIES, __VA_ARGS__)
#define arv_info_policies(...) arv_info (ARV_DEBUG_CATEGORY_POLICIES, __VA_ARGS__)
#define arv_debug_policies(...) arv_debug (ARV_DEBUG_CATEGORY_POLICIES, __VA_ARGS__)
#define arv_warning_evaluator(...) arv_warning (ARV_DEBUG_CATEGORY_EVALUATOR, __VA_ARGS__)
#define arv_info_evaluator(...) arv_info (ARV_DEBUG_CATEGORY_EVALUATOR, __VA_ARGS__)
#define arv_debug_evaluator(...) arv_debug (ARV_DEBUG_CATEGORY_EVALUATOR, __VA_ARGS__)
#define arv_warning_misc(...) arv_warning (ARV_DEBUG_CATEGORY_MISC, __VA_ARGS__)
#define arv_info_misc(...) arv_info (ARV_DEBUG_CATEGORY_MISC, __VA_ARGS__)
#define arv_debug_misc(...) arv_debug (ARV_DEBUG_CATEGORY_MISC, __VA_ARGS__)
#define arv_warning_viewer(...) arv_warning (ARV_DEBUG_CATEGORY_VIEWER, __VA_ARGS__)
#define arv_info_viewer(...) arv_info (ARV_DEBUG_CATEGORY_VIEWER, __VA_ARGS__)
#define arv_debug_viewer(...) arv_debug (ARV_DEBUG_CATEGORY_VIEWER, __VA_ARGS__)
gboolean arv_debug_check (ArvDebugCategory category, ArvDebugLevel level);
/* private, but used by viewer */
ARV_API void arv_warning (ArvDebugCategory category, const char *format, ...) G_GNUC_PRINTF (2,3);
ARV_API void arv_info (ArvDebugCategory category, const char *format, ...) G_GNUC_PRINTF (2,3);
ARV_API void arv_debug (ArvDebugCategory category, const char *format, ...) G_GNUC_PRINTF (2,3);
ARV_API void arv_trace (ArvDebugCategory category, const char *format, ...) G_GNUC_PRINTF (2,3);
/* private, but export for use in debugging tools */
ARV_API void arv_debug_print_infos (void);
G_END_DECLS
#endif