Direct-BT v3.3.0-1-gc2d430c
Direct-BT - Direct Bluetooth Programming.
|
A thread safe singleton handler of the HCI control channel to one controller (BT adapter) More...
#include <HCIHandler.hpp>
Public Types | |
enum | DefaultsSizeT : jau::nsize_t { HCI_MAX_MTU = static_cast<jau::nsize_t>(HCIConstSizeT::PACKET_MAX_SIZE) } |
typedef std::shared_ptr< HCIConnection > | HCIConnectionRef |
typedef jau::darray< HCIConnectionRef, size_type > | HCIConnectionRefList_t |
typedef jau::function< HCIStatusCode() > | PostShutdownFunc |
Use post shutdown function, considered to be noexcept . More... | |
typedef jau::nsize_t | size_type |
Public Member Functions | |
HCIHandler (const HCIHandler &)=delete | |
HCIHandler (const uint16_t dev_id, const BTMode btMode=BTMode::NONE) noexcept | |
~HCIHandler () noexcept | |
Releases this instance after issuing close() . More... | |
bool | addMgmtEventCallback (const MgmtEvent::Opcode opc, const MgmtEventCallback &cb) noexcept |
MgmtEventCallback handling More... | |
void | addSMPMsgCallback (const HCISMPMsgCallback &l) |
void | clearAllCallbacks () noexcept |
Removes all MgmtEventCallbacks from all MgmtEvent::Opcode lists and all SMPSecurityReqCallbacks. More... | |
void | clearMgmtEventCallbacks (const MgmtEvent::Opcode opc) noexcept |
Removes all MgmtEventCallbacks from the to the named MgmtEvent::Opcode list. More... | |
void | close () noexcept |
HCIStatusCode | create_conn (const EUI48 &bdaddr, const uint16_t pkt_type=HCI_DM1|HCI_DM3|HCI_DM5|HCI_DH1|HCI_DH3|HCI_DH5, const uint16_t clock_offset=0x0000, const uint8_t role_switch=0x01) noexcept |
Establish a connection to the given BREDR (non LE). More... | |
HCIStatusCode | disconnect (const uint16_t conn_handle, const BDAddressAndType &peerAddressAndType, const HCIStatusCode reason=HCIStatusCode::REMOTE_USER_TERMINATED_CONNECTION) noexcept |
Disconnect an established connection. More... | |
BTMode | getBTMode () const noexcept |
ScanType | getCurrentScanType () const noexcept |
HCIStatusCode | getLocalVersion (HCILocalVersion &version) noexcept |
bool | isAdvertising () const noexcept |
Advertising is enabled via le_start_adv() or le_enable_adv(). More... | |
bool | isOpen () const noexcept |
Returns true if this mgmt instance is open, connected and hence valid, otherwise false. More... | |
HCIStatusCode | le_add_to_resolv_list (const BDAddressAndType &peerIdentityAddressAndType, jau::uint128dp_t &peer_irk, jau::uint128dp_t &local_irk) noexcept |
BT Core Spec v5.2: Vol 4, Part E HCI: 7.8.38 LE Add Device To Resolving List command. More... | |
HCIStatusCode | le_clear_resolv_list () noexcept |
BT Core Spec v5.2: Vol 4, Part E HCI: 7.8.40 LE Clear Resolving List command. More... | |
HCIStatusCode | le_create_conn (const EUI48 &peer_bdaddr, const HCILEPeerAddressType peer_mac_type=HCILEPeerAddressType::PUBLIC, const HCILEOwnAddressType own_mac_type=HCILEOwnAddressType::PUBLIC, const uint16_t le_scan_interval=24, const uint16_t le_scan_window=24, const uint16_t conn_interval_min=8, const uint16_t conn_interval_max=12, const uint16_t conn_latency=0, const uint16_t supervision_timeout=getHCIConnSupervisorTimeout(0, 15)) noexcept |
Establish a connection to the given LE peer. More... | |
HCIStatusCode | le_del_from_resolv_list (const BDAddressAndType &peerIdentityAddressAndType) noexcept |
BT Core Spec v5.2: Vol 4, Part E HCI: 7.8.39 LE Remove Device From Resolving List command. More... | |
HCIStatusCode | le_enable_adv (const bool enable) noexcept |
Enables or disabled advertising. More... | |
HCIStatusCode | le_enable_scan (const bool enable, const bool filter_dup=true) noexcept |
Starts or stops LE scanning. More... | |
LE_Features | le_get_local_features () noexcept |
Return previously fetched LE_Features for the controller via initSupCommands() via resetAllStates() More... | |
HCIStatusCode | le_read_local_resolv_addr (const BDAddressAndType &peerIdentityAddressAndType, jau::EUI48 &localResolvableAddress) noexcept |
BT Core Spec v5.2: Vol 4, Part E HCI: 7.8.43 LE Read Local Resolvable Address command. More... | |
HCIStatusCode | le_read_peer_resolv_addr (const BDAddressAndType &peerIdentityAddressAndType, jau::EUI48 &peerResolvableAddress) noexcept |
BT Core Spec v5.2: Vol 4, Part E HCI: 7.8.42 LE Read Peer Resolvable Address command. More... | |
HCIStatusCode | le_read_phy (const uint16_t conn_handle, const BDAddressAndType &peerAddressAndType, LE_PHYs &resTx, LE_PHYs &resRx) noexcept |
Request and return LE_PHYs bit for the given connection. More... | |
HCIStatusCode | le_read_remote_features (const uint16_t conn_handle, const BDAddressAndType &peerAddressAndType) noexcept |
Request supported LE_Features from remote device. More... | |
HCIStatusCode | le_read_resolv_list_size (uint32_t &size_res) noexcept |
BT Core Spec v5.2: Vol 4, Part E HCI: 7.8.41 LE Read Resolving List Size command. More... | |
HCIStatusCode | le_set_addr_resolv_enable (const bool enable) noexcept |
BT Core Spec v5.2: Vol 4, Part E HCI: 7.8.44 LE Set Address Resolution Enable command. More... | |
HCIStatusCode | le_set_default_phy (const LE_PHYs Tx, const LE_PHYs Rx) noexcept |
Sets default preference of used LE_PHYs for all subsequent LE connections. More... | |
HCIStatusCode | le_set_phy (const uint16_t conn_handle, const BDAddressAndType &peerAddressAndType, const LE_PHYs Tx, const LE_PHYs Rx) noexcept |
Sets preference of used LE_PHYs for the given connection. More... | |
HCIStatusCode | le_start_adv (const EInfoReport &eir, const EIRDataType adv_mask=EIRDataType::FLAGS|EIRDataType::SERVICE_UUID, const EIRDataType scanrsp_mask=EIRDataType::NAME|EIRDataType::CONN_IVAL, const EUI48 &peer_bdaddr=EUI48::ANY_DEVICE, const HCILEOwnAddressType own_mac_type=HCILEOwnAddressType::PUBLIC, const HCILEOwnAddressType peer_mac_type=HCILEOwnAddressType::PUBLIC, const uint16_t adv_interval_min=160, const uint16_t adv_interval_max=480, const AD_PDU_Type adv_type=AD_PDU_Type::ADV_IND, const uint8_t adv_chan_map=0x07, const uint8_t filter_policy=0x00) noexcept |
Starts advertising. More... | |
HCIStatusCode | le_start_scan (const bool filter_dup=true, const bool le_scan_active=true, const HCILEOwnAddressType own_mac_type=HCILEOwnAddressType::PUBLIC, const uint16_t le_scan_interval=24, const uint16_t le_scan_window=24, const uint8_t filter_policy=0x00) noexcept |
Start LE scanning, i.e. More... | |
void | operator= (const HCIHandler &)=delete |
size_type | removeMgmtEventCallback (const MgmtEvent::Opcode opc, const MgmtEventCallback &cb) noexcept |
Returns count of removed given MgmtEventCallback from the named MgmtEvent::Opcode list. More... | |
size_type | removeSMPMsgCallback (const HCISMPMsgCallback &l) |
HCIStatusCode | resetAdapter (const PostShutdownFunc &user_post_shutdown) |
Complete adapter reset. More... | |
bool | resetAllStates (const bool powered_on) noexcept |
Reset all internal states, i.e. More... | |
void | sendMgmtEvent (const MgmtEvent &event) noexcept |
Manually send a MgmtEvent to all of its listeners. More... | |
void | setBTMode (const BTMode mode) noexcept |
void | setCurrentScanType (const ScanType v) noexcept |
void | setResolvHCIConnectionAddr (const BDAddressAndType &visibleAddressAndType, const BDAddressAndType &addressAndType) noexcept |
std::string | toString () const noexcept |
bool | use_ext_adv () const noexcept |
Use extended advertising if LE_Features::LE_Ext_Adv is set (Bluetooth 5.0). More... | |
bool | use_ext_conn () const noexcept |
Use extended connection if HCI_LE_Extended_Create_Connection is supported (Bluetooth 5.0). More... | |
bool | use_ext_scan () const noexcept |
Use extended scanning if HCI_LE_Set_Extended_Scan_Parameters and HCI_LE_Set_Extended_Scan_Enable is supported (Bluetooth 5.0). More... | |
bool | use_resolv_add () const noexcept |
bool | use_resolv_clear () const noexcept |
bool | use_resolv_del () const noexcept |
bool | use_resolv_enable () const noexcept |
bool | use_resolv_readLocalRA () const noexcept |
bool | use_resolv_readPeerRA () const noexcept |
bool | use_resolv_size () const noexcept |
Public Attributes | |
const HCIEnv & | env |
A thread safe singleton handler of the HCI control channel to one controller (BT adapter)
Implementation utilizes a lock free ringbuffer receiving data within its separate thread.
Controlling Environment variables, see HCIEnv
.
Definition at line 179 of file HCIHandler.hpp.
Definition at line 187 of file HCIHandler.hpp.
typedef std::shared_ptr<HCIConnection> direct_bt::HCIHandler::HCIConnectionRef |
Definition at line 237 of file HCIHandler.hpp.
Definition at line 238 of file HCIHandler.hpp.
Use post shutdown function, considered to be noexcept
.
HCIStatusCode post_shutdown() noexcept
Definition at line 481 of file HCIHandler.hpp.
Enumerator | |
---|---|
HCI_MAX_MTU |
Definition at line 181 of file HCIHandler.hpp.
|
noexcept |
Definition at line 686 of file HCIHandler.cpp.
|
delete |
|
inlinenoexcept |
Releases this instance after issuing close()
.
Definition at line 396 of file HCIHandler.hpp.
|
inlinenoexcept |
Definition at line 298 of file HCIHandler.hpp.
|
delete |
|
noexcept |
|
inlinenoexcept |
Definition at line 400 of file HCIHandler.hpp.
|
inlinenoexcept |
Definition at line 402 of file HCIHandler.hpp.
|
inlinenoexcept |
Returns true if this mgmt instance is open, connected and hence valid, otherwise false.
Definition at line 405 of file HCIHandler.hpp.
|
inlinenoexcept |
Use extended scanning if HCI_LE_Set_Extended_Scan_Parameters and HCI_LE_Set_Extended_Scan_Enable is supported (Bluetooth 5.0).
Definition at line 410 of file HCIHandler.hpp.
|
inlinenoexcept |
Use extended connection if HCI_LE_Extended_Create_Connection is supported (Bluetooth 5.0).
Definition at line 416 of file HCIHandler.hpp.
|
inlinenoexcept |
Definition at line 420 of file HCIHandler.hpp.
|
inlinenoexcept |
Definition at line 421 of file HCIHandler.hpp.
|
inlinenoexcept |
|
inlinenoexcept |
Definition at line 423 of file HCIHandler.hpp.
|
inlinenoexcept |
Definition at line 424 of file HCIHandler.hpp.
|
inlinenoexcept |
Definition at line 425 of file HCIHandler.hpp.
|
inlinenoexcept |
Definition at line 426 of file HCIHandler.hpp.
|
inlinenoexcept |
Use extended advertising if LE_Features::LE_Ext_Adv is set (Bluetooth 5.0).
Definition at line 429 of file HCIHandler.hpp.
|
inlinenoexcept |
|
inlinenoexcept |
Definition at line 434 of file HCIHandler.hpp.
|
inlinenoexcept |
Advertising is enabled via le_start_adv() or le_enable_adv().
Advertising is active until either disabled via le_enable_adv(false) or a connection has been made.
Definition at line 443 of file HCIHandler.hpp.
|
noexcept |
HCIStatusCode HCIHandler::resetAdapter | ( | const PostShutdownFunc & | user_post_shutdown | ) |
Complete adapter reset.
The semantics are specific to the HCI host implementation, however, it shall comply at least with the HCI Reset command.
The adapter shall be shutdown into standby first, i.e. POWERED off, then the adapter should be brought up into a POWERED functional state afterwards.
BT Core Spec v5.2: Vol 4, Part E HCI: 7.3.2 Reset command
user_post_shutdown | optional custom user function to be executed after successful adapter shutdown. If function is not null and returns false, the adapter will not be brought up again. |
Definition at line 1049 of file HCIHandler.cpp.
|
noexcept |
Reset all internal states, i.e.
connection and disconnect lists.
Must be explicitly called with powered_on=true
when adapter is powered on!
powered_on | indicates whether the adapter is powered on or not |
Definition at line 1086 of file HCIHandler.cpp.
|
noexcept |
Definition at line 1117 of file HCIHandler.cpp.
|
inlinenoexcept |
Return previously fetched LE_Features for the controller via initSupCommands() via resetAllStates()
BT Core Spec v5.2: Vol 6, Part B, 4.6 (LE LL) Feature Support BT Core Spec v5.2: Vol 4, Part E, 7.8.3 LE Read Local Supported Features command
res | reference for the resulting LE_Features |
Definition at line 532 of file HCIHandler.hpp.
|
noexcept |
Request supported LE_Features from remote device.
BT Core Spec v5.2: Vol 6, Part B, 4.6 (LE LL) Feature Support BT Core Spec v5.2: Vol 4, Part E, 7.8.21 LE Read Remote Features command
Method returns immediate without result.
Result is being delivered off-thread via HCIMetaEventType::LE_REMOTE_FEAT_COMPLETE, see
BT Core Spec v5.2: Vol 4, Part E, 7.7.65.4 LE Read Remote Features Complete event
Definition at line 932 of file HCIHandler.cpp.
|
noexcept |
Starts or stops LE scanning.
BT Core Spec v5.2: Vol 4 HCI, Part E HCI Functional: 7.8.65 LE Set Extended Scan Enable command (Bluetooth 5.0) if available, otherwise using BT Core Spec v5.2: Vol 4, Part E HCI: 7.8.11 LE Set Scan Enable command
enable | true to enable discovery, otherwise false |
filter_dup | true to filter out duplicate AD PDUs (default), otherwise all will be reported. |
Definition at line 1195 of file HCIHandler.cpp.
|
noexcept |
Start LE scanning, i.e.
performs le_set_scan_param() and le_enable_scan() in one atomic operation.
BT Core Spec v5.2: Vol 4 HCI, Part E HCI Functional: 7.8.64 LE Set Extended Scan Parameters command (Bluetooth 5.0) BT Core Spec v5.2: Vol 4 HCI, Part E HCI Functional: 7.8.10 LE Set Scan Parameters command BT Core Spec v5.2: Vol 4 HCI, Part E HCI Functional: 7.8.65 LE Set Extended Scan Enable command (Bluetooth 5.0) BT Core Spec v5.2: Vol 4, Part E HCI: 7.8.11 LE Set Scan Enable command
<p<blockquote>
Scan parameters control advertising (AD) Protocol Data Unit (PDU) delivery behavior.
Should not be called while LE scanning is active, otherwise HCIStatusCode::COMMAND_DISALLOWED will be returned.
Method will report errors.
filter_dup | true to filter out duplicate AD PDUs (default), otherwise all will be reported. |
le_scan_active | true enables delivery of active scanning PDUs like EIR w/ device name (default), otherwise no scanning PDUs shall be sent. |
own_mac_type | HCILEOwnAddressType::PUBLIC (default) or random/private. |
le_scan_interval | in units of 0.625ms, default value 24 for 15ms; Value range [4 .. 0x4000] for [2.5ms .. 10.24s] |
le_scan_window | in units of 0.625ms, default value 24 for 15ms; Value range [4 .. 0x4000] for [2.5ms .. 10.24s]. Shall be <= le_scan_interval |
filter_policy | 0x00 accepts all PDUs (default), 0x01 only of whitelisted, ... |
Definition at line 1243 of file HCIHandler.cpp.
|
noexcept |
Establish a connection to the given LE peer.
BT Core Spec v5.2: Vol 4, Part E HCI: 7.8.66 LE Extended Create Connection command (Bluetooth 5.0) if available, otherwise using BT Core Spec v5.2: Vol 4, Part E HCI: 7.8.12 LE Create Connection command
<p<blockquote>
Set window to the same value as the interval, enables continuous scanning.
The supervising timeout period is the time it takes before a devices gives up on the link if no packets are received. Hence this parameter influences the responsiveness on a link loss. A too small number may render the link too unstable, it should be at least 6 times of the connection interval.
To detect a link loss one can also send a regular ping to check whether the peripheral is still responding, see BTGattHandler::ping().
Implementation tries to mitigate HCIStatusCode::COMMAND_DISALLOWED failure due to any pending connection commands, waiting actively up to HCIEnv::HCI_COMMAND_COMPLETE_REPLY_TIMEOUT, testing every HCIEnv::HCI_COMMAND_POLL_PERIOD if resolved.
In case of no resolution, i.e. another HCI_LE_Create_Connection command is pending, HCIStatusCode::COMMAND_DISALLOWED will be returned by the underlying HCI host implementation.
Implementation tries to mitigate HCIStatusCode::CONNECTION_ALREADY_EXISTS failure due to a specific pending disconnect command, waiting actively up to HCIEnv::HCI_COMMAND_COMPLETE_REPLY_TIMEOUT, testing every HCIEnv::HCI_COMMAND_POLL_PERIOD if resolved.
In case of no resolution, i.e. the connection persists, HCIStatusCode::CONNECTION_ALREADY_EXISTS will be returned by the underlying HCI host implementation.
peer_bdaddr | |
peer_mac_type | |
own_mac_type | |
le_scan_interval | in units of 0.625ms, default value 24 for 15ms; Value range [4 .. 0x4000] for [2.5ms .. 10.24s] |
le_scan_window | in units of 0.625ms, default value 24 for 15ms; Value range [4 .. 0x4000] for [2.5ms .. 10.24s]. Shall be <= le_scan_interval |
conn_interval_min | in units of 1.25ms, default value 8 for 10ms; Value range [6 .. 3200] for [7.5ms .. 4000ms] |
conn_interval_max | in units of 1.25ms, default value 12 for 15ms; Value range [6 .. 3200] for [7.5ms .. 4000ms] |
conn_latency | slave latency in units of connection events, default value 0; Value range [0 .. 0x01F3]. See Range of [0 - getHCIMaxConnLatency()]. |
supervision_timeout | in units of 10ms, default value >= 10 x conn_interval_max; Value range [0xA-0x0C80] for [100ms - 32s]. We use 500ms minimum, i.e. getHCIConnSupervisorTimeout(0, 15, ::HCIConstInt::LE_CONN_MIN_TIMEOUT_MS). |
Definition at line 1276 of file HCIHandler.cpp.
|
noexcept |
Establish a connection to the given BREDR (non LE).
BT Core Spec v5.2: Vol 4, Part E HCI: 7.1.5 Create Connection command
<p<blockquote>
Implementation tries to mitigate HCIStatusCode::COMMAND_DISALLOWED failure due to any pending connection commands, waiting actively up to HCIEnv::HCI_COMMAND_COMPLETE_REPLY_TIMEOUT, testing every HCIEnv::HCI_COMMAND_POLL_PERIOD if resolved.
In case of no resolution, i.e. another HCI_Create_Connection command is pending, HCIStatusCode::COMMAND_DISALLOWED will be returned by the underlying HCI host implementation.
Implementation tries to mitigate HCIStatusCode::CONNECTION_ALREADY_EXISTS failure due to a specific pending disconnect command, waiting actively up to HCIEnv::HCI_COMMAND_COMPLETE_REPLY_TIMEOUT, testing every HCIEnv::HCI_COMMAND_POLL_PERIOD if resolved.
In case of no resolution, i.e. the connection persists, HCIStatusCode::CONNECTION_ALREADY_EXISTS will be returned by the underlying HCI host implementation.
Definition at line 1409 of file HCIHandler.cpp.
|
noexcept |
Disconnect an established connection.
BT Core Spec v5.2: Vol 4, Part E HCI: 7.1.6 Disconnect command
Definition at line 1485 of file HCIHandler.cpp.
|
noexcept |
BT Core Spec v5.2: Vol 4, Part E HCI: 7.8.38 LE Add Device To Resolving List command.
Definition at line 1510 of file HCIHandler.cpp.
|
noexcept |
BT Core Spec v5.2: Vol 4, Part E HCI: 7.8.39 LE Remove Device From Resolving List command.
Definition at line 1528 of file HCIHandler.cpp.
|
noexcept |
BT Core Spec v5.2: Vol 4, Part E HCI: 7.8.40 LE Clear Resolving List command.
Definition at line 1543 of file HCIHandler.cpp.
|
noexcept |
BT Core Spec v5.2: Vol 4, Part E HCI: 7.8.41 LE Read Resolving List Size command.
Definition at line 1555 of file HCIHandler.cpp.
|
noexcept |
BT Core Spec v5.2: Vol 4, Part E HCI: 7.8.42 LE Read Peer Resolvable Address command.
FIXME: May not be supported by Linux/BlueZ
Definition at line 1570 of file HCIHandler.cpp.
|
noexcept |
BT Core Spec v5.2: Vol 4, Part E HCI: 7.8.43 LE Read Local Resolvable Address command.
FIXME: May not be supported by Linux/BlueZ
Definition at line 1589 of file HCIHandler.cpp.
|
noexcept |
BT Core Spec v5.2: Vol 4, Part E HCI: 7.8.44 LE Set Address Resolution Enable command.
Definition at line 1608 of file HCIHandler.cpp.
|
noexcept |
Request and return LE_PHYs bit for the given connection.
BT Core Spec v5.2: Vol 4, Part E, 7.8.47 LE Read PHY command
Controller shall send a pending HCIMetaEventType::LE_PHY_UPDATE_COMPLETE event with SUCCESS after issuing this command in all cases (change or unchanged PHYs).
conn_handle | |
addressAndType | |
resTx | reference for the resulting transmitter LE_PHYs bit |
resRx | reference for the resulting receiver LE_PHYs bit |
Definition at line 1622 of file HCIHandler.cpp.
|
noexcept |
Sets default preference of used LE_PHYs for all subsequent LE connections.
BT Core Spec v5.2: Vol 4, Part E, 7.8.48 LE Set Default PHY command
Tx | transmitter LE_PHYs bit mask of preference if not set to LE_PHYs::NONE (ignored). |
Rx | receiver LE_PHYs bit mask of preference if not set to LE_PHYs::NONE (ignored). |
Definition at line 1678 of file HCIHandler.cpp.
|
noexcept |
Sets preference of used LE_PHYs for the given connection.
conn_handle | |
peerAddressAndType | |
Tx | transmitter LE_PHYs bit mask of preference if not set to LE_PHYs::NONE (ignored). |
Rx | receiver LE_PHYs bit mask of preference if not set to LE_PHYs::NONE (ignored). |
Definition at line 1712 of file HCIHandler.cpp.
|
noexcept |
Enables or disabled advertising.
if available, otherwise using
Advertising is active until either disabled via le_enable_adv(false) or a connection has been made, see isAdvertising().
enable |
Definition at line 1900 of file HCIHandler.cpp.
|
noexcept |
Starts advertising.
if available, otherwise using
Advertising is active until either disabled via le_enable_adv(false) or a connection has been made, see isAdvertising().
TODO:
eir | Full ADV EIR EInfoReport |
adv_mask | EIRDataType mask for EInfoReport to select advertisement EIR PDU data, defaults to EIRDataType::FLAGS | EIRDataType::SERVICE_UUID |
scanrsp_mask | EIRDataType mask for EInfoReport to select scan-response (active scanning) EIR PDU data, defaults to EIRDataType::NAME | EIRDataType::CONN_IVAL |
peer_bdaddr | EUI48 of directed peer, defaults to EUI48::ANY_DEVICE (zero address) |
own_mac_type | HCILEOwnAddressType::PUBLIC (default) or random/private. |
peer_mac_type | HCILEOwnAddressType::PUBLIC (default) or random/private. |
adv_interval_min | in units of 0.625ms, default value 160 for 100ms; Value range [0x0020 .. 0x4000] for [20ms .. 10.24s] |
adv_interval_max | in units of 0.625ms, default value 480 for 300ms; Value range [0x0020 .. 0x4000] for [20ms .. 10.24s] |
adv_type | see AD_PDU_Type, default AD_PDU_Type::ADV_IND |
adv_chan_map | bit 0: chan 37, bit 1: chan 38, bit 2: chan 39, default is 0x07 (all 3 channels enabled) |
filter_policy | 0x00 accepts all PDUs (default), 0x01 only of whitelisted, ... |
Definition at line 1970 of file HCIHandler.cpp.
|
noexcept |
MgmtEventCallback handling
Appends the given MgmtEventCallback to the named MgmtEvent::Opcode list, if it is not present already (opcode + callback).
opc | opcode index for callback list, the callback shall be added to |
cb | the to be added callback |
Definition at line 2197 of file HCIHandler.cpp.
|
noexcept |
Returns count of removed given MgmtEventCallback from the named MgmtEvent::Opcode list.
Definition at line 2206 of file HCIHandler.cpp.
|
noexcept |
Removes all MgmtEventCallbacks from the to the named MgmtEvent::Opcode list.
Definition at line 2214 of file HCIHandler.cpp.
void HCIHandler::addSMPMsgCallback | ( | const HCISMPMsgCallback & | l | ) |
Definition at line 2236 of file HCIHandler.cpp.
HCIHandler::size_type HCIHandler::removeSMPMsgCallback | ( | const HCISMPMsgCallback & | l | ) |
Definition at line 2239 of file HCIHandler.cpp.
|
noexcept |
Removes all MgmtEventCallbacks from all MgmtEvent::Opcode lists and all SMPSecurityReqCallbacks.
Definition at line 2221 of file HCIHandler.cpp.
|
noexcept |
Manually send a MgmtEvent to all of its listeners.
Definition at line 588 of file HCIHandler.cpp.
const HCIEnv& direct_bt::HCIHandler::env |
Definition at line 185 of file HCIHandler.hpp.