bzr branch
http://darksoft.org/webbzr/alps/pcitool
7.1.1
by Suren A. Chilingaryan
Initial support of IPECamera protocol |
1 |
#ifndef _PCILIB_ERROR_H
|
2 |
#define _PCILIB_ERROR_H
|
|
126
by Suren A. Chilingaryan
multithread preprocessing of ipecamera frames and code reorganization |
3 |
|
4 |
#include <errno.h> |
|
247
by Suren A. Chilingaryan
New error reporting public interface |
5 |
#include <pcilib.h> |
6 |
||
263
by Suren A. Chilingaryan
Support pcilib_log_once calls |
7 |
typedef enum { |
8 |
PCILIB_LOG_DEFAULT = 0, |
|
9 |
PCILIB_LOG_ONCE = 1 |
|
10 |
} pcilib_log_flags_t; |
|
11 |
||
383
by Suren A. Chilingaryan
Add missing typedef to the pcilib_error_t |
12 |
typedef enum { |
7.1.1
by Suren A. Chilingaryan
Initial support of IPECamera protocol |
13 |
PCILIB_ERROR_SUCCESS = 0, |
126
by Suren A. Chilingaryan
multithread preprocessing of ipecamera frames and code reorganization |
14 |
PCILIB_ERROR_MEMORY = ENOMEM, |
15 |
PCILIB_ERROR_INVALID_REQUEST = EBADR, |
|
16 |
PCILIB_ERROR_INVALID_ADDRESS = EFAULT, |
|
17 |
PCILIB_ERROR_INVALID_BANK = ENOENT, |
|
18 |
PCILIB_ERROR_INVALID_DATA = EILSEQ, |
|
19 |
PCILIB_ERROR_INVALID_STATE = EBADFD, |
|
20 |
PCILIB_ERROR_INVALID_ARGUMENT = EINVAL, |
|
21 |
PCILIB_ERROR_TIMEOUT = ETIME, |
|
22 |
PCILIB_ERROR_FAILED = EBADE, |
|
23 |
PCILIB_ERROR_VERIFY = EREMOTEIO, |
|
24 |
PCILIB_ERROR_NOTSUPPORTED = ENOTSUP, |
|
25 |
PCILIB_ERROR_NOTFOUND = ESRCH, |
|
26 |
PCILIB_ERROR_OUTOFRANGE = ERANGE, |
|
27 |
PCILIB_ERROR_NOTAVAILABLE = ENAVAIL, |
|
28 |
PCILIB_ERROR_NOTINITIALIZED = EBADFD, |
|
315
by Suren A. Chilingaryan
Support properties of arbitrary type |
29 |
PCILIB_ERROR_NOTPERMITED = EPERM, |
126
by Suren A. Chilingaryan
multithread preprocessing of ipecamera frames and code reorganization |
30 |
PCILIB_ERROR_TOOBIG = EFBIG, |
174
by Suren A. Chilingaryan
Check for free space in camera DDR buffer before triggering event |
31 |
PCILIB_ERROR_OVERWRITTEN = ESTALE, |
303
by Suren A. Chilingaryan
Initial integration of XML support |
32 |
PCILIB_ERROR_BUSY = EBUSY, |
33 |
PCILIB_ERROR_EXIST = EEXIST |
|
7.1.1
by Suren A. Chilingaryan
Initial support of IPECamera protocol |
34 |
} pcilib_errot_t; |
35 |
||
277
by Suren A. Chilingaryan
Keep C++ compilers happy |
36 |
#ifdef __cplusplus
|
37 |
extern "C" { |
|
38 |
#endif
|
|
39 |
||
263
by Suren A. Chilingaryan
Support pcilib_log_once calls |
40 |
void pcilib_log_message(const char *file, int line, pcilib_log_flags_t flags, pcilib_log_priority_t prio, const char *msg, ...); |
41 |
void pcilib_log_vmessage(const char *file, int line, pcilib_log_flags_t flags, pcilib_log_priority_t prio, const char *msg, va_list va); |
|
247
by Suren A. Chilingaryan
New error reporting public interface |
42 |
|
346.1.15
by Vasilii Chernov
1. Add python thread initialization to pcilib_init_py() |
43 |
/**
|
44 |
* Gets current logger function.
|
|
45 |
*/
|
|
46 |
pcilib_logger_t pcilib_get_logger(); |
|
47 |
||
48 |
/**
|
|
49 |
* Gets current logger min priority.
|
|
50 |
*/
|
|
346.1.16
by Vasilii Chernov
1. Add cmake BUILD_PYTHON_MODULES option. |
51 |
pcilib_log_priority_t pcilib_get_log_level(); |
346.1.15
by Vasilii Chernov
1. Add python thread initialization to pcilib_init_py() |
52 |
|
53 |
/**
|
|
54 |
* Gets current logger argument.
|
|
55 |
*/
|
|
346.1.16
by Vasilii Chernov
1. Add cmake BUILD_PYTHON_MODULES option. |
56 |
void* pcilib_get_logger_context(); |
277
by Suren A. Chilingaryan
Keep C++ compilers happy |
57 |
|
58 |
#ifdef __cplusplus
|
|
59 |
}
|
|
60 |
#endif
|
|
61 |
||
247
by Suren A. Chilingaryan
New error reporting public interface |
62 |
#define pcilib_log(prio, ...) \
|
263
by Suren A. Chilingaryan
Support pcilib_log_once calls |
63 |
pcilib_log_message(__FILE__, __LINE__, PCILIB_LOG_DEFAULT, prio, __VA_ARGS__)
|
64 |
||
65 |
#define pcilib_log_once(prio, ...) \
|
|
66 |
pcilib_log_message(__FILE__, __LINE__, PCILIB_LOG_ONCE, prio, __VA_ARGS__)
|
|
247
by Suren A. Chilingaryan
New error reporting public interface |
67 |
|
68 |
#define pcilib_error(...) pcilib_log(PCILIB_LOG_ERROR, __VA_ARGS__)
|
|
256
by Suren A. Chilingaryan
Fix typos in versioning code |
69 |
#define pcilib_warning(...) pcilib_log(PCILIB_LOG_WARNING, __VA_ARGS__)
|
247
by Suren A. Chilingaryan
New error reporting public interface |
70 |
#define pcilib_info(...) pcilib_log(PCILIB_LOG_INFO, __VA_ARGS__)
|
263
by Suren A. Chilingaryan
Support pcilib_log_once calls |
71 |
#define pcilib_warning_once(...) pcilib_log_once(PCILIB_LOG_WARNING, __VA_ARGS__)
|
72 |
#define pcilib_info_once(...) pcilib_log_once(PCILIB_LOG_INFO, __VA_ARGS__)
|
|
247
by Suren A. Chilingaryan
New error reporting public interface |
73 |
|
126
by Suren A. Chilingaryan
multithread preprocessing of ipecamera frames and code reorganization |
74 |
|
7.1.1
by Suren A. Chilingaryan
Initial support of IPECamera protocol |
75 |
#endif /* _PCILIB_ERROR_H */ |