diff options
author | Sven Gothel <[email protected]> | 2020-06-04 04:11:12 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2020-06-04 04:11:12 +0200 |
commit | 73f5b4fc21d7a14aa174f2c48657ca3f2229dda1 (patch) | |
tree | 1b455d3e699600eb9f0c1ccc09d10ffd8052929b /api/direct_bt/BTIoctl.hpp | |
parent | 1c449ba2a4cede1e942ff9df181bf96a408d2c67 (diff) |
Introduce HCITypes + HCIHandler: Providing C++ basics for full HCI support; Misc..
Introduce HCITypes + HCIHandler: Providing C++ basics for full HCI support
============================================================================
- HCITypes defines the HCI command and event data structures,
similar to MgmtTypes and ATTPDUTypes.
For more coding efficiency we use template command and event classes, allowing to reuse
the HCIIoctl struct types being wrapped in the C++ classes
for flow and lifecycle control.
HCITypes further includes all essential 'enum class' command opcodes, event types etc,
ensuring type safety.
- HCIHandler defines the command/event workflow similar to GATTHandler and DBTManager.
One HCIHandler per DBTAdapter is being used, each HCIHandler using its
event reader thread and ringbuffer.
Socket event filtering and manual le-meta filtering ensures reduced workload (DoS safety).
Similar to HCITypes, we use template function to utilize
the template command and event classes, reuising the HCIIoctl struct types...
HCIHandler can be extended for more functionality as well as used to implement
our own DBTManager, i.e. Reducing HCIEvents to MgmtEvents with callback support.
At least this is a viable option now, if so desired (non-linux, etc).
- HCIComm: Contains the core I/O functionality only, dropped all semantic HCI code.
The latter resides in HCIHandler now.
- DBTAdapter now uses HCIHander instead of HCIComm, renamed field to simply 'hci'
Misc..
=======
- reduced all ringbuffer capacity to 128 from 256
- Moved Mgmt*EventCallback from DBTManager to MgmtTypes,
as we might want to reuse the MgmtTypes incl callbacks
for alternative DBTManager implementations.
- Added 'enum class' to underlying number type conversion pattern:
<NumberType> number('enum class type')
Avoiding the many static_cast<NumberType>(..) directives.
- align all Type -> String method names: 'get<Type>String(Type)'
- BasicTypes: Add safe uint32_t bitfield mask helper
Diffstat (limited to 'api/direct_bt/BTIoctl.hpp')
0 files changed, 0 insertions, 0 deletions