aboutsummaryrefslogtreecommitdiffstats
path: root/api
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2020-06-01 02:52:08 +0200
committerSven Gothel <[email protected]>2020-06-01 02:52:08 +0200
commit171eda5060c20e190b960600e823c108c74ab2be (patch)
treefdfcf081c294753c0ba6b4f068e7397e9d5db650 /api
parent728cbb0c31ac8cab0cc6e7551c78adab5e2a4a4d (diff)
Clarify le_scan and conn[ection] arguments for whitelist and connect methods C++/Java, fix timeout semantics (API doc)
Diffstat (limited to 'api')
-rw-r--r--api/direct_bt/DBTAdapter.hpp13
-rw-r--r--api/direct_bt/DBTDevice.hpp16
-rw-r--r--api/direct_bt/DBTManager.hpp13
-rw-r--r--api/direct_bt/HCIComm.hpp6
4 files changed, 38 insertions, 10 deletions
diff --git a/api/direct_bt/DBTAdapter.hpp b/api/direct_bt/DBTAdapter.hpp
index 3813fd5d..cef32699 100644
--- a/api/direct_bt/DBTAdapter.hpp
+++ b/api/direct_bt/DBTAdapter.hpp
@@ -317,11 +317,20 @@ namespace direct_bt {
* <p>
* Method will reject duplicate devices, in which case it should be removed first.
* </p>
+ *
+ * @param address
+ * @param address_type
+ * @param ctype
+ * @param conn_interval_min default value 0x000F
+ * @param conn_interval_max default value 0x000F
+ * @param conn_latency default value 0x0000
+ * @param timeout in units of 10ms, default value 1000 for 10000ms or 10s.
+ * @return
*/
bool addDeviceToWhitelist(const EUI48 &address, const BDAddressType address_type,
const HCIWhitelistConnectType ctype,
- const uint16_t min_interval=0x000F, const uint16_t max_interval=0x000F,
- const uint16_t latency=0x0000, const uint16_t timeout=HCI_LE_CONN_TIMEOUT_MS/10);
+ const uint16_t conn_interval_min=0x000F, const uint16_t conn_interval_max=0x000F,
+ const uint16_t conn_latency=0x0000, const uint16_t timeout=HCI_LE_CONN_TIMEOUT_MS/10);
/** Remove the given device from the adapter's autoconnect whitelist. */
diff --git a/api/direct_bt/DBTDevice.hpp b/api/direct_bt/DBTDevice.hpp
index e5f86818..724aa529 100644
--- a/api/direct_bt/DBTDevice.hpp
+++ b/api/direct_bt/DBTDevice.hpp
@@ -177,12 +177,22 @@ namespace direct_bt {
* <p>
* Set window to the same value as the interval, enables continuous scanning.
* </p>
+ *
+ * @param peer_mac_type
+ * @param own_mac_type
+ * @param le_scan_interval default value 0x0004
+ * @param le_scan_window default value 0x0004
+ * @param conn_interval_min default value 0x000F
+ * @param conn_interval_max default value 0x000F
+ * @param conn_latency default value 0x0000
+ * @param supervision_timeout in units of 10ms, default value 1000 for 10000ms or 10s.
+ * @return
*/
uint16_t connectLE(const HCIAddressType peer_mac_type=HCIAddressType::HCIADDR_LE_PUBLIC,
const HCIAddressType own_mac_type=HCIAddressType::HCIADDR_LE_PUBLIC,
- const uint16_t interval=0x0004, const uint16_t window=0x0004,
- const uint16_t min_interval=0x000F, const uint16_t max_interval=0x000F,
- const uint16_t latency=0x0000, const uint16_t supervision_timeout=HCI_LE_CONN_TIMEOUT_MS/10);
+ const uint16_t le_scan_interval=0x0004, const uint16_t le_scan_window=0x0004,
+ const uint16_t conn_interval_min=0x000F, const uint16_t conn_interval_max=0x000F,
+ const uint16_t conn_latency=0x0000, const uint16_t supervision_timeout=HCI_LE_CONN_TIMEOUT_MS/10);
/**
* Establish a HCI BDADDR_BREDR connection to this device.
diff --git a/api/direct_bt/DBTManager.hpp b/api/direct_bt/DBTManager.hpp
index 5ebcf925..15e46098 100644
--- a/api/direct_bt/DBTManager.hpp
+++ b/api/direct_bt/DBTManager.hpp
@@ -245,10 +245,19 @@ namespace direct_bt {
/**
* Uploads given connection parameter for given device to the kernel.
+ *
+ * @param dev_id
+ * @param address
+ * @param address_type
+ * @param conn_interval_min default value 0x000F
+ * @param conn_interval_max default value 0x000F
+ * @param conn_latency default value 0x0000
+ * @param timeout in units of 10ms, default value 1000 for 10000ms or 10s.
+ * @return
*/
bool uploadConnParam(const int dev_id, const EUI48 &address, const BDAddressType address_type,
- const uint16_t min_interval=0x000F, const uint16_t max_interval=0x000F,
- const uint16_t latency=0x0000, const uint16_t timeout=HCI_LE_CONN_TIMEOUT_MS/10);
+ const uint16_t conn_interval_min=0x000F, const uint16_t conn_interval_max=0x000F,
+ const uint16_t conn_latency=0x0000, const uint16_t timeout=HCI_LE_CONN_TIMEOUT_MS/10);
/**
* Returns true, if the adapter's device is already whitelisted.
diff --git a/api/direct_bt/HCIComm.hpp b/api/direct_bt/HCIComm.hpp
index f437e9fc..2f5e4dc1 100644
--- a/api/direct_bt/HCIComm.hpp
+++ b/api/direct_bt/HCIComm.hpp
@@ -220,9 +220,9 @@ namespace direct_bt {
HCIErrorCode le_create_conn(uint16_t * handle_return, const EUI48 &peer_bdaddr,
const HCIAddressType peer_mac_type=HCIAddressType::HCIADDR_LE_PUBLIC,
const HCIAddressType own_mac_type=HCIAddressType::HCIADDR_LE_PUBLIC,
- const uint16_t interval=0x0004, const uint16_t window=0x0004,
- const uint16_t min_interval=0x000F, const uint16_t max_interval=0x000F,
- const uint16_t latency=0x0000, const uint16_t supervision_timeout=HCI_LE_CONN_TIMEOUT_MS/10);
+ const uint16_t le_scan_interval=0x0004, const uint16_t le_scan_window=0x0004,
+ const uint16_t conn_interval_min=0x000F, const uint16_t conn_interval_max=0x000F,
+ const uint16_t conn_latency=0x0000, const uint16_t supervision_timeout=HCI_LE_CONN_TIMEOUT_MS/10);
/**
* Establish a connection to the given BREDR (non LE).