diff options
author | Sven Gothel <[email protected]> | 2020-08-27 23:18:30 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2020-08-27 23:18:30 +0200 |
commit | 15686be6e6a53f266515bb4bd3f88cd7e7372512 (patch) | |
tree | 937823a211691a3e0cd8da56c8c815357fe60b22 /api/direct_bt/DBTManager.hpp | |
parent | 59a333efa97cf5e7fbc57ed011f06a81b90f48f9 (diff) |
DBTManager, HCIHandler, GATTHandler: Have all timeout+ config values read from environment via DBTEnv
Only default value change:
- GATTHandler::L2CAP_READER_THREAD_POLL_TIMEOUT: 3s -> 10s (aligning w/ others)
- GATTHandler::GATT_WRITE_COMMAND_REPLY_TIMEOUT: Back to 500ms default like GATT_READ_COMMAND_REPLY_TIMEOUT
Using int32_t timeout, i.e. 31 bits suitable for extreme maximum.
Diffstat (limited to 'api/direct_bt/DBTManager.hpp')
-rw-r--r-- | api/direct_bt/DBTManager.hpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/api/direct_bt/DBTManager.hpp b/api/direct_bt/DBTManager.hpp index f5e75d7a..c5a7de18 100644 --- a/api/direct_bt/DBTManager.hpp +++ b/api/direct_bt/DBTManager.hpp @@ -59,18 +59,18 @@ namespace direct_bt { */ class DBTManager : public JavaUplink { public: - enum Defaults : int { + enum Defaults : int32_t { /* BT Core Spec v5.2: Vol 3, Part F 3.2.8: Maximum length of an attribute value. */ ClientMaxMTU = 512, - - /** 10s poll timeout for mgmt reader thread */ - MGMT_READER_THREAD_POLL_TIMEOUT = 10000, - /** 3s timeout for mgmt command replies */ - MGMT_COMMAND_REPLY_TIMEOUT = 3000, - /** Small ringbuffer capacity for synchronized commands */ - MGMTEVT_RING_CAPACITY = 64 }; + /** Poll timeout for mgmt reader thread, defaults to 10s. */ + static const int32_t MGMT_READER_THREAD_POLL_TIMEOUT; + /** Timeout for mgmt command replies, defaults to 3s. */ + static const int32_t MGMT_COMMAND_REPLY_TIMEOUT; + /** Small ringbuffer capacity for synchronized commands, defaults to 64 messages. */ + static const int32_t MGMTEVT_RING_CAPACITY; + static const pid_t pidSelf; private: |