File tree Expand file tree Collapse file tree 2 files changed +16
-10
lines changed Expand file tree Collapse file tree 2 files changed +16
-10
lines changed Original file line number Diff line number Diff line change 7
7
GATTLIB_SUCCESS = 0
8
8
GATTLIB_INVALID_PARAMETER = 1
9
9
GATTLIB_NOT_FOUND = 2
10
- GATTLIB_OUT_OF_MEMORY = 3
11
- GATTLIB_NOT_SUPPORTED = 4
12
- GATTLIB_DEVICE_ERROR = 5
13
- GATTLIB_ERROR_DBUS = 6
10
+ GATTLIB_ERROR_TIMEOUT = 3
11
+ GATTLIB_OUT_OF_MEMORY = 4
12
+ GATTLIB_NOT_SUPPORTED = 5
13
+ GATTLIB_DEVICE_ERROR = 6
14
+ GATTLIB_ERROR_DBUS = 7
15
+ GATTLIB_ERROR_BLUEZ = 8
16
+ GATTLIB_ERROR_INTERNAL = 9
14
17
15
18
16
19
class GattlibException (Exception ):
@@ -56,6 +59,8 @@ def handle_return(ret):
56
59
raise NotFound ()
57
60
elif ret == GATTLIB_OUT_OF_MEMORY :
58
61
raise OutOfMemory ()
62
+ elif ret == GATTLIB_ERROR_TIMEOUT :
63
+ raise TimeoutError ()
59
64
elif ret == GATTLIB_NOT_SUPPORTED :
60
65
raise NotSupported ()
61
66
elif ret == GATTLIB_DEVICE_ERROR :
Original file line number Diff line number Diff line change @@ -38,12 +38,13 @@ extern "C" {
38
38
#define GATTLIB_SUCCESS 0
39
39
#define GATTLIB_INVALID_PARAMETER 1
40
40
#define GATTLIB_NOT_FOUND 2
41
- #define GATTLIB_OUT_OF_MEMORY 3
42
- #define GATTLIB_NOT_SUPPORTED 4
43
- #define GATTLIB_DEVICE_ERROR 5
44
- #define GATTLIB_ERROR_DBUS 6
45
- #define GATTLIB_ERROR_BLUEZ 7
46
- #define GATTLIB_ERROR_INTERNAL 8
41
+ #define GATTLIB_ERROR_TIMEOUT 3
42
+ #define GATTLIB_OUT_OF_MEMORY 4
43
+ #define GATTLIB_NOT_SUPPORTED 5
44
+ #define GATTLIB_DEVICE_ERROR 6
45
+ #define GATTLIB_ERROR_DBUS 7
46
+ #define GATTLIB_ERROR_BLUEZ 8
47
+ #define GATTLIB_ERROR_INTERNAL 9
47
48
//@}
48
49
49
50
/**
You can’t perform that action at this time.
0 commit comments