Production Line Tool v5.0
The DA1470x Production Line Tool Software Package
Loading...
Searching...
No Matches
dbg_dll.h
Go to the documentation of this file.
1
17#ifndef _DBG_DLL_H_
18#define _DBG_DLL_H_
19
40#ifndef __bool_true_false_are_defined
41 #define __bool_true_false_are_defined 1
42 #ifndef __cplusplus /* In C++, 'bool', 'true' and 'false' and keywords */
43 #define bool char
44 #define true 1
45 #define false 0
46 #else
47 #ifdef __GNUC__
48 /* GNU C++ supports direct inclusion of stdbool.h to provide C99
49 compatibility by defining _Bool */
50 #define BOOL bool
51 #endif
52 #endif
53#endif /* __bool_true_false_are_defined */
57#define DBG_DLL_EXPORTS
58#ifdef DBG_DLL_EXPORTS
59#define DBG_DLL_API __declspec(dllexport)
60#else
61#define DBG_DLL_API __declspec(dllimport)
62#endif
63
64#define DBG_MAX_STR_SIZE 1024
65#define FILE_PATH_SIZE 256
76#define DBG_SUCCESS 0
77#define DBG_ERROR 1
78#define DBG_WRONG_PARAMS 2
97typedef enum _DBG_OUTPUT
98{
102 DBG_OUTPUT_INVALID = 0x8
104
110typedef enum _DBG_LEVEL
111{
115 DBG_LVL_INVALID = 0x8
117
135typedef void (__stdcall *_dbg_clbk)(char *dbg_str);
136
142typedef struct __dbg_params
143{
147 char dbg_file_path[FILE_PATH_SIZE];
150
153#ifdef __cplusplus // If used by C++ code,
154extern "C" { // we need to export the C interface
155#endif
176DBG_DLL_API int dbg_init(void **dbg_session, const _dbg_params *dbg_params_t);
177
187DBG_DLL_API int dbg_close(const void *dbg_session);
188
204DBG_DLL_API void dbg_print(void *dbg_session, DBG_LEVEL dbg_level, char *dbg_sw, char *func, int line, char *fmt, ...);
205 // @defgroup dbg_funcs
207#ifdef __cplusplus
208}
209#endif
210 // @defgroup dbg_group
212
213#endif //_DBG_DLL_H_
enum _DBG_OUTPUT DBG_OUTPUT
Enumeration that enables the different debug outputs.
_DBG_OUTPUT
Enumeration that enables the different debug outputs.
Definition: dbg_dll.h:98
_DBG_LEVEL
Enumeration for the different debug levels.
Definition: dbg_dll.h:111
enum _DBG_LEVEL DBG_LEVEL
Enumeration for the different debug levels.
@ DBG_TO_CLBK
Definition: dbg_dll.h:101
@ DBG_TO_FILE
Definition: dbg_dll.h:100
@ DBG_OUTPUT_INVALID
Definition: dbg_dll.h:102
@ DBG_TO_STDIO
Definition: dbg_dll.h:99
@ DBG_LVL_ERR
Definition: dbg_dll.h:112
@ DBG_LVL_INFO
Definition: dbg_dll.h:113
@ DBG_LVL_INVALID
Definition: dbg_dll.h:115
@ DBG_LVL_DEBUG
Definition: dbg_dll.h:114
DBG_DLL_API int dbg_init(void **dbg_session, const _dbg_params *dbg_params_t)
Initializes debugging.
DBG_DLL_API int dbg_close(const void *dbg_session)
Closes the debug session.
DBG_DLL_API void dbg_print(void *dbg_session, DBG_LEVEL dbg_level, char *dbg_sw, char *func, int line, char *fmt,...)
Debug print function.
#define FILE_PATH_SIZE
Definition: dbg_dll.h:65
struct __dbg_params _dbg_params
The main settings of the Debug DLL API.
void(__stdcall * _dbg_clbk)(char *dbg_str)
Debug API callback function type definition. Used at __dbg_params::dbg_clbk.
Definition: dbg_dll.h:135
The main settings of the Debug DLL API.
Definition: dbg_dll.h:143
int dbg_out
Definition: dbg_dll.h:145
bool dbg_enable
Definition: dbg_dll.h:144
_dbg_clbk dbg_clbk
Definition: dbg_dll.h:148
int dbg_level
Definition: dbg_dll.h:146