18#ifndef NIMBLECONNINFO_H_
19#define NIMBLECONNINFO_H_
21#if defined(CONFIG_NIMBLE_CPP_IDF)
22# include "host/ble_gap.h"
24# include "nimble/nimble/host/include/host/ble_gap.h"
27#include "NimBLEAddress.h"
56 bool isMaster()
const {
return (m_desc.
role == BLE_GAP_ROLE_MASTER); }
59 bool isSlave()
const {
return (m_desc.
role == BLE_GAP_ROLE_SLAVE); }
A BLE device address.
Definition NimBLEAddress.h:41
The model of a BLE Characteristic.
Definition NimBLECharacteristic.h:40
A model of a BLE client.
Definition NimBLEClient.h:49
Connection information.
Definition NimBLEConnInfo.h:32
uint16_t getConnLatency() const
Gets the allowable latency for this connection (unit = number of intervals)
Definition NimBLEConnInfo.h:50
NimBLEAddress getAddress() const
Gets the over-the-air address of the connected peer.
Definition NimBLEConnInfo.h:35
uint16_t getMTU() const
Gets the maximum transmission unit size for this connection (in bytes)
Definition NimBLEConnInfo.h:53
NimBLEAddress getIdAddress() const
Gets the ID address of the connected peer.
Definition NimBLEConnInfo.h:38
bool isEncrypted() const
Check if the connection in encrypted.
Definition NimBLEConnInfo.h:65
uint8_t getSecKeySize() const
Gets the key size used to encrypt the connection.
Definition NimBLEConnInfo.h:71
bool isMaster() const
Check if we are in the master role in this connection.
Definition NimBLEConnInfo.h:56
bool isAuthenticated() const
Check if the the connection has been authenticated.
Definition NimBLEConnInfo.h:68
uint16_t getConnHandle() const
Gets the connection handle (also known as the connection id) of the connected peer.
Definition NimBLEConnInfo.h:41
uint16_t getConnTimeout() const
Gets the supervision timeout for this connection (in 10ms units)
Definition NimBLEConnInfo.h:47
uint16_t getConnInterval() const
Gets the connection interval for this connection (in 1.25ms units)
Definition NimBLEConnInfo.h:44
bool isSlave() const
Check if we are in the slave role in this connection.
Definition NimBLEConnInfo.h:59
bool isBonded() const
Check if we are connected to a bonded peer.
Definition NimBLEConnInfo.h:62
A model of a BLE descriptor.
Definition NimBLEDescriptor.h:33
The model of a BLE server.
Definition NimBLEServer.h:60
uint16_t ble_att_mtu(uint16_t conn_handle)
Connection descriptor.
Definition ble_gap.h:249
ble_addr_t peer_ota_addr
Definition ble_gap.h:263
uint8_t role
Definition ble_gap.h:280
struct ble_gap_sec_state sec_state
Definition ble_gap.h:251
uint16_t supervision_timeout
Definition ble_gap.h:275
uint16_t conn_latency
Definition ble_gap.h:272
uint16_t conn_handle
Definition ble_gap.h:266
ble_addr_t peer_id_addr
Definition ble_gap.h:257
uint16_t conn_itvl
Definition ble_gap.h:269
unsigned bonded
Definition ble_gap.h:210
unsigned key_size
Definition ble_gap.h:213
unsigned authenticated
Definition ble_gap.h:207
unsigned encrypted
Definition ble_gap.h:204