File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 77GATTLIB_SUCCESS = 0
88GATTLIB_INVALID_PARAMETER = 1
99GATTLIB_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
1417
1518
1619class GattlibException (Exception ):
@@ -56,6 +59,8 @@ def handle_return(ret):
5659 raise NotFound ()
5760 elif ret == GATTLIB_OUT_OF_MEMORY :
5861 raise OutOfMemory ()
62+ elif ret == GATTLIB_ERROR_TIMEOUT :
63+ raise TimeoutError ()
5964 elif ret == GATTLIB_NOT_SUPPORTED :
6065 raise NotSupported ()
6166 elif ret == GATTLIB_DEVICE_ERROR :
Original file line number Diff line number Diff line change @@ -38,12 +38,13 @@ extern "C" {
3838#define GATTLIB_SUCCESS 0
3939#define GATTLIB_INVALID_PARAMETER 1
4040#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
4748//@}
4849
4950/**
You can’t perform that action at this time.
0 commit comments