blob: 87567320d08aaedaf011a9b1d40645cd288a82ca (
plain)
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
|
#ifndef DISTRIO_COMMON_IDL
#define DISTRIO_COMMON_IDL
/**
* @brief shared between different modules
*
* - definitions for error handling
*
* @author Manuel Traut <manut@mecka.net>
* @copyright GPLv2
*
*/
module Distrio {
/**
* @brief kind of error
*/
enum Error_code {
SUCCESS,
E_INVAL,
E_NOTSUPPORTED
};
/**
* @brief used for filtering and classification
*/
enum Error_level {
L_DEBUG,
L_INFO,
L_WARNING,
L_NORMAL,
L_CRITICAL
};
/**
* @brief describes when the error was detected
* (it's helpful to sync all boards with ntp)
*/
struct Error_timestamp {
long seconds;
long nanoseconds;
};
/**
* @brief description of an error
*/
struct Error {
Error_code code;
Error_level level;
Error_timestamp time;
/** id of the digital/analog IO or the IO device */
long module_id;
/** a human readable description which can be displayed in GUIs */
string description;
};
};
#endif
|